From 6a614f980620082cefdcb06e04c6dd8966cc7000 Mon Sep 17 00:00:00 2001 From: danfe Date: Thu, 10 Sep 2015 15:21:12 +0000 Subject: - Unbreak the build on PowerPC by using correct Fif_ENTRYPOINT() macro that does not append double underscore to symbol names in binaries (previously __FreeBSD__ check was removed from the condition, but __PPC__ was left) - Rename the patch: not only it used now deprecated `+' as path separator, the patch name itself was just wrong (inconsistent with the patched file) - Remove useless PKGMESSAGE assignment, bsd.port.mk does this automatically - Improve `regression-test' target: add dependency on `build', and get rid of explicit cd'ing to ${BUILD_WRKSRC} by using -C switch of make(1) - Fix some minor whitespace bugs and reorder the knobs to make more sense I've removed BROKEN statement entirely (for all Tier-2 systems) while I've only tested it on PowerPC: it pulls quite heavy GCC 4.8 for Fortran support and I didn't want to stress our poor flame too much (This is a really slow, old machine. Be gentle). Since the bug was indeed PowerPC-specific, it is probably OK (and worth trying anyway). --- science/cdf/Makefile | 31 +++++++++++---------------- science/cdf/files/patch-src+include+cdfdist.h | 11 ---------- science/cdf/files/patch-src_include_cdflib.h | 12 +++++++++++ 3 files changed, 24 insertions(+), 30 deletions(-) delete mode 100644 science/cdf/files/patch-src+include+cdfdist.h create mode 100644 science/cdf/files/patch-src_include_cdflib.h (limited to 'science/cdf') diff --git a/science/cdf/Makefile b/science/cdf/Makefile index 08cab2a679b7..64e7ce4d1eae 100644 --- a/science/cdf/Makefile +++ b/science/cdf/Makefile @@ -13,38 +13,31 @@ DIST_SUBDIR= ${PORTNAME}-${PORTVERSION} MAINTAINER= stephen@FreeBSD.org COMMENT= Device independent view of the CDF data model -MAKE_FLAGS= INSTALLDIR=${STAGEDIR}${PREFIX} OS=freebsd ENV=gnu \ - FORTRAN=yes FC_freebsd=${F77} +USES= fortran USE_LDCONFIG= yes +MAKE_FLAGS= INSTALLDIR=${STAGEDIR}${PREFIX} OS=freebsd ENV=gnu \ + FORTRAN=yes FC_freebsd=${F77} MAKE_JOBS_UNSAFE= yes -VER= ${PORTVERSION:S/.//:S/./_/} - -USES= fortran - WRKSRC= ${WRKDIR}/cdf${VER}-dist SUB_FILES= pkg-message -PKGMESSAGE= ${WRKDIR}/pkg-message +VER= ${PORTVERSION:S/.//:S/./_/} DEFS= B C K + PORTDOCS= CDF_copyright.txt CHANGES.txt Release.notes Welcome.txt OPTIONS_DEFINE= DOCS EXAMPLES -.include - -.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" -BROKEN= Does not compile on ia64, powerpc, or sparc64 -.endif - pre-configure: .for def in ${DEFS} - ${REINPLACE_CMD} -e 's||${PREFIX}|' \ + ${REINPLACE_CMD} -e 's||${PREFIX}|' \ ${WRKSRC}/src/definitions/definitions.${def} .endfor post-install: - ${MV} ${STAGEDIR}${PREFIX}/lib/libcdf.so ${STAGEDIR}${PREFIX}/lib/libcdf.so.0 + ${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} @@ -52,8 +45,8 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/samples/* ${STAGEDIR}${EXAMPLESDIR} ${SED} -i '' 's,${STAGEDIR},,g' ${STAGEDIR}${PREFIX}/bin/definitions.? -regression-test: - (cd ${BUILD_WRKSRC} ; \ - ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test) +regression-test: build + @${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} \ + ${MAKE_ARGS} test -C ${BUILD_WRKSRC} -.include +.include diff --git a/science/cdf/files/patch-src+include+cdfdist.h b/science/cdf/files/patch-src+include+cdfdist.h deleted file mode 100644 index 3a923d69bdc6..000000000000 --- a/science/cdf/files/patch-src+include+cdfdist.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/include/cdflib.h.orig 2010-01-18 15:22:03.000000000 -0600 -+++ src/include/cdflib.h 2010-01-18 15:22:32.000000000 -0600 -@@ -375,7 +375,7 @@ - #elif defined(unix) && !defined(AIX) && !defined(Mach) && !defined(hpux) || \ - defined(__MINGW32__) - # if (defined(linux) && !defined(__ICC)) || defined(__CYGWIN__) || \ -- defined(sun) || defined(__MINGW32__) || defined(__FreeBSD__) || \ -+ defined(sun) || defined(__MINGW32__) || \ - defined(__PPC__) - # define Fif_ENTRYPOINT(ep__,ep_,ep,EP) ep__ - # else diff --git a/science/cdf/files/patch-src_include_cdflib.h b/science/cdf/files/patch-src_include_cdflib.h new file mode 100644 index 000000000000..2d5f0acc0b10 --- /dev/null +++ b/science/cdf/files/patch-src_include_cdflib.h @@ -0,0 +1,12 @@ +--- src/include/cdflib.h.orig 2010-01-18 15:22:03.000000000 -0600 ++++ src/include/cdflib.h 2010-01-18 15:22:32.000000000 -0600 +@@ -375,8 +375,7 @@ + #elif defined(unix) && !defined(AIX) && !defined(Mach) && !defined(hpux) || \ + defined(__MINGW32__) + # if (defined(linux) && !defined(__ICC)) || defined(__CYGWIN__) || \ +- defined(sun) || defined(__MINGW32__) || defined(__FreeBSD__) || \ +- defined(__PPC__) ++ defined(sun) || defined(__MINGW32__) + # define Fif_ENTRYPOINT(ep__,ep_,ep,EP) ep__ + # else + # define Fif_ENTRYPOINT(ep__,ep_,ep,EP) ep_ -- cgit