diff options
author | pawel <pawel@FreeBSD.org> | 2017-07-27 23:07:48 +0800 |
---|---|---|
committer | pawel <pawel@FreeBSD.org> | 2017-07-27 23:07:48 +0800 |
commit | 40ed0822bacd86a8d2c513c3ea3e5229081f7e19 (patch) | |
tree | d87ace6709ea3cbc04463896729e253f2d55470a /lang/f2c | |
parent | 5a10c83348b2a3a72d029112a073d5f5284b0620 (diff) | |
download | freebsd-ports-gnome-40ed0822bacd86a8d2c513c3ea3e5229081f7e19.tar.gz freebsd-ports-gnome-40ed0822bacd86a8d2c513c3ea3e5229081f7e19.tar.zst freebsd-ports-gnome-40ed0822bacd86a8d2c513c3ea3e5229081f7e19.zip |
- Add SONAME library description
- Convert to options helpers
- Use INSTALL_LIB to get stripped library
PR: 221036
Submitted by: myself
Approved by: maho (maintainer)
Diffstat (limited to 'lang/f2c')
-rw-r--r-- | lang/f2c/Makefile | 52 | ||||
-rw-r--r-- | lang/f2c/files/patch-libf2c_Makefile | 2 | ||||
-rw-r--r-- | lang/f2c/pkg-plist | 2 |
3 files changed, 24 insertions, 32 deletions
diff --git a/lang/f2c/Makefile b/lang/f2c/Makefile index 328356a36184..f9d4aef6d9ac 100644 --- a/lang/f2c/Makefile +++ b/lang/f2c/Makefile @@ -3,7 +3,7 @@ PORTNAME= f2c PORTVERSION= 20060810 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= lang MASTER_SITES= LOCAL/maho/f2c DISTNAME= ${PORTNAME} @@ -19,23 +19,20 @@ GUNZIP_CMD= minigzip -d USES= gmake USE_LDCONFIG= yes -OPTIONS_DEFINE= LEAD_0 -LEAD_0_DESC= Print with leading zeros +LIBVER= 2 # Set FCNAME to the name of the Fortran 77 / F2C wrapper. FCNAME?= fc -PLIST_SUB= FCNAME=${FCNAME} -.include <bsd.port.options.mk> - -.if ${PORT_OPTIONS:MFC} -PLIST_SUB+= FC="" -.else -PLIST_SUB+= FC="@comment " -.endif +PLIST_SUB= FCNAME=${FCNAME} LIBVER=${LIBVER} PORTDOCS= 00lastchange README README_libf2c changes f2c.pdf permission -.include <bsd.port.pre.mk> +OPTIONS_DEFINE= DOCS FC LEAD_0 +OPTIONS_SUB= yes + +FC_DESC= f77 script based on f2c +LEAD_0_DESC= Print with leading zeros +LEAD_0_CFLAGS= -DWANT_LEAD_0 post-extract: cd ${WRKSRC} && ${FIND} . -name "*.gz" | ${XARGS} ${GUNZIP_CMD} @@ -48,34 +45,29 @@ pre-patch: pre-configure: ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/fc -.if ${PORT_OPTIONS:MLEAD_0} - ${REINPLACE_CMD} -e 's|CFLAGS += -fPIC|CFLAGS += -fPIC -DWANT_LEAD_0|' ${WRKSRC}/libf2c/Makefile - ${REINPLACE_CMD} -e 's|#CFLAGS = -O|CFLAGS = -O -DWANT_LEAD_0|' ${WRKSRC}/src/Makefile -.endif - - + ${REINPLACE_CMD} -e 's|#CFLAGS = -O|CFLAGS = ${CFLAGS}|' ${WRKSRC}/src/Makefile + ${REINPLACE_CMD} 's|%%LIBVER%%|${LIBVER}|' ${WRKSRC}/libf2c/Makefile do-build: @${ECHO_MSG} "===> Building f2c..." - @(cd ${WRKSRC}/src; \ - ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) + @(cd ${WRKSRC}/src && ${DO_MAKE_BUILD} ${ALL_TARGET}) @${ECHO_MSG} "===> Building libf2c..." - @(cd ${WRKSRC}/libf2c; \ - ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET} libf2c.so) - ${MV} ${WRKSRC}/libf2c/libf2c.so ${WRKSRC}/libf2c/libf2c.so.2 + @(cd ${WRKSRC}/libf2c && ${DO_MAKE_BUILD} ${ALL_TARGET} libf2c.so) + ${MV} ${WRKSRC}/libf2c/libf2c.so ${WRKSRC}/libf2c/libf2c.so.${LIBVER} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/f2c ${STAGEDIR}${PREFIX}/bin -.if defined(WITH_MFC) - ${INSTALL_SCRIPT} ${WRKSRC}/fc ${STAGEDIR}${PREFIX}/bin/${FCNAME} -.endif ${INSTALL_DATA} ${WRKSRC}/src/f2c.h ${STAGEDIR}${PREFIX}/include ${INSTALL_MAN} ${WRKSRC}/src/f2c.1t ${STAGEDIR}${MAN1PREFIX}/man/man1/f2c.1 - ${INSTALL_DATA} ${WRKSRC}/libf2c/libf2c.a ${STAGEDIR}${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/libf2c/libf2c.so.2 ${STAGEDIR}${PREFIX}/lib - ${LN} -sf libf2c.so.2 ${STAGEDIR}${PREFIX}/lib/libf2c.so + ${INSTALL_LIB} ${WRKSRC}/libf2c/libf2c.a ${STAGEDIR}${PREFIX}/lib + ${INSTALL_LIB} ${WRKSRC}/libf2c/libf2c.so.${LIBVER} ${STAGEDIR}${PREFIX}/lib + ${LN} -sf libf2c.so.${LIBVER} ${STAGEDIR}${PREFIX}/lib/libf2c.so +do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} -.include <bsd.port.post.mk> +do-install-FC-on: + ${INSTALL_SCRIPT} ${WRKSRC}/fc ${STAGEDIR}${PREFIX}/bin/${FCNAME} + +.include <bsd.port.mk> diff --git a/lang/f2c/files/patch-libf2c_Makefile b/lang/f2c/files/patch-libf2c_Makefile index 685e6442fde3..183662b98659 100644 --- a/lang/f2c/files/patch-libf2c_Makefile +++ b/lang/f2c/files/patch-libf2c_Makefile @@ -26,7 +26,7 @@ libf2c.so: $(OFILES) - cc -shared -o libf2c.so $(OFILES) -+ $(CC) -shared -o libf2c.so $(OFILES) ++ $(CC) -shared -Wl,-soname,libf2c.so.%%LIBVER%% -o libf2c.so $(OFILES) ### If your system lacks ranlib, you don't need it; see README. diff --git a/lang/f2c/pkg-plist b/lang/f2c/pkg-plist index 90ca84b16710..1334436d3f7b 100644 --- a/lang/f2c/pkg-plist +++ b/lang/f2c/pkg-plist @@ -3,5 +3,5 @@ bin/f2c include/f2c.h lib/libf2c.a lib/libf2c.so -lib/libf2c.so.2 +lib/libf2c.so.%%LIBVER%% man/man1/f2c.1.gz |