diff --git a/science/pnetcdf/Makefile b/science/pnetcdf/Makefile index 5b97d9bebfde..3b38756cb48a 100644 --- a/science/pnetcdf/Makefile +++ b/science/pnetcdf/Makefile @@ -33,7 +33,6 @@ OPENMPI_CONFIGURE_ON= --with-mpi=${LOCALBASE}/mpi/openmpi OPENMPI_LIB_DEPENDS= libmpi.so:net/openmpi post-patch: - @${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -e '/$$(INSTALL.*$$(...DIR)/ s|$$(...DIR)|$$(DESTDIR)&|' @${REINPLACE_CMD} -e '/$$(INSTALL.*$$(PREFIX)/ s|$$(PREFIX)|$$(DESTDIR)&|' ${WRKSRC}/Makefile.in post-install: diff --git a/science/pnetcdf/files/patch-macros.make.in b/science/pnetcdf/files/patch-macros.make.in new file mode 100644 index 000000000000..c1e9555c9bff --- /dev/null +++ b/science/pnetcdf/files/patch-macros.make.in @@ -0,0 +1,31 @@ +Add DESTDIR support with modified MANDIR (prefix/share/man -> prefix/man) + +Obtained from: http://trac.mcs.anl.gov/projects/parallel-netcdf/changeset/2745 + +--- macros.make.in.orig 2016-11-24 02:55:40 UTC ++++ macros.make.in +@@ -20,13 +20,20 @@ LN_S = @LN_S@ + # Installation Directories: + # SRCDIR = @SRCDIR@ + prefix = @prefix@ +-INCDIR = $(prefix)/include +-LIBDIR = $(prefix)/lib +-BINDIR = $(prefix)/bin +-MANDIR = $(prefix)/man + BUILDDIR = @BUILDDIR@ + LIBRARY = @BUILDDIR@/src/lib/libpnetcdf.a + ++ifdef DESTDIR ++INCDIR = $(DESTDIR)/$(prefix)/include ++LIBDIR = $(DESTDIR)/$(prefix)/lib ++BINDIR = $(DESTDIR)/$(prefix)/bin ++MANDIR = $(DESTDIR)/$(prefix)/man ++else ++INCDIR = $(prefix)/include ++LIBDIR = $(prefix)/lib ++BINDIR = $(prefix)/bin ++MANDIR = $(prefix)/share/man ++endif + + # Useful tools + M4 = @M4@ diff --git a/science/pnetcdf/files/patch-rules.make b/science/pnetcdf/files/patch-rules.make deleted file mode 100644 index 7e93b1559bdd..000000000000 --- a/science/pnetcdf/files/patch-rules.make +++ /dev/null @@ -1,32 +0,0 @@ ---- rules.make.orig 2013-10-26 16:53:18 UTC -+++ rules.make -@@ -125,21 +125,21 @@ - # $(INSTALL)ation: - - $(INCDIR)/$(HEADER): $(INCDIR) $(HEADER) -- $(INSTALL) $(srcdir)/$(HEADER) $@ -+ $(INSTALL) $(srcdir)/$(HEADER) $(DESTDIR)$@ - $(INCDIR)/$(HEADER1): $(INCDIR) $(HEADER1) -- $(INSTALL) $(srcdir)/$(HEADER1) $@ -+ $(INSTALL) $(srcdir)/$(HEADER1) $(DESTDIR)$@ - $(INCDIR)/$(HEADER2): $(INCDIR) $(HEADER2) -- $(INSTALL) $(srcdir)/$(HEADER2) $@ -+ $(INSTALL) $(srcdir)/$(HEADER2) $(DESTDIR)$@ - $(INCDIR)/$(HEADER3): $(INCDIR) $(HEADER3) -- $(INSTALL) $(srcdir)/$(HEADER3) $@ -+ $(INSTALL) $(srcdir)/$(HEADER3) $(DESTDIR)$@ - - $(LIBDIR)/$(LIBRARY): $(LIBDIR) $(LIBRARY) -- $(INSTALL) -d -m 755 $(LIBDIR) -- $(INSTALL) -m 644 $(LIBRARY) $@ -+ $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR) -+ $(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$@ - - $(BINDIR)/$(PROGRAM): $(BINDIR) $(PROGRAM) -- $(INSTALL) -d -m 755 $(BINDIR) -- $(INSTALL) -m 755 $(PROGRAM) $@ -+ $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR) -+ $(INSTALL) -m 755 $(PROGRAM) $(DESTDIR)$@ - - #$(BINDIR) \ - #$(INCDIR) \ diff --git a/science/pnetcdf/pkg-descr b/science/pnetcdf/pkg-descr index d35d9c2e42e7..0517d337d6b3 100644 --- a/science/pnetcdf/pkg-descr +++ b/science/pnetcdf/pkg-descr @@ -5,4 +5,4 @@ However, it does so in a serial manner, making it difficult to achieve high I/O performance. By making some small changes to the API specified by NetCDF, we can use MPI-IO and its collective operations. -WWW: http://trac.mcs.anl.gov/projects/parallel-netcdf +WWW: https://trac.mcs.anl.gov/projects/parallel-netcdf