From ae51d57e99d442adb38fedb14063891ecf9185d0 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Thu, 18 Apr 2019 14:51:07 -0700 Subject: [armadillo] Use new GitLab repository and enable Linux (#6130) * [armadillo] use new gitlab repository, update to latest commit, now it builds on linux and enables also mlpack to be built on linux * [armadillo] change ref to another version, the newest one disappeared * [armadillo] Bump CONTROL version --- ports/armadillo/ArmadilloConfig.cmake | 4 --- ports/armadillo/CONTROL | 6 ++-- ports/armadillo/disable-wrapper.patch | 50 -------------------------- ports/armadillo/portfile.cmake | 68 +++++++++++++++-------------------- ports/armadillo/usage | 5 --- 5 files changed, 32 insertions(+), 101 deletions(-) delete mode 100644 ports/armadillo/ArmadilloConfig.cmake delete mode 100644 ports/armadillo/disable-wrapper.patch delete mode 100644 ports/armadillo/usage diff --git a/ports/armadillo/ArmadilloConfig.cmake b/ports/armadillo/ArmadilloConfig.cmake deleted file mode 100644 index 4658b665c..000000000 --- a/ports/armadillo/ArmadilloConfig.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set(ARMADILLO_FOUND TRUE) -set(ARMADILLO_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include") -set(ARMADILLO_LIBRARY_DIRS) -set(ARMADILLO_LIBRARIES) diff --git a/ports/armadillo/CONTROL b/ports/armadillo/CONTROL index 59a3ba1f4..d8edd620e 100644 --- a/ports/armadillo/CONTROL +++ b/ports/armadillo/CONTROL @@ -1,3 +1,3 @@ -Source: armadillo -Version: 8.400.0-1 -Description: Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use +Source: armadillo +Version: 2019-04-16-f00d3225 +Description: Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use diff --git a/ports/armadillo/disable-wrapper.patch b/ports/armadillo/disable-wrapper.patch deleted file mode 100644 index 06eb4a776..000000000 --- a/ports/armadillo/disable-wrapper.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7924a8f..853c2ee 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -27,7 +27,7 @@ include(CheckLibraryExists) - ## You will then need to link your programs with -lblas -llapack instead of -larmadillo - ## If you're using OpenBLAS, link your programs with -lopenblas -llapack instead of -larmadillo - --set(ARMA_USE_WRAPPER true) -+set(ARMA_USE_WRAPPER false) - - - # the settings below will be automatically configured by the rest of this script -@@ -379,7 +379,7 @@ message(STATUS "Generating ${PROJECT_BINARY_DIR}/tmp/include/config.hpp") - configure_file(${PROJECT_BINARY_DIR}/tmp/include/armadillo_bits/config.hpp.cmake ${PROJECT_BINARY_DIR}/tmp/include/armadillo_bits/config.hpp) - - message(STATUS "Generating ${PROJECT_SOURCE_DIR}/examples/Makefile") --configure_file(${PROJECT_SOURCE_DIR}/examples/Makefile.cmake ${PROJECT_SOURCE_DIR}/examples/Makefile) -+#configure_file(${PROJECT_SOURCE_DIR}/examples/Makefile.cmake ${PROJECT_SOURCE_DIR}/examples/Makefile) - - - include_directories(${PROJECT_BINARY_DIR}/tmp/include/ ${CMAKE_REQUIRED_INCLUDES}) -@@ -439,11 +439,13 @@ PATTERN "*~" EXCLUDE - PATTERN "*orig" EXCLUDE - ) - -+if(ARMA_USE_WRAPPER) - install(TARGETS armadillo EXPORT ArmadilloLibraryDepends - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -- -+endif() -+ - # Export the package for use from the build-tree - # (this registers the build-tree with a global CMake-registry) - export(PACKAGE armadillo) -@@ -465,10 +467,11 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake_aux/InstallFiles/ArmadilloConfigVersi - "${PROJECT_BINARY_DIR}/ArmadilloConfigVersion.cmake" @ONLY) - - # Install the export set for use with the install-tree -+if(ARMA_USE_WRAPPER) - install(EXPORT ArmadilloLibraryDepends DESTINATION - "${CMAKE_INSTALL_DATADIR}/Armadillo/CMake" - COMPONENT dev) -- -+endif() - - ## GLOBAL INSTALL FILES - # Create ArmadilloConfig.cmake file for the use from the install tree diff --git a/ports/armadillo/portfile.cmake b/ports/armadillo/portfile.cmake index b8240089c..8031c7964 100644 --- a/ports/armadillo/portfile.cmake +++ b/ports/armadillo/portfile.cmake @@ -1,39 +1,29 @@ -include(vcpkg_common_functions) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message("Armadillo only supports static library linkage") - set(VCPKG_LIBRARY_LINKAGE static) -endif() - -#as conradsnicta/armadillo-code has no release, and the link http://sourceforge.net/projects/arma/files/armadillo-8.400.0.tar.xz is not worked, I use the latest commit for 8.400.x branch -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO conradsnicta/armadillo-code - REF a25f66da4c27d40a4a7699199cbf4dc747e712a7 - SHA512 bf5e1de18c38503e46f72f4f9f145477b6b782baf0df42600acb8811c7a07a5d8c0cd2ac3015d4169c961876e4cbb0457a7c1417b55ba52c98d4f78d145f9ae6 - HEAD_REF unstable -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-wrapper.patch -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DDETECT_HDF5=false -) - -vcpkg_install_cmake() - -vcpkg_copy_pdbs() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Armadillo/CMake) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/ArmadilloConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Armadillo) - -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Armadillo RENAME copyright) +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO conradsnicta/armadillo-code + REF f00d3225b1c005775044369723f31cecc3cd6569 + SHA512 ca3574edf5de8c752867403c3856ed9569fbed2ce9729585cae59be5751493c2e71121319b0a812e2ea56baada6b6f62fbc84ce6f1efb362347e5fd4141ccf1b + HEAD_REF 9.400.x +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDETECT_HDF5=false +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/Armadillo/CMake TARGET_PATH share/armadillo) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Armadillo RENAME copyright) diff --git a/ports/armadillo/usage b/ports/armadillo/usage deleted file mode 100644 index 26d82f0ef..000000000 --- a/ports/armadillo/usage +++ /dev/null @@ -1,5 +0,0 @@ -The package armadillo is compatible with built-in CMake targets: - - find_package(Armadillo CONFIG REQUIRED) - target_include_directories(main PRIVATE ${ARMADILLO_INCLUDE_DIRS}) - target_link_libraries(main PRIVATE ${ARMADILLO_LIBRARIES}) -- cgit v1.2.3