summaryrefslogtreecommitdiff
path: root/science
diff options
context:
space:
mode:
authorThomas Gellekum <tg@FreeBSD.org>1997-11-03 12:10:43 +0000
committerThomas Gellekum <tg@FreeBSD.org>1997-11-03 12:10:43 +0000
commit1f164220b2c0acee2f9f83dd4205471fadee48d6 (patch)
treee2f0baf6253094bb5d84601c1a6dff1c797e430e /science
parentActivate cccc. (diff)
Import HDF port. HDF is yet another graphics format.
PR: 4546 Submitted by: Mikhail Teterin <mi@aldan.ziplink.net>
Notes
Notes: svn path=/head/; revision=8455
Diffstat (limited to 'science')
-rw-r--r--science/hdf/Makefile68
-rw-r--r--science/hdf/distinfo1
-rw-r--r--science/hdf/pkg-comment1
-rw-r--r--science/hdf/pkg-descr23
-rw-r--r--science/hdf/pkg-plist89
-rw-r--r--science/hdf/scripts/post-patch83
-rw-r--r--science/hdf5-18/Makefile68
-rw-r--r--science/hdf5-18/distinfo1
-rw-r--r--science/hdf5-18/pkg-comment1
-rw-r--r--science/hdf5-18/pkg-descr23
-rw-r--r--science/hdf5-18/pkg-plist89
-rw-r--r--science/hdf5-18/scripts/post-patch83
-rw-r--r--science/hdf5/Makefile68
-rw-r--r--science/hdf5/distinfo1
-rw-r--r--science/hdf5/pkg-comment1
-rw-r--r--science/hdf5/pkg-descr23
-rw-r--r--science/hdf5/pkg-plist89
-rw-r--r--science/hdf5/scripts/post-patch83
18 files changed, 795 insertions, 0 deletions
diff --git a/science/hdf/Makefile b/science/hdf/Makefile
new file mode 100644
index 000000000000..934cfc344b4a
--- /dev/null
+++ b/science/hdf/Makefile
@@ -0,0 +1,68 @@
+# New ports collection makefile for: HDF_lib
+# Version required: 4.1r1
+# Date created: 17 November 1996
+# Whom: mi
+#
+# $Id$
+#
+
+DISTNAME= HDF4.1r1
+PKGNAME= hdf-4.1r1
+CATEGORIES= graphics
+MASTER_SITES= ftp://ftp.ncsa.uiuc.edu/HDF/HDF_Current/tar/
+
+MAINTAINER= mi@aldan.ziplink.net
+
+LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg
+
+GNU_CONFIGURE= yes
+MAKE_FLAGS= CC="$(CC)" -f
+
+# This will create dummy Makefiles and some links in the jpeg and libz
+# subdirectories. This way, we do not need to hunt all the dependencies
+# out. Shame on the lib's developers, though, this can not be done through
+# `configure'. -mi
+pre-build:
+ test -d ${WRKSRC}/hdf/jpeg.came-with-HDF || \
+ ${MV} -f ${WRKSRC}/hdf/jpeg ${WRKSRC}/hdf/jpeg.came-with-HDF
+ -${MKDIR} ${WRKSRC}/hdf/jpeg
+ ${RM} -f ${WRKSRC}/hdf/jpeg/Makefile
+ ${ECHO} #Phony makefile > ${WRKSRC}/hdf/jpeg/Makefile
+ ${ECHO} >> ${WRKSRC}/hdf/jpeg/Makefile
+ ${ECHO} libjpeg.a: >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\t@echo Using the already installed JPEG library\n' \
+ >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\nclean:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\ninstall-lib:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\ninstall:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
+ -ln -s ${PREFIX}/lib/libjpeg* ${WRKSRC}/hdf/jpeg/
+ -ln -s ${PREFIX}/include/j*.h ${WRKSRC}/hdf/jpeg/
+ test -d ${WRKSRC}/hdf/zlib.came-with-HDF || \
+ ${MV} -f ${WRKSRC}/hdf/zlib ${WRKSRC}/hdf/zlib.came-with-HDF
+ -${MKDIR} ${WRKSRC}/hdf/zlib
+ ${RM} -f ${WRKSRC}/hdf/zlib/Makefile
+ ${ECHO} #Phony makefile > ${WRKSRC}/hdf/zlib/Makefile
+ ${ECHO} >> ${WRKSRC}/hdf/zlib/Makefile
+ ${ECHO} libzlib.a: >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\t@echo Using the already installed ZLIB library\n' \
+ >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\nclean:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\ninstall-lib:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\ninstall:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
+ -ln -s /usr/lib/libz* ${WRKSRC}/hdf/zlib/
+ -ln -s /usr/include/zconf.h /usr/include/zlib.h ${WRKSRC}/hdf/zlib/
+
+post-install:
+.if !defined(NOMANCOMPRESS)
+ @for man_page in `grep man./ ${PKGDIR}/PLIST` ; do \
+ mp=`echo $${man_page} | ${SED} s/\.gz//` ;\
+ ${ECHO} Compressing ${PREFIX}/$$mp ;\
+ ${GZIP_CMD} ${PREFIX}/$$mp ; done
+.endif
+ @for binary in `grep ^bin/ ${PKGDIR}/PLIST` ; do strip ${PREFIX}/$$binary; done
+ ${LDCONFIG} -m ${PREFIX}/lib
+
+test:
+ cd ${WRKSRC}; make $@
+
+.include <bsd.port.mk>
diff --git a/science/hdf/distinfo b/science/hdf/distinfo
new file mode 100644
index 000000000000..cb7643c276d2
--- /dev/null
+++ b/science/hdf/distinfo
@@ -0,0 +1 @@
+MD5 (HDF4.1r1.tar.gz) = d9a759acc62d8d290b84d3ca7a0a6a2c
diff --git a/science/hdf/pkg-comment b/science/hdf/pkg-comment
new file mode 100644
index 000000000000..2f8affd569f0
--- /dev/null
+++ b/science/hdf/pkg-comment
@@ -0,0 +1 @@
+Hierarchical Data Format library (from NCSA)
diff --git a/science/hdf/pkg-descr b/science/hdf/pkg-descr
new file mode 100644
index 000000000000..e34fb16bae11
--- /dev/null
+++ b/science/hdf/pkg-descr
@@ -0,0 +1,23 @@
+From HDF's manpage:
+
+ hdf - Hierarchical Data Format library
+
+Description:
+ HDF is a multi-object file format that facilitates the
+ transfer of various types of scientific data between
+ machines and operating systems. Machines currently sup-
+ ported include the Cray, Convex, HP, Vax, Sun, IBM
+ RS/6000, Silicon Graphics, Macintosh, and IBM PC comput-
+ ers. HDF allows self-definitions of data content and easy
+ extensibility for future enhancements or compatibility
+ with other standard formats. HDF includes Fortran and C
+ calling interfaces,and utilities to prepare raw image of
+ data files or for use with other NCSA software. The HDF
+ library contains interfaces for storing and retrieving
+ compressed or uncompressed 8-bit and 24-bit raster images
+ with palettes, n-Dimensional scientific datasets and
+ binary tables. An interface is also included that allows
+ arbitray grouping of other HDF objects.
+
+
+ -mi (mi@aldan.ziplink.net)
diff --git a/science/hdf/pkg-plist b/science/hdf/pkg-plist
new file mode 100644
index 000000000000..78c422777698
--- /dev/null
+++ b/science/hdf/pkg-plist
@@ -0,0 +1,89 @@
+bin/fp2hdf
+bin/hdf24to8
+bin/hdf2jpeg
+bin/hdf8to24
+bin/hdfcomp
+bin/hdfed
+bin/hdfls
+bin/hdfpack
+bin/hdftopal
+bin/hdftor8
+bin/hdfunpac
+bin/hdp
+bin/jpeg2hdf
+bin/ncdump
+bin/ncgen
+bin/paltohdf
+bin/r8tohdf
+bin/ristosds
+bin/vcompat
+bin/vmake
+bin/vshow
+lib/libmfhdf.a
+@exec ranlib %D/%F
+lib/libdf.a
+@exec ranlib %D/%F
+include/atom.h
+include/bitvect.h
+include/cdeflate.h
+include/cnbit.h
+include/cnone.h
+include/crle.h
+include/cskphuff.h
+include/df.h
+include/dfan.h
+include/dffunc.f90
+include/dffunc.inc
+include/dfgr.h
+include/dfi.h
+include/dfrig.h
+include/dfsd.h
+include/dfstubs.h
+include/dfufp2i.h
+include/dynarray.h
+include/hbitio.h
+include/hchunks.h
+include/hcomp.h
+include/hcompi.h
+include/hconv.h
+include/hdf.h
+include/hdf.f90
+include/hdf.inc
+include/hdf2netcdf.h
+include/hdfi.h
+include/herr.h
+include/hfile.h
+include/hkit.h
+include/hlimits.h
+include/hntdefs.h
+include/hproto.h
+include/htags.h
+include/linklist.h
+include/local_nc.h
+include/mfan.h
+include/mfgr.h
+include/mfhdf.h
+include/mstdio.h
+include/netcdf.h
+include/netcdf.f90
+include/netcdf.inc
+include/tbbt.h
+include/vattr.h
+include/vg.h
+man/man1/hdf.1.gz
+man/man1/hdfls.1.gz
+man/man1/hdfpack.1.gz
+man/man1/hdfunpac.1.gz
+man/man1/hdp.1.gz
+man/man1/ncdump.1.gz
+man/man1/ncgen.1.gz
+man/man1/ristosds.1.gz
+man/man3/hxsetcreatedir.3.gz
+man/man3/hxsetdir.3.gz
+man/man3/mfan.3.gz
+man/man3/netcdf.3.gz
+man/man3/netcdf.3f.gz
+man/man3/sdisdimval_bwcomp.3.gz
+man/man3/sdsetaccesstype.3.gz
+man/man3/sdsetdimval_comp.3.gz
+man/man3/vssetexternalfile.3.gz
diff --git a/science/hdf/scripts/post-patch b/science/hdf/scripts/post-patch
new file mode 100644
index 000000000000..d0c121f81cd2
--- /dev/null
+++ b/science/hdf/scripts/post-patch
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^CFLAGS = -ansi -O"`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,1 +72,1 @@
+-CFLAGS = -ansi -O
++#CFLAGS = -ansi -O
+END_OF_PATCH
+done
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^ZLIB_LIB = "`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,1 +72,1 @@
+-ZLIB_LIB = \$(TOP_SRCDIR)/hdf/zlib/libz.a
++#ZLIB_LIB = \$(TOP_SRCDIR)/hdf/zlib/libz.a
+END_OF_PATCH
+done
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^JPEG_LIB = "`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,1 +72,1 @@
+-JPEG_LIB = \$(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
++#JPEG_LIB = \$(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
+END_OF_PATCH
+done
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^ZLIBLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-ZLIBINC=\$(srcdir)/../zlib
+-ZLIBLIB=\$(srcdir)/../zlib
++ZLIBINC=/usr/include
++ZLIBLIB=/usr/lib
+END_OF_PATCH
+done
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^ZLIBLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-ZLIBLIB=\$(srcdir)/../zlib
+-ZLIBINC=\$(srcdir)/../zlib
++ZLIBLIB=/usr/lib
++ZLIBINC=/usr/include
+END_OF_PATCH
+done
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^JPEGLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-JPEGINC=\$(srcdir)/../jpeg
+-JPEGLIB=\$(srcdir)/../jpeg
++JPEGINC=\$(prefix)/include
++JPEGLIB=\$(prefix)/lib
+END_OF_PATCH
+done
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^JPEGLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-JPEGLIB=\$(srcdir)/../jpeg
+-JPEGINC=\$(srcdir)/../jpeg
++JPEGLIB=\$(prefix)/lib
++JPEGINC=\$(prefix)/include
+END_OF_PATCH
+done
diff --git a/science/hdf5-18/Makefile b/science/hdf5-18/Makefile
new file mode 100644
index 000000000000..934cfc344b4a
--- /dev/null
+++ b/science/hdf5-18/Makefile
@@ -0,0 +1,68 @@
+# New ports collection makefile for: HDF_lib
+# Version required: 4.1r1
+# Date created: 17 November 1996
+# Whom: mi
+#
+# $Id$
+#
+
+DISTNAME= HDF4.1r1
+PKGNAME= hdf-4.1r1
+CATEGORIES= graphics
+MASTER_SITES= ftp://ftp.ncsa.uiuc.edu/HDF/HDF_Current/tar/
+
+MAINTAINER= mi@aldan.ziplink.net
+
+LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg
+
+GNU_CONFIGURE= yes
+MAKE_FLAGS= CC="$(CC)" -f
+
+# This will create dummy Makefiles and some links in the jpeg and libz
+# subdirectories. This way, we do not need to hunt all the dependencies
+# out. Shame on the lib's developers, though, this can not be done through
+# `configure'. -mi
+pre-build:
+ test -d ${WRKSRC}/hdf/jpeg.came-with-HDF || \
+ ${MV} -f ${WRKSRC}/hdf/jpeg ${WRKSRC}/hdf/jpeg.came-with-HDF
+ -${MKDIR} ${WRKSRC}/hdf/jpeg
+ ${RM} -f ${WRKSRC}/hdf/jpeg/Makefile
+ ${ECHO} #Phony makefile > ${WRKSRC}/hdf/jpeg/Makefile
+ ${ECHO} >> ${WRKSRC}/hdf/jpeg/Makefile
+ ${ECHO} libjpeg.a: >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\t@echo Using the already installed JPEG library\n' \
+ >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\nclean:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\ninstall-lib:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\ninstall:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
+ -ln -s ${PREFIX}/lib/libjpeg* ${WRKSRC}/hdf/jpeg/
+ -ln -s ${PREFIX}/include/j*.h ${WRKSRC}/hdf/jpeg/
+ test -d ${WRKSRC}/hdf/zlib.came-with-HDF || \
+ ${MV} -f ${WRKSRC}/hdf/zlib ${WRKSRC}/hdf/zlib.came-with-HDF
+ -${MKDIR} ${WRKSRC}/hdf/zlib
+ ${RM} -f ${WRKSRC}/hdf/zlib/Makefile
+ ${ECHO} #Phony makefile > ${WRKSRC}/hdf/zlib/Makefile
+ ${ECHO} >> ${WRKSRC}/hdf/zlib/Makefile
+ ${ECHO} libzlib.a: >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\t@echo Using the already installed ZLIB library\n' \
+ >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\nclean:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\ninstall-lib:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\ninstall:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
+ -ln -s /usr/lib/libz* ${WRKSRC}/hdf/zlib/
+ -ln -s /usr/include/zconf.h /usr/include/zlib.h ${WRKSRC}/hdf/zlib/
+
+post-install:
+.if !defined(NOMANCOMPRESS)
+ @for man_page in `grep man./ ${PKGDIR}/PLIST` ; do \
+ mp=`echo $${man_page} | ${SED} s/\.gz//` ;\
+ ${ECHO} Compressing ${PREFIX}/$$mp ;\
+ ${GZIP_CMD} ${PREFIX}/$$mp ; done
+.endif
+ @for binary in `grep ^bin/ ${PKGDIR}/PLIST` ; do strip ${PREFIX}/$$binary; done
+ ${LDCONFIG} -m ${PREFIX}/lib
+
+test:
+ cd ${WRKSRC}; make $@
+
+.include <bsd.port.mk>
diff --git a/science/hdf5-18/distinfo b/science/hdf5-18/distinfo
new file mode 100644
index 000000000000..cb7643c276d2
--- /dev/null
+++ b/science/hdf5-18/distinfo
@@ -0,0 +1 @@
+MD5 (HDF4.1r1.tar.gz) = d9a759acc62d8d290b84d3ca7a0a6a2c
diff --git a/science/hdf5-18/pkg-comment b/science/hdf5-18/pkg-comment
new file mode 100644
index 000000000000..2f8affd569f0
--- /dev/null
+++ b/science/hdf5-18/pkg-comment
@@ -0,0 +1 @@
+Hierarchical Data Format library (from NCSA)
diff --git a/science/hdf5-18/pkg-descr b/science/hdf5-18/pkg-descr
new file mode 100644
index 000000000000..e34fb16bae11
--- /dev/null
+++ b/science/hdf5-18/pkg-descr
@@ -0,0 +1,23 @@
+From HDF's manpage:
+
+ hdf - Hierarchical Data Format library
+
+Description:
+ HDF is a multi-object file format that facilitates the
+ transfer of various types of scientific data between
+ machines and operating systems. Machines currently sup-
+ ported include the Cray, Convex, HP, Vax, Sun, IBM
+ RS/6000, Silicon Graphics, Macintosh, and IBM PC comput-
+ ers. HDF allows self-definitions of data content and easy
+ extensibility for future enhancements or compatibility
+ with other standard formats. HDF includes Fortran and C
+ calling interfaces,and utilities to prepare raw image of
+ data files or for use with other NCSA software. The HDF
+ library contains interfaces for storing and retrieving
+ compressed or uncompressed 8-bit and 24-bit raster images
+ with palettes, n-Dimensional scientific datasets and
+ binary tables. An interface is also included that allows
+ arbitray grouping of other HDF objects.
+
+
+ -mi (mi@aldan.ziplink.net)
diff --git a/science/hdf5-18/pkg-plist b/science/hdf5-18/pkg-plist
new file mode 100644
index 000000000000..78c422777698
--- /dev/null
+++ b/science/hdf5-18/pkg-plist
@@ -0,0 +1,89 @@
+bin/fp2hdf
+bin/hdf24to8
+bin/hdf2jpeg
+bin/hdf8to24
+bin/hdfcomp
+bin/hdfed
+bin/hdfls
+bin/hdfpack
+bin/hdftopal
+bin/hdftor8
+bin/hdfunpac
+bin/hdp
+bin/jpeg2hdf
+bin/ncdump
+bin/ncgen
+bin/paltohdf
+bin/r8tohdf
+bin/ristosds
+bin/vcompat
+bin/vmake
+bin/vshow
+lib/libmfhdf.a
+@exec ranlib %D/%F
+lib/libdf.a
+@exec ranlib %D/%F
+include/atom.h
+include/bitvect.h
+include/cdeflate.h
+include/cnbit.h
+include/cnone.h
+include/crle.h
+include/cskphuff.h
+include/df.h
+include/dfan.h
+include/dffunc.f90
+include/dffunc.inc
+include/dfgr.h
+include/dfi.h
+include/dfrig.h
+include/dfsd.h
+include/dfstubs.h
+include/dfufp2i.h
+include/dynarray.h
+include/hbitio.h
+include/hchunks.h
+include/hcomp.h
+include/hcompi.h
+include/hconv.h
+include/hdf.h
+include/hdf.f90
+include/hdf.inc
+include/hdf2netcdf.h
+include/hdfi.h
+include/herr.h
+include/hfile.h
+include/hkit.h
+include/hlimits.h
+include/hntdefs.h
+include/hproto.h
+include/htags.h
+include/linklist.h
+include/local_nc.h
+include/mfan.h
+include/mfgr.h
+include/mfhdf.h
+include/mstdio.h
+include/netcdf.h
+include/netcdf.f90
+include/netcdf.inc
+include/tbbt.h
+include/vattr.h
+include/vg.h
+man/man1/hdf.1.gz
+man/man1/hdfls.1.gz
+man/man1/hdfpack.1.gz
+man/man1/hdfunpac.1.gz
+man/man1/hdp.1.gz
+man/man1/ncdump.1.gz
+man/man1/ncgen.1.gz
+man/man1/ristosds.1.gz
+man/man3/hxsetcreatedir.3.gz
+man/man3/hxsetdir.3.gz
+man/man3/mfan.3.gz
+man/man3/netcdf.3.gz
+man/man3/netcdf.3f.gz
+man/man3/sdisdimval_bwcomp.3.gz
+man/man3/sdsetaccesstype.3.gz
+man/man3/sdsetdimval_comp.3.gz
+man/man3/vssetexternalfile.3.gz
diff --git a/science/hdf5-18/scripts/post-patch b/science/hdf5-18/scripts/post-patch
new file mode 100644
index 000000000000..d0c121f81cd2
--- /dev/null
+++ b/science/hdf5-18/scripts/post-patch
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^CFLAGS = -ansi -O"`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,1 +72,1 @@
+-CFLAGS = -ansi -O
++#CFLAGS = -ansi -O
+END_OF_PATCH
+done
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^ZLIB_LIB = "`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,1 +72,1 @@
+-ZLIB_LIB = \$(TOP_SRCDIR)/hdf/zlib/libz.a
++#ZLIB_LIB = \$(TOP_SRCDIR)/hdf/zlib/libz.a
+END_OF_PATCH
+done
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^JPEG_LIB = "`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,1 +72,1 @@
+-JPEG_LIB = \$(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
++#JPEG_LIB = \$(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
+END_OF_PATCH
+done
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^ZLIBLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-ZLIBINC=\$(srcdir)/../zlib
+-ZLIBLIB=\$(srcdir)/../zlib
++ZLIBINC=/usr/include
++ZLIBLIB=/usr/lib
+END_OF_PATCH
+done
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^ZLIBLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-ZLIBLIB=\$(srcdir)/../zlib
+-ZLIBINC=\$(srcdir)/../zlib
++ZLIBLIB=/usr/lib
++ZLIBINC=/usr/include
+END_OF_PATCH
+done
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^JPEGLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-JPEGINC=\$(srcdir)/../jpeg
+-JPEGLIB=\$(srcdir)/../jpeg
++JPEGINC=\$(prefix)/include
++JPEGLIB=\$(prefix)/lib
+END_OF_PATCH
+done
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^JPEGLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-JPEGLIB=\$(srcdir)/../jpeg
+-JPEGINC=\$(srcdir)/../jpeg
++JPEGLIB=\$(prefix)/lib
++JPEGINC=\$(prefix)/include
+END_OF_PATCH
+done
diff --git a/science/hdf5/Makefile b/science/hdf5/Makefile
new file mode 100644
index 000000000000..934cfc344b4a
--- /dev/null
+++ b/science/hdf5/Makefile
@@ -0,0 +1,68 @@
+# New ports collection makefile for: HDF_lib
+# Version required: 4.1r1
+# Date created: 17 November 1996
+# Whom: mi
+#
+# $Id$
+#
+
+DISTNAME= HDF4.1r1
+PKGNAME= hdf-4.1r1
+CATEGORIES= graphics
+MASTER_SITES= ftp://ftp.ncsa.uiuc.edu/HDF/HDF_Current/tar/
+
+MAINTAINER= mi@aldan.ziplink.net
+
+LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg
+
+GNU_CONFIGURE= yes
+MAKE_FLAGS= CC="$(CC)" -f
+
+# This will create dummy Makefiles and some links in the jpeg and libz
+# subdirectories. This way, we do not need to hunt all the dependencies
+# out. Shame on the lib's developers, though, this can not be done through
+# `configure'. -mi
+pre-build:
+ test -d ${WRKSRC}/hdf/jpeg.came-with-HDF || \
+ ${MV} -f ${WRKSRC}/hdf/jpeg ${WRKSRC}/hdf/jpeg.came-with-HDF
+ -${MKDIR} ${WRKSRC}/hdf/jpeg
+ ${RM} -f ${WRKSRC}/hdf/jpeg/Makefile
+ ${ECHO} #Phony makefile > ${WRKSRC}/hdf/jpeg/Makefile
+ ${ECHO} >> ${WRKSRC}/hdf/jpeg/Makefile
+ ${ECHO} libjpeg.a: >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\t@echo Using the already installed JPEG library\n' \
+ >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\nclean:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\ninstall-lib:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
+ printf '\ninstall:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
+ -ln -s ${PREFIX}/lib/libjpeg* ${WRKSRC}/hdf/jpeg/
+ -ln -s ${PREFIX}/include/j*.h ${WRKSRC}/hdf/jpeg/
+ test -d ${WRKSRC}/hdf/zlib.came-with-HDF || \
+ ${MV} -f ${WRKSRC}/hdf/zlib ${WRKSRC}/hdf/zlib.came-with-HDF
+ -${MKDIR} ${WRKSRC}/hdf/zlib
+ ${RM} -f ${WRKSRC}/hdf/zlib/Makefile
+ ${ECHO} #Phony makefile > ${WRKSRC}/hdf/zlib/Makefile
+ ${ECHO} >> ${WRKSRC}/hdf/zlib/Makefile
+ ${ECHO} libzlib.a: >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\t@echo Using the already installed ZLIB library\n' \
+ >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\nclean:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\ninstall-lib:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
+ printf '\ninstall:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
+ -ln -s /usr/lib/libz* ${WRKSRC}/hdf/zlib/
+ -ln -s /usr/include/zconf.h /usr/include/zlib.h ${WRKSRC}/hdf/zlib/
+
+post-install:
+.if !defined(NOMANCOMPRESS)
+ @for man_page in `grep man./ ${PKGDIR}/PLIST` ; do \
+ mp=`echo $${man_page} | ${SED} s/\.gz//` ;\
+ ${ECHO} Compressing ${PREFIX}/$$mp ;\
+ ${GZIP_CMD} ${PREFIX}/$$mp ; done
+.endif
+ @for binary in `grep ^bin/ ${PKGDIR}/PLIST` ; do strip ${PREFIX}/$$binary; done
+ ${LDCONFIG} -m ${PREFIX}/lib
+
+test:
+ cd ${WRKSRC}; make $@
+
+.include <bsd.port.mk>
diff --git a/science/hdf5/distinfo b/science/hdf5/distinfo
new file mode 100644
index 000000000000..cb7643c276d2
--- /dev/null
+++ b/science/hdf5/distinfo
@@ -0,0 +1 @@
+MD5 (HDF4.1r1.tar.gz) = d9a759acc62d8d290b84d3ca7a0a6a2c
diff --git a/science/hdf5/pkg-comment b/science/hdf5/pkg-comment
new file mode 100644
index 000000000000..2f8affd569f0
--- /dev/null
+++ b/science/hdf5/pkg-comment
@@ -0,0 +1 @@
+Hierarchical Data Format library (from NCSA)
diff --git a/science/hdf5/pkg-descr b/science/hdf5/pkg-descr
new file mode 100644
index 000000000000..e34fb16bae11
--- /dev/null
+++ b/science/hdf5/pkg-descr
@@ -0,0 +1,23 @@
+From HDF's manpage:
+
+ hdf - Hierarchical Data Format library
+
+Description:
+ HDF is a multi-object file format that facilitates the
+ transfer of various types of scientific data between
+ machines and operating systems. Machines currently sup-
+ ported include the Cray, Convex, HP, Vax, Sun, IBM
+ RS/6000, Silicon Graphics, Macintosh, and IBM PC comput-
+ ers. HDF allows self-definitions of data content and easy
+ extensibility for future enhancements or compatibility
+ with other standard formats. HDF includes Fortran and C
+ calling interfaces,and utilities to prepare raw image of
+ data files or for use with other NCSA software. The HDF
+ library contains interfaces for storing and retrieving
+ compressed or uncompressed 8-bit and 24-bit raster images
+ with palettes, n-Dimensional scientific datasets and
+ binary tables. An interface is also included that allows
+ arbitray grouping of other HDF objects.
+
+
+ -mi (mi@aldan.ziplink.net)
diff --git a/science/hdf5/pkg-plist b/science/hdf5/pkg-plist
new file mode 100644
index 000000000000..78c422777698
--- /dev/null
+++ b/science/hdf5/pkg-plist
@@ -0,0 +1,89 @@
+bin/fp2hdf
+bin/hdf24to8
+bin/hdf2jpeg
+bin/hdf8to24
+bin/hdfcomp
+bin/hdfed
+bin/hdfls
+bin/hdfpack
+bin/hdftopal
+bin/hdftor8
+bin/hdfunpac
+bin/hdp
+bin/jpeg2hdf
+bin/ncdump
+bin/ncgen
+bin/paltohdf
+bin/r8tohdf
+bin/ristosds
+bin/vcompat
+bin/vmake
+bin/vshow
+lib/libmfhdf.a
+@exec ranlib %D/%F
+lib/libdf.a
+@exec ranlib %D/%F
+include/atom.h
+include/bitvect.h
+include/cdeflate.h
+include/cnbit.h
+include/cnone.h
+include/crle.h
+include/cskphuff.h
+include/df.h
+include/dfan.h
+include/dffunc.f90
+include/dffunc.inc
+include/dfgr.h
+include/dfi.h
+include/dfrig.h
+include/dfsd.h
+include/dfstubs.h
+include/dfufp2i.h
+include/dynarray.h
+include/hbitio.h
+include/hchunks.h
+include/hcomp.h
+include/hcompi.h
+include/hconv.h
+include/hdf.h
+include/hdf.f90
+include/hdf.inc
+include/hdf2netcdf.h
+include/hdfi.h
+include/herr.h
+include/hfile.h
+include/hkit.h
+include/hlimits.h
+include/hntdefs.h
+include/hproto.h
+include/htags.h
+include/linklist.h
+include/local_nc.h
+include/mfan.h
+include/mfgr.h
+include/mfhdf.h
+include/mstdio.h
+include/netcdf.h
+include/netcdf.f90
+include/netcdf.inc
+include/tbbt.h
+include/vattr.h
+include/vg.h
+man/man1/hdf.1.gz
+man/man1/hdfls.1.gz
+man/man1/hdfpack.1.gz
+man/man1/hdfunpac.1.gz
+man/man1/hdp.1.gz
+man/man1/ncdump.1.gz
+man/man1/ncgen.1.gz
+man/man1/ristosds.1.gz
+man/man3/hxsetcreatedir.3.gz
+man/man3/hxsetdir.3.gz
+man/man3/mfan.3.gz
+man/man3/netcdf.3.gz
+man/man3/netcdf.3f.gz
+man/man3/sdisdimval_bwcomp.3.gz
+man/man3/sdsetaccesstype.3.gz
+man/man3/sdsetdimval_comp.3.gz
+man/man3/vssetexternalfile.3.gz
diff --git a/science/hdf5/scripts/post-patch b/science/hdf5/scripts/post-patch
new file mode 100644
index 000000000000..d0c121f81cd2
--- /dev/null
+++ b/science/hdf5/scripts/post-patch
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^CFLAGS = -ansi -O"`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,1 +72,1 @@
+-CFLAGS = -ansi -O
++#CFLAGS = -ansi -O
+END_OF_PATCH
+done
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^ZLIB_LIB = "`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,1 +72,1 @@
+-ZLIB_LIB = \$(TOP_SRCDIR)/hdf/zlib/libz.a
++#ZLIB_LIB = \$(TOP_SRCDIR)/hdf/zlib/libz.a
+END_OF_PATCH
+done
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^JPEG_LIB = "`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,1 +72,1 @@
+-JPEG_LIB = \$(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
++#JPEG_LIB = \$(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
+END_OF_PATCH
+done
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^ZLIBLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-ZLIBINC=\$(srcdir)/../zlib
+-ZLIBLIB=\$(srcdir)/../zlib
++ZLIBINC=/usr/include
++ZLIBLIB=/usr/lib
+END_OF_PATCH
+done
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^ZLIBLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-ZLIBLIB=\$(srcdir)/../zlib
+-ZLIBINC=\$(srcdir)/../zlib
++ZLIBLIB=/usr/lib
++ZLIBINC=/usr/include
+END_OF_PATCH
+done
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^JPEGLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-JPEGINC=\$(srcdir)/../jpeg
+-JPEGLIB=\$(srcdir)/../jpeg
++JPEGINC=\$(prefix)/include
++JPEGLIB=\$(prefix)/lib
+END_OF_PATCH
+done
+
+for f in `find $1 -type f -name Makefile.in -print | xargs grep -l "^JPEGLIB="`
+do
+patch -p << END_OF_PATCH
+--- $f.orig
++++ $f
+@@ -72,2 +72,2 @@
+-JPEGLIB=\$(srcdir)/../jpeg
+-JPEGINC=\$(srcdir)/../jpeg
++JPEGLIB=\$(prefix)/lib
++JPEGINC=\$(prefix)/include
+END_OF_PATCH
+done