aboutsummaryrefslogtreecommitdiff
path: root/ports/mlpack
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2021-05-20 05:05:43 +0800
committerGitHub <noreply@github.com>2021-05-19 14:05:43 -0700
commitc99dc50be99c9656502d140e1d785a267ab233a4 (patch)
tree84bb9de6c33b93fc965dbde7915a53bf18ffea97 /ports/mlpack
parent3738723dd22fcba69c3f16497d4696aee0f48b51 (diff)
downloadvcpkg-c99dc50be99c9656502d140e1d785a267ab233a4.tar.gz
vcpkg-c99dc50be99c9656502d140e1d785a267ab233a4.zip
[vcpkg baseline][many ports] Fix build error (#17983)
* [vcpkg baseline][wxwidgets] Fix build error * [mlpack] Fix configure error (upstream bug) * [vcpkg baseline] [embree2/embree3] Set cmake policy * Remove control file * Update baseline version * [mlpack] Re-write the dependency * [mlpack] Remove dependency boost-test since only feature test need it, add more boost dependencies. * [mlpack] Add dependency boost-heap * [mlpack] Fix uwp build * update version record * [mlpack] Revert uwp fix * update version record * [mlpack] Remove dependency boost-test * update version record * update baseline * [clamav] Update hash * update version record Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
Diffstat (limited to 'ports/mlpack')
-rw-r--r--ports/mlpack/CONTROL9
-rw-r--r--ports/mlpack/fix-configure-error.patch15
-rw-r--r--ports/mlpack/fix-test-dependency.patch24
-rw-r--r--ports/mlpack/portfile.cmake2
-rw-r--r--ports/mlpack/vcpkg.json24
5 files changed, 65 insertions, 9 deletions
diff --git a/ports/mlpack/CONTROL b/ports/mlpack/CONTROL
deleted file mode 100644
index e424e6cad..000000000
--- a/ports/mlpack/CONTROL
+++ /dev/null
@@ -1,9 +0,0 @@
-Source: mlpack
-Version: 3.4.1
-Homepage: https://github.com/mlpack/mlpack
-Description: mlpack is a fast, flexible machine learning library, written in C++, that aims to provide fast, extensible implementations of cutting-edge machine learning algorithms.
-Build-Depends: boost, armadillo, ensmallen, stb
-Supports: !uwp
-
-Feature: tools
-Description: Build command-line executables.
diff --git a/ports/mlpack/fix-configure-error.patch b/ports/mlpack/fix-configure-error.patch
new file mode 100644
index 000000000..03a27077a
--- /dev/null
+++ b/ports/mlpack/fix-configure-error.patch
@@ -0,0 +1,15 @@
+diff --git a/CMake/go/AppendModel.cmake b/CMake/go/AppendModel.cmake
+index eeb28f7..ec50f15 100644
+--- a/CMake/go/AppendModel.cmake
++++ b/CMake/go/AppendModel.cmake
+@@ -44,8 +44,8 @@ function(append_model SERIALIZATION_FILE PROGRAM_MAIN_FILE)
+ else ()
+ string(APPEND GOMODEL_SAFE_TYPE ${MODEL_CHAR})
+ endif()
+- endif()
+- endforeach()
++ endforeach()
++ endif()
+
+ # See if the model type already exists.
+ file(READ "${SERIALIZATION_FILE}" SERIALIZATION_FILE_CONTENTS)
diff --git a/ports/mlpack/fix-test-dependency.patch b/ports/mlpack/fix-test-dependency.patch
new file mode 100644
index 000000000..1dbb5088d
--- /dev/null
+++ b/ports/mlpack/fix-test-dependency.patch
@@ -0,0 +1,24 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b59555c..4dd92f0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -441,11 +441,18 @@ set(Boost_ADDITIONAL_VERSIONS
+ set(Boost_NO_BOOST_CMAKE 1)
+ find_package(Boost "${BOOST_VERSION}"
+ COMPONENTS
+- unit_test_framework
+ serialization
+ REQUIRED
+ )
+
++if (BUILD_TESTS)
++ find_package(Boost "${BOOST_VERSION}"
++ COMPONENTS
++ unit_test_framework
++ REQUIRED
++ )
++endif()
++
+ if(0)
+ link_directories(${Boost_LIBRARY_DIRS})
+
diff --git a/ports/mlpack/portfile.cmake b/ports/mlpack/portfile.cmake
index bfc30ace7..51e2ac6f0 100644
--- a/ports/mlpack/portfile.cmake
+++ b/ports/mlpack/portfile.cmake
@@ -6,6 +6,8 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
cmakelists.patch
+ fix-configure-error.patch
+ fix-test-dependency.patch
)
file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACML.cmake)
diff --git a/ports/mlpack/vcpkg.json b/ports/mlpack/vcpkg.json
new file mode 100644
index 000000000..62317fa71
--- /dev/null
+++ b/ports/mlpack/vcpkg.json
@@ -0,0 +1,24 @@
+{
+ "name": "mlpack",
+ "version": "3.4.1",
+ "port-version": 1,
+ "description": "mlpack is a fast, flexible machine learning library, written in C++, that aims to provide fast, extensible implementations of cutting-edge machine learning algorithms.",
+ "homepage": "https://github.com/mlpack/mlpack",
+ "supports": "uwp",
+ "dependencies": [
+ "armadillo",
+ "boost-heap",
+ "boost-math",
+ "boost-program-options",
+ "boost-random",
+ "boost-serialization",
+ "boost-serialization",
+ "ensmallen",
+ "stb"
+ ],
+ "features": {
+ "tools": {
+ "description": "Build command-line executables."
+ }
+ }
+}