summaryrefslogtreecommitdiff
path: root/devel/hdf
diff options
context:
space:
mode:
authorjtb <jtb@pkgsrc.org>2001-03-02 19:40:51 +0000
committerjtb <jtb@pkgsrc.org>2001-03-02 19:40:51 +0000
commit40d1d759a0620e4acd691cf36032551a38faf86c (patch)
treed2d8a918b8dd34a73332ee9609c30a49df01f30b /devel/hdf
parentb2e422b4232a9c99ae9ce822e94e816bed534bdf (diff)
downloadpkgsrc-40d1d759a0620e4acd691cf36032551a38faf86c.tar.gz
Vastly decrease the number of files run through `sed'. Some other minor
tidying.
Diffstat (limited to 'devel/hdf')
-rw-r--r--devel/hdf/Makefile31
-rw-r--r--devel/hdf/files/bytesex.c6
2 files changed, 23 insertions, 14 deletions
diff --git a/devel/hdf/Makefile b/devel/hdf/Makefile
index 7bf3a199d8a..c4e781d4b4f 100644
--- a/devel/hdf/Makefile
+++ b/devel/hdf/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2001/02/28 22:18:38 jtb Exp $
+# $NetBSD: Makefile,v 1.2 2001/03/02 19:40:51 jtb Exp $
DISTNAME= HDF4.1r4
PKGNAME= hdf-4.1r4
@@ -13,21 +13,22 @@ COMMENT= NCSA Hierarchical Data Format
DEPENDS+= f2c-[0-9]*:../../lang/f2c
DEPENDS+= jpeg-[0-9]*:../../graphics/jpeg
+USE_FORTRAN= #defined
+
EVAL_PREFIX+= JPEGBASE=jpeg F2CBASE=f2c
-MAKE_ENV+= "JPEGBASE=${JPEGBASE}"
-MAKE_ENV+= "F2CBASE=${F2CBASE}"
post-patch:
- (cd ${WRKSRC}/hdf/src; for i in *.f; do \
- ${F2CBASE}/bin/f2c $$i; \
- done)
- (cd ${WRKSRC}/mfhdf/fortran; for i in *.f; do \
- ${F2CBASE}/bin/f2c $$i; \
- done)
- for i in `${FIND} ${WRKSRC}/mfhdf/ -type f -print`; do \
+ for i in fortran/config/jackets-fbsd.c \
+ fortran/fort_ps/mfhdfp.h fortran/jackets.src \
+ libsrc/cdftest.cmf 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 \
${SED} -e 's:"netcdf.h":"netcdf_hdf.h":g' \
-e 's:\<netcdf.h\>:\<netcdf_hdf.h\>:g' \
- < $$i > $$i.tmp && ${MV} -f $$i.tmp $$i; \
+ < ${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
@@ -36,6 +37,14 @@ post-patch:
${MV} -f ${WRKSRC}/mfhdf/ncgen/ncgen.1 \
${WRKSRC}/mfhdf/ncgen/hdfncgen.1
+pre-build:
+ (cd ${WRKSRC}/hdf/src; for i in *.f; do \
+ ${F2CBASE}/bin/f2c $$i; \
+ done)
+ (cd ${WRKSRC}/mfhdf/fortran; for i in *.f; do \
+ ${F2CBASE}/bin/f2c $$i; \
+ done)
+
pre-configure:
${CC} ${FILESDIR}/bytesex.c -o ${WRKSRC}/bytesex
diff --git a/devel/hdf/files/bytesex.c b/devel/hdf/files/bytesex.c
index 0fd19ec1d98..b51c0d666ae 100644
--- a/devel/hdf/files/bytesex.c
+++ b/devel/hdf/files/bytesex.c
@@ -8,10 +8,10 @@ int
main()
{
u.Long = 1;
- if (u.Char[0] == 1) /* Little endian */
+ if (u.Char[0] == 1) /* little-endian */
printf("-DSWAP\n");
- else if (u.Char[sizeof(long) - 1] == 1) /* Big endian */
+ else if (u.Char[sizeof(long) - 1] == 1) /* big-endian */
printf("\n");
- else exit(1); /* Unknown */
+ else exit(1);
return 0;
}