SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "f2c"

# SliTaz package receipt.

PACKAGE="f2c"
VERSION="20200916"
CATEGORY="development"
SHORT_DESC="A Fortran 77 to C translator."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="MIT"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://github.com/barak/f2c"
WGET_URL="https://github.com/barak/f2c/archive/refs/tags/upstream/$VERSION.tar.gz"
LIBF2C="http://www.netlib.org/f2c/libf2c.zip"
EXTRA_SOURCE_FILES="${LIBF2C##*/}"
TAGS="fortran"

# What is the latest version available today?
current_version()
{
    wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
    [ -s $SOURCES_REPOSITORY/$EXTRA_SOURCE_FILES ] ||
        wget -P $SOURCES_REPOSITORY $LIBF2C
    cd src
    cp makefile.u makefile
    make
    mkdir libf2c && cd libf2c
    unzip -q $SOURCES_REPOSITORY/$EXTRA_SOURCE_FILES
    sed 's|^CFLAGS.*|& -fPIC -DNON_UNIX_STDIO|' < makefile.u > makefile
    make all libf2c.so
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $install/usr/man $fs/usr/bin $fs/usr/lib $fs/usr/include
    cp -a $src/src/f2c $fs/usr/bin
    cp -a $src/src/libf2c/f2c.h $fs/usr/include
    cp -a $src/src/libf2c/libf2c.a $fs/usr/lib
    cp -a $src/src/libf2c/libf2c.so $fs/usr/lib/libf2c.so.1.0.0
    ln -s libf2c.so.1.0.0 $fs/usr/lib/libf2c.so.1
    ln -s libf2c.so.1.0.0 $fs/usr/lib/libf2c.so
    cp -a $src/f2c.1t $install/usr/man/f2c.1
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)