View | Details | Raw Unified | Return to bug 14717
Collapse All | Expand All

(-)./Makefile (-49 / +18 lines)
Lines 3-68 Link Here
3
# Date created:		17 November 1996
3
# Date created:		17 November 1996
4
# Whom:			mi
4
# Whom:			mi
5
#
5
#
6
# $FreeBSD: ports/graphics/hdf/Makefile,v 1.14 1999/10/26 21:18:37 fenner Exp $
6
# $FreeBSD: ports/graphics/hdf/Makefile,v 1.13 1999/08/28 01:57:15 mharo Exp $
7
#
7
#
8
8
9
DISTNAME=	HDF4.1r2
9
DISTNAME=	HDF4.1r3
10
PKGNAME=	hdf-4.1r2
10
PKGNAME=	hdf-4.1r3
11
CATEGORIES=	graphics
11
CATEGORIES=	graphics
12
MASTER_SITES=	ftp://ftp.ncsa.uiuc.edu/HDF/HDF4.1r2/tar/
12
MASTER_SITES=	ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF4.1r3/tar/
13
13
14
MAINTAINER=	mi@aldan.algebra.com
14
MAINTAINER=	mi@aldan.algebra.com
15
15
16
LIB_DEPENDS=	jpeg.9:${PORTSDIR}/graphics/jpeg
16
LIB_DEPENDS=	jpeg.9:${PORTSDIR}/graphics/jpeg
17
17
18
MAN1=		hdf.1 hdfunpac.1 ncdump.1 ncgen.1
18
MAN1=		hdf.1 hdfunpac.1 ncdump.1 ncgen.1
19
MAN3=		gr_chunk.3
20
MANCOMPRESSED=	maybe
19
21
20
GNU_CONFIGURE=	yes
22
MAKE_ARGS=	PREFIX="${PREFIX}" -j 2
21
FC?=		f77 # Can also be g77 for the newer one
22
MAKE_FLAGS=	CC="$(CC)" FC="${FC}" -f
23
MAKE_ENV=	pwrkdir=${WRKDIR}
24
#"wrkdir" doesn't work for some reason in the above
25
26
# This will create dummy Makefiles and some links in the jpeg and libz
27
# subdirectories. This way, we do not need to hunt all the dependencies
28
# out. Shame on the lib's developers, though, this can not be done through
29
# `configure'.	-mi
30
pre-build:
31
	${AR} -r ${WRKDIR}/libz.a /dev/null
32
	${RANLIB} ${WRKDIR}/libz.a
33
	test -d ${WRKSRC}/hdf/jpeg.came-with-HDF || \
34
		${MV} -f ${WRKSRC}/hdf/jpeg ${WRKSRC}/hdf/jpeg.came-with-HDF
35
	-${MKDIR} ${WRKSRC}/hdf/jpeg
36
	${RM} -f ${WRKSRC}/hdf/jpeg/Makefile
37
	${ECHO} #Phony makefile > ${WRKSRC}/hdf/jpeg/Makefile
38
	${ECHO} >> ${WRKSRC}/hdf/jpeg/Makefile
39
	${ECHO} libjpeg.a: >> ${WRKSRC}/hdf/jpeg/Makefile
40
	printf '\t@${ECHO} Using the already installed JPEG library\n' \
41
		>> ${WRKSRC}/hdf/jpeg/Makefile
42
	printf '\nclean:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
43
	printf '\ninstall-lib:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
44
	printf '\ninstall:\n\ttrue\n' >> ${WRKSRC}/hdf/jpeg/Makefile
45
	-${LN} -s ${PREFIX}/lib/libjpeg* ${WRKSRC}/hdf/jpeg/
46
	-${LN} -s ${PREFIX}/include/j*.h ${WRKSRC}/hdf/jpeg/
47
	test -d ${WRKSRC}/hdf/zlib.came-with-HDF || \
48
		${MV} -f ${WRKSRC}/hdf/zlib ${WRKSRC}/hdf/zlib.came-with-HDF
49
	-${MKDIR} ${WRKSRC}/hdf/zlib
50
	${RM} -f ${WRKSRC}/hdf/zlib/Makefile
51
	${ECHO} #Phony makefile > ${WRKSRC}/hdf/zlib/Makefile
52
	${ECHO} >> ${WRKSRC}/hdf/zlib/Makefile
53
	${ECHO} libzlib.a: >> ${WRKSRC}/hdf/zlib/Makefile
54
	printf '\t@${ECHO} Using the already installed ZLIB library\n' \
55
		>> ${WRKSRC}/hdf/zlib/Makefile
56
	printf '\nclean:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
57
	printf '\ninstall-lib:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
58
	printf '\ninstall:\n\ttrue\n' >> ${WRKSRC}/hdf/zlib/Makefile
59
	-${LN} -s /usr/lib/${BINFORMAT}/libz* ${WRKSRC}/hdf/zlib/
60
	-${LN} -s /usr/include/zconf.h /usr/include/zlib.h ${WRKSRC}/hdf/zlib/
61
23
62
post-install:
24
post-patch:
63
	@for binary in `${GREP} ^bin/ ${PLIST}` ; do strip ${PREFIX}/$$binary; done
25
	${RM} -rf ${WRKSRC}/hdf/jpeg
26
	${RM} -rf ${WRKSRC}/hdf/zlib
27
28
do-configure:
29
	${CP} -rp ${FILESDIR}/Makefile ${FILESDIR}/hdf \
30
		${FILESDIR}/mfhdf ${FILESDIR}/man ${WRKSRC}
31
	${LN} -s config/netcdf-fbsd.h ${WRKSRC}/mfhdf/libsrc/netcdf.h
32
	${LN} -s netcdf-fbsd.inc ${WRKSRC}/mfhdf/fortran/config/netcdf.inc
64
33
65
test:
34
test: build
66
	cd ${WRKSRC}; make ${MAKE_FLAGS} ${MAKEFILE} test
35
	cd ${WRKSRC}; ${MAKE} test
67
36
68
.include <bsd.port.mk>
37
.include <bsd.port.mk>
(-)./files/Makefile (+14 lines)
Line 0 Link Here
1
SUBDIR	 = hdf mfhdf man
2
#PREFIX	?= /usr/local
3
LIBDIR	?= ${PREFIX}/lib
4
BINDIR	?= ${PREFIX}/bin
5
6
.MAKEFLAGS: PREFIX=${PREFIX} LIBDIR=${LIBDIR} BINDIR=${BINDIR}
7
8
test: all
9
	# testing in hdf
10
	@cd hdf && ${MAKE} hdf-test
11
	# testing in mfhdf
12
	@cd mfhdf && ${MAKE} test
13
14
.include <bsd.subdir.mk>
(-)./files/hdf/Makefile (+7 lines)
Line 0 Link Here
1
SUBDIR	 = src util test
2
3
hdf-test: all
4
	cd util && ${MAKE} test
5
	cd test && ${MAKE} test
6
7
.include <bsd.subdir.mk>
(-)./files/hdf/src/Makefile (+40 lines)
Line 0 Link Here
1
LIB=df
2
3
# uncomment the line below to avoid building static libraries
4
#INTERNALLIB=YES
5
LIBDIR=${PREFIX}/lib
6
7
SHLIB_MAJOR=1
8
SHLIB_MINOR=0
9
10
SRCS=atom.c  bitvect.c  cdeflate.c  cnbit.c  cnone.c  crle.c  cskphuff.c \
11
	df24.c  df24f.c dfan.c  dfanf.c dfcomp.c  dfconv.c dff.c  dfgr.c \
12
	dfgroup.c  dfimcomp.c  dfjpeg.c  dfkconv.c  dfkcray.c  dfkfuji.c \
13
	dfknat.c dfkswap.c dfkvms.c dfp.c  dfpf.c dfr8.c dfr8f.c dfrle.c \
14
	dfsd.c dfsdf.c dfstubs.c dfufp2i.c dfunjpeg.c dfutil.c dfutilf.c \
15
	dir_mac.c  dynarray.c   glist.c  hbitio.c   hblocks.c  hbuffer.c \
16
	hchunks.c hcomp.c hcompri.c  hdfalloc.c herr.c herrf.c hextelt.c \
17
	hfile.c hfiledd.c hfilef.c hkit.c linklist.c mcache.c \
18
	mfan.c mfanf.c  mfgr.c mfgrf.c mstdio.c tbbt.c  vattr.c vattrf.c \
19
	vconv.c  vg.c vgf.c  vgp.c  vhi.c vio.c  vparse.c vrw.c  vsfld.c \
20
	df24ff.f  dfanff.f dfff.f  dfpff.f dfr8ff.f  dfsdff.f dfufp2if.f \
21
	hfileff.f mfgrff.f vattrff.f vgff.f
22
23
CFLAGS	+= -I${PREFIX}/include
24
FFLAGS	+= ${CFLAGS}
25
LDADD	+= -L${PREFIX}/lib -ljpeg -lf2c -lz
26
27
28
afterinstall:
29
	install -c -o root -g wheel -m 444 \
30
		atom.h  bitvect.h  cdeflate.h   cnbit.h  cnone.h  crle.h \
31
		cskphuff.h df.h dfan.h  dfconvrt.h dfgr.h dfi.h dfivms.h \
32
		dfrig.h dfsd.h dfstubs.h  dfufp2i.h dir_mac.h dynarray.h \
33
		glist.h  hbitio.h  hchunks.h  hcomp.h  hcompi.h  hconv.h \
34
		hdf.h hdfi.h  herr.h hfile.h hkit.h  hlimits.h hntdefs.h \
35
		hproto.h hqueue.h htags.h linklist.h maldebug.h mcache.h \
36
		mfan.h mfgr.h mstdio.h patchlevel.h sys_dir_mac.h tbbt.h \
37
		trace.h vattr.h vg.h vgint.h hdf.inc dffunc.inc \
38
			${PREFIX}/include
39
40
.include <bsd.lib.mk>
(-)./files/hdf/test/Makefile (+66 lines)
Line 0 Link Here
1
CSRCS= 	rig.c sdstr.c blocks.c an.c anfile.c extelt.c file.c file1.c vers.c \
2
	sdmms.c sdnmms.c slab.c litend.c tvset.c comp.c bitio.c tree.c macros.c \
3
	conv.c nbit.c man.c mgr.c testhdf.c tbv.c tvsfpack.c chunks.c tvattr.c \
4
    buffer.c
5
6
COBJS=	${CSRCS:S/.c/.o/g}
7
8
FSRCS= fortest.c fortestF.f forsupff.f forsupf.c \
9
	manf.f mgrf.f slabwf.f t24f.f tanf.f tanfilef.f tpf.f tr8f.f \
10
	tsdmmsf.f tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f \
11
        tvsetf.f, tvattrf.f
12
13
FOBJS = fortestF.o forsupff.o forsupf.o \
14
	manf.o mgrf.o slabwf.o t24f.o tanf.o tanfilef.o tpf.o tr8f.o \
15
	tsdmmsf.o tsdnmmsf.o tsdnntf.o tsdntf.o tsdstrf.o tstubsf.o  \
16
        tvsetf.o tvattrf.o
