diff options
| author | Phoebe <20694052+PhoebeHui@users.noreply.github.com> | 2020-03-11 08:15:34 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-10 17:15:34 -0700 |
| commit | f41d64c18f4c2a8c417e1112b550549df4e82adb (patch) | |
| tree | d004f1a6d4fb56de394d904bccc9ae9d3f5ea874 | |
| parent | 330ef69f9edb488bfb18947e4d3cb6d681ddc4b9 (diff) | |
| download | vcpkg-f41d64c18f4c2a8c417e1112b550549df4e82adb.tar.gz vcpkg-f41d64c18f4c2a8c417e1112b550549df4e82adb.zip | |
[mlpack ensmallen] Update to latest revision (#10070)
| -rw-r--r-- | ports/ensmallen/CONTROL | 3 | ||||
| -rw-r--r-- | ports/ensmallen/disable_tests.patch | 15 | ||||
| -rw-r--r-- | ports/ensmallen/portfile.cmake | 15 | ||||
| -rw-r--r-- | ports/mlpack/CONTROL | 3 | ||||
| -rw-r--r-- | ports/mlpack/blas_lapack.patch | 13 | ||||
| -rw-r--r-- | ports/mlpack/cmakelists.patch | 100 | ||||
| -rw-r--r-- | ports/mlpack/portfile.cmake | 19 |
7 files changed, 85 insertions, 83 deletions
diff --git a/ports/ensmallen/CONTROL b/ports/ensmallen/CONTROL index 024a7617b..2a93222c6 100644 --- a/ports/ensmallen/CONTROL +++ b/ports/ensmallen/CONTROL @@ -1,5 +1,6 @@ Source: ensmallen -Version: 1.15.1 +Version: 2.11.2 +Homepage: https://github.com/mlpack/ensmallen Description: A header-only C++ library for mathematical optimization. Build-Depends: openblas (!osx), clapack (!osx), armadillo diff --git a/ports/ensmallen/disable_tests.patch b/ports/ensmallen/disable_tests.patch deleted file mode 100644 index 80dd7e869..000000000 --- a/ports/ensmallen/disable_tests.patch +++ /dev/null @@ -1,15 +0,0 @@ -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 index edded904a..065d12981 100644 --- a/ports/ensmallen/portfile.cmake +++ b/ports/ensmallen/portfile.cmake @@ -1,21 +1,20 @@ -include(vcpkg_common_functions)
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mlpack/ensmallen
- REF 8bea8d214b40be3cb42e817328c0791541fbcd6c - SHA512 b075b763c136c1d2d5088c533a8557e3d425da7bcfeb3748063c1e3225e58969eddfc5bd786cb02f29f71ea5e3288327481a0961f64b1d2ff1251a0f59c07779
+ REF ba0897d57f52db9578e5e44426eb3220d5bd917f # v2.11.2 + SHA512 715c87b407487c1b5f1b2e95c23151c80d84bda8e5bd879f71e41871bc9a10bb157acf67fa2814b180da4c426a842bf84f29ce0d3bd3a2df4bfab382f5bb04d3
HEAD_REF master
- PATCHES
- disable_tests.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
+ OPTIONS
+ -DBUILD_TESTS=OFF
)
vcpkg_install_cmake()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
+
+file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
-file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ensmallen RENAME copyright)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
diff --git a/ports/mlpack/CONTROL b/ports/mlpack/CONTROL index e76327ca5..f7416c2cd 100644 --- a/ports/mlpack/CONTROL +++ b/ports/mlpack/CONTROL @@ -1,5 +1,6 @@ Source: mlpack -Version: 3.1.1-1 +Version: 3.2.2 +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: openblas (!osx), clapack (!osx), boost, armadillo, ensmallen diff --git a/ports/mlpack/blas_lapack.patch b/ports/mlpack/blas_lapack.patch deleted file mode 100644 index 2b9e44597..000000000 --- a/ports/mlpack/blas_lapack.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b158498..50f1def 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -286,7 +286,7 @@ if (WIN32)
- find_package(LAPACK)
- find_package(BLAS)
- set(ARMADILLO_LIBRARIES
-- ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY})
-+ ${ARMADILLO_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
- endif ()
-
- # Include directories for the previous dependencies.
diff --git a/ports/mlpack/cmakelists.patch b/ports/mlpack/cmakelists.patch index 05810f57f..9db41f912 100644 --- a/ports/mlpack/cmakelists.patch +++ b/ports/mlpack/cmakelists.patch @@ -1,48 +1,80 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 26757a5..c200b40 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -283,25 +283,8 @@
+@@ -288,6 +288,7 @@ endif()
# and find LAPACK and BLAS ourselves, using a slightly modified variant of the
# script Armadillo uses to find these.
if (WIN32)
-- find_library(LAPACK_LIBRARY
-- NAMES lapack liblapack lapack_win32_MT lapack_win32
-- PATHS "C:/Program Files/Armadillo"
-- PATH_SUFFIXES "examples/lib_win32/")
--
-- if (NOT LAPACK_LIBRARY)
-- message(FATAL_ERROR "Cannot find LAPACK library (.lib)!")
-- endif ()
--
-- find_library(BLAS_LIBRARY
-- NAMES blas libblas blas_win32_MT blas_win32
-- PATHS "C:/Program Files/Armadillo"
-- PATH_SUFFIXES "examples/lib_win32/")
--
-- if (NOT BLAS_LIBRARY)
-- message(FATAL_ERROR "Cannot find BLAS library (.lib)!")
-- endif ()
--
-- # Piggyback LAPACK and BLAS linking into Armadillo link.
-+ find_package(LAPACK)
-+ find_package(BLAS)
++ if(0)
+ find_library(LAPACK_LIBRARY
+ NAMES lapack liblapack lapack_win32_MT lapack_win32
+ PATHS "C:/Program Files/Armadillo"
+@@ -305,24 +306,31 @@ if (WIN32)
+ if (NOT BLAS_LIBRARY)
+ message(FATAL_ERROR "Cannot find BLAS library (.lib)!")
+ endif ()
++ endif()
+
++ find_package(clapack CONFIG REQUIRED)
++ set(LAPACK_LIBRARIES lapack)
++ find_package(OpenBLAS CONFIG REQUIRED)
++ set(BLAS_LIBRARIES OpenBLAS::OpenBLAS)
+ # Piggyback LAPACK and BLAS linking into Armadillo link.
set(ARMADILLO_LIBRARIES
- ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY})
+- ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY})
++ ${ARMADILLO_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+
+ # Ensure that the libraries are added to the MSVC IDE runtime path.
+- get_filename_component(BLAS_DIR ${BLAS_LIBRARY} DIRECTORY)
+- get_filename_component(LAPACK_DIR ${LAPACK_LIBRARY} DIRECTORY)
++ get_property(BLAS_DIR TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_LOCATION_RELEASE)
++ get_filename_component(BLAS_DIR ${BLAS_DIR} DIRECTORY)
++ get_property(LAPACK_DIR TARGET lapack PROPERTY IMPORTED_LOCATION_RELEASE)
++ get_filename_component(LAPACK_DIR ${LAPACK_DIR} DIRECTORY)
+
+ # Sometimes, especially with an OpenBLAS install via nuget, the DLLs are
+ # actually in ../../bin/x64/. Automatically add these.
+- if (EXISTS "${BLAS_DIR}/../../bin/x64/")
+- get_filename_component(BLAS_DLL_DIR "${BLAS_DIR}/../../bin/x64" ABSOLUTE)
++ if (EXISTS "${BLAS_DIR}")
++ get_filename_component(BLAS_DLL_DIR "${BLAS_DIR}" ABSOLUTE)
+ set(DLL_COPY_DIRS ${DLL_COPY_DIRS} "${BLAS_DLL_DIR}")
+ endif ()
+
+- if (EXISTS "${LAPACK_DIR}/../../bin/x64/")
+- get_filename_component(LAPACK_DLL_DIR "${LAPACK_DIR}/../../bin/x64" ABSOLUTE)
++ if (EXISTS "${LAPACK_DIR}")
++ get_filename_component(LAPACK_DLL_DIR "${LAPACK_DIR}" ABSOLUTE)
+ set(DLL_COPY_DIRS ${DLL_COPY_DIRS} "${BLAS_DLL_DIR}")
+ endif ()
endif ()
-@@ -395,19 +378,11 @@
+@@ -415,8 +423,8 @@ if (NOT ENSMALLEN_FOUND)
+ "Successfully downloaded ensmallen into ${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/")
+
+ # Now we have to also ensure these header files get installed.
+- install(DIRECTORY "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen_bits/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ensmallen_bits")
+- install(FILES "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen.hpp" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
++ #install(DIRECTORY "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen_bits/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ensmallen_bits")
++ #install(FILES "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen.hpp" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+ else ()
+ message(FATAL_ERROR "Problem unpacking ensmallen! Expected only one directory ensmallen-x.y.z/; found ${ENS_DIRECTORIES}. Try removing the directory ${CMAKE_BINARY_DIR}/deps and reconfiguring.")
+ endif ()
+@@ -472,6 +480,7 @@ find_package(Boost 1.49
REQUIRED
)
--link_directories(${Boost_LIBRARY_DIRS})
--
--# In Visual Studio, automatic linking is performed, so we don't need to worry
--# about it. Clear the list of libraries to link against and let Visual Studio
--# handle it.
--if (MSVC)
-- link_directories(${Boost_LIBRARY_DIRS})
-- set(Boost_LIBRARIES "")
--endif ()
-+link_directories(${Boost_LIBRARIES})
++if(0)
+ link_directories(${Boost_LIBRARY_DIRS})
+
+ # In Visual Studio, automatic linking is performed, so we don't need to worry
+@@ -483,10 +492,12 @@ if (MSVC)
+ message("boost lib dirs ${Boost_LIBRARY_DIRS}")
+ set(Boost_LIBRARIES "")
+ endif ()
++endif()
++link_directories(${Boost_LIBRARIES})
set(MLPACK_INCLUDE_DIRS ${MLPACK_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} ${Boost_LIBRARIES})
-set(MLPACK_LIBRARY_DIRS ${MLPACK_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS})
diff --git a/ports/mlpack/portfile.cmake b/ports/mlpack/portfile.cmake index 6bde064f4..71d110b48 100644 --- a/ports/mlpack/portfile.cmake +++ b/ports/mlpack/portfile.cmake @@ -1,14 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mlpack/mlpack - REF mlpack-3.1.1 - SHA512 4acef74da951934b9bd1cabd87b9d6d002c80eb3218f69755277fa654d928aed379a5e63987f32ec162cc005c2952e618d6d528c2311aebb8cd2cc01cab71f86 + REF a8af4882af5e163ae8c8023653c66c8914ac1c22 # 3.2.2 + SHA512 879dd24f6cface3e6e1a0990e912ca4463060725c7c105e1e7d228c90123b1f44728cbe1ae327fa20e0e4981626a5d1eb2c411257899ef849c9600891616eed4 HEAD_REF master PATCHES cmakelists.patch - blas_lapack.patch ) file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACML.cmake) @@ -22,10 +19,9 @@ file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindMKL.cmake) file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindOpenBLAS.cmake) file(REMOVE ${SOURCE_PATH}/CMake/FindArmadillo.cmake) -set(BUILD_TOOLS OFF) -if("tools" IN_LIST FEATURES) - set(BUILD_TOOLS ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools BUILD_TOOLS +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -33,13 +29,14 @@ vcpkg_configure_cmake( OPTIONS -DBUILD_TESTS=${BUILD_TOOLS} -DBUILD_CLI_EXECUTABLES=${BUILD_TOOLS} + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() vcpkg_copy_pdbs() -file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/mlpack RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -if(BUILD_TOOLS) +if("tools" IN_LIST FEATURES) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) file(GLOB MLPACK_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(COPY ${MLPACK_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) |
