summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lang/f2c/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/lang/f2c/Makefile b/lang/f2c/Makefile
index 8a2aefe6ad92..8e4dcb6c54de 100644
--- a/lang/f2c/Makefile
+++ b/lang/f2c/Makefile
@@ -24,6 +24,9 @@ GUNZIP_CMD= minigzip -d
USE_GMAKE= yes
USE_LDCONFIG= yes
+OPTIONS= LEAD_0 "Print with leading zeros" Off
+
+
# Set FCNAME to the name of the Fortran 77 / F2C wrapper.
FCNAME?= fc
PLIST_SUB= FCNAME=${FCNAME}
@@ -50,6 +53,12 @@ pre-patch:
pre-configure:
${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/fc
+.if !defined(WITHOUT_LEAD_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
+
+
do-build:
@${ECHO_MSG} "===> Building f2c..."