17
18
#CFORSUPSRCS = forsupf.c
19
20
HDFLIB	 = ${.CURDIR}/../src
21
CFLAGS	+= -I${HDFLIB}
22
FFLAGS	+= ${CFLAGS} -Nn802 -Nx400
23
24
FTESTS = fortest fortestF
25
26
all: testhdf $(FTESTS) gentest
27
28
#CFORSUPOBJS = forsupf.o
29
30
TESTF = fortest.o
31
32
# directory used by extelt test.
33
TESTDIR = testdir
34
35
$(FOBJS): fortest.inc
36
37
test: atest-hdf
38
39
atest-hdf: testhdf $(FTESTS)
40
	-rm -f *.hdf 
41
	env LD_LIBRARY_PATH=${.CURDIR}/../src ./testhdf
42
	-rm -f *.hdf 
43
	env LD_LIBRARY_PATH=${.CURDIR}/../src ./fortest
44
45
testhdf: $(COBJS) $(HDFLIB)/libdf.so
46
	$(CC) -o testhdf $(COBJS) $(HDFLIB)/libdf.so -lm
47
	test -d $(TESTDIR) || mkdir $(TESTDIR)
48
49
fortestF: $(FOBJS) $(HDFLIB)/libdf.so
50
	$(FC) $(FFLAGS) -o $@ $(FOBJS) $(HDFLIB)/libdf.so -lm
51
52
fortest: $(HDFLIB)/libdf.so fortest.c $(CHDRS)
53
	$(CC) $(CFLAGS) -o fortest fortest.c $(HDFLIB)/libdf.so -lm
54
55
gentest: gentest.c $(HDFLIB)/libdf.so
56
	$(CC) $(CFLAGS) gentest.c -o gentest $(HDFLIB)/libdf.so -lm
57
58
clean: 
59
	-rm -f $(COBJS) testhdf $(FOBJS) $(FTESTS) \
60
	core *.hdf ptesthdf qtesthdf gentest *.o fortest.arg $(TESTDIR)/* \
61
	.depend
62
63
depend: 
64
	mkdep ${CFLAGS} ${CSRCS}
65
66
install:
(-)./files/hdf/util/Makefile (+28 lines)
Line 0 Link Here
1
UTILS	 = hdf24to8 hdfcomp hdfls hdfpack hdftopal hdftor8 paltohdf \
2
        r8tohdf ristosds  vmake vshow hdf8to24 hdf2jpeg jpeg2hdf fp2hdf \
3
	hdfunpac vcompat
4
5
all: ${UTILS} hdfed
6
7
HEOBJ = he_main.o he_cntrl.o he_disp.o he_file.o
8
9
#CFLAGS	+= -I${PREFIX}/include -I${.CURDIR}/../src/
10
CFLAGS	+=  -I${.CURDIR}/../src/
11
#LDFLAGS	+= -L${PREFIX}/lib -ljpeg -L${.CURDIR}/../src/ -ldf -lz
12
LDFLAGS	+= -L${.CURDIR}/../src/ -ldf
13
14
hdfed: he.h he_proto.h $(HEOBJ)
15
	$(CC) $(HEOBJ) $(LDFLAGS) -o hdfed
16
17
test: all fptest
18
	env LD_LIBRARY_PATH=${.CURDIR}/../src ./testutil.sh
19
20
clean:
21
	-rm -f *.o $(UTILS) hdfed fptest
22
	-rm -f o* ctx* cb* fptestf .depend
23
24
depend:
25
	mkdep ${CFLAGS} ${UTILS:S/$/.c/g} ${HEOBJ:S/.o/.c/g}
26
27
install: all
28
	install -c -s -o root -g wheel -m 555 ${UTILS} hdfed ${BINDIR}
(-)./files/man/Makefile (+15 lines)
Line 0 Link Here
1
MANDIR	=	${PREFIX}/man/man
2
3
MAN1	=	hdf.1 hdfunpac.1
4
MAN3	=	gr_chunk.3
5
6
.include <bsd.man.mk>
7
8
install: all-man maninstall
9
10
clean:
11
	-rm -f *.gz
12
13
all: all-man
14
15
depend:
(-)./files/md5 (-1 / +1 lines)
Line 1 Link Here
1
MD5 (HDF4.1r2.tar.gz) = 52814865529791e3a39637fd851a7143
1
MD5 (HDF4.1r3.tar.gz) = 975f84ad8c5910841995c9d339fbd8bb
(-)./files/mfhdf/Makefile (+11 lines)
Line 0 Link Here
1
SUBDIR		= fortran libsrc ncgen ncdump nctest dumper
2
3
.include <bsd.subdir.mk>
4
5
test: all
6
	@for d in ${SUBDIR} ; do \
7
		echo "===> testing in $$d"; \
8
		cd $$d; \
9
		${MAKE} test; \
10
		cd ..; \
11
	done
(-)./files/mfhdf/dumper/Makefile (+11 lines)
Line 0 Link Here
1
PROG		 = hdp
2
NOMAN		 = 1
3
LDFLAGS		+= -L${.CURDIR}/../libsrc -L${.CURDIR}/../../hdf/src -lmfhdf -ldf
4
CFLAGS		+= -I${.CURDIR}/../libsrc -I${.CURDIR}/../../hdf/src
5
6
SRCS		=  hdp.c hdp_list.c hdp_sds.c hdp_util.c hdp_vd.c hdp_vg.c hdp_rig.c show.c hdp_dump.c hdp_gr.c
7
8
.include <bsd.prog.mk>
9
10
test: ${PROG}
11
	env LD_LIBRARY_PATH=${.CURDIR}/../libsrc:${.CURDIR}/../../hdf/src sh testhdp.sh
(-)./files/mfhdf/fortran/Makefile (+40 lines)
Line 0 Link Here
1
.PATH:	${.CURDIR} ${.CURDIR}/config
2
3
all:
4
5
NOMAN	 =	1
6
7
FFLAGS	+=	${CFLAGS} -DNDEBUG -Nn802 -Nx400
8
9
LDFLAGS	+=	-L${.CURDIR}/../libsrc -L${.CURDIR}/../../hdf/src -lmfhdf -ldf
10
11
afterinstall:
12
	install -c -o root -g wheel -m 444 config/netcdf-fbsd.inc \
13
		${PREFIX}/include/netcdf.inc
14
15
.include <bsd.prog.mk>
16
17
ENVIR	 =	env LD_LIBRARY_PATH=${.CURDIR}/../libsrc:${.CURDIR}/../../hdf/src
18
19
CLEANFILES+=	hdftest hdftest.o ftest ftest-fbsd.o
20
21
config/netcdf.inc:
22
	ln -s netcdf-fbsd.inc config/netcdf.inc
23
24
ftest:	ftest-fbsd.f config/netcdf.inc
25
	${MAKE} PROG=$@ SRCS=ftest-fbsd.f $@
26
27
hdftest: hdftest.f
28
	${MAKE} PROG=$@ SRCS=hdftest.f $@
29
30
test: ftest hdftest
31
	mkdir -p testdir
32
	# ================================
33
	#  netCDF Fortran interface tests
34
	# ================================
35
	${ENVIR} ./ftest
36
	${ENVIR} ./hdftest > hdfout.new
37
	@diff -Bb hdfout.new hdftst.sav && \
38
		echo "*** HDF-SD Fortran interface tests passed ***" || \
39
		(echo "*** HDF-SD Fortran interface tests failed ***"; \
40
		echo "The above differences are OK if small")
(-)./files/mfhdf/libsrc/Makefile (+41 lines)
Line 0 Link Here
1
.PATH:  ${.CURDIR} ${.CURDIR}/../fortran/config ${.CURDIR}/../fortran
2
3
SRCS		= array.c attr.c cdf.c dim.c file.c iarray.c error.c \
4
		  globdef.c putget.c putgetg.c sharray.c string.c var.c \
5
		  hdfsds.c mfsd.c nssdc.c xdrposix.c \
6
		  jackets-fbsd.c mfsdf.c mfsdff.f
7
8
LIB		= mfhdf
9
SHLIB_MAJOR	= 2
10
SHLIB_MINOR	= 3
11
12
LIBDIR		= ${PREFIX}/lib
13
14
# uncomment the line below to avoid building static libraries
15
#INTERNALLIB	= Yes
16
17
CFLAGS	+=	-DNDEBUG -DHDF -I${.CURDIR}/../../hdf/src -I${.CURDIR}
18
.if ${MACHINE_ARCH} == "i386"
19
CFLAGS	+=	-DSWAP
20
.endif
21
22
LDADD	+=	-L${.CURDIR}/../../hdf/src -ldf
23
LDFLAGS	+=	-L. -l${LIB} ${LDADD}
24
25
afterinstall:
26
	install -c -o root -g wheel -m 444 hdf2netcdf.h local_nc.h \
27
		mfhdf.h netcdf.h ${PREFIX}/include
28
29
.include <bsd.lib.mk>
30
31
test: ${SHLIB_NAME} cdftest hdftest
32
	env LD_LIBRARY_PATH=${.CURDIR}:${.CURDIR}/../../hdf/src ./cdftest > cdfout.new
33
	@diff cdfout.new testout.sav && \
34
		echo "*** netCDF passes formatted test ***" || \
35
                (echo "*** netCDF fails formatted test ***" ; \
36
                echo "The above differences are OK if small")
37
	env LD_LIBRARY_PATH=${.CURDIR}:${.CURDIR}/../../hdf/src ./hdftest > hdfout.new
38
	@diff hdfout.new hdfout.sav && \
39
		echo "*** HDF passes formatted test ***" || \
40
                (echo "*** HDF fails formatted test ***" ; \
41
                echo "The above differences are OK if small")
(-)./files/mfhdf/ncdump/Makefile (+20 lines)
Line 0 Link Here
1
PROG		 = ncdump
2
MANDIR		 = ${PREFIX}/man/man
3
4
LDFLAGS		+= -L${.CURDIR}/../libsrc -L${.CURDIR}/../../hdf/src -lmfhdf -ldf
5
CFLAGS		+= -I${.CURDIR}/../libsrc
6
SRCS		=  ncdump.c vardata.c dumplib.c
7
8
.include <bsd.prog.mk>
9
10
ENVIR		= env LD_LIBRARY_PATH=${.CURDIR}/../../hdf/src:${.CURDIR}/../libsrc
11
NCGEN		= ${.CURDIR}/../ncgen/ncgen
12
13
test:		$(PROG) test0.cdl
14
	${ENVIR} $(NCGEN) -o test0.nc -n test0.cdl
15
	${ENVIR} ./$(PROG) test0.nc > test1.cdl
16
	${ENVIR} $(NCGEN) -o test1.nc -n test1.cdl
17
	${ENVIR} ./$(PROG) -n test0 test1.nc > test2.cdl
18
	@cmp test1.cdl test2.cdl && \
19
	    echo "*** $(PROGRAM) test successful ***" ; \
20
	    rm test1.cdl test1.nc test2.cdl
(-)./files/mfhdf/ncgen/Makefile (+70 lines)
Line 0 Link Here
1
PROG		 = ncgen
2
MANDIR		 = ${PREFIX}/man/man
3
LDFLAGS		+= -L${.CURDIR}/../libsrc -L${.CURDIR}/../../hdf/src -lmfhdf -ldf
4
CFLAGS		+= -I${.CURDIR}/../libsrc -I${.CURDIR}/../../hdf/src -DNDEBUG
5
SRCS		 = main.c generate.c load.c ncgentab.c escapes.c \
6
		  getfill.c init.c close.c genlib.c
7
8
ENVIR		 = env LD_LIBRARY_PATH=${.CURDIR}/../libsrc:${.CURDIR}/../../hdf/src
9
NCDUMP		 = ${.CURDIR}/../ncdump/ncdump
10
11
test:           $(PROG) test0.cdl btest ctest ftest
12
13
ncgenyy.c: ncgen.l
14
	${LEX} ${LFLAGS} ncgen.l
15
	mv lex.yy.c ncgenyy.c
16
	
17
ncgentab.c: ncgenyy.c ncgen.y
18
	${YACC} ${YFLAGS} ncgen.y
19
	mv y.tab.c ncgentab.c
20
	mv y.tab.h ncgentab.h
21
22
.include <bsd.prog.mk>
23
24
#
25
# test "-b" option of ncgen
26
#
27
btest:		$(PROG) test0.cdl test1.cdl
28
	${ENVIR} ./$(PROG) -b test1.cdl
29
	${ENVIR} $(NCDUMP) test1.nc > test2.cdl
30
	@diff test1.cdl test2.cdl && \
31
	    echo "*** $(PROG) -b test successful ***"
32
33
#
34
# test "-c" option of ncgen
35
#
36
ctest:		test1.cdl ctest0
37
	${ENVIR} ./ctest0		# tests `-c' option, creates ctest0.nc
38
	${ENVIR} $(NCDUMP) -n test1 ctest0.nc > ctest1.cdl
39
	@diff test1.cdl ctest1.cdl && \
40
	    echo "*** $(PROG) -c test successful ***"
41
42
ctest0:		ncgen test0.cdl
43
	${ENVIR} ./$(PROG) -c -o ctest0.nc test0.cdl > test0.c
44
	$(CC) $(CFLAGS) -o $@ test0.c ${LDFLAGS}
45
46
#
47
# test "-f" option of ncgen
48
#
49
ftest:	test1.cdl ftest0
50
	${ENVIR} ./ftest0
51
	${ENVIR} $(NCDUMP) -n test1 ftest0.nc > ftest1.cdl
52
	@if diff test1.cdl ftest1.cdl; then \
53
		echo "*** ncgen -f test successful ***"; \
54
	else \
55
		echo "*** ncgen -f test failed " \
56
		    "(but roundoff differences are OK) ***"; \
57
	fi
58
59
ftest0:	$(PROG) test0.cdl netcdf.inc
60
	${ENVIR} ./$(PROG) -f -o ftest0.nc test0.cdl > test0.f; \
61
	$(FC) $(FFLAGS) ${CFLAGS} -o $@ test0.f ${LDFLAGS}
62
63
test1.cdl:	test0.nc
64
	${ENVIR} $(NCDUMP) -n test1 test0.nc > $@
65
66
test0.nc:	$(PROG) test0.cdl
67
	${ENVIR} ./$(PROG) -b -o test0.nc test0.cdl
68
69
netcdf.inc:
70
	ln -s ../fortran/config/netcdf-fbsd.inc $@
(-)./files/mfhdf/nctest/Makefile (+17 lines)
Line 0 Link Here
1
PROG		 = nctest
2
NOMAN		 = 1
3
CFLAGS		+= -I${.CURDIR}/../libsrc
4
LDFLAGS		+= -L${.CURDIR}/../libsrc -L${.CURDIR}/../../hdf/src -lmfhdf -ldf
5
SRCS		= varget.c vargetg.c varput.c varputg.c vardef.c vartests.c \
6
		  vputget.c vputgetg.c driver.c cdftests.c dimtests.c rec.c \
7
		  atttests.c misctest.c add.c error.c emalloc.c val.c slabs.c
8
9
install:
10
11
.include <bsd.prog.mk>
12
13
test:		$(PROG)
14
	@ echo "==========================="
15
	@ echo "netCDF C interface tests"
16
	@ echo "==========================="
17
	env LD_LIBRARY_PATH=${.CURDIR}/../libsrc:${.CURDIR}/../../hdf/src ./$(PROG)
(-)./patches/patch-aa (-20 lines)
Lines 1-20 Link Here
1
--- config/mh-fbsd.orig	Fri Oct 24 20:54:55 1997
2
+++ config/mh-fbsd	Fri May 29 10:45:15 1998
3
@@ -26 +26 @@
4
-CFLAGS=-ansi -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wnested-externs -pedantic -O2
5
+CFLAGS+=-ansi -DNDEBUG
6
@@ -33,2 +33,2 @@
7
-FC = f77
8
-FFLAGS = -O -Nn802 -Nx400
9
+FC ?= f77
10
+FFLAGS = $(CFLAGS) -Nn802 -Nx400
11
@@ -177,0 +178,9 @@
12
+# Have to do the following as files (not `-lz') for dependencies to work :(
13
+# XXX Version numbers will change in the future.	-mi
14
+JPEG_LIB	= $(prefix)/lib/libjpeg.so # separate port
15
+ZLIB_LIB	= -lz # Comes with the OS these days.
16
+ZLIBLIB=-lz
17
+ZLIBINC=/usr/include
18
+JPEGLIB=$(prefix)/lib
19
+JPEGINC=$(prefix)/include
20
+
(-)./patches/patch-ab (-12 lines)
Lines 1-12 Link Here
1
--- Makefile.in.orig	Thu Sep 11 21:18:49 1997
2
+++ Makefile.in	Thu Sep 11 21:26:57 1997
3
@@ -69,7 +69,7 @@
4
 
5
 AS = as
6
 CC = gcc
7
-CFLAGS = -ansi -O
8
+#CFLAGS = -ansi -O
9
 FC = f77
10
-FFLAGS= -O
11
+#FFLAGS= -O
12
 
(-)./patches/patch-ac (-41 lines)
Lines 1-41 Link Here
1
--- hdf/util/Makefile.in.orig	Thu Nov 14 04:12:28 1996
2
+++ hdf/util/Makefile.in	Sat Oct  3 22:46:36 1998
3
@@ -121,8 +121,8 @@
4
 HDFBIN=$(srcdir)/../bin
5
 
6
 # ==> where is your JPEG library (libjpeg.a) located?
7
-JPEGLIB=$(srcdir)/../jpeg
8
-JPEGINC=$(srcdir)/../jpeg
9
+JPEGLIB?=$(srcdir)/../jpeg
10
+JPEGINC?=$(srcdir)/../jpeg
11
 
12
 # ==> where is your PABLO include files
13
 PABLO_HINC= $(srcdir)/../pablo
14
@@ -132,8 +132,8 @@
15
 FMPOOL_SRC=$(srcdir)/../fmpool
16
 
17
 # ==> where is your zlib library (libz.a) located?
18
-ZLIBLIB=$(srcdir)/../zlib
19
-ZLIBINC=$(srcdir)/../zlib
20
+ZLIBLIB?=$(srcdir)/../zlib
21
+ZLIBINC?=$(srcdir)/../zlib
22
 
23
 #Where are the utility includes
24
 UTILINC=$(srcdir)
25
@@ -216,13 +216,13 @@
26
 	$(CC) $(ALL_CFLAGS) -c $<
27
 
28
 .c: $(HDFLIB)/libdf.a
29
-	$(CC) $(ALL_CFLAGS) $< -o $@ $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a $(LIBSX)
30
+	$(CC) $(ALL_CFLAGS) $< -o $@ $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB) $(LIBSX)
31
 
32
 .f: $(HDFLIB)/libdf.a 
33
-	$(FC) $(FFLAGS) $< $(HDFLIB)/libdf.a -o $@ $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a
34
+	$(FC) $(FFLAGS) $< $(HDFLIB)/libdf.a -o $@ $(JPEGLIB)/libjpeg.a $(ZLIBLIB)
35
 
36
 hdfed: he.h he_proto.h $(HEOBJ) $(HDFLIB)/libdf.a $(FRC)
37
-	$(CC) $(ALL_CFLAGS) $(HEOBJ) $(HDFLIB)/libdf.a -o hdfed $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a
38
+	$(CC) $(ALL_CFLAGS) $(HEOBJ) $(HDFLIB)/libdf.a -o hdfed $(JPEGLIB)/libjpeg.a $(ZLIBLIB)
39
 
40
 utils: $(UTILS) $(HDFLIB)/libdf.a $(FRC)
41
 
(-)./patches/patch-ad (-11 lines)
Lines 1-11 Link Here
1
--- mfhdf/xdr/types.h.orig	Tue Oct 29 11:34:08 1996
2
+++ mfhdf/xdr/types.h	Wed Apr  8 14:47:38 1998
3
@@ -23,7 +23,7 @@
4
 
5
 #if defined __STDC__ || defined PC || defined _WINDOWS || defined WIN32
6
 #define STDC_INCLUDES
7
-#if !(defined vms || defined UNIX386 || defined WINNT || defined WIN32 || defined __ultrix || (defined __sun__ && defined __i386__) || defined _CRAYMPP)
8
+#if !(defined vms || defined UNIX386 || defined WINNT || defined WIN32 || defined __ultrix || (defined __sun__ && defined __i386__) || defined _CRAYMPP || defined __FreeBSD__ )
9
 long ntohl(long);
10
 long htonl(long);
11
 #endif /* !unix */
