summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradam <adam>2010-11-11 07:44:10 +0000
committeradam <adam>2010-11-11 07:44:10 +0000
commitf82082c4aa54457ce5d9f7c144da5af1ddb8d22d (patch)
treee71bde077c25ef489730bb63bdd057fd43fe1df5
parent6625f87183836e584891fb73eefc0bd38033f5b4 (diff)
downloadpkgsrc-f82082c4aa54457ce5d9f7c144da5af1ddb8d22d.tar.gz
* Accept -isysroot option (Darwin)
* On Darwin, optionally set F2C_F77_CPP, so it can be set in mk.conf
-rw-r--r--lang/f2c/Makefile4
-rw-r--r--lang/f2c/files/f2c-f77.in8
2 files changed, 9 insertions, 3 deletions
diff --git a/lang/f2c/Makefile b/lang/f2c/Makefile
index 7662fe731ee..90bf340d808 100644
--- a/lang/f2c/Makefile
+++ b/lang/f2c/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.57 2010/11/01 18:01:16 wiz Exp $
+# $NetBSD: Makefile,v 1.58 2010/11/11 07:44:10 adam Exp $
DISTNAME= f2c-20090411 # see notes below
PKGREVISION= 5
@@ -25,7 +25,7 @@ INSTALLATION_DIRS= bin share/doc/f2c ${PKGMANDIR}/man1
# XXX(jmmv): This is a very ugly workaround. CPP should probably default to
# /usr/bin/cpp in OS X.
.if ${OPSYS} == "Darwin"
-F2C_F77_CPP= /usr/bin/cpp
+F2C_F77_CPP?= /usr/bin/cpp
.else
F2C_F77_CPP= ${CPP}
.endif
diff --git a/lang/f2c/files/f2c-f77.in b/lang/f2c/files/f2c-f77.in
index f59c5aadba1..dd9a8711429 100644
--- a/lang/f2c/files/f2c-f77.in
+++ b/lang/f2c/files/f2c-f77.in
@@ -28,6 +28,8 @@ PATH=$PATH:/bin:/usr/bin:@PREFIX@/bin
#
# -arch Compile for the specified architecture (Darwin)
#
+# -isysroot Change root directory for headers and libraries
+#
# -c Do not call linker, leave relocatables in *.o.
#
# -C Check that subscripts are in bounds.
@@ -294,7 +296,11 @@ do
shift 2;
;;
- -arch) CFLAGS="$CFLAGS -arch $2"
+ -arch) CFLAGS="$CFLAGS $1 $2"
+ shift 2
+ ;;
+
+ -isysroot) CFLAGS="$CFLAGS $1 $(shell_quote "$2")"
shift 2
;;