h5z-zfp: fix build with Fujitsu compiler (#29029)
This commit is contained in:
parent
8409443b1f
commit
4176ce5c07
5 changed files with 102 additions and 2 deletions
|
@ -0,0 +1,11 @@
|
|||
--- spack-src/src/Makefile.orig 2022-02-02 17:42:03.000000000 +0900
|
||||
+++ spack-src/src/Makefile 2022-02-02 17:42:34.000000000 +0900
|
||||
@@ -54,7 +54,7 @@
|
||||
$(INSTALL) libh5zzfp.a $(PREFIX)/lib
|
||||
$(INSTALL) -m 644 H5Zzfp.h H5Zzfp_lib.h H5Zzfp_plugin.h H5Zzfp_props.h $(PREFIX)/include
|
||||
ifneq ($(FC),)
|
||||
- $(INSTALL) -m 644 H5Zzfp_props_f.mod $(PREFIX)/include
|
||||
+ $(INSTALL) -m 644 *.[mM][oO][dD] $(PREFIX)/include
|
||||
endif
|
||||
|
||||
clean:
|
|
@ -0,0 +1,11 @@
|
|||
--- spack-src/config.make.orig 2017-06-09 21:15:21.000000000 +0900
|
||||
+++ spack-src/config.make 2022-02-02 17:04:31.000000000 +0900
|
||||
@@ -16,6 +16,8 @@
|
||||
H5Z_ZFP_BASE := ../src
|
||||
else ifeq ($(PWD_BASE),H5Z-ZFP)
|
||||
H5Z_ZFP_BASE := ./src
|
||||
+else
|
||||
+ H5Z_ZFP_BASE := ./src
|
||||
endif
|
||||
H5Z_ZFP_PLUGIN := $(H5Z_ZFP_BASE)/plugin
|
||||
H5Z_ZFP_VERSINFO := $(shell grep '^\#define H5Z_FILTER_ZFP_VERSION_[MP]' $(H5Z_ZFP_BASE)/H5Zzfp_plugin.h | cut -d' ' -f3 | tr '\n' '.' | cut -d'.' -f-3 2>/dev/null)
|
46
var/spack/repos/builtin/packages/h5z-zfp/config.make.patch
Normal file
46
var/spack/repos/builtin/packages/h5z-zfp/config.make.patch
Normal file
|
@ -0,0 +1,46 @@
|
|||
diff --git a/config.make b/config.make
|
||||
index d782bd1..1c53ab8 100644
|
||||
--- a/config.make
|
||||
+++ b/config.make
|
||||
@@ -128,18 +128,37 @@ ZFP_INC = $(ZFP_HOME)/inc
|
||||
else
|
||||
ZFP_INC = $(ZFP_HOME)/include
|
||||
endif
|
||||
+ifeq ($(wildcard $(ZFP_HOME)/lib),)
|
||||
+ZFP_LIB = $(ZFP_HOME)/lib64
|
||||
+else
|
||||
ZFP_LIB = $(ZFP_HOME)/lib
|
||||
+endif
|
||||
+
|
||||
+# Check if specified individually the HDF5 include directory,
|
||||
+# library directory and bin directory separated by commas, i.e. HDF5_HOME=INC,LIB,BIN
|
||||
|
||||
-HDF5_INC = $(HDF5_HOME)/include
|
||||
-HDF5_LIB = $(HDF5_HOME)/lib
|
||||
-HDF5_BIN = $(HDF5_HOME)/bin
|
||||
+ifneq (,$(findstring ",",$(HDF5_HOME)))
|
||||
+ HDF5_INC = $(shell echo $(HDF5_HOME) | awk -F'[,]' '{print $$1}')
|
||||
+ HDF5_LIB = $(shell echo $(HDF5_HOME) | awk -F'[,]' '{print $$2}')
|
||||
+ HDF5_BIN = $(shell echo $(HDF5_HOME) | awk -F'[,]' '{print $$3}')
|
||||
+ MAKEVARS =
|
||||
+else
|
||||
+ HDF5_INC = $(HDF5_HOME)/include
|
||||
+ ifeq ($(wildcard $(HDF5_HOME)/lib),)
|
||||
+ HDF5_LIB = $(HDF5_HOME)/lib64
|
||||
+ else
|
||||
+ HDF5_LIB = $(HDF5_HOME)/lib
|
||||
+ endif
|
||||
+ HDF5_BIN = $(HDF5_HOME)/bin
|
||||
+ MAKEVARS = HDF5_HOME=$(HDF5_HOME)
|
||||
+endif
|
||||
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX := $(shell pwd)/install
|
||||
endif
|
||||
INSTALL ?= install
|
||||
|
||||
-MAKEVARS = ZFP_HOME=$(ZFP_HOME) HDF5_HOME=$(HDF5_HOME) PREFIX=$(PREFIX)
|
||||
+MAKEVARS += ZFP_HOME=$(ZFP_HOME) PREFIX=$(PREFIX)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .F90 .h .o .mod
|
23
var/spack/repos/builtin/packages/h5z-zfp/fj.patch
Normal file
23
var/spack/repos/builtin/packages/h5z-zfp/fj.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
--- spack-src/config.make.org 2022-02-01 18:43:23.000000000 +0900
|
||||
+++ spack-src/config.make 2022-02-01 18:42:54.000000000 +0900
|
||||
@@ -106,6 +106,11 @@
|
||||
SOEXT ?= so
|
||||
SHFLAG ?= -qmkshrobj
|
||||
PREPATH = -Wl,-R,
|
||||
+else ifneq ($(findstring fcc, $(CC)),)
|
||||
+ CFLAGS += -KPIC
|
||||
+ SOEXT ?= so
|
||||
+ SHFLAG ?= -shared
|
||||
+ PREPATH = -Wl,-rpath,
|
||||
endif
|
||||
|
||||
ifneq ($(findstring gfortran, $(FC)),)
|
||||
@@ -118,6 +123,8 @@
|
||||
FCFLAGS += -qpic
|
||||
else ifneq ($(findstring bgxlf_r, $(FC)),)
|
||||
FCFLAGS += -qpic
|
||||
+else ifneq ($(findstring frt, $(FC)),)
|
||||
+ FCFLAGS += -KPIC
|
||||
else ifneq ($(findstring f77, $(FC)),)
|
||||
# some makefile versions set FC=f77 if FC is not set
|
||||
FC =
|
|
@ -12,10 +12,12 @@ class H5zZfp(MakefilePackage):
|
|||
|
||||
homepage = "https://h5z-zfp.readthedocs.io/en/latest"
|
||||
git = "https://github.com/LLNL/H5Z-ZFP.git"
|
||||
url = "https://github.com/LLNL/H5Z-ZFP/archive/refs/tags/v1.0.1.tar.gz"
|
||||
|
||||
version('develop', branch='master')
|
||||
version('0.8.0', commit='af165c4')
|
||||
version('0.7.0', commit='58ac811')
|
||||
version('1.0.1', sha256='b9ed91dab8e2ef82dc6706b4242c807fb352875e3b21c217dd00782dd1a22b24')
|
||||
version('0.8.0', sha256='a5eb089191369a5e929c51ec9e5da107afaee39c6ab3b7ad693c454319ab9217')
|
||||
version('0.7.0', sha256='f728b0bcb9e9cf8bafe05909ab02fec39415635d275e98b661176f69d34f87b3')
|
||||
|
||||
variant('fortran', default=True, description='Enable Fortran support')
|
||||
|
||||
|
@ -23,6 +25,13 @@ class H5zZfp(MakefilePackage):
|
|||
depends_on('hdf5', when='~fortran')
|
||||
depends_on('zfp bsws=8')
|
||||
|
||||
patch('https://github.com/LLNL/H5Z-ZFP/commit/983a1870cefff5fdb643898a14eda855c2c231e4.patch',
|
||||
sha256='64a624880ca944ebcc174f66d739dd0458a6dab2f0bccc6ed99bf4c0c9b9e388', when='@1.0.1')
|
||||
patch('config.make.patch', when='@0.7.0:0.8.0')
|
||||
patch('config.make.0.7.0.patch', when='@0.7.0')
|
||||
patch('Makefile.0.7.0.patch', when='@0.7.0')
|
||||
patch('fj.patch', when='@0.7.0: %fj')
|
||||
|
||||
@property
|
||||
def make_defs(self):
|
||||
make_defs = [
|
||||
|
|
Loading…
Reference in a new issue