(-)./patches/patch-ae (-36 lines)
Lines 1-36 Link Here
1
--- hdf/test/Makefile.in.orig	Sat Oct  3 22:48:08 1998
2
+++ hdf/test/Makefile.in	Sat Oct  3 22:54:41 1998
3
@@ -358,26 +358,26 @@
4
 	@cmp fortest.out fortest.sav && echo "*** Fortran tests passed ***";
5
 
6
 qtesthdf: $(COBJS) $(HDFLIB)/libdf.a
7
-	quantify $(CC) $(ALL_CFLAGS) -o qtesthdf $(COBJS) $(HDFSRC)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
8
+	quantify $(CC) $(ALL_CFLAGS) -o qtesthdf $(COBJS) $(HDFSRC)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB) -lm
9
 
10
 ptesthdf: $(COBJS) $(HDFLIB)/libdf.a
11
-	purify $(CC) $(ALL_CFLAGS) -o ptesthdf $(COBJS) $(HDFSRC)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
12
+	purify $(CC) $(ALL_CFLAGS) -o ptesthdf $(COBJS) $(HDFSRC)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB) -lm
13
 
14
 testhdf.tc: $(COBJS) $(HDFLIB)/libdf.a
15
-	proof $(CC) $(ALL_CFLAGS) -o testhdf.tc $(COBJS) $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
16
+	proof $(CC) $(ALL_CFLAGS) -o testhdf.tc $(COBJS) $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB) -lm
17
 
