summaryrefslogtreecommitdiff
path: root/lang/f2c
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2004-09-15 20:56:31 +0000
committerdmcmahill <dmcmahill>2004-09-15 20:56:31 +0000
commitbbbe30f978c968f6f48d2dd2b9766e1ea07002d6 (patch)
tree644c54f94fc1c45ec66cfa1ca23d0155afd9f3b5 /lang/f2c
parentd0d3b27e88b039111e7fbb365f8321841493de11 (diff)
downloadpkgsrc-bbbe30f978c968f6f48d2dd2b9766e1ea07002d6.tar.gz
- don't hard code the c compiler name.
- automatically figure out MAIN__ vs _MAIN__ - don't clobber the path when running f2c-f77. This lets you have a better chance of finding the c compiler! With all this this package now seems fully functional on solaris-2.9 as well as NetBSD.
Diffstat (limited to 'lang/f2c')
-rw-r--r--lang/f2c/Makefile4
-rw-r--r--lang/f2c/distinfo7
-rw-r--r--lang/f2c/patches/patch-aa12
-rw-r--r--lang/f2c/patches/patch-ac10
-rw-r--r--lang/f2c/patches/patch-ah12
5 files changed, 32 insertions, 13 deletions
diff --git a/lang/f2c/Makefile b/lang/f2c/Makefile
index 7c17e11cfc9..881892d50f0 100644
--- a/lang/f2c/Makefile
+++ b/lang/f2c/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2004/09/14 22:09:40 dmcmahill Exp $
+# $NetBSD: Makefile,v 1.30 2004/09/15 20:56:31 dmcmahill Exp $
DISTNAME= f2c-20001205
PKGREVISION= 6
@@ -28,6 +28,8 @@ F2CMAJOR= 0
F2CMINOR= 0
MAKE_ENV+= F2CMAJOR=${F2CMAJOR} F2CMINOR=${F2CMINOR}
MAKE_ENV+= LIBOWN=${LIBOWN} LIBGRP=${LIBGRP}
+MAKE_ENV+= AWK=${AWK}
+MAKE_ENV+= ECHO=${ECHO}
PLIST_SUBST+= F2CMAJOR=${F2CMAJOR} F2CMINOR=${F2CMINOR}
WRKSRC= ${WRKDIR}/f2c
diff --git a/lang/f2c/distinfo b/lang/f2c/distinfo
index 0dbe61ea396..2edbe3d23ae 100644
--- a/lang/f2c/distinfo
+++ b/lang/f2c/distinfo
@@ -1,13 +1,14 @@
-$NetBSD: distinfo,v 1.11 2004/09/15 12:27:26 dmcmahill Exp $
+$NetBSD: distinfo,v 1.12 2004/09/15 20:56:31 dmcmahill Exp $
SHA1 (f2c-20001205.tar.gz) = f3cc1653eb962fee45d850df50890fc53448a17f
Size (f2c-20001205.tar.gz) = 988607 bytes
-SHA1 (patch-aa) = c3ac2f66a5707b5a4d06f134e867ee245fd76ac0
+SHA1 (patch-aa) = ca2ced3179b4866ab6d1f8ffa6d7a4e08221cc9a
SHA1 (patch-ab) = 97c676fa452daa674e11348412ccb26d38a7baa4
-SHA1 (patch-ac) = 6fc52f9257cdecd3784e7f8897cce8b5656b73e4
+SHA1 (patch-ac) = 3bdc1873b4990ff7d542ce5474f23137d2dc5d54
SHA1 (patch-ad) = 7f204a45891e3632589ea8fb0e4e379a0a792dea
SHA1 (patch-ae) = 037cc8aed72a3088771ab24077ff19b009e63ebf
SHA1 (patch-af) = fe24139c21862e85c576118166b7deab8e421572
SHA1 (patch-ag) = 5f294e491ba4730aa7047ad53fa710a0698c2649
+SHA1 (patch-ah) = 54e4679e33cf3adc3b0d2b8b5b4e98cf26370319
SHA1 (patch-ai) = 641d3720c80cfb7d1c23981bb845b0a9bee3e6d7
SHA1 (patch-aj) = c58361fbbfc06e033b2a47e1d1e370716c4b185c
diff --git a/lang/f2c/patches/patch-aa b/lang/f2c/patches/patch-aa
index e340d32730c..9050b253b9e 100644
--- a/lang/f2c/patches/patch-aa
+++ b/lang/f2c/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.13 2004/09/14 22:09:40 dmcmahill Exp $
+$NetBSD: patch-aa,v 1.14 2004/09/15 20:56:31 dmcmahill Exp $
--- Makefile.orig Tue Sep 14 16:47:52 2004
+++ Makefile
-@@ -0,0 +1,43 @@
+@@ -0,0 +1,47 @@
+# Top level Makefile for f2c, libF77, and libI77
+
+all: f2c libF77/libF77.la libI77/libI77.la f2c-f77 man
@@ -44,5 +44,9 @@ $NetBSD: patch-aa,v 1.13 2004/09/14 22:09:40 dmcmahill Exp $
+ ${BSD_INSTALL_MAN} ./f2c.1 ${PREFIX}/man/man1
+ ${BSD_INSTALL_MAN} ./f2c.0 ${PREFIX}/man/cat1
+
-+f2c-f77: fc
-+ sed 's!@PREFIX@!${PREFIX}!g' fc > f2c-f77
++f2c-f77: fc f2c hello.f
++ ./src/f2c -Aw8 -Nn802 -Nx400 hello.f
++ $(CC) $(CFLAGS) -c hello.c
++ main=`$(NM) hello.o | ${AWK} 'BEGIN{x=""} {gsub(/\|/,""); for(i=1; i<=NF; i=i+1){if($$i ~ /MAIN/){x="-u " $$i}}} END{print x}'` ; \
++ ${ECHO} "Adding $$main to f2c-f77 script" ; \
++ sed -e 's;@PREFIX@;${PREFIX};g' -e 's;@CC@;${CC};g' -e 's;@CPP@;${CPP};g' -e "s;@MAIN@;$$main;g" fc > f2c-f77
diff --git a/lang/f2c/patches/patch-ac b/lang/f2c/patches/patch-ac
index a14586fa262..ffc265108c0 100644
--- a/lang/f2c/patches/patch-ac
+++ b/lang/f2c/patches/patch-ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.13 2002/01/22 16:47:23 dmcmahill Exp $
+$NetBSD: patch-ac,v 1.14 2004/09/15 20:56:31 dmcmahill Exp $
Much cleanup of the script. Added various options such as
-O for optimization
@@ -31,7 +31,7 @@ Also only pass -m* to the C compiler not f2c.
-PATH=/usr/local/bin:/bin:/usr/bin
-
+#!/bin/sh
-+PATH=/bin:/usr/bin:@PREFIX@/bin
++PATH=$PATH:/bin:/usr/bin:@PREFIX@/bin
+#USAGESTART
# f77-style shell script to compile and load fortran, C, and assembly codes
-
@@ -165,7 +165,7 @@ Also only pass -m* to the C compiler not f2c.
-### about multiple definitions of COMMON blocks.
-#CC=${CC_f2c:-'cc -common'}
-CC=${CC_f2c:-'cc'}
-+CC=${CC_f2c:-'cc '}
++CC=${CC_f2c:-'@CC@ '}
EFL=${EFL:-efl}
EFLFLAGS=${EFLFLAGS:-'system=portable deltastno=10'}
RATFOR=${RATFOR:-ratfor}
@@ -176,7 +176,7 @@ Also only pass -m* to the C compiler not f2c.
+F2C=${F2C:-@PREFIX@/bin/f2c}
+F2CFLAGS=${F2CFLAGS:='-Aw8 -Nn802 -Nx400'}
+S2DBLFLAG="-R"
-+CPP=${CPP:-/usr/bin/cpp}
++CPP=${CPP:-'@CPP@ '}
rc=0
trap "rm -f $s $t; exit \$rc" 0
OUTF=a.out
@@ -447,7 +447,7 @@ Also only pass -m* to the C compiler not f2c.
-### about unnecessary -l options.
+case $cOPT
+in
-+ 2) $CC $CFLAGS -o $OUTF -u _MAIN__ $OFILES $LIBS $FLIBS
++ 2) $CC $CFLAGS -o $OUTF @MAIN@ $OFILES $LIBS $FLIBS
+ ;;
+esac
diff --git a/lang/f2c/patches/patch-ah b/lang/f2c/patches/patch-ah
new file mode 100644
index 00000000000..c14276c6147
--- /dev/null
+++ b/lang/f2c/patches/patch-ah
@@ -0,0 +1,12 @@
+$NetBSD: patch-ah,v 1.5 2004/09/15 20:56:31 dmcmahill Exp $
+
+Used in checks for _MAIN__ vs MAIN__
+
+--- /dev/null Wed Sep 15 12:50:48 2004
++++ hello.f Wed Sep 15 13:48:00 2004
+@@ -0,0 +1,5 @@
++
++ PROGRAM hello
++ print*, 'hello world'
++ END
++