aboutsummaryrefslogtreecommitdiffstats
path: root/lang/f2c/Makefile
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2006-08-10 15:37:32 +0800
committerthierry <thierry@FreeBSD.org>2006-08-10 15:37:32 +0800
commitacef024991f72768b2520caf030bcf2a4b56489d (patch)
tree47d4b36836573a1f70f3d153d9258e27b634ee22 /lang/f2c/Makefile
parent931dea829355976aad69fb263f7465e8909146fe (diff)
downloadfreebsd-ports-gnome-acef024991f72768b2520caf030bcf2a4b56489d.tar.gz
freebsd-ports-gnome-acef024991f72768b2520caf030bcf2a4b56489d.tar.zst
freebsd-ports-gnome-acef024991f72768b2520caf030bcf2a4b56489d.zip
- Upgrade to 20060506;
- Remove FreeBSD specificities. PR: ports/101054 Security: VuXML ID 43cb40b3-c8c2-11da-a672-000e0c2e438a
Diffstat (limited to 'lang/f2c/Makefile')
-rw-r--r--lang/f2c/Makefile70
1 files changed, 54 insertions, 16 deletions
diff --git a/lang/f2c/Makefile b/lang/f2c/Makefile
index 74d26380899b..143f76bbfd53 100644
--- a/lang/f2c/Makefile
+++ b/lang/f2c/Makefile
@@ -6,35 +6,73 @@
#
PORTNAME= f2c
-PORTVERSION= 3.0.0
-PORTREVISION= 1
+PORTVERSION= 20060506
CATEGORIES= lang
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= lioux
-DISTNAME= f2c-freebsd.3.0.0
+MASTER_SITES= ftp://netlib.bell-labs.com/netlib/
+DISTNAME= ${PORTNAME}
+EXTRACT_SUFX= .tar
+DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Fortran-to-C converter and its run-time libraries
-.include <bsd.port.pre.mk>
+EXTRACT_DEPENDS=${UNZIP_CMD}:${PORTSDIR}/archivers/unzip
-.if (${ARCH} == "alpha")
-pre-configure:
- @${CP} ${FILESDIR}/f2c.h.alpha ${WRKSRC}/f2c/f2c.h
-.endif
+USE_GMAKE= yes
+USE_LDCONFIG= yes
-ALL_TARGET= depend all
+# Set FCNAME to the name of the Fortran 77 / F2C wrapper.
+FCNAME?= fc
+PLIST_SUB= FCNAME=${FCNAME}
+.if defined(WITH_FC)
+PLIST_SUB+= FC=""
+.else
+PLIST_SUB+= FC="@comment "
+.endif
MAN1= f2c.1
+PORTDOCS= 00lastchange README README_libf2c changes f2c.pdf permission
+
+.include <bsd.port.pre.mk>
+
+post-extract:
+ cd ${WRKSRC} && ${FIND} . -name "*.gz" | ${XARGS} ${GUNZIP_CMD}
+ cd ${WRKSRC} && ${UNZIP_CMD} libf2c.zip
+ ${CP} -p ${WRKSRC}/libf2c/README ${WRKSRC}/README_libf2c
+
+pre-patch:
+ ${CP} -p ${WRKSRC}/libf2c/makefile.u ${WRKSRC}/libf2c/Makefile
+ ${CP} -p ${WRKSRC}/src/makefile.u ${WRKSRC}/src/Makefile
+
+pre-configure:
+ ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/fc
+
+do-build:
+ @${ECHO_MSG} "===> Building f2c..."
+ @(cd ${WRKSRC}/src; \
+ ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
+ @${ECHO_MSG} "===> Building libf2c..."
+ @(cd ${WRKSRC}/libf2c; \
+ ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET} libf2c.so)
+
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/f2c/f2c ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/f2c/f2c.h ${PREFIX}/include
- ${INSTALL_MAN} ${WRKSRC}/f2c/f2c.1 ${PREFIX}/man/man1
- ${INSTALL_DATA} ${WRKSRC}/libf2c/libf2c.* ${PREFIX}/lib
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/f2c ${PREFIX}/bin
+.if defined(WITH_FC)
+ ${INSTALL_SCRIPT} ${WRKSRC}/fc ${PREFIX}/bin/${FCNAME}
+.endif
+ ${INSTALL_DATA} ${WRKSRC}/src/f2c.h ${PREFIX}/include
+ ${INSTALL_MAN} ${WRKSRC}/src/f2c.1 ${MAN1PREFIX}/man/man1
+ ${MV} ${WRKSRC}/libf2c/libf2c.so ${WRKSRC}/libf2c/libf2c.so.2
+ ${INSTALL_DATA} ${WRKSRC}/libf2c/libf2c.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/libf2c/libf2c.so.2 ${PREFIX}/lib
${LN} -sf libf2c.so.2 ${PREFIX}/lib/libf2c.so
post-install:
- ${LDCONFIG} -m ${PREFIX}/lib
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
+ @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
+.endif
.include <bsd.port.post.mk>