summaryrefslogtreecommitdiffstats
path: root/development/f2c
diff options
context:
space:
mode:
Diffstat (limited to 'development/f2c')
-rw-r--r--development/f2c/README23
-rw-r--r--development/f2c/f2c.SlackBuild56
-rw-r--r--development/f2c/f2c.info18
-rw-r--r--development/f2c/slack-desc10
4 files changed, 63 insertions, 44 deletions
diff --git a/development/f2c/README b/development/f2c/README
index ed89051435..61f28bde6f 100644
--- a/development/f2c/README
+++ b/development/f2c/README
@@ -1,13 +1,22 @@
+
f2c is a Fortran-to-C converter.
This package includes libf2c, which must be linked to the resulting C
-code. Thus the general idea is
+code.
+
+Thus the general idea is: f2c foo.f; gcc foo.c -lf2c
+
+Or use the fc script provided in the docs directory. Beware, fc is
+also an (unrelated) bash builtin.
+
+f2c used to use two separate libraries, libi77 and libf77. These are
+now rolled together into libf2c. NB libf2c carries a separate version
+number from f2c itself. The version number associated with the
+SlackBuilds package is the f2c version number.
- f2c foo.f
- gcc foo.c -lf2c
+If combining with gfortran, you may want to use gfortran -ff2c. See
+the gfortran man page.
-Or use the fc script provided in the docs directory. Beware, fc is also
-a bash builtin.
+Multiple files must be downloaded because netlib doesn't provide a
+convenient single tarball.
-If combining with gfortran, you may want to use the gfortran -ff2c
-option. See the gfortran man page.
diff --git a/development/f2c/f2c.SlackBuild b/development/f2c/f2c.SlackBuild
index 4106279e3f..ca3b3d691d 100644
--- a/development/f2c/f2c.SlackBuild
+++ b/development/f2c/f2c.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for f2c
-# Copyright 2017, Judah Milgram, Washington DC
+# Copyright 2017-2023, Judah Milgram, Washington DC
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=f2c
-VERSION=${VERSION:-20160102} # This is the f2c version, not libf2c.
+VERSION=${VERSION:-20240130} # f2c version, not libf2c.
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -66,7 +73,7 @@ cd $PRGNAM-$VERSION/libf2c
unzip $CWD/libf2c.zip
cd $TMP/$PRGNAM-$VERSION
-tar xvf $CWD/src.tgz
+tar xfvz $CWD/src.tgz
chown -R root:root .
find -L . \
@@ -75,46 +82,49 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# libf2c
-
+# make libf2c:
cd $TMP/$PRGNAM-$VERSION/libf2c
make CFLAGS="${SLKCFLAGS}" -f makefile.u
+# install libf2c:
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
make -f makefile.u LIBDIR=$PKG/usr/lib${LIBDIRSUFFIX} install
-strip --strip-unneeded $PKG/usr/lib${LIBDIRSUFFIX}/libf2c.a
-
-# f2c
+# make f2c:
cd $TMP/$PRGNAM-$VERSION/src
make CFLAGS="${SLKCFLAGS}" -f makefile.u
+# install f2c:
mkdir -p $PKG/usr/bin
+mkdir -p $PKG/usr/include
install -s f2c $PKG/usr/bin
-strip --strip-unneeded $PKG/usr/bin/f2c
+install -m 644 f2c.h $PKG/usr/include
-mkdir -p $PKG/usr/include
-install f2c.h $PKG/usr/include
+# strip binaries:
+strip --strip-unneeded $PKG/usr/lib${LIBDIRSUFFIX}/libf2c.a
+strip --strip-unneeded $PKG/usr/bin/f2c
+# install f2c man page:
+cd $TMP
mkdir -p $PKG/usr/man/man1
-install f2c.1 $PKG/usr/man/man1/f2c.1
+install -m 644 $PRGNAM-$VERSION/src/f2c.1t $PKG/usr/man/man1/f2c.1
gzip -9 $PKG/usr/man/man1/f2c.1
-
-cd $TMP/$PRGNAM-$VERSION
-
+# install docs:
+cd $TMP
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a src/Notice src/changes $PKG/usr/doc/$PRGNAM-$VERSION
-
-cp -a src/README $PKG/usr/doc/$PRGNAM-$VERSION/README.f2c
-cp -a libf2c/README $PKG/usr/doc/$PRGNAM-$VERSION/README.libf2c
-
+cp -a $PRGNAM-$VERSION/src/Notice $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $PRGNAM-$VERSION/src/README $PKG/usr/doc/$PRGNAM-$VERSION/README.f2c
+cp -a $PRGNAM-$VERSION/src/changes $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $PRGNAM-$VERSION/libf2c/README $PKG/usr/doc/$PRGNAM-$VERSION/README.libf2c
cat $CWD/fc > $PKG/usr/doc/$PRGNAM-$VERSION/fc
cat $CWD/f2c.pdf > $PKG/usr/doc/$PRGNAM-$VERSION/f2c.pdf
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# Copy the slack-desc into ./install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+# Make the package
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/development/f2c/f2c.info b/development/f2c/f2c.info
index 69d0ea1d2a..3871d4eb70 100644
--- a/development/f2c/f2c.info
+++ b/development/f2c/f2c.info
@@ -1,16 +1,16 @@
PRGNAM="f2c"
-VERSION="20160102"
-HOMEPAGE="http://www.netlib.org/f2c/"
-DOWNLOAD="http://www.netlib.org/f2c/libf2c.zip \
- http://www.netlib.org/f2c/src.tgz \
- http://www.netlib.org/f2c/fc \
- http://www.netlib.org/f2c/f2c.pdf"
-MD5SUM="e80fb30fa3717660db71b1bed65b88b7 \
- f11ed7992a92ad4b4f86fdf94994473a \
+VERSION="20240130"
+HOMEPAGE="https://netlib.org/f2c/"
+DOWNLOAD="https://netlib.org/f2c/libf2c.zip \
+ https://netlib.org/f2c/src.tgz \
+ https://netlib.org/f2c/fc \
+ https://netlib.org/f2c/f2c.pdf"
+MD5SUM="651b3d9cbfc9ae659166332785ac3b6e \
+ 3a292e0c25dbb65bf0273959a3f18bf5 \
dcdf6afbd96204662bf10594b744cb44 \
2a84d6d2f74412d7a288e721070d62b8"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Judah Milgram"
-EMAIL="milgram@cgpp.com"
+EMAIL="milgram / cgpp / com"
diff --git a/development/f2c/slack-desc b/development/f2c/slack-desc
index 4373cf0645..b1f3476557 100644
--- a/development/f2c/slack-desc
+++ b/development/f2c/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-f2c: f2c (Fortran-to-C converter)
+f2c: f2c (a Fortran-to-C converter)
f2c:
-f2c: f2c is a Fortran-to-C converter
f2c: by S. I. Feldman, David M. Gay, Mark W. Maimone, and N. L. Schryer
f2c:
-f2c: This package includes libf2c, which must be linked to the resulting C
-f2c: code.
-f2c:
+f2c: From netlib. Includes libf2c.
f2c:
+f2c: The general idea: f2c foo.f; gcc foo.c -lf2c
f2c:
+f2c: If combining with gfortran, see the -ff2c option in the gfortran man
+f2c: page.
f2c: