summaryrefslogtreecommitdiff
path: root/devel/hdf
diff options
context:
space:
mode:
authorjtb <jtb>2001-03-22 23:19:16 +0000
committerjtb <jtb>2001-03-22 23:19:16 +0000
commitab93b834c47d0aa2c77d0693c0ea6a6c7ed47459 (patch)
tree4e68d3097c1ae7303c78e384923443878158a741 /devel/hdf
parent4002b4d2d99449007ff742c96404ef8808c2cbaa (diff)
downloadpkgsrc-ab93b834c47d0aa2c77d0693c0ea6a6c7ed47459.tar.gz
Added F2CBASE_DEFAULT=${LOCALBASE} so that EVAL_PREFIX will give a
sensible value if a dependency is not yet installed. Problem noted by Matthias Drochner with fix by Alistair Crooks. Fixed `ncgen' to generate files which #include "netcdf_hdf.h" and "netcdf_hdf.inc" thus allowing the HDF and netCDF packages to coexist. Added test target in package Makefile for compiling and running the tests for the libraries and the `ncdump' program.
Diffstat (limited to 'devel/hdf')
-rw-r--r--devel/hdf/Makefile29
-rw-r--r--devel/hdf/files/patch-sum7
-rw-r--r--devel/hdf/patches/patch-ai17
-rw-r--r--devel/hdf/patches/patch-al63
-rw-r--r--devel/hdf/patches/patch-am22
-rw-r--r--devel/hdf/patches/patch-an32
6 files changed, 159 insertions, 11 deletions
diff --git a/devel/hdf/Makefile b/devel/hdf/Makefile
index f8f0e4ac864..44373a68c39 100644
--- a/devel/hdf/Makefile
+++ b/devel/hdf/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2001/03/09 22:47:43 jtb Exp $
+# $NetBSD: Makefile,v 1.5 2001/03/22 23:19:16 jtb Exp $
DISTNAME= HDF4.1r4
PKGNAME= hdf-4.1r4
@@ -15,6 +15,7 @@ DEPENDS+= jpeg-[0-9]*:../../graphics/jpeg
USE_FORTRAN= #defined
+F2CBASE_DEFAULT=${LOCALBASE}
EVAL_PREFIX+= JPEGBASE=jpeg F2CBASE=f2c
.if (${MACHINE_ARCH} == "alpha")
@@ -27,15 +28,23 @@ post-patch:
libsrc/cdftest.c libsrc/globdef.c libsrc/local_nc.h \
libsrc/xdrposix.c libsrc/xdrstdio.c ncdump/dumplib.c \
ncdump/vardata.c ncgen/generate.c ncgen/ncgen.h \
- libsrc/mfhdf.h; do \
+ libsrc/mfhdf.h nctest/add.c nctest/atttests.c \
+ nctest/cdftests.c nctest/dimtests.c nctest/driver.c \
+ nctest/error.c nctest/misctest.c nctest/rec.c \
+ nctest/slabs.c nctest/val.c nctest/vardef.c \
+ nctest/varget.c nctest/vargetg.c nctest/varput.c \
+ nctest/varputg.c nctest/vartests.c nctest/vputget.c \
+ nctest/vputgetg.c; do \
${SED} -e 's:"netcdf.h":"netcdf_hdf.h":g' \
-e 's:\<netcdf.h\>:\<netcdf_hdf.h\>:g' \
- < ${WRKSRC}/mfhdf/$$i > ${WRKSRC}/mfhdf/$$i.tmp \
+ ${WRKSRC}/mfhdf/$$i > ${WRKSRC}/mfhdf/$$i.tmp \
&& ${MV} -f ${WRKSRC}/mfhdf/$$i.tmp \
${WRKSRC}/mfhdf/$$i; \
done
${MV} -f ${WRKSRC}/mfhdf/libsrc/netcdf.h.in \
${WRKSRC}/mfhdf/libsrc/netcdf_hdf.h
+ ${MV} -f ${WRKSRC}/mfhdf/fortran/config/netcdf-fbsd.inc \
+ ${WRKSRC}/mfhdf/fortran/netcdf_hdf.inc
${MV} -f ${WRKSRC}/mfhdf/ncdump/ncdump.1 \
${WRKSRC}/mfhdf/ncdump/hdfncdump.1
${MV} -f ${WRKSRC}/mfhdf/ncgen/ncgen.1 \
@@ -52,7 +61,7 @@ pre-build:
pre-configure:
${CC} ${FILESDIR}/bytesex.c -o ${WRKSRC}/bytesex
-SWAP=`${WRKSRC}/bytesex`
+SWAP= `${WRKSRC}/bytesex`
do-configure:
@for f in libsrc dumper ncgen ncdump; do \
@@ -64,7 +73,15 @@ do-configure:
done
post-install:
- ${INSTALL_DATA} ${WRKSRC}/mfhdf/fortran/config/netcdf-fbsd.inc \
- ${PREFIX}/include/hdf/netcdf_hdf.inc
+ ${INSTALL_DATA} ${WRKSRC}/mfhdf/fortran/netcdf_hdf.inc \
+ ${PREFIX}/include/hdf
+
+test: build
+ @cd ${WRKSRC}/hdf/test && ${SETENV} ${MAKE_ENV} ${MAKE}
+ @cd ${WRKSRC}/hdf/test && ./testhdf
+ @cd ${WRKSRC}/hdf/test && ./fortest
+ @cd ${WRKSRC}/mfhdf/dumper && ${SH} testhdp.sh
+ @cd ${WRKSRC}/mfhdf/ncdump && ${SETENV} ${MAKE_ENV} ${MAKE} test
+ @cd ${WRKSRC}/mfhdf/nctest && ${SETENV} ${MAKE_ENV} ${MAKE} test
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/hdf/files/patch-sum b/devel/hdf/files/patch-sum
index 3c4972aabec..1b25ef5050e 100644
--- a/devel/hdf/files/patch-sum
+++ b/devel/hdf/files/patch-sum
@@ -1,4 +1,4 @@
-$NetBSD: patch-sum,v 1.4 2001/03/19 13:37:28 dmcmahill Exp $
+$NetBSD: patch-sum,v 1.5 2001/03/22 23:19:17 jtb Exp $
SHA1 (patch-aa) = dd9c4c44423a8d93226e72331d921b0911cd0e62
SHA1 (patch-ab) = bc3dcc046aee99ec219d2e01b98dc314f63e25b6
@@ -8,6 +8,9 @@ SHA1 (patch-ae) = 0a098f3068d1f1e029abda19955665553f2df456
SHA1 (patch-af) = 675659b915a07b7352dd291c39155136889cd32a
SHA1 (patch-ag) = 1a3143fc8508213690a6e5953b30b915b64bf910
SHA1 (patch-ah) = 42f1f926c78fbd4781c699932a948bcac3873b21
-SHA1 (patch-ai) = 3a089b352e5049d70deeb90f537c1fd807936869
+SHA1 (patch-ai) = 97d799f4b3c9da70e68fa674bb9019e34f85c453
SHA1 (patch-aj) = 6a3d24528b7a7deeeeefdbe7688851a8691ea456
SHA1 (patch-ak) = d29cd29382e6775f3bfb353dd745c78ac85b2e1b
+SHA1 (patch-al) = b4d1ceb6ad28c5492c10e657bc8de9faa33e7ff8
+SHA1 (patch-am) = b51a0705d1130c799663cbf75a938af0cbd0f599
+SHA1 (patch-an) = 4628f98d94710ab953a7386d0d97fe3201c244fd
diff --git a/devel/hdf/patches/patch-ai b/devel/hdf/patches/patch-ai
index aade744ff52..95da51f5928 100644
--- a/devel/hdf/patches/patch-ai
+++ b/devel/hdf/patches/patch-ai
@@ -1,8 +1,8 @@
-$NetBSD: patch-ai,v 1.2 2001/03/09 22:47:44 jtb Exp $
+$NetBSD: patch-ai,v 1.3 2001/03/22 23:19:17 jtb Exp $
---- /dev/null Fri Mar 9 22:24:45 2001
+--- /dev/null Thu Mar 22 20:12:43 2001
+++ mfhdf/ncdump/Makefile
-@@ -0,0 +1,23 @@
+@@ -0,0 +1,34 @@
+PROG= ncdump
+PROGNAME= hdfncdump
+
@@ -25,4 +25,15 @@ $NetBSD: patch-ai,v 1.2 2001/03/09 22:47:44 jtb Exp $
+
+NOGCCERROR= 1
+
++NCGEN= ${.CURDIR}/../ncgen/ncgen
++
++test: ${PROG} test0.cdl
++ ${NCGEN} -o test0.nc -n test0.cdl
++ ./${PROG} test0.nc > test1.cdl
++ ${NCGEN} -o test1.nc -n test1.cdl
++ ./${PROG} -n test0 test1.nc > test2.cdl
++ @cmp test1.cdl test2.cdl && \
++ echo "*** ${PROG} test successful ***" ; \
++ rm test1.cdl test1.nc test2.cdl
++
+.include <bsd.prog.mk>
diff --git a/devel/hdf/patches/patch-al b/devel/hdf/patches/patch-al
new file mode 100644
index 00000000000..af35c9bc7b7
--- /dev/null
+++ b/devel/hdf/patches/patch-al
@@ -0,0 +1,63 @@
+$NetBSD: patch-al,v 1.1 2001/03/22 23:19:17 jtb Exp $
+
+--- /dev/null Thu Mar 22 19:52:41 2001
++++ hdf/test/Makefile
+@@ -0,0 +1,58 @@
++CSRCS= rig.c sdstr.c blocks.c an.c anfile.c extelt.c file.c file1.c \
++ vers.c sdmms.c sdnmms.c slab.c litend.c tvset.c comp.c bitio.c \
++ tree.c macros.c conv.c nbit.c man.c mgr.c testhdf.c tbv.c \
++ tvsfpack.c chunks.c tvattr.c buffer.c
++
++COBJS= ${CSRCS:.c=.o}
++
++FSRCS= fortest.c fortestF.f forsupff.f forsupf.c \
++ manf.f mgrf.f slabwf.f t24f.f tanf.f tanfilef.f tpf.f tr8f.f \
++ tsdmmsf.f tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f \
++ tvsetf.f, tvattrf.f
++
++FOBJS= fortestF.o forsupff.o forsupf.o \
++ manf.o mgrf.o slabwf.o t24f.o tanf.o tanfilef.o tpf.o tr8f.o \
++ tsdmmsf.o tsdnmmsf.o tsdnntf.o tsdntf.o tsdstrf.o tstubsf.o \
++ tvsetf.o tvattrf.o
++
++HDFLIB = -Wl,-R${.CURDIR}/../src -L${.CURDIR}/../src -ldf
++JPEGLIB= -Wl,-R${JPEGBASE}/lib -L${JPEGBASE}/lib -ljpeg
++ZLIB= -lz
++
++CPPFLAGS+= -Dunix -I${.CURDIR}/../src
++
++FTESTS = fortest fortestF
++
++all: testhdf ${FTESTS} gentest
++
++TESTF = fortest.o
++
++TESTDIR = testdir
++
++${FOBJS}: fortest.inc
++
++test: atest-hdf
++
++atest-hdf: testhdf ${FTESTS}
++ -rm -f *.hdf
++
++testhdf: ${COBJS}
++ ${CC} ${CPPFLAGS} ${CFLAGS} -o $@ $? ${LDFLAGS} ${HDFLIB} ${JPEGLIB} ${ZLIB} -lm
++ test -d ${TESTDIR} || mkdir ${TESTDIR}
++
++fortestF: ${FOBJS}
++ ${FC} ${FFLAGS} -o $@ $? ${LDFLAGS} ${HDFLIB} ${JPEGLIB} ${ZLIB}
++
++fortest: fortest.o
++ ${CC} ${CPPFLAGS} ${CFLAGS} -o $@ $? ${LDFLAGS} ${HDFLIB} ${JPEGLIB} ${ZLIB} -lm
++
++gentest: gentest.o
++ ${CC} ${CPPFLAGS} ${CFLAGS} -o $@ $? ${LDFLAGS} ${HDFLIB} ${JPEGLIB} ${ZLIB} -lm
++
++clean:
++ -rm -f testhdf ${COBJS} ${FOBJS} ${FTESTS} \
++ core *.hdf ptesthdf qtesthdf gentest *.o fortest.arg ${TESTDIR}/* \
++ .depend
++
++depend:
++ mkdep ${CFLAGS} ${CSRCS}
diff --git a/devel/hdf/patches/patch-am b/devel/hdf/patches/patch-am
new file mode 100644
index 00000000000..66e517db24e
--- /dev/null
+++ b/devel/hdf/patches/patch-am
@@ -0,0 +1,22 @@
+$NetBSD: patch-am,v 1.1 2001/03/22 23:19:17 jtb Exp $
+
+--- mfhdf/ncgen/generate.c.orig Tue Dec 8 21:38:02 1998
++++ mfhdf/ncgen/generate.c
+@@ -101,7 +101,7 @@
+ int ntypes = (sizeof ctypes) / (sizeof ctypes[0]);
+
+ /* wrap in main program */
+- cline("#include \"netcdf.h\"");
++ cline("#include \"netcdf_hdf.h\"");
+ cline("");
+ cline("int");
+ sprintf(stmnt, "main() {\t\t\t/* create %s */", filename);
+@@ -413,7 +413,7 @@
+ #ifdef MSDOS
+ printf("$include: \"netcdf.inc\"\n");
+ #else
+- fline("include 'netcdf.inc'");
++ fline("include 'netcdf_hdf.inc'");
+ #endif
+
+ /* create necessary declarations */
diff --git a/devel/hdf/patches/patch-an b/devel/hdf/patches/patch-an
new file mode 100644
index 00000000000..f2c92a35b76
--- /dev/null
+++ b/devel/hdf/patches/patch-an
@@ -0,0 +1,32 @@
+$NetBSD: patch-an,v 1.1 2001/03/22 23:19:17 jtb Exp $
+
+--- /dev/null Thu Mar 22 22:34:52 2001
++++ mfhdf/nctest/Makefile
+@@ -0,0 +1,27 @@
++PROG= nctest
++
++SRCS = varget.c vargetg.c varput.c varputg.c vardef.c vartests.c \
++ vputget.c vputgetg.c driver.c cdftests.c dimtests.c rec.c \
++ atttests.c misctest.c add.c error.c emalloc.c val.c slabs.c
++
++MFHDFLIB= -L${.CURDIR}/../libsrc -lmfhdf
++MFHDFINC= -I${.CURDIR}/../libsrc
++
++HDFLIB= -L${.CURDIR}/../../hdf/src -ldf
++HDFINC= -I${.CURDIR}/../../hdf/src
++
++JPEGLIB= -R${JPEGBASE}/lib -L${JPEGBASE}/lib -ljpeg
++
++LDFLAGS+= -Wl,-R{LIBDIR} ${MFHDFLIB} ${HDFLIB} ${JPEGLIB}
++
++CPPFLAGS+= -Dunix -DNDEBUG ${MFHDFINC} ${HDFINC}
++
++NOMAN= 1
++
++test: $(PROG)
++ @ echo "==========================="
++ @ echo "netCDF C interface tests"
++ @ echo "==========================="
++ ./$(PROG)
++
++.include <bsd.prog.mk>