pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

armadillo: fix hdf5 header location, lift BLAS restrictions



Module Name:	pkgsrc-wip
Committed By:	Dr. Thomas Orgis <thomas.orgis%uni-hamburg.de@localhost>
Pushed By:	thor
Date:		Tue Mar 24 00:11:11 2020 +0100
Changeset:	37ec60953c4e9f310a864adee0cb704a77ef48f6

Modified Files:
	armadillo/Makefile
	armadillo/distinfo
	armadillo/patches/patch-CMakeLists.txt

Log Message:
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.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=37ec60953c4e9f310a864adee0cb704a77ef48f6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 armadillo/Makefile                     |  5 -----
 armadillo/distinfo                     |  2 +-
 armadillo/patches/patch-CMakeLists.txt | 19 +++++++++++++++++++
 3 files changed, 20 insertions(+), 6 deletions(-)

diffs:
diff --git a/armadillo/Makefile b/armadillo/Makefile
index 79efcc0983..221d44447d 100644
--- a/armadillo/Makefile
+++ b/armadillo/Makefile
@@ -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"
diff --git a/armadillo/distinfo b/armadillo/distinfo
index d81dc848ef..b10b6778a1 100644
--- a/armadillo/distinfo
+++ b/armadillo/distinfo
@@ -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
diff --git a/armadillo/patches/patch-CMakeLists.txt b/armadillo/patches/patch-CMakeLists.txt
index 0f419d8eb4..cd3e1ea819 100644
--- a/armadillo/patches/patch-CMakeLists.txt
+++ b/armadillo/patches/patch-CMakeLists.txt
@@ -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()
+ 


Home | Main Index | Thread Index | Old Index