wok-6.x annotate f2c/receipt @ rev 24939

f2c: add libf2c
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Apr 15 16:15:33 2022 +0000 (2022-04-15)
parents 3e62030539e2
children 0a3aadaa7736
rev   line source
pascal@24796 1 # SliTaz package receipt.
pascal@24796 2
pascal@24796 3 PACKAGE="f2c"
pascal@24796 4 VERSION="20200916"
pascal@24796 5 CATEGORY="development"
pascal@24796 6 SHORT_DESC="A Fortran 77 to C translator."
pascal@24796 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@24807 8 LICENSE="MIT"
pascal@24796 9 TARBALL="$PACKAGE-$VERSION.tgz"
pascal@24939 10 WEB_SITE="https://github.com/barak/f2c"
pascal@24939 11 WGET_URL="http://www.netlib.org/f2c/src.tgz"
pascal@24939 12 LIBF2C="http://www.netlib.org/f2c/libf2c.zip"
pascal@24939 13 EXTRA_SOURCE_FILES="${LIBF2C##*/}"
pascal@24796 14 TAGS="fortran"
pascal@24796 15
pascal@24796 16 # What is the latest version available today?
pascal@24796 17 current_version()
pascal@24796 18 {
pascal@24796 19 wget -O - $WGET_URL 2>/dev/null | \
pascal@24796 20 tar xOzf - src/changes | sed '/^20[0-9]/!d' | sort -Vr | sed q
pascal@24796 21 }
pascal@24796 22
pascal@24796 23 # Rules to configure and make the package.
pascal@24796 24 compile_rules()
pascal@24796 25 {
pascal@24939 26 [ -s $SOURCES_REPOSITORY/$EXTRA_SOURCE_FILES ] ||
pascal@24939 27 wget -P $SOURCES_REPOSITORY $LIBF2C
pascal@24796 28 cp makefile.u makefile
pascal@24796 29 make
pascal@24939 30 unzip $SOURCES_REPOSITORY/$EXTRA_SOURCE_FILES -d libf2c
pascal@24939 31 cd libf2c
pascal@24939 32 sed 's|^CFLAGS.*|& -fPIC -DNON_UNIX_STDIO|' < makefile.u > makefile
pascal@24939 33 make all libf2c.so
pascal@24796 34 }
pascal@24796 35
pascal@24796 36 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@24796 37 genpkg_rules()
pascal@24796 38 {
pascal@24939 39 mkdir -p $install/usr/man $fs/usr/bin $fs/usr/lib $fs/usr/include
pascal@24796 40 cp -a $src/f2c $fs/usr/bin
pascal@24939 41 cp -a $src/libf2c/f2c.h $fs/usr/include
pascal@24939 42 cp -a $src/libf2c/libf2c.a $fs/usr/lib
pascal@24939 43 cp -a $src/libf2c/libf2c.so $fs/usr/lib/libf2c.so.1.0.0
pascal@24939 44 ln -s libf2c.so.1.0.0 $fs/usr/lib/libf2c.so.1
pascal@24939 45 ln -s libf2c.so.1.0.0 $fs/usr/lib/libf2c.so
pascal@24805 46 cp -a $src/f2c.1t $install/usr/man/f2c.1
pascal@24796 47 }