From 9b24d40e51b817d4d8a4235fd1b30401d4ab57f3 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 14 Jul 2021 01:40:16 -0700 Subject: [PATCH 1/5] [mlpack] Add feature openmp --- ports/mlpack/fix-dependencies.patch | 13 +++++++++++++ ports/mlpack/portfile.cmake | 4 +++- ports/mlpack/vcpkg.json | 5 ++++- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 ports/mlpack/fix-dependencies.patch diff --git a/ports/mlpack/fix-dependencies.patch b/ports/mlpack/fix-dependencies.patch new file mode 100644 index 00000000000000..2de2682ac416c4 --- /dev/null +++ b/ports/mlpack/fix-dependencies.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4dd92f0..bfa697d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -488,7 +488,7 @@ add_definitions(-DBOOST_TEST_DYN_LINK) + # } + # #endif + if (USE_OPENMP) +- find_package(OpenMP) ++ find_package(OpenMP REQUIRED) + endif () + + if (OPENMP_FOUND) diff --git a/ports/mlpack/portfile.cmake b/ports/mlpack/portfile.cmake index 51e2ac6f060610..97ab0affee4d68 100644 --- a/ports/mlpack/portfile.cmake +++ b/ports/mlpack/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( cmakelists.patch fix-configure-error.patch fix-test-dependency.patch + fix-dependencies.patch ) file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACML.cmake) @@ -22,7 +23,8 @@ file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindOpenBLAS.cmake) file(REMOVE ${SOURCE_PATH}/CMake/FindArmadillo.cmake) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - tools BUILD_CLI_EXECUTABLES + tools BUILD_CLI_EXECUTABLES + openmp USE_OPENMP ) vcpkg_configure_cmake( diff --git a/ports/mlpack/vcpkg.json b/ports/mlpack/vcpkg.json index 62317fa71eec19..e957717084721c 100644 --- a/ports/mlpack/vcpkg.json +++ b/ports/mlpack/vcpkg.json @@ -1,7 +1,7 @@ { "name": "mlpack", "version": "3.4.1", - "port-version": 1, + "port-version": 2, "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", @@ -19,6 +19,9 @@ "features": { "tools": { "description": "Build command-line executables." + }, + "openmp": { + "description": "use OpenMP for parallelization." } } } From 72c289ff31c830e20171b03592985e3754934fcc Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 14 Jul 2021 01:41:58 -0700 Subject: [PATCH 2/5] format manifest --- ports/mlpack/vcpkg.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/mlpack/vcpkg.json b/ports/mlpack/vcpkg.json index e957717084721c..2998ba1f5ce855 100644 --- a/ports/mlpack/vcpkg.json +++ b/ports/mlpack/vcpkg.json @@ -17,11 +17,11 @@ "stb" ], "features": { - "tools": { - "description": "Build command-line executables." - }, "openmp": { "description": "use OpenMP for parallelization." + }, + "tools": { + "description": "Build command-line executables." } } } From f5bb06f1d3d9f7de4f600543b37f425d9a92b8fd Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 14 Jul 2021 01:42:11 -0700 Subject: [PATCH 3/5] add version stuff --- versions/baseline.json | 2 +- versions/m-/mlpack.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 1d13df61403923..f28b4b17c093ee 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4070,7 +4070,7 @@ }, "mlpack": { "baseline": "3.4.1", - "port-version": 1 + "port-version": 2 }, "mman": { "baseline": "git-f5ff813-3", diff --git a/versions/m-/mlpack.json b/versions/m-/mlpack.json index 585e56e2741986..14d3a50305deda 100644 --- a/versions/m-/mlpack.json +++ b/versions/m-/mlpack.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3bd9b5e857e2aacc12e3f52e46b583fda35ce557", + "version": "3.4.1", + "port-version": 2 + }, { "git-tree": "4793fb5802e10e645d5d33e0ec2baf6f1a0a337b", "version": "3.4.1", From 79eecb8f8ff87edc9358f3395be89506153b3415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Thu, 15 Jul 2021 14:46:28 +0800 Subject: [PATCH 4/5] Update ports/mlpack/portfile.cmake --- ports/mlpack/portfile.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/mlpack/portfile.cmake b/ports/mlpack/portfile.cmake index 97ab0affee4d68..058bcf9f8740a0 100644 --- a/ports/mlpack/portfile.cmake +++ b/ports/mlpack/portfile.cmake @@ -23,8 +23,9 @@ file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindOpenBLAS.cmake) file(REMOVE ${SOURCE_PATH}/CMake/FindArmadillo.cmake) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - tools BUILD_CLI_EXECUTABLES - openmp USE_OPENMP + FEATURES + tools BUILD_CLI_EXECUTABLES + openmp USE_OPENMP ) vcpkg_configure_cmake( From 06da5dcdd87d94d5b86ebc138554087fbef23aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Fri, 16 Jul 2021 10:03:24 +0800 Subject: [PATCH 5/5] Update versions/m-/mlpack.json --- versions/m-/mlpack.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/mlpack.json b/versions/m-/mlpack.json index 14d3a50305deda..cb0e68931db259 100644 --- a/versions/m-/mlpack.json +++ b/versions/m-/mlpack.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "3bd9b5e857e2aacc12e3f52e46b583fda35ce557", + "git-tree": "587ee2575ef7543ff9a0ed30e645154db26f0001", "version": "3.4.1", "port-version": 2 },