wok annotate h8300-gcc3/receipt @ rev 24694

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 13 12:06:14 2022 +0000 (2022-03-13)
parents 600949c94110
children d79ed38ace18
rev   line source
pascal@2176 1 # SliTaz package receipt.
pascal@2176 2
pascal@2176 3 PACKAGE="h8300-gcc3"
pascal@2176 4 SOURCE="gcc"
pascal@2176 5 VERSION="3.4.6"
pascal@2176 6 CATEGORY="development"
pascal@2176 7 SHORT_DESC="gcc targeting the H8/300"
pascal@2176 8 MAINTAINER="rcx@zoominternet.net"
pascal@15000 9 LICENSE="GPL2"
pascal@2176 10 TARBALL="$SOURCE-$VERSION.tar.bz2"
pascal@2176 11 WEB_SITE="http://www.gnu.org/software/gcc/"
pascal@2176 12 WGET_URL="$GNU_MIRROR/$SOURCE/$SOURCE-$VERSION/$TARBALL"
rcx@4029 13 PROVIDE="h8300-gcc"
pascal@13033 14 TAGS="compiler C C++ ada"
pascal@2176 15
pascal@15000 16 DEPENDS="h8300-binutils"
pascal@15000 17 BUILD_DEPENDS="bison flex h8300-binutils"
pascal@15000 18
pascal@24694 19 # What is the latest version available today?
pascal@24694 20 current_version()
pascal@24694 21 {
pascal@24694 22 wget -O - $GNU_MIRROR/$SOURCE 2>/dev/null | \
pascal@24694 23 sed '/gcc-3/!d;s|.*gcc-||;s|.t.*||;s|/.*||' | sort -Vr | sed q
pascal@24694 24 }
pascal@24694 25
rcx@4034 26 # Configuration only needs included if we're in the build/wok environment
rcx@4034 27 if [ -e $WOK/h8300-toolchain/stuff/h8300.conf ] ; then
rcx@4034 28 . $WOK/h8300-toolchain/stuff/h8300.conf
rcx@4034 29 fi
rcx@4034 30
pascal@2176 31 # Rules to configure and make the package.
pascal@2176 32 compile_rules()
pascal@2176 33 {
rcx@3292 34 rm -f -r $src/libssp $src/libstdc++-v3 $src/binutils
pascal@15338 35 mkdir -p $SOURCE-$VERSION-build \
pascal@15338 36 $DESTDIR/usr/share/man/man1 $DESTDIR/usr/share/man/man7
rcx@3292 37 cd $SOURCE-$VERSION-build
pascal@2176 38 $src/configure \
rcx@4034 39 --target=$H8300_TARGET \
rcx@3294 40 --enable-languages=c,c++,ada \
pascal@2176 41 --disable-nls \
pascal@2176 42 --enable-target-optspace \
pascal@2176 43 --prefix=/usr \
pascal@4014 44 --libexecdir=/usr/lib \
pascal@2176 45 --infodir=/usr/share/info \
pascal@2176 46 --mandir=/usr/share/man \
pascal@2176 47 $CONFIGURE_ARGS &&
gokhlayeh@11574 48 make $MAKEFLAGS &&
pascal@15338 49 make DESTDIR=$DESTDIR install
pascal@2176 50 }
pascal@2176 51
pascal@2176 52 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2176 53 genpkg_rules()
pascal@2176 54 {
pascal@2176 55 mkdir -p $fs/usr
pascal@15000 56 cp -a $install/usr/bin $fs/usr
pascal@15000 57 cp -a $install/usr/include $fs/usr
rcx@4034 58 # Do not need to copy lib/libiberty.a
pascal@2176 59 mkdir -p $fs/usr/lib
pascal@15000 60 cp -a $install/usr/lib/gcc $fs/usr/lib
rcx@4034 61 # Do not include the h8300* variant folders; create separate packages if they are needed
rcx@4034 62 rm -r -f $fs/usr/lib/gcc/$H8300_TARGET/$VERSION/h8300h
rcx@4034 63 rm -r -f $fs/usr/lib/gcc/$H8300_TARGET/$VERSION/h8300s
pascal@2176 64 }
rcx@3292 65
rcx@3292 66 # Rules to clean the package
rcx@3292 67 clean_wok()
rcx@3292 68 {
rcx@3292 69 rm -r $SOURCE-$VERSION-build
rcx@3292 70 }