diff options
author | agc <agc> | 1998-07-21 16:40:45 +0000 |
---|---|---|
committer | agc <agc> | 1998-07-21 16:40:45 +0000 |
commit | de0595896726acbcb981007319f62a10232d673e (patch) | |
tree | e36b4aae762424d5d005b3d88831d92f768c6d25 /lang | |
parent | 4b4408a4663bd67282ddcfde6d89bffdac6a35d6 (diff) | |
download | pkgsrc-de0595896726acbcb981007319f62a10232d673e.tar.gz |
Addition of f2c, the Fortran to C translator/compiler, to the NetBSD
packages collection. This is based on the 1998/05/16 version of f2c,
and was submitted by Dan McMahill in PR pkg/5735. I modified some patches
to contain the correct pathnames.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/f2c/Makefile | 15 | ||||
-rw-r--r-- | lang/f2c/files/md5 | 1 | ||||
-rw-r--r-- | lang/f2c/patches/patch-aa | 54 | ||||
-rw-r--r-- | lang/f2c/patches/patch-ab | 9 | ||||
-rw-r--r-- | lang/f2c/patches/patch-ac | 65 | ||||
-rw-r--r-- | lang/f2c/patches/patch-ad | 23 | ||||
-rw-r--r-- | lang/f2c/patches/patch-ae | 23 | ||||
-rw-r--r-- | lang/f2c/patches/patch-af | 8 | ||||
-rw-r--r-- | lang/f2c/patches/patch-ag | 19 | ||||
-rw-r--r-- | lang/f2c/patches/patch-ah | 8 | ||||
-rw-r--r-- | lang/f2c/pkg/COMMENT | 1 | ||||
-rw-r--r-- | lang/f2c/pkg/DESCR | 12 | ||||
-rw-r--r-- | lang/f2c/pkg/PLIST | 12 | ||||
-rwxr-xr-x | lang/f2c/scripts/post-extract | 23 |
14 files changed, 273 insertions, 0 deletions
diff --git a/lang/f2c/Makefile b/lang/f2c/Makefile new file mode 100644 index 00000000000..f155cbbc9af --- /dev/null +++ b/lang/f2c/Makefile @@ -0,0 +1,15 @@ +# $NetBSD: Makefile,v 1.1 1998/07/21 16:40:45 agc Exp $ + +DISTNAME= f2c +PKGNAME= f2c-19980516 +CATEGORIES= lang +MASTER_SITES= ftp://netlib.bell-labs.com/netlib/ +EXTRACT_SUFX= .tar + +MAINTAINER= mcmahill@alum.mit.edu + +EXTRACT_BEFORE_ARGS= -xvf + +CONFLICTS= egcs-19980608 + +.include "../../mk/bsd.pkg.mk" diff --git a/lang/f2c/files/md5 b/lang/f2c/files/md5 new file mode 100644 index 00000000000..6bf9e15d40b --- /dev/null +++ b/lang/f2c/files/md5 @@ -0,0 +1 @@ +MD5 (f2c.tar) = f0f87033f72bfc89ab6991d5725ee277 diff --git a/lang/f2c/patches/patch-aa b/lang/f2c/patches/patch-aa new file mode 100644 index 00000000000..12153aa0a08 --- /dev/null +++ b/lang/f2c/patches/patch-aa @@ -0,0 +1,54 @@ +--- /dev/null Mon Jun 15 02:04:53 1998 ++++ Makefile Mon Jun 15 10:16:05 1998 +@@ -0,0 +1,51 @@ ++# Top level Makefile for f2c,libF77, and libI77 ++ ++all: f2c libf2c.a f77 man ++ ++ ++f2c: ++ #Making all in 'src' ++ cd src; make all ++ cp src/f2c f2c ++ ++libF77.a: ++ #Making all in 'libF77' ++ cd libF77; make check; make all ++ cp libF77/libF77.a libF77.a ++ ++libI77.a: ++ #Making all in 'libI77' ++ cd libI77; make check; make libI77.a ++ cp libI77/libI77.a libI77.a ++ ++libf2c.a: libI77.a libF77.a ++ cp libF77.a libf2c.a ++ ar ruv libf2c.a libI77/*.o ++ ranlib libf2c.a ++ ++man: f2c.0 ++ ++f2c.0: f2c.1t ++ rm f2c.1 ++ sed 's!/usr!${PREFIX}!g' f2c.1t | sed 's!lib/libc.a!usr/lib/libc.a!g' > f2c.1 ++ nroff -man f2c.1 > f2c.0 ++ ++ ++install: ++ ${BSD_INSTALL_PROGRAM_DIR} ${PREFIX}/bin ++ ${BSD_INSTALL_PROGRAM} ./src/f2c ${PREFIX}/bin ++ ${BSD_INSTALL_SCRIPT} ./f77 ${PREFIX}/bin ++ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/lib ++ ${BSD_INSTALL_DATA} ./libf2c.a ${PREFIX}/lib ++ ${BSD_INSTALL_DATA} ./libF77.a ${PREFIX}/lib ++ ${BSD_INSTALL_DATA} ./libI77.a ${PREFIX}/lib ++ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/include ++ ${BSD_INSTALL_DATA} ./f2c.h ${PREFIX}/include ++ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/share/doc/f2c ++ ${BSD_INSTALL_DATA} ./f2c.ps ${PREFIX}/share/doc/f2c ++ ${BSD_INSTALL_DATA} ./changes ${PREFIX}/share/doc/f2c ++ ${BSD_INSTALL_MAN} ./f2c.1 ${PREFIX}/man/man1 ++ ${BSD_INSTALL_MAN} ./f2c.0 ${PREFIX}/man/cat1 ++ ++f77: fc ++ sed 's!PREFIX!${PREFIX}!g' fc > f77 diff --git a/lang/f2c/patches/patch-ab b/lang/f2c/patches/patch-ab new file mode 100644 index 00000000000..d36ec628c78 --- /dev/null +++ b/lang/f2c/patches/patch-ab @@ -0,0 +1,9 @@ +--- src/makefile.orig Wed Feb 25 08:18:04 1998 ++++ src/makefile Sun Jul 19 23:14:03 1998 +@@ -3,5 +3,5 @@ + .SUFFIXES: .c .o + CC = cc +-CFLAGS = -O ++CFLAGS = -O2 + SHELL = /bin/sh + YACC = yacc diff --git a/lang/f2c/patches/patch-ac b/lang/f2c/patches/patch-ac new file mode 100644 index 00000000000..b36e4479091 --- /dev/null +++ b/lang/f2c/patches/patch-ac @@ -0,0 +1,65 @@ +--- fc.orig Tue May 16 17:37:49 1995 ++++ fc Thu Jul 9 08:36:49 1998 +@@ -1,4 +1,4 @@ + #!/bin/sh +-PATH=/v/bin:/bin:/usr/bin ++PATH=/bin:/usr/bin:PREFIX/bin + # f77-style shell script to compile and load fortran, C, and assembly codes + +@@ -21,4 +21,14 @@ + # -w omit all warning messages + ++# -Wall turn on the -Wall flag to the c compiler ++ ++# -O turn on the -O flag to the c compiler ++ ++# -O1 turn on the -O1 flag to the c compiler ++ ++# -O2 turn on the -O2 flag to the c compiler ++ ++# -O3 turn on the -O3 flag to the c compiler ++ + # -w66 omit Fortran 66 compatibility warning messages + +@@ -46,5 +56,5 @@ + s=/tmp/stderr_$$ + t=/tmp/f77_$$.o +-CC=${CC_f2c:-'cc -common'} ++CC=${CC_f2c:-'cc '} + EFL=${EFL:-efl} + EFLFLAGS=${EFLFLAGS:-'system=portable deltastno=10'} +@@ -58,7 +68,8 @@ + OUTF=a.out + cOPT=1 +-set -- `getopt cCD:gI:N:Oo:Suw6 "$@"` ++set -- `getopt cCD:gI:N:W:O:o:Suw6 "$@"` + case $? in 0);; *) rc=$?; exit;; esac + CPPFLAGS= ++CFLAGS=-IPREFIX/include + while + test X"$1" != X-- +@@ -90,5 +101,5 @@ + ;; + +- -O) case $2 in -1) O=-O1;; -2) O=-O2;; -3) O=-O3;; *) O=-O;; esac ++ -O) case $2 in 1) O=-O1;; 2) O=-O2;; 3) O=-O3;; *) O=-O;; esac + case $O in -O);; *) shift;; esac + CFLAGS="$CFLAGS $O" +@@ -96,4 +107,10 @@ + ;; + ++ -W) case $2 in all) W=-Wall;; *) echo "don't understand -W$2";; esac ++ case $O in -W);; *) shift;; esac ++ CFLAGS="$CFLAGS $W" ++ shift ++ ;; ++ + -u) F2CFLAGS="$F2CFLAGS -u" + shift +@@ -232,5 +249,5 @@ + done + +-case $cOPT in 2) $CC -o $OUTF -u MAIN__ $OFILES -lf2c -lm;; esac ++case $cOPT in 2) $CC -o $OUTF -u _MAIN__ $OFILES -LPREFIX/lib -lf2c -lm;; esac + rc=$? + exit $rc diff --git a/lang/f2c/patches/patch-ad b/lang/f2c/patches/patch-ad new file mode 100644 index 00000000000..f57372d4f38 --- /dev/null +++ b/lang/f2c/patches/patch-ad @@ -0,0 +1,23 @@ +--- f2c.1t.orig Sat May 16 17:16:53 1998 ++++ f2c.1t Thu Jul 9 07:54:55 1998 +@@ -333,12 +333,15 @@ + output file + .TP +-.F /usr/include/f2c.h ++.F .../include/f2c.h + header file + .TP +-.F /usr/lib/libF77.a +-intrinsic function library ++.F .../lib/libF77.a ++intrinsic function library. May be replaced by libf2c.a + .TP +-.F /usr/lib/libI77.a +-Fortran I/O library ++.F .../lib/libI77.a ++Fortran I/O library. May be replaced by libf2c.a ++.TP ++.F .../lib/libf2c.a ++Combined Fortran library. May be used in place of libF77.a and libI77.a + .TP + .F /lib/libc.a diff --git a/lang/f2c/patches/patch-ae b/lang/f2c/patches/patch-ae new file mode 100644 index 00000000000..d060a5421d1 --- /dev/null +++ b/lang/f2c/patches/patch-ae @@ -0,0 +1,23 @@ +--- libF77/makefile.orig Sun Jul 19 22:58:11 1998 ++++ libF77/makefile Sun Jul 19 23:11:54 1998 +@@ -2,5 +2,5 @@ + CC = cc + SHELL = /bin/sh +-CFLAGS = -O ++CFLAGS = -O2 -DNO_ONEXIT + + # If your system lacks onexit() and you are not using an +@@ -82,5 +82,5 @@ + + check: +- xsum F77_aloc.c Notice README Version.c abort_.c c_abs.c c_cos.c \ ++ ../src/xsum F77_aloc.c Notice README Version.c abort_.c c_abs.c c_cos.c \ + c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c cabs.c d_abs.c d_acos.c \ + d_asin.c d_atan.c d_atn2.c d_cnjg.c d_cos.c d_cosh.c d_dim.c \ +@@ -93,5 +93,5 @@ + i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c i_mod.c i_nint.c \ + i_sign.c iargc_.c l_ge.c l_gt.c l_le.c l_lt.c lbitbits.c lbitshft.c \ +- main.c makefile pow_ci.c pow_dd.c pow_di.c pow_hh.c pow_ii.c \ ++ main.c pow_ci.c pow_dd.c pow_di.c pow_hh.c pow_ii.c \ + pow_qq.c pow_ri.c pow_zi.c pow_zz.c qbitbits.c qbitshft.c \ + r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c \ diff --git a/lang/f2c/patches/patch-af b/lang/f2c/patches/patch-af new file mode 100644 index 00000000000..ebd10e8ed6b --- /dev/null +++ b/lang/f2c/patches/patch-af @@ -0,0 +1,8 @@ +--- libF77/libF77.xsum.orig Thu Jul 9 08:25:14 1998 ++++ libF77/libF77.xsum Thu Jul 9 08:25:31 1998 +@@ -75,5 +75,4 @@ + lbitshft.c ec57bf21 191 + main.c 6eed57a 2152 +-makefile e48bc2b8 4031 + pow_ci.c f593b0b9 345 + pow_dd.c e451857d 209 diff --git a/lang/f2c/patches/patch-ag b/lang/f2c/patches/patch-ag new file mode 100644 index 00000000000..d6501a8b977 --- /dev/null +++ b/lang/f2c/patches/patch-ag @@ -0,0 +1,19 @@ +--- libI77/makefile.orig Sun Jul 19 22:58:35 1998 ++++ libI77/makefile Sun Jul 19 23:13:08 1998 +@@ -1,5 +1,5 @@ + .SUFFIXES: .c .o + CC = cc +-CFLAGS = -O ++CFLAGS = -O2 + SHELL = /bin/sh + +@@ -96,7 +96,7 @@ + + check: +- xsum Notice README Version.c backspace.c close.c dfe.c dolio.c \ ++ ../src/xsum Notice README Version.c backspace.c close.c dfe.c dolio.c \ + due.c endfile.c err.c f2ch.add fio.h fmt.c fmt.h fmtlib.c fp.h \ +- ftell_.c iio.c ilnw.c inquire.c lio.h lread.c lwrite.c makefile \ ++ ftell_.c iio.c ilnw.c inquire.c lio.h lread.c lwrite.c \ + open.c rawio.h rdfmt.c rewind.c rsfe.c rsli.c rsne.c sfe.c sue.c \ + typesize.c uio.c util.c wref.c wrtfmt.c wsfe.c wsle.c wsne.c \ diff --git a/lang/f2c/patches/patch-ah b/lang/f2c/patches/patch-ah new file mode 100644 index 00000000000..a388c9a62dd --- /dev/null +++ b/lang/f2c/patches/patch-ah @@ -0,0 +1,8 @@ +--- libI77/libI77.xsum.orig Thu Jul 9 08:26:43 1998 ++++ libI77/libI77.xsum Thu Jul 9 08:27:14 1998 +@@ -22,5 +22,4 @@ + lread.c 1d81233c 13010 + lwrite.c 16866b71 4478 +-makefile 1720cb4d 2278 + open.c f7d34487 5504 + rawio.h 1ab49f7c 718 diff --git a/lang/f2c/pkg/COMMENT b/lang/f2c/pkg/COMMENT new file mode 100644 index 00000000000..f9e1f3471d5 --- /dev/null +++ b/lang/f2c/pkg/COMMENT @@ -0,0 +1 @@ +Fortran to C compiler (translates fortran to C). diff --git a/lang/f2c/pkg/DESCR b/lang/f2c/pkg/DESCR new file mode 100644 index 00000000000..8318c376378 --- /dev/null +++ b/lang/f2c/pkg/DESCR @@ -0,0 +1,12 @@ +f2c is a Fortran 77 to C compiler (translates fortran to C). + +A script, fc, is included which works with f2c and the C compile +to emulate a f77 fortran compiler. + +f2c is distributed by netlib. + +There do not appear to be released versions of f2c with an assigned +version number. When updates are made, the "changes" file is updated, +but there is no associated version number. I don't have any suggestions +for keeping track of the version except to consult the "changes" file +which will be installed as ${PREFIX}/share/doc/f2c/changes for reference. diff --git a/lang/f2c/pkg/PLIST b/lang/f2c/pkg/PLIST new file mode 100644 index 00000000000..3f391b05f36 --- /dev/null +++ b/lang/f2c/pkg/PLIST @@ -0,0 +1,12 @@ +@comment $NetBSD: PLIST,v 1.1 1998/07/21 16:40:47 agc Exp $ +bin/f2c +bin/f77 +include/f2c.h +lib/libf2c.a +lib/libF77.a +lib/libI77.a +man/man1/f2c.1 +man/cat1/f2c.0 +share/doc/f2c/f2c.ps +share/doc/f2c/changes +@dirrm share/doc/f2c diff --git a/lang/f2c/scripts/post-extract b/lang/f2c/scripts/post-extract new file mode 100755 index 00000000000..1274518235b --- /dev/null +++ b/lang/f2c/scripts/post-extract @@ -0,0 +1,23 @@ +#!/bin/sh + +echo "Running post-extract" + +cd $WRKSRC + +# uncompress the top level files +rm index.html +gunzip *.gz + +# extract the shell archives for libF77 and libI77 +sh libf77 +sh libi77 + +# copy the f2c.h header needed by the the libraries +cp f2c.h libF77/f2c.h +cp f2c.h libI77/f2c.h + +# uncompress the main f2c source +cd src +rm index.html +mv .depend depend.orig +gunzip *.gz |