Package: f2c Version: 20090414 Revision: 3 Description: Convert Fortran 77 source code to C License: OSI-Approved Suggests: fort77 Source: mirror:sourceforge:fink/%n-%v.tar.bz2 Source-Checksum: SHA256(ce3892f885abd11a5e96d526a005c49f576e965a372112422dc0a1c5f4578f86) #Source: ftp://ftp.netlib.org/f2c.tar.gz #Source: ftp://ftp.cdc.noaa.gov/Public/jsw/%n-%v.tar.bz2 # outdated, historic PatchScript: << #!/bin/sh -ev sed -i.bak 's|#include "defs.h"|#include "defs.h"\ #include "unistd.h"|g' src/sysdep.c sed -i.bak 's|fe71c52a|f7c83c00|g' src/xsum0.out sed -i.bak 's|15893|15913|g' src/xsum0.out << CompileScript: << #!/bin/sh -ev if test -f src/notice ; then /bin/mv src/notice src/Notice ; fi if test -f src/readme ; then /bin/mv src/readme src/README ; fi sed 's/CFLAGS = -O/CFLAGS = -O2 -fno-common -Wno-parentheses/; s/ld -r -x/ld -r/' libf2c/makefile.u > libf2c/makefile sed 's/CFLAGS = -O/CFLAGS = -O2 -fno-common -Wno-parentheses/; s/ld -r -x/ld -r/' src/makefile.u > src/makefile cd libf2c make cd ../src make cd .. mv fc fc.orig sed 's/CFLAGS="$CFLAGS $O"/CFLAGS="$CFLAGS $O""3"/; s/ -lm//g; s/ -u MAIN__//g; s|/usr/local|%p|g; s/lib\/cpp/usr\/bin\/cpp/g' fc.orig > fc chmod +x fc << InstallScript: << #!/bin/sh -ev mkdir -p %i/include cp libf2c/f2c.h %i/include mkdir -p %i/lib cp libf2c/libf2c.a %i/lib ranlib %i/lib/libf2c.a mkdir -p %i/bin cp src/f2c %i/bin cp src/xsum %i/bin cp fc %i/bin mkdir -p %i/share/man/man1 cp f2c.1t %i/share/man/man1/f2c.1 << DocFiles: << f2c.pdf README libf2c/README:README.libf2c src/Notice permission disclaimer changes 00lastchange fixlog << DescUsage: << f2c converts f77 source code to C, which can then be compiled with a C compiler. The shell script fc does both, conversion to C and compilation. It acts very much like a 'real' compiler. The fort77 package provides a perl script with similar, but added, functionality. To test: f2c myprog.f cc -O2 -I $PREFIX/include -L$PREFIX/lib -lf2c -o myprog myprog.c ./myprog or: setenv F2CFLAGS {any flags you want fc to pass to f2c here} fc -O -o myprog myprog.f ./myprog where $PREFIX is the root of fink's directory hierarchy (/sw by default). << Maintainer: Karl-Michael Schindler Homepage: http://www.netlib.org/f2c