18
 testhdf: $(COBJS) $(HDFLIB)/libdf.a
19
-	$(CC) $(ALL_CFLAGS) -o testhdf $(COBJS) $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
20
+	$(CC) $(ALL_CFLAGS) -o testhdf $(COBJS) $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB) -lm
21
 	test -d $(TESTDIR) || mkdir $(TESTDIR)
22
 
23
 fortestF: $(FOBJS) $(HDFLIB)/libdf.a
24
-	$(FC) $(FFLAGS) -o $@ $(FOBJS) $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
25
+	$(FC) $(FFLAGS) -o $@ $(FOBJS) $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB) -lm
26
 
27
 fortest: $(HDFLIB)/libdf.a fortest.c $(CHDRS)
28
-	$(CC) $(ALL_CFLAGS) -o fortest fortest.c $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
29
+	$(CC) $(ALL_CFLAGS) -o fortest fortest.c $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB) -lm
30
 
31
 gentest: gentest.c $(HDFLIB)/libdf.a
32
-	$(CC) $(ALL_CFLAGS) gentest.c -o gentest $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
33
+	$(CC) $(ALL_CFLAGS) gentest.c -o gentest $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB) -lm
34
 
35
 ftests: $(FTESTS)
36
 
(-)./patches/patch-af (-18 lines)
Lines 1-18 Link Here
1
--- configure.in.orig	Tue Mar  3 17:23:22 1998
2
+++ configure.in	Sun May 30 18:08:57 1999
3
@@ -82,6 +82,7 @@
4
   mips*-sgi-irix4*)       host_makefile_frag=config/mh-irix4 ;;
