summaryrefslogtreecommitdiffstats
path: root/science/hdf/Makefile
blob: 8cb7747090dbb154a399b1190d36f0f2cdab07ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# New ports collection makefile for:	HDF_lib
# Date created:		17 November 1996
# Whom:			mi
#
# $FreeBSD$
#

PORTNAME=	hdf
PORTVERSION=	4.2r1
CATEGORIES=	science archivers graphics
MASTER_SITES=	ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF${PORTVERSION}/src/:src \
		ftp://ftp.ncsa.uiuc.edu/HDF/HDF/Documentation/HDF4.2r0/:doc \
		http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/:doc_szip
DISTNAME=	HDF${PORTVERSION}
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:src \
		${SZIP_DOCFILE}:doc_szip \
		${DOCFILES:C/$/:doc/g}
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

MAINTAINER=	glewis@FreeBSD.org
COMMENT=	Hierarchical Data Format library (from NCSA)

BUILD_DEPENDS=	${LOCALBASE}/bin/libtool15:${PORTSDIR}/devel/libtool15
LIB_DEPENDS=	jpeg.9:${PORTSDIR}/graphics/jpeg \
		sz.2:${PORTSDIR}/science/szip

CONFLICTS=	netcdf-*

GNU_CONFIGURE=	yes
CONFIGURE_ARGS+=--with-jpeg="${LOCALBASE}" \
		--with-szlib="${LOCALBASE}"
USE_REINPLACE=	yes
DOCFILES=	HDF41r5_SpecDG.pdf \
		HDF42r0_RefMan.pdf \
		HDF42r0_UserGd.pdf
SZIP_DOCFILE=	SZIP_HDF4_2r1.pdf

MAN1=		hdf.1 hdfunpac.1 ncdump.1 ncgen.1
MANCOMPRESSED=	no

INSTALLS_SHLIB=	yes

.include <bsd.port.pre.mk>

.if ${ARCH} != "i386" && ${ARCH} != "alpha" && ${ARCH} != "amd64"
BROKEN=		"Does not compile on !i386, !amd64 and !alpha"
.endif

post-patch:
	${REINPLACE_CMD} -e "s:%%LOCALBASE%%:${LOCALBASE}:" \
		${WRKSRC}/hdf/src/Makefile.in ${WRKSRC}/mfhdf/libsrc/Makefile.in

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.for file in ${DOCFILES} ${SZIP_DOCFILE}
	@${INSTALL_DATA} ${DISTDIR}/${file} ${DOCSDIR}
.endfor
	@cd ${WRKSRC}/release_notes && ${FIND} . \
		| ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
.endif

test: build
	cd ${WRKSRC}/hdf/test && ${MAKE} check

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud