armadillo: more dependencies and BLAS fixup
This commit is contained in:
parent
385b569930
commit
171ca63ad6
|
@ -21,16 +21,21 @@ PKG_MINOR= 40
|
|||
DIST_MINOR= ${PKG_MINOR}0
|
||||
|
||||
CMAKE_ARGS+= -DINSTALL_LIB_DIR=${PREFIX}/lib
|
||||
CONFIGURE_ENV+= LAPACK_LIBS=${LAPACK_LIBS:Q} BLAS_LIBS=${BLAS_LIBS:Q}
|
||||
|
||||
SUBST_CLASSES= minor
|
||||
SUBST_STAGE.minor= post-patch
|
||||
SUBST_FILES.minor= CMakeLists.txt
|
||||
SUBST_SED.minor= -e "s|ARMA_MINOR ${DIST_MINOR}|ARMA_MINOR ${PKG_MINOR}|g"
|
||||
|
||||
# Upstream requires both lapack and openblas, so we cannot use
|
||||
# mk/blas.buildlink.mk without extensive hacking
|
||||
.include "../../wip/openblas/buildlink3.mk"
|
||||
.include "../../wip/lapack/buildlink3.mk"
|
||||
# wip/superlu has that because I do not know better how to force
|
||||
# a specifc blas lib (easily). We need to ensure to avoid mixing BLAS libs.
|
||||
# If this setting is dropped, it should be dropped for both.
|
||||
BLAS_ACCEPTED= openblas netlib
|
||||
|
||||
.include "../../wip/mk/blas.buildlink3.mk"
|
||||
.include "../../wip/superlu/buildlink3.mk"
|
||||
.include "../../math/arpack/buildlink3.mk"
|
||||
.include "../../devel/boost-libs/buildlink3.mk"
|
||||
.include "../../devel/boost-headers/buildlink3.mk"
|
||||
.include "../../devel/hdf5/buildlink3.mk"
|
||||
|
|
|
@ -4,3 +4,4 @@ SHA1 (armadillo-9.400.3.tar.xz) = 142acafa7801613b01965a113267211d09e421dc
|
|||
RMD160 (armadillo-9.400.3.tar.xz) = e1d73d9c5cb9eed997ca294fee85d5c649a8ef90
|
||||
SHA512 (armadillo-9.400.3.tar.xz) = ae35f6d2e45202af4f5ef4516467c38a064ca2c1796d5c03ab389c31b800e8eea110b9035912a742c3f297234890b57f91918a40df071db5ebb20ec74b18ada5
|
||||
Size (armadillo-9.400.3.tar.xz) = 4798164 bytes
|
||||
SHA1 (patch-CMakeLists.txt) = bb6d8eaa1e4301e5280b2784e7e071922c0a0a0f
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
$Netbsd$
|
||||
|
||||
Make the build use LAPACK_LIBS and BLAS_LIBS from the environment.
|
||||
Could this be acceptible to upstream?
|
||||
|
||||
--- CMakeLists.txt.orig 2020-02-24 22:11:41.093696230 +0100
|
||||
+++ CMakeLists.txt 2020-02-24 22:14:52.780347663 +0100
|
||||
@@ -151,6 +151,16 @@
|
||||
##
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake_aux/Modules/")
|
||||
+if(APPLE)
|
||||
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
+ message(STATUS "Clang compiler on MacOS X detected. Added '-stdlib=libc++' to compiler flags")
|
||||
+ endif()
|
||||
+
|
||||
+ set(CMAKE_MACOSX_RPATH 1)
|
||||
+endif()
|
||||
+
|
||||
+if("$ENV{BLAS_LIBS}" STREQUAL "")
|
||||
|
||||
if(APPLE)
|
||||
|
||||
@@ -162,13 +172,6 @@
|
||||
set(ARMA_LIBS ${ARMA_LIBS} "-framework Accelerate") # or "-framework accelerate" ?
|
||||
message(STATUS "MacOS X detected. Added '-framework Accelerate' to compiler flags")
|
||||
|
||||
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
- message(STATUS "Clang compiler on MacOS X detected. Added '-stdlib=libc++' to compiler flags")
|
||||
- endif()
|
||||
-
|
||||
- set(CMAKE_MACOSX_RPATH 1)
|
||||
-
|
||||
else()
|
||||
|
||||
set(ARMA_OS unix)
|
||||
@@ -284,6 +287,14 @@
|
||||
|
||||
endif()
|
||||
|
||||
+else()
|
||||
+
|
||||
+set(ARMA_USE_BLAS true)
|
||||
+set(ARMA_USE_LAPACK true)
|
||||
+set(ARMA_LIBS ${ARMA_LIBS} $ENV{LAPACK_LIBS} $ENV{BLAS_LIBS})
|
||||
+message(STATUS "Using BLAS/LAPACK from BLAS_LIBS and LAPACK_LIBS environment variables.")
|
||||
+
|
||||
+endif()
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
Loading…
Reference in New Issue