development/f2c: Fix VERSION.

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Judah Milgram 2021-03-11 05:56:23 +00:00 committed by Willy Sudiarto Raharjo
parent 8026611b24
commit 31b689327d
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
4 changed files with 49 additions and 36 deletions

View File

@ -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.

View File

@ -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}

View File

@ -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"

View File

@ -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: