aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel <mcanteras@gmail.com>2019-02-27 00:18:43 +0100
committerPhil Christensen <philc@microsoft.com>2019-02-26 15:18:43 -0800
commitc05014eb91f15043c8a68e35c93e45ab34188255 (patch)
tree38fc31e1e263c9f3cfc906d11b19a0ca1e37c6bf
parent4a582b4d1dda94f1342a1ab281c06b9617841532 (diff)
downloadvcpkg-c05014eb91f15043c8a68e35c93e45ab34188255.tar.gz
vcpkg-c05014eb91f15043c8a68e35c93e45ab34188255.zip
[ensmallen] Add new port (#5421)
* [ensmallen] Add new port * [ensmallen] disable tests
-rw-r--r--ports/ensmallen/CONTROL5
-rw-r--r--ports/ensmallen/disable_tests.patch15
-rw-r--r--ports/ensmallen/portfile.cmake21
3 files changed, 41 insertions, 0 deletions
diff --git a/ports/ensmallen/CONTROL b/ports/ensmallen/CONTROL
new file mode 100644
index 000000000..9676b708b
--- /dev/null
+++ b/ports/ensmallen/CONTROL
@@ -0,0 +1,5 @@
+Source: ensmallen
+Version: 1.14.0
+Description: A header-only C++ library for mathematical optimization.
+Build-Depends: openblas, clapack, armadillo
+
diff --git a/ports/ensmallen/disable_tests.patch b/ports/ensmallen/disable_tests.patch
new file mode 100644
index 000000000..80dd7e869
--- /dev/null
+++ b/ports/ensmallen/disable_tests.patch
@@ -0,0 +1,15 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1577be5..b0171b2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -57,6 +57,7 @@ install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/ensmallen_bits"
+ install(FILES ${CMAKE_SOURCE_DIR}/include/ensmallen.hpp
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/include")
+
+-enable_testing()
+-
+-add_subdirectory(tests)
++# Disable tests
++#enable_testing()
++#
++#add_subdirectory(tests)
diff --git a/ports/ensmallen/portfile.cmake b/ports/ensmallen/portfile.cmake
new file mode 100644
index 000000000..dd03620f5
--- /dev/null
+++ b/ports/ensmallen/portfile.cmake
@@ -0,0 +1,21 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mlpack/ensmallen
+ REF ensmallen-1.14.0
+ SHA512 a0b3660a0d01f5bc79fe302f08161a0b4d16fa006cc1d95cf24e046d2a4ab48de49b7644023837ed93426b982fbd0861d6c2774c0a80f4d2392ce494291ff70a
+ HEAD_REF master
+ PATCHES
+ disable_tests.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+vcpkg_install_cmake()
+
+file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ensmallen RENAME copyright)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)