summaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorJudah Milgram <milgram@cgpp.com>2021-03-11 05:56:23 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-03-13 09:02:38 +0700
commit31b689327d303d194c4e91f6568357ae63d9cea5 (patch)
tree0cb2d61d485c3e78629ef128715c3f15f8198d6c /development
parent8026611b24952a60785be88e7a4cc69378c4a6ce (diff)
downloadslackbuilds-31b689327d303d194c4e91f6568357ae63d9cea5.tar.gz
development/f2c: Fix VERSION.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/f2c/README22
-rw-r--r--development/f2c/f2c.SlackBuild49
-rw-r--r--development/f2c/f2c.info4
-rw-r--r--development/f2c/slack-desc10
4 files changed, 49 insertions, 36 deletions
diff --git a/development/f2c/README b/development/f2c/README
index f0e77ae559..5f2431f228 100644
--- a/development/f2c/README
+++ b/development/f2c/README
@@ -1,14 +1,22 @@
+
f2c is a Fortran-to-C converter.
-This package includes libf77 and libi77 rolled together as libf2c,
-which must be linked to the resulting C code. Thus the general idea
-is
+This package includes libf2c, which must be linked to the resulting C
+code.
- f2c foo.f
- gcc foo.c -lf2c
+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
a bash builtin.
-If combining with gfortran, you may want to use gfortran's -ff2c
-option. See the gfortran man page.
+f2c used to use two separate libraries, libi77 and libf77. These are
+now rolled together into libf2c. Beware, libf2c carries a separate
+version number from f2c itself. The version number associated with the
+SlackBuilds package is the f2c version number.
+
+If combining with gfortran, you may want to use gfortran -ff2c. See the
+gfortran man page.
+
+Multiple files must be downloaded because netlib doesn't provide a
+convenient single tarball.
+
diff --git a/development/f2c/f2c.SlackBuild b/development/f2c/f2c.SlackBuild
index 955f1fe394..6256e7075f 100644
--- a/development/f2c/f2c.SlackBuild
+++ b/development/f2c/f2c.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for f2c
-# Copyright 2017-2021, Judah Milgram, Washington DC
+# Copyright 2017, Judah Milgram, Washington DC
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,14 +23,16 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=f2c
-VERSION=${VERSION:-20160102} # f2c version, not libi77 or libf77
+VERSION=${VERSION:-20160102} # This is the f2c version, not libf2c.
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -66,7 +68,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 +77,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
-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
+# install libf2c:
+mkdir -p $PKG/usr/lib
+make -f makefile.u LIBDIR=$PKG/usr/lib install
+# make f2c:
cd $TMP/$PRGNAM-$VERSION/src
make CFLAGS="${SLKCFLAGS}" -f makefile.u
+# install f2c:
mkdir -p $PKG/usr/bin
-install -s f2c $PKG/usr/bin
-strip --strip-unneeded $PKG/usr/bin/f2c
-
mkdir -p $PKG/usr/include
+install -s f2c $PKG/usr/bin
install f2c.h $PKG/usr/include
+# strip binaries:
+strip --strip-unneeded $PKG/usr/lib/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 $PRGNAM-$VERSION/src/f2c.1 $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}
diff --git a/development/f2c/f2c.info b/development/f2c/f2c.info
index 9d5d5de7f5..4b157b737c 100644
--- a/development/f2c/f2c.info
+++ b/development/f2c/f2c.info
@@ -1,5 +1,5 @@
PRGNAM="f2c"
-VERSION="2020916"
+VERSION="20160102"
HOMEPAGE="http://www.netlib.org/f2c/"
DOWNLOAD="http://www.netlib.org/f2c/libf2c.zip \
http://www.netlib.org/f2c/src.tgz \
@@ -13,4 +13,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Judah Milgram"
-EMAIL="milgram at cgpp dot 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: