armadillo: fix hdf5 header location, lift BLAS restrictions

The hdf5 header location stored in armadillo headers (what a
superbly bad idea!) could by accident (influence of external
header directories made available to pksrc) point outside
pkgsrc, not to where pkgsrc installs hdf5. Fixing that.

This needs revision once we add builtin hdf5. I hope we don't.
This commit is contained in:
Dr. Thomas Orgis 2020-03-24 00:11:11 +01:00
parent ac5d8eb9aa
commit 37ec60953c
3 changed files with 20 additions and 6 deletions

View File

@ -28,11 +28,6 @@ SUBST_STAGE.minor= post-patch
SUBST_FILES.minor= CMakeLists.txt
SUBST_SED.minor= -e "s|ARMA_MINOR ${DIST_MINOR}|ARMA_MINOR ${PKG_MINOR}|g"
# 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-ng/buildlink3.mk"

View File

@ -4,4 +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
SHA1 (patch-CMakeLists.txt) = 21d73fdb47a1a5e957121c223f1671c35a7f6612

View File

@ -3,6 +3,15 @@ $Netbsd$
Make the build use LAPACK_LIBS and BLAS_LIBS from the environment.
Could this be acceptible to upstream?
Also, override the possibly badly detected HDF5 include directory.
On my system, where there are some paths external to pkgrc (compiler,
Open MPI), and HDF5 is just available without any extra hassle,
the firsts of the external include paths is picked up as alleged
HDF5 include directory. It's Open MPI's include directory. No
hdf5.h in there! This breaks users of armadillo, obviously. I don't
get the sense of hardcoding the path to hdf5.h at all. This is all
so wrong.
--- 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 @@
@ -51,3 +60,13 @@ Could this be acceptible to upstream?
find_package(PkgConfig)
@@ -334,6 +345,9 @@ if(DETECT_HDF5)
message(STATUS "*** rerun cmake with HDF5 detection disabled:")
message(STATUS "*** cmake -D DETECT_HDF5=false .")
message(STATUS "")
+ set(ARMA_HDF5_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
+ message(STATUS "Overriding silly HDF5 include dir hardcode to common install prefix for pkgsrc.")
+ message(STATUS "ARMA_HDF5_INCLUDE_DIR = ${ARMA_HDF5_INCLUDE_DIR}")
endif()
endif()