diff options
| author | Stefano Sinigardi <stesinigardi@hotmail.com> | 2019-06-01 00:48:17 +0200 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2019-05-31 15:48:17 -0700 |
| commit | 5898891125b00a3ec2b698bc496735ab997669f5 (patch) | |
| tree | ea6f52bc69dec26f7c88d6766234a7c507607a06 /ports/mlpack | |
| parent | 26a9338c5055193915290527eacb37f2ac7fdcb8 (diff) | |
| download | vcpkg-5898891125b00a3ec2b698bc496735ab997669f5.tar.gz vcpkg-5898891125b00a3ec2b698bc496735ab997669f5.zip | |
[openexr,openimageio,suitesparse,theia] updates for non-win32 (#6371)
* [openexr,openimageio,suitesparse,theia] updates for non-win32
* [theia] use only valid cmake symbols
* [suitesparse] Fix build
* [lapack] still not properly integrating with other ports
* [lapack] intercept cmake module calls and substitute them with our defs
* [suitesparse,clapack] fixes for proper integration
* [ceres,clapack] bump CONTROL
* [suitesparse] remove unnecessary defs
* [clapack] improve wrapper logic
* [WIN32] remove wrong symbol
* [clapack] fix wrapper integration
* [Accelerate] use best framework when available
* [clapack] separate config from wrapper
* [clapack] fix paths and filenames
* [mlpack,armadillo,clapack] improve library handling
* [mlpack] remove unnecessary cmake option
* [clp,coinutils,osi,liblemon] dependencies of openmvg, improve compatibility with non-win32
* [openmvg] fix for case-sensitive filesystems
* [clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps
* [sophus] Force rebuild
* [theia] fixes for linux, part1
* [io2d] remove broken sintax
* [fontconfig] bump version to remove CI cached failure
* [theia] fixes for linux, part2
* [theia] remove unnecessary empty folders and comments from portfile
* [theia] use correct build type removing forced vars in cmakelists.txt
* [openmvg] add missing suitesparse target detection
* [sophus] fix Suitesparse dependency
* [sophus,openmvg] use suitesparse lowercase for module compatibility on case-sensitive filesystems
* [suitesparse] fixes for case-sensitive filesystems
* [openmvg] use correct Eigen3 name for case-sensitive filesystems
* [sophus] trigger rebuild
* [shogun] use modern vcpkg style
* [shogun] add missing cmake system processor symbol
Diffstat (limited to 'ports/mlpack')
| -rw-r--r-- | ports/mlpack/CONTROL | 14 | ||||
| -rw-r--r-- | ports/mlpack/cmakelists.patch | 96 | ||||
| -rw-r--r-- | ports/mlpack/portfile.cmake | 34 |
3 files changed, 82 insertions, 62 deletions
diff --git a/ports/mlpack/CONTROL b/ports/mlpack/CONTROL index d57aa4ca3..75cc21eb4 100644 --- a/ports/mlpack/CONTROL +++ b/ports/mlpack/CONTROL @@ -1,7 +1,7 @@ -Source: mlpack
-Version: 3.1.0-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.
-Build-Depends: openblas, clapack, boost, armadillo
-
-Feature: tools
-Description: Build command-line executables and tests.
+Source: mlpack +Version: 3.1.0-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. +Build-Depends: openblas (!osx), clapack (!osx), boost, armadillo, ensmallen + +Feature: tools +Description: Build command-line executables and tests. diff --git a/ports/mlpack/cmakelists.patch b/ports/mlpack/cmakelists.patch index 6c39a4293..a4ef8f119 100644 --- a/ports/mlpack/cmakelists.patch +++ b/ports/mlpack/cmakelists.patch @@ -1,42 +1,54 @@ ---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -284,7 +284,7 @@
- # script Armadillo uses to find these.
- if (WIN32)
- find_library(LAPACK_LIBRARY
-- NAMES lapack liblapack lapack_win32_MT lapack_win32
-+ NAMES clapack lapack liblapack lapack_win32_MT lapack_win32
- PATHS "C:/Program Files/Armadillo"
- PATH_SUFFIXES "examples/lib_win32/")
-
-@@ -293,7 +293,7 @@
- endif ()
-
- find_library(BLAS_LIBRARY
-- NAMES blas libblas blas_win32_MT blas_win32
-+ NAMES openblas blas libblas blas_win32_MT blas_win32
- PATHS "C:/Program Files/Armadillo"
- PATH_SUFFIXES "examples/lib_win32/")
-
-@@ -392,19 +392,11 @@
- 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})
-
- 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})
-+set(MLPACK_LIBRARY_DIRS ${MLPACK_LIBRARY_DIRS} ${Boost_LIBRARIES})
-
- # For Boost testing framework (will have no effect on non-testing executables).
- # This specifies to Boost that we are dynamically linking to the Boost test
+diff --git a/CMakeLists.txt b/CMakeLists.txt +index 26dfd6e..5e287d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -283,25 +283,8 @@ 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) + set(ARMADILLO_LIBRARIES + ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY}) + endif () +@@ -392,19 +375,11 @@ 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}) + + 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}) ++set(MLPACK_LIBRARY_DIRS ${MLPACK_LIBRARY_DIRS} ${Boost_LIBRARIES}) + + # For Boost testing framework (will have no effect on non-testing executables). + # This specifies to Boost that we are dynamically linking to the Boost test diff --git a/ports/mlpack/portfile.cmake b/ports/mlpack/portfile.cmake index c7bf89bc1..20cbc882e 100644 --- a/ports/mlpack/portfile.cmake +++ b/ports/mlpack/portfile.cmake @@ -6,11 +6,20 @@ vcpkg_from_github( REF mlpack-3.1.0 SHA512 dc305a9a2f7232d3957206a346d0ac97ba13b933d5dbef45329002b8380ecc0982621c0b97f6c5ee82d0a26ad53b1cdd7a9b991fb749efc8546394988ac40a5b HEAD_REF master - PATCHES - cmakelists.patch + PATCHES + cmakelists.patch ) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" MLPACK_SHARED_LIBS) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACML.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACMLMP.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindARPACK.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindBLAS.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindCBLAS.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindCLAPACK.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindLAPACK.cmake) +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) @@ -20,10 +29,9 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DBUILD_TESTS=${BUILD_TOOLS} - -DBUILD_CLI_EXECUTABLES=${BUILD_TOOLS} - -DBUILD_SHARED_LIBS=${MLPACK_SHARED_LIBS} + OPTIONS + -DBUILD_TESTS=${BUILD_TOOLS} + -DBUILD_CLI_EXECUTABLES=${BUILD_TOOLS} ) vcpkg_install_cmake() vcpkg_copy_pdbs() @@ -31,12 +39,12 @@ vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/mlpack RENAME copyright) if(BUILD_TOOLS) - 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}) - file(REMOVE ${MLPACK_TOOLS}) - file(GLOB MLPACK_TOOLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) - file(REMOVE ${MLPACK_TOOLS_DEBUG}) + 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}) + file(REMOVE ${MLPACK_TOOLS}) + file(GLOB MLPACK_TOOLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${MLPACK_TOOLS_DEBUG}) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) |