5
   i[3456]86-*-linux*)     host_makefile_frag=config/mh-linux ;;
6
   i[3456]86-*-freebsd*)   host_makefile_frag=config/mh-fbsd ;;
7
+  alpha-*-freebsd*)       host_makefile_frag=config/mh-fbsd ;;
8
   *-ibm-aix*)             host_makefile_frag=config/mh-aix ;;
9
   i386-*-solaris2*)       host_makefile_frag=config/mh-solarisx86 ;;
10
   *-*-solaris2*)          host_makefile_frag=config/mh-solaris ;;
11
@@ -155,6 +156,7 @@
12
   mips*-sgi-irix4*)       files="mfhdf/libsrc/config/netcdf-irix4.h mfhdf/fortran/config/jackets-irix4.c mfhdf/fortran/config/netcdf-irix4.inc mfhdf/fortran/config/ftest-irix4.f" ;;
13
   i[3456]86-*-linux*)     files="mfhdf/libsrc/config/netcdf-linux.h mfhdf/fortran/config/jackets-linux.c mfhdf/fortran/config/netcdf-linux.inc mfhdf/fortran/config/ftest-linux.f" ;;
14
   i[3456]86-*-freebsd*)   files="mfhdf/libsrc/config/netcdf-fbsd.h mfhdf/fortran/config/jackets-fbsd.c mfhdf/fortran/config/netcdf-fbsd.inc mfhdf/fortran/config/ftest-fbsd.f" ;;
15
+  alpha-*-freebsd*)       files="mfhdf/libsrc/config/netcdf-fbsd.h mfhdf/fortran/config/jackets-fbsd.c mfhdf/fortran/config/netcdf-fbsd.inc mfhdf/fortran/config/ftest-fbsd.f" ;;
16
   *-ibm-aix*)             files="mfhdf/libsrc/config/netcdf-aix.h mfhdf/fortran/config/jackets-aix.c mfhdf/fortran/config/netcdf-aix.inc mfhdf/fortran/config/ftest-aix.f" ;;
17
   i386-*-solaris2*)       files="mfhdf/libsrc/config/netcdf-solarisx86.h mfhdf/fortran/config/jackets-solarisx86.c mfhdf/fortran/config/netcdf-solarisx86.inc mfhdf/fortran/config/ftest-solarisx86.f" ;;
18
   *-*-solaris2*)          files="mfhdf/libsrc/config/netcdf-solaris.h mfhdf/fortran/config/jackets-solaris.c mfhdf/fortran/config/netcdf-solaris.inc mfhdf/fortran/config/ftest-solaris.f";;
(-)./patches/patch-ag (-18 lines)
Lines 1-18 Link Here
1
--- hdf/jpeg/configure.in.orig	Tue Mar  3 17:23:32 1998
2
+++ hdf/jpeg/configure.in	Sun May 30 17:47:04 1999
3
@@ -40,6 +40,7 @@
4
   mips*-sgi-irix4*)       host_makefile_frag=config/mh-irix4 ;;
5
   i[3456]86-*-linux*)     host_makefile_frag=config/mh-linux ;;
6
   i[3456]86-*-freebsd*)   host_makefile_frag=config/mh-fbsd ;;
7
+  alpha-*-freebsd*)       host_makefile_frag=config/mh-fbsd ;;
8
   *-ibm-aix*)             host_makefile_frag=config/mh-aix ;;
9
   *-*-solaris2*)          host_makefile_frag=config/mh-solaris ;;
10
   *-sun-*)		          host_makefile_frag=config/mh-sun ;;
11
@@ -110,6 +111,7 @@
12
   mips*-sgi-irix4*)       files=config/jirix4.h ;;
13
   i[3456]86-*-linux*)     files=config/jlinux.h ;;
14
   i[3456]86-*-freebsd*)   files=config/jfbsd.h ;;
15
+  alpha-*-freebsd*)       files=config/jfbsd.h ;;
16
   *-ibm-aix*)             files=config/jaix.h ;;
17
   *-*-solaris2*)          files=config/jsolaris.h ;;
18
   *-sun-*)	              files=config/jsun.h ;;
(-)./patches/patch-ah (-18 lines)
Lines 1-18 Link Here
1
--- hdf/fmpool/configure.in.orig	Sun May 30 17:49:07 1999
2
+++ hdf/fmpool/configure.in	Sun May 30 17:49:41 1999
3
@@ -40,6 +40,7 @@
4
   mips*-sgi-irix4*)       host_makefile_frag=config/mh-irix4 ;;
5
   i[3456]86-*-linux*)     host_makefile_frag=config/mh-linux ;;
6
   i[3456]86-*-freebsd*)   host_makefile_frag=config/mh-fbsd ;;
