diff options
author | frueauf <frueauf> | 1999-01-14 13:56:04 +0000 |
---|---|---|
committer | frueauf <frueauf> | 1999-01-14 13:56:04 +0000 |
commit | 0e1f423409d70008263deb0a7d517ab2aeca9bf6 (patch) | |
tree | ff7e88d46fe8a708cf75485a4416f2c1c7b8ccc7 /lang | |
parent | fd41b4ddac5975bee81ac8877550a7ddffae86a9 (diff) | |
download | pkgsrc-0e1f423409d70008263deb0a7d517ab2aeca9bf6.tar.gz |
Update f2c to 19980913. Provided in pr 6804 by Dan McMahill.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/f2c/Makefile | 19 | ||||
-rw-r--r-- | lang/f2c/files/md5 | 4 | ||||
-rw-r--r-- | lang/f2c/patches/patch-ac | 57 | ||||
-rw-r--r-- | lang/f2c/patches/patch-ai | 30 | ||||
-rw-r--r-- | lang/f2c/patches/patch-aj | 117 |
5 files changed, 197 insertions, 30 deletions
diff --git a/lang/f2c/Makefile b/lang/f2c/Makefile index 2447eb7d64e..d934fe3a2fe 100644 --- a/lang/f2c/Makefile +++ b/lang/f2c/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.4 1998/08/25 08:54:06 agc Exp $ +# $NetBSD: Makefile,v 1.5 1999/01/14 13:56:04 frueauf Exp $ -DISTNAME= f2c-19980516p1 +DISTNAME= f2c-19980913 +WRKSRC= ${WRKDIR}/f2c CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_LOCAL} @@ -9,6 +10,18 @@ HOMEPAGE= http://www.netlib.org/f2c/index.html CONFLICTS= egcs-current-19980608 -WRKSRC= ${WRKDIR}/f2c +post-extract:: + @rm ${WRKSRC}/index.html + @gunzip ${WRKSRC}/*.gz + @cd ${WRKSRC} ; sh libf77 ; sh libi77 + @rm ${WRKSRC}/src/index.html + @mv ${WRKSRC}/src/.depend ${WRKSRC}/src/depend.orig + @gunzip ${WRKSRC}/src/*.gz + +post-patch:: + @cd ${WRKSRC} ; ${CC} -o chktypes chktypes.c + ${WRKSRC}/chktypes + @cp ${WRKSRC}/f2c.h ${WRKSRC}/libF77/f2c.h + @cp ${WRKSRC}/f2c.h ${WRKSRC}/libI77/f2c.h .include "../../mk/bsd.pkg.mk" diff --git a/lang/f2c/files/md5 b/lang/f2c/files/md5 index a0bfcfac7c6..917ee54405a 100644 --- a/lang/f2c/files/md5 +++ b/lang/f2c/files/md5 @@ -1,3 +1,3 @@ -$NetBSD: md5,v 1.4 1998/08/25 08:54:06 agc Exp $ +$NetBSD: md5,v 1.5 1999/01/14 13:56:04 frueauf Exp $ -MD5 (f2c-19980516p1.tar.gz) = 0c649bfc2a125036bf26fa5fafee2499 +MD5 (f2c-19980913.tar.gz) = b59e9e9c2e85788c8c8881557ce870e4 diff --git a/lang/f2c/patches/patch-ac b/lang/f2c/patches/patch-ac index eabcbd9cb8c..e7015f99027 100644 --- a/lang/f2c/patches/patch-ac +++ b/lang/f2c/patches/patch-ac @@ -1,10 +1,14 @@ -$NetBSD: patch-ac,v 1.3 1998/08/25 08:54:07 agc Exp $ +$NetBSD: patch-ac,v 1.4 1999/01/14 13:56:04 frueauf Exp $ -Add various options to f2c, including PIC support +Much cleanup of the script. Added various options such as +-O for optimization +-fPIC for PIC support +-Wall for gcc warnings +-Wl, for additional linker arguments --- fc.orig Tue May 16 17:37:49 1995 -+++ fc Mon Aug 24 14:05:40 1998 -@@ -1,26 +1,51 @@ ++++ fc Tue Jan 12 20:31:32 1999 +@@ -1,26 +1,54 @@ #!/bin/sh -PATH=/v/bin:/bin:/usr/bin +PATH=/bin:/usr/bin:PREFIX/bin @@ -68,9 +72,12 @@ Add various options to f2c, including PIC support +# +# -Wall turn on the -Wall flag to the c compiler +# ++# -Wl, Pass options to the linker. For example, -Wl,-R/usr/X11R6/lib ++# passes "-R/usr/X11R6/lib" to the linker ++# # files FORTRAN source files ending in .f . # FORTRAN with cpp preprocessor directives -@@ -30,21 +55,18 @@ +@@ -30,21 +58,18 @@ # efl source files ending in .e . # RATFOR files ending in .r . - @@ -83,14 +90,14 @@ Add various options to f2c, including PIC support - -# -I includepath passed to C compiler (for .c files) -# or to cpp (for .F files), and to f2c -- --# -Ntnnn allow nnn entries in table t +# if no input arguments, then spit out the help stuff from the beginning +# of this file. +if [ $# = 0 ]; then + cat $0 | awk '$1 == "#USAGESTART", $1 == ""' | tail +2 | sed 's/#//g' +fi +-# -Ntnnn allow nnn entries in table t +- -# -P emit .P files s=/tmp/stderr_$$ @@ -99,7 +106,7 @@ Add various options to f2c, including PIC support +CC=${CC_f2c:-'cc '} EFL=${EFL:-efl} EFLFLAGS=${EFLFLAGS:-'system=portable deltastno=10'} -@@ -58,25 +80,29 @@ +@@ -58,25 +83,29 @@ OUTF=a.out cOPT=1 -set -- `getopt cCD:gI:N:Oo:Suw6 "$@"` @@ -138,7 +145,7 @@ Add various options to f2c, including PIC support + G="-g" shift;; -@@ -86,45 +112,75 @@ +@@ -86,11 +115,37 @@ ;; + -I*) CFLAGS="$CFLAGS $1" @@ -167,41 +174,41 @@ Add various options to f2c, including PIC support + + -O|-O1|-O2|-O3) + CFLAGS="$CFLAGS $1" - shift - ;; - -- -u) F2CFLAGS="$F2CFLAGS -u" ++ shift ++ ;; ++ + -P) F2CFLAGS="$F2CFLAGS $1" ++ shift ++ ;; ++ ++ ++ -S) CFLAGS="$CFLAGS -S" ++ cOPT=0 shift ;; +@@ -101,30 +156,38 @@ -- -w) F2CFLAGS="$F2CFLAGS -w" + -w) F2CFLAGS="$F2CFLAGS -w" - case $2 in -6) F2CFLAGS="$F2CFLAGS"66; shift - case $2 in -6) shift;; esac;; esac -+ -+ -S) CFLAGS="$CFLAGS -S" -+ cOPT=0 shift ;; - -N) F2CFLAGS="$F2CFLAGS $1""$2" - shift 2 -+ -u) F2CFLAGS="$F2CFLAGS -u" ++ -w66) F2CFLAGS="$F2CFLAGS -w66" + shift ;; - -P) F2CFLAGS="$F2CFLAGS $1" -+ -w) F2CFLAGS="$F2CFLAGS -w" ++ -Wall) CFLAGS="$CFLAGS -Wall" shift ;; -+ -w66) F2CFLAGS="$F2CFLAGS -w66" -+ shift -+ ;; - +- - -S) CFLAGS="$CFLAGS -S" - cOPT=0 -+ -Wall) CFLAGS="$CFLAGS -Wall" ++ -Wl*) CFLAGS="$CFLAGS $1" shift ;; @@ -228,7 +235,7 @@ Add various options to f2c, including PIC support + while test -n "$1" -@@ -232,5 +288,20 @@ +@@ -232,5 +295,20 @@ done -case $cOPT in 2) $CC -o $OUTF -u MAIN__ $OFILES -lf2c -lm;; esac diff --git a/lang/f2c/patches/patch-ai b/lang/f2c/patches/patch-ai new file mode 100644 index 00000000000..f57c0f056e7 --- /dev/null +++ b/lang/f2c/patches/patch-ai @@ -0,0 +1,30 @@ +$NetBSD: patch-ai,v 1.1 1999/01/14 13:56:04 frueauf Exp $ + +required to make +sizeof(integer) == sizeof(real) +and +sizeof(logical) == sizeof(real) +(per f2c/readme) + +--- f2c.h.orig Wed Jan 13 17:42:45 1999 ++++ f2c.h Wed Jan 13 17:44:21 1999 +@@ -8,5 +8,9 @@ + #define F2C_INCLUDE + ++#if defined(__alpha__) ++typedef int integer; ++#else + typedef long int integer; ++#endif + typedef unsigned long uinteger; + typedef char *address; +@@ -16,5 +20,9 @@ + typedef struct { real r, i; } complex; + typedef struct { doublereal r, i; } doublecomplex; ++#if defined(__alpha__) ++typedef int logical; ++#else + typedef long int logical; ++#endif + typedef short int shortlogical; + typedef char logical1; diff --git a/lang/f2c/patches/patch-aj b/lang/f2c/patches/patch-aj new file mode 100644 index 00000000000..b64ee44712b --- /dev/null +++ b/lang/f2c/patches/patch-aj @@ -0,0 +1,117 @@ +$NetBSD: patch-aj,v 1.1 1999/01/14 13:56:04 frueauf Exp $ + +--- /dev/null Wed Jan 13 02:06:04 1999 ++++ chktypes.c Wed Jan 13 18:12:34 1999 +@@ -0,0 +1,112 @@ ++#include <stdio.h> ++#include <string.h> ++#include "f2c.h" ++ ++int main(int argc, char *argv[]) ++{ ++ ++ int err=0; ++ int pok=0; ++ ++ ++ if(argc > 1) ++ { ++ if(strncmp(argv[1],"-v",2)==0) ++ { ++ pok=1; ++ } ++ } ++ if(sizeof(doublecomplex) == 2*sizeof(doublereal)) ++ { ++ if(pok) ++ printf("sizeof(doublecomplex) = 2*sizeof(doublereal) = %d\n",sizeof(doublecomplex)); ++ } ++ else ++ { ++ printf("ERROR:\tsizeof(doublecomplex) \t= %d\n\t2*sizeof(doublereal) \t= %d\n", ++ sizeof(doublecomplex),2*sizeof(doublereal)); ++ err=1; ++ } ++ ++ ++ if(sizeof(doublereal) == sizeof(complex)) ++ { ++ if(pok) ++ printf("sizeof(doublereal) = sizeof(complex) = %d\n",sizeof(doublereal)); ++ } ++ else ++ { ++ printf("ERROR:\tsizeof(doublereal) \t= %d\n\tsizeof(complex) \t= %d\n", ++ sizeof(doublereal),sizeof(complex)); ++ err=1; ++ } ++ ++ ++ if(sizeof(doublereal) == 2*sizeof(real)) ++ { ++ if(pok) ++ printf("sizeof(doublereal) = 2*sizeof(real) = %d\n",sizeof(doublereal)); ++ } ++ else ++ { ++ printf("ERROR:\tsizeof(doublereal) \t= %d\n\t2*sizeof(real)\t = %d\n", ++ sizeof(doublereal),2*sizeof(real)); ++ err=1; ++ } ++ ++ if(sizeof(real) == sizeof(integer)) ++ { ++ if(pok) ++ printf("sizeof(real) = sizeof(integer) = %d\n",sizeof(real)); ++ } ++ else ++ { ++ printf("ERROR:\tsizeof(real) \t= %d\n\tsizeof(integer) \t= %d\n", ++ sizeof(real),sizeof(integer)); ++ err=1; ++ } ++ ++ if(sizeof(real) == sizeof(logical)) ++ { ++ if(pok) ++ printf("sizeof(real) = sizeof(logical) = %d\n",sizeof(real)); ++ } ++ else ++ { ++ printf("ERROR:\tsizeof(real) \t= %d\n\tsizeof(logical) \t= %d\n", ++ sizeof(real),sizeof(logical)); ++ err=1; ++ } ++ ++ if(sizeof(real) == 2*sizeof(shortint)) ++ { ++ if(pok) ++ printf("sizeof(real) = 2*sizeof(shortint) = %d\n",sizeof(real)); ++ } ++ else ++ { ++ printf("ERROR:\tsizeof(real) \t= %d\n\t2*sizeof() \t= %d\n", ++ sizeof(real),2*sizeof(shortint)); ++ err=1; ++ } ++ ++ if(pok) ++ { ++ printf("\n\n-------------------\n"); ++ printf("sizeof(short) = %d\n",sizeof(short)); ++ printf("sizeof(int) = %d\n",sizeof(int)); ++ printf("sizeof(float) = %d\n",sizeof(float)); ++ printf("sizeof(long) = %d\n",sizeof(long)); ++ printf("sizeof(double) = %d\n",sizeof(double)); ++ printf("\n\n-------------------\n"); ++ } ++ ++ if(err) ++ { ++ printf("The header file f2c.h has the wrong typedef's for your machine\n"); ++ printf("architecture. Please contact the package maintainer.\n"); ++ } ++ ++ return(err); ++} ++ |