sys-cluster/parallel-netcdf: restrict tests, respect flags

Closes: https://bugs.gentoo.org/835036
Closes: https://bugs.gentoo.org/815742
Closes: https://bugs.gentoo.org/815739
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-03-31 16:35:04 +02:00
parent 925cfef4c8
commit b10cbd7216
3 changed files with 105 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -65,40 +65,40 @@
@echo '+----------------------------------------------------------------------------+'
@echo '|'
@echo '| PnetCDF has been successfully installed under'
- @echo '| $(DESTDIR)$(prefix)'
+ @echo '| $(prefix)'
@echo '|'
@echo '| * PnetCDF header files have been installed in'
- @echo '| $(DESTDIR)$(prefix)/include'
+ @echo '| $(prefix)/include'
@echo '| * PnetCDF library files have been installed in'
- @echo '| $(DESTDIR)$(exec_prefix)/lib'
+ @echo '| $(exec_prefix)/lib'
@echo '| * PnetCDF utility programs have been installed in'
- @echo '| $(DESTDIR)$(exec_prefix)/bin'
+ @echo '| $(exec_prefix)/bin'
@echo '| * PnetCDF man pages have been installed in'
- @echo '| $(DESTDIR)$(prefix)/share/man'
+ @echo '| $(prefix)/share/man'
@echo '|'
@echo '| To compile your PnetCDF programs, please add the following to the command'
@echo '| line, so the compiler can find the PnetCDF header files:'
- @echo '| -I$(DESTDIR)$(prefix)/include'
+ @echo '| -I$(prefix)/include'
@echo '|'
@if test "x$(has_fortran)" = xyes -a 'x$(FC_MODINC)' != 'x-I' ; then \
echo '| Add the following line to compile your Fortran programs' ; \
- echo '| $(FC_MODINC)$(DESTDIR)$(prefix)/include' ; \
+ echo '| $(FC_MODINC)$(prefix)/include' ; \
echo '|' ; \
fi
@echo '| Add the following line to link your program to PnetCDF library:'
- @echo '| -L$(DESTDIR)$(exec_prefix)/lib -lpnetcdf'
+ @echo '| -L$(exec_prefix)/lib -lpnetcdf'
@echo '|'
@if test "x$(enable_shared)" = xyes ; then \
echo '| Add the following to your run-time environment variable LD_LIBRARY_PATH,' ; \
echo '| when linking your executable with the PnetCDF shared libraries.' ; \
if test "x$(enable_netcdf4)" = xyes -a "x$(enable_adios)" = xyes ; then \
- echo '| $(DESTDIR)$(exec_prefix)/lib:$(netcdf4_libdir):$(adios_libdir)' ; \
+ echo '| $(exec_prefix)/lib:$(netcdf4_libdir):$(adios_libdir)' ; \
elif test "x$(enable_netcdf4)" = xyes ; then \
- echo '| $(DESTDIR)$(exec_prefix)/lib:$(netcdf4_libdir)' ; \
+ echo '| $(exec_prefix)/lib:$(netcdf4_libdir)' ; \
elif test "x$(enable_adios)" = xyes ; then \
- echo '| $(DESTDIR)$(exec_prefix)/lib:$(adios_libdir)' ; \
+ echo '| $(exec_prefix)/lib:$(adios_libdir)' ; \
else \
- echo '| $(DESTDIR)$(exec_prefix)/lib' ; \
+ echo '| $(exec_prefix)/lib' ; \
fi ; \
echo '|' ; \
fi

View File

@@ -0,0 +1,44 @@
--- a/src/utils/ncmpidiff/Makefile.am
+++ b/src/utils/ncmpidiff/Makefile.am
@@ -18,7 +18,7 @@
cdfdiff_SOURCES = cdfdiff.c
cdfdiff$(EXEEXT): cdfdiff.c Makefile
- $(SEQ_CC) -I$(top_srcdir)/src/utils/ncvalidator -o $@ $<
+ $(SEQ_CC) $(CFLAGS) $(LDFLAGS) -PIE -I$(top_srcdir)/src/utils/ncvalidator -o $@ $<
$(top_builddir)/src/libs/libpnetcdf.la:
set -e; cd $(top_builddir)/src/libs && $(MAKE) $(MFLAGS)
--- a/src/utils/ncoffsets/Makefile.am
+++ b/src/utils/ncoffsets/Makefile.am
@@ -10,7 +10,7 @@
EXTRA_DIST = ncoffsets.c
ncoffsets$(EXEEXT): ncoffsets.c
- $(SEQ_CC) -o $@ $<
+ $(SEQ_CC) $(CFLAGS) $(LDFLAGS) -PIE -o $@ $<
dist_man_MANS = ncoffsets.1
--- a/src/utils/ncvalidator/Makefile.am
+++ b/src/utils/ncvalidator/Makefile.am
@@ -76,7 +76,7 @@
TST_HDF5_FILES = pad_superblock.h5
ncvalidator$(EXEEXT): ncvalidator.c Makefile
- $(SEQ_CC) -o $@ $<
+ $(SEQ_CC) $(CFLAGS) $(LDFLAGS) -PIE -o $@ $<
# autimake 1.11.3 has not yet implemented AM_TESTS_ENVIRONMENT
# For newer versions, we can use AM_TESTS_ENVIRONMENT instead
--- a/src/utils/pnetcdf_version/Makefile.am
+++ b/src/utils/pnetcdf_version/Makefile.am
@@ -22,7 +22,7 @@
endif
pnetcdf_version$(EXEEXT): pnetcdf_version.c
- $(SEQ_CC) $(XDEFS) -o $@ $<
+ $(SEQ_CC) $(CFLAGS) $(LDFLAGS) -PIE $(XDEFS) -o $@ $<
dist_man_MANS = pnetcdf_version.1

View File

@@ -36,6 +36,12 @@ BDEPEND="
)
"
RESTRICT="test" # tests require MPI set up
PATCHES=(
"${FILESDIR}/${P}-no-DESTDIR-for-info-clarity.patch"
"${FILESDIR}/${P}-respect-flags.patch"
)
pkg_setup() {
fortran-2_pkg_setup
}