7
+  alpha-*-freebsd*)       host_makefile_frag=config/mh-fbsd ;;
8
   *-ibm-aix*)             host_makefile_frag=config/mh-aix ;;
9
   *-*-solaris2*)          host_makefile_frag=config/mh-solaris ;;
10
   *-sun-*)		          host_makefile_frag=config/mh-sun ;;
11
@@ -110,6 +111,7 @@
12
   mips*-sgi-irix4*)       files=config/fmpirix4.h ;;
13
   i[3456]86-*-linux*)     files=config/fmplinux.h ;;
14
   i[3456]86-*-freebsd*)   files=config/fmpfbsd.h ;;
15
+  alpha-*-freebsd*)       files=config/fmpfbsd.h ;;
16
   *-ibm-aix*)             files=config/fmpaix.h ;;
17
   *-*-solaris2*)          files=config/fmpsolaris.h ;;
18
   *-sun-*)		          files=config/fmpsun.h ;;
(-)./pkg/PLIST (-3 / +4 lines)
Lines 20-26 Link Here
20
bin/vmake
20
bin/vmake
21
bin/vshow
21
bin/vshow
22
lib/libmfhdf.a
22
lib/libmfhdf.a
23
lib/libmfhdf.so.2
24
lib/libmfhdf.so
23
lib/libdf.a
25
lib/libdf.a
26
lib/libdf.so
27
lib/libdf.so.1
24
include/atom.h
28
include/atom.h
25
include/bitvect.h
29
include/bitvect.h
26
include/cdeflate.h
30
include/cdeflate.h
Lines 30-36 Link Here
30
include/cskphuff.h
34
include/cskphuff.h
31
include/df.h
35
include/df.h
32
include/dfan.h
36
include/dfan.h
33
include/dffunc.f90
34
include/dffunc.inc
37
include/dffunc.inc
35
include/dfgr.h
38
include/dfgr.h
36
include/dfi.h
39
include/dfi.h
Lines 45-51 Link Here
45
include/hcompi.h
48
include/hcompi.h
46
include/hconv.h
49
include/hconv.h
47
include/hdf.h
50
include/hdf.h
48
include/hdf.f90
49
include/hdf.inc
51
include/hdf.inc
50
include/hdf2netcdf.h
52
include/hdf2netcdf.h
51
include/hdfi.h
53
include/hdfi.h
Lines 63-69 Link Here
63
include/mfhdf.h
65
include/mfhdf.h
64
include/mstdio.h
66
include/mstdio.h
65
include/netcdf.h
67
include/netcdf.h
66
include/netcdf.f90
67
include/netcdf.inc
68
include/netcdf.inc
68
include/tbbt.h
69
include/tbbt.h
69
include/vattr.h
70
include/vattr.h
(-)./scripts/post-patch (-83 lines)
Lines 1-83 Link Here
1
#!/bin/sh
2
3
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^CFLAGS = -ansi -O"`
4
do
5
patch -p << END_OF_PATCH
6
--- $f.orig
7
+++ $f
8
@@ -72,1 +72,1 @@
9
-CFLAGS = -ansi -O
10
+#CFLAGS = -ansi -O
11
END_OF_PATCH
12
done
13
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^ZLIB_LIB = "`
14
do
15
patch -p << END_OF_PATCH
16
--- $f.orig
17
+++ $f
18
@@ -72,1 +72,1 @@
19
-ZLIB_LIB = \$(TOP_SRCDIR)/hdf/zlib/libz.a
20
+#ZLIB_LIB = \$(TOP_SRCDIR)/hdf/zlib/libz.a
21
END_OF_PATCH
22
done
23
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^JPEG_LIB = "`
24
do
25
patch -p << END_OF_PATCH
26
--- $f.orig
27
+++ $f
28
@@ -72,1 +72,1 @@
29
-JPEG_LIB = \$(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
30
+#JPEG_LIB = \$(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
31
END_OF_PATCH
32
done
33
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^ZLIBLIB="`
34
do
35
patch -p << END_OF_PATCH
36
--- $f.orig
37
+++ $f
38
@@ -72,2 +72,2 @@
39
-ZLIBINC=\$(srcdir)/../zlib
40
-ZLIBLIB=\$(srcdir)/../zlib
41
+ZLIBINC=/usr/include
42
+ZLIBLIB=-lz \$(pwrkdir)
43
END_OF_PATCH
44
done
45
46
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^ZLIBLIB="`
47
do
48
patch -p << END_OF_PATCH
49
--- $f.orig
50
+++ $f
51
@@ -72,2 +72,2 @@
52
-ZLIBLIB=\$(srcdir)/../zlib
53
-ZLIBINC=\$(srcdir)/../zlib
54
+ZLIBLIB=-lz
55
+ZLIBINC=/usr/include
56
END_OF_PATCH
57
done
58
59
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^JPEGLIB="`
60
do
61
patch -p << END_OF_PATCH
62
--- $f.orig
63
+++ $f
64
@@ -72,2 +72,2 @@
65
-JPEGINC=\$(srcdir)/../jpeg
66
-JPEGLIB=\$(srcdir)/../jpeg
67
+JPEGINC=\$(prefix)/include
68
+JPEGLIB=\$(prefix)/lib
69
END_OF_PATCH
70
done
71
72
for f in `find ${WRKSRC} -type f -name Makefile.in -print | xargs grep -l "^JPEGLIB="`
73
do
74
patch -p << END_OF_PATCH
75
--- $f.orig
76
+++ $f
77
@@ -72,2 +72,2 @@
78
-JPEGLIB=\$(srcdir)/../jpeg
79
-JPEGINC=\$(srcdir)/../jpeg
80
+JPEGLIB=\$(prefix)/lib
81
+JPEGINC=\$(prefix)/include
82
END_OF_PATCH
83
done

Return to bug 14717