summaryrefslogtreecommitdiff
path: root/science/cdf/Makefile
blob: 98968615ff368b53ef5128311dc961e39aba7894 (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
# Created by: Thierry Thomas <thierry@pompo.net>
# $FreeBSD$

PORTNAME=	cdf3
PORTVERSION=	3.3.0
PORTREVISION=	13
CATEGORIES=	science
MASTER_SITES=	LOCAL/thierry/${PORTNAME} \
		ftp://cdaweb.gsfc.nasa.gov/pub/cdf/dist/cdf${VER}/unix/
DISTNAME=	cdf${VER}-dist-cdf
DIST_SUBDIR=	${PORTNAME}-${PORTVERSION}

MAINTAINER=	stephen@FreeBSD.org
COMMENT=	Device independent view of the CDF data model

LICENSE=	NASA-G
LICENSE_NAME=	NASA/Goddard Space Flight Center
LICENSE_FILE=	${WRKSRC}/CDF_copyright.txt
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

BROKEN_aarch64=		fails to compile: error: use of undeclared identifier FP1ZEROsingle; did you mean FP1zeroSingle?
BROKEN_armv6=		fails to compile: error: use of undeclared identifier FP1ZEROsingle; did you mean FP1zeroSingle?
BROKEN_armv7=		fails to compile: error: use of undeclared identifier FP1ZEROsingle; did you mean FP1zeroSingle?

USES=		fortran ncurses
USE_LDCONFIG=	yes
MAKE_FLAGS=	INSTALLDIR=${STAGEDIR}${PREFIX} OS=freebsd ENV=gnu \
		FORTRAN=yes FC_freebsd=${F77}
MAKE_JOBS_UNSAFE=	yes

WRKSRC=		${WRKDIR}/cdf${VER}-dist
SUB_FILES=	pkg-message

VER=		${PORTVERSION:S/.//:S/./_/}
DEFS=		B C K

PORTDOCS=	CDF_copyright.txt CHANGES.txt Release.notes Welcome.txt

OPTIONS_DEFINE=	DOCS EXAMPLES

post-patch:
.for def in ${DEFS}
	@${REINPLACE_CMD} -e 's|<path>|${PREFIX}|' \
		 ${WRKSRC}/src/definitions/definitions.${def}
.endfor

post-install:
	${MV} ${STAGEDIR}${PREFIX}/lib/libcdf.so \
		${STAGEDIR}${PREFIX}/lib/libcdf.so.0
	${LN} -sf libcdf.so.0 ${STAGEDIR}${PREFIX}/lib/libcdf.so
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	${INSTALL_DATA} ${WRKSRC}/samples/* ${STAGEDIR}${EXAMPLESDIR}
	${SED} -i '' 's,${STAGEDIR},,g' ${STAGEDIR}${PREFIX}/bin/definitions.?

regression-test: build
	@${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} \
		${MAKE_ARGS} test -C ${BUILD_WRKSRC}

.include <bsd.port.mk>