summaryrefslogtreecommitdiff
path: root/science/cdf/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'science/cdf/Makefile')
-rw-r--r--science/cdf/Makefile39
1 files changed, 27 insertions, 12 deletions
diff --git a/science/cdf/Makefile b/science/cdf/Makefile
index edc94cf929c9..6b516cd72448 100644
--- a/science/cdf/Makefile
+++ b/science/cdf/Makefile
@@ -1,9 +1,10 @@
PORTNAME= cdf3
DISTVERSION= 3.9.1
+PORTREVISION= 1
CATEGORIES= science
MASTER_SITES= https://spdf.gsfc.nasa.gov/pub/software/cdf/dist/cdf39_1/
DISTNAME= cdf${VER}-dist-cdf
-DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
+DIST_SUBDIR= ${PORTNAME}-${DISTVERSION}
MAINTAINER= alven@FreeBSD.org
COMMENT= Device independent view of the CDF data model
@@ -16,26 +17,34 @@ LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
BUILD_DEPENDS= bash:shells/bash
-USES= fortran ncurses gmake
-
+USES= fortran gmake ncurses
USE_LDCONFIG= yes
+
+MAKE_ARGS+= OS=freebsd ENV=gnu all
MAKE_FLAGS= INSTALLDIR=${STAGEDIR}${PREFIX} OS=freebsd ENV=gnu \
FORTRAN=yes FC_freebsd=${F77}
MAKE_JOBS_UNSAFE= yes
-TEST_TARGET= test # XXX: test segfaults
-FFLAGS+= -std=legacy
+TEST_TARGET= test
+
+PIE_UNSAFE= yes
-WRKSRC= ${WRKDIR}/cdf${VER}-dist
SUB_FILES= pkg-message
-VER= ${PORTVERSION:S/.//:S/./_/}
-DEFS= B C K
+WRKSRC= ${WRKDIR}/cdf${VER}-dist
+PLIST_SUB= SOVERSION=${DISTVERSION}
PORTDOCS= CDF_copyright.txt CHANGES.txt Release.notes Welcome.txt
OPTIONS_DEFINE= DOCS EXAMPLES
-MAKE_ARGS+= OS=freebsd ENV=gnu all
+DEFS= B C K
+VER= ${PORTVERSION:S/.//:S/./_/}
+
+.include <bsd.port.pre.mk>
+
+.if ${FORTRAN_DEFAULT} != flang
+FFLAGS= -std=legacy
+.endif
post-patch:
.for def in ${DEFS}
@@ -44,11 +53,17 @@ post-patch:
.endfor
post-install:
+ ${SED} -i '' 's,${STAGEDIR},,g' ${STAGEDIR}${PREFIX}/bin/definitions.?
+ ${RM} -f ${STAGEDIR}${PREFIX}/CDFLeapSeconds.txt
+ cd ${STAGEDIR}${PREFIX} && \
+ ${FIND} bin/* lib/* -executable -exec ${STRIP_CMD} {} \;
+
+post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/samples/* ${STAGEDIR}${EXAMPLESDIR}
- ${SED} -i '' 's,${STAGEDIR},,g' ${STAGEDIR}${PREFIX}/bin/definitions.?
- ${RM} -f ${STAGEDIR}${PREFIX}/CDFLeapSeconds.txt
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>