summaryrefslogtreecommitdiff
path: root/lang/f2c
diff options
context:
space:
mode:
authorjlam <jlam>2001-07-25 23:51:38 +0000
committerjlam <jlam>2001-07-25 23:51:38 +0000
commitb65318e16623b95ebac47e4e6a5323187bed8695 (patch)
treebac0dfb541923ca4cb88c8da65f7978a551d2ea4 /lang/f2c
parenta30f1ee062b53b6beb04dac527b4da4d9beb08d8 (diff)
downloadpkgsrc-b65318e16623b95ebac47e4e6a5323187bed8695.tar.gz
Create a wrapper for f2c-f77 that substitutes for -I and -L references to
${LOCALBASE} directories. Also set PKG_FC to the buildlink'ed f2c-f77 wrapper script.
Diffstat (limited to 'lang/f2c')
-rw-r--r--lang/f2c/buildlink.mk24
1 files changed, 23 insertions, 1 deletions
diff --git a/lang/f2c/buildlink.mk b/lang/f2c/buildlink.mk
index 488efb70774..3e4d0551386 100644
--- a/lang/f2c/buildlink.mk
+++ b/lang/f2c/buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink.mk,v 1.2 2001/07/20 01:54:47 jlam Exp $
+# $NetBSD: buildlink.mk,v 1.3 2001/07/25 23:51:38 jlam Exp $
#
# This Makefile fragment is included by packages that use f2c.
#
@@ -33,9 +33,31 @@ BUILDLINK_FILES.f2c+= lib/libI77_p.a
BUILDLINK_FILES.f2c+= lib/libI77_pic.a
BUILDLINK_TARGETS.f2c= f2c-buildlink
+BUILDLINK_TARGETS.f2c+= f2c-f77-buildlink
BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.f2c}
+# Set the f2c-f77 script to the buildlink'ed wrapper script.
+PKG_FC= ${BUILDLINK_DIR}/bin/f2c-f77
+
pre-configure: ${BUILDLINK_TARGETS.f2c}
f2c-buildlink: _BUILDLINK_USE
+f2c-f77-buildlink:
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ cookie=${BUILDLINK_DIR}/.f2c_f77_buildlink_done; \
+ if [ ! -f $${cookie} ]; then \
+ file=bin/f2c-f77; \
+ dest=${BUILDLINK_DIR}/$${file}; \
+ ${ECHO_MSG} "Creating script $${dest}."; \
+ dir=`${DIRNAME} $${dest}`; \
+ if [ ! -d $${dir} ]; then \
+ ${MKDIR} $${dir}; \
+ fi; \
+ ${SED} -e "s|-I${BUILDLINK_PREFIX.f2c}/include|-I${BUILDLINK_DIR}/include|g" \
+ -e "s|-L${BUILDLINK_PREFIX.f2c}/lib|-L${BUILDLINK_DIR}/lib|g" \
+ ${BUILDLINK_PREFIX.f2c}/$${file} > $${dest}; \
+ ${CHMOD} +x $${dest}; \
+ ${ECHO} $${dest} >> $${cookie}; \
+ fi
+
.endif # F2C_BUILDLINK_MK