wok-next rev 16229

fpc-bootstrap: prepare multi arch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Apr 01 08:34:15 2014 +0000 (2014-04-01)
parents 66940c68d29e
children 3a0f4ab7b0ad
files fpc-bootstrap/receipt
line diff
     1.1 --- a/fpc-bootstrap/receipt	Tue Apr 01 08:27:12 2014 +0000
     1.2 +++ b/fpc-bootstrap/receipt	Tue Apr 01 08:34:15 2014 +0000
     1.3 @@ -6,9 +6,23 @@
     1.4  SHORT_DESC="bootstrap to compile fpc."
     1.5  MAINTAINER="slaxemulator@gmail.com"
     1.6  LICENSE="GPL2 LGPL2.1"
     1.7 -TARBALL="$PACKAGE-$VERSION.bz2"
     1.8 +TARBALL="$PACKAGE-$ARCH-$VERSION.bz2"
     1.9  WEB_SITE="http://freepascal.org/"
    1.10 -WGET_URL="ftp://ftp.freepascal.org/pub/fpc/dist/$VERSION/bootstrap/i386-linux-ppc386.bz2"
    1.11 +BOOTSTRAP="i386-linux-ppc386"
    1.12 +WGET_URL="ftp://ftp.freepascal.org/pub/fpc/dist/$VERSION/bootstrap/$BOOTSTRAP.bz2"
    1.13 +#HOST_ARCH="i486 x86_64 arm"
    1.14 +
    1.15 +# Handle cross compilation.
    1.16 +case "$ARCH" in
    1.17 +	arm*) 
    1.18 +		BOOTSTRAP="arm-linux-ppcarm"
    1.19 +		WGET_URL="ftp://ftp.freepascal.org/pub/fpc/dist/$VERSION/bootstrap/$BOOTSTRAP.bz2"
    1.20 +		;;
    1.21 +	x86_64) 
    1.22 +		BOOTSTRAP="x86_64-linux-ppcx64"
    1.23 +		WGET_URL="ftp://ftp.freepascal.org/pub/fpc/dist/$VERSION/bootstrap/$BOOTSTRAP.bz2"
    1.24 +		;;
    1.25 +esac
    1.26  
    1.27  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.28  genpkg_rules()
    1.29 @@ -17,7 +31,8 @@
    1.30  	if [ -f $SOURCES_REPOSITORY/$TARBALL ]; then
    1.31  		cp $SOURCES_REPOSITORY/$TARBALL $WOK/$PACKAGE/tmp
    1.32  	fi
    1.33 +	mv $WOK/$PACKAGE/tmp/$TARBALL $WOK/$PACKAGE/tmp/$BOOTSTRAP.bz2
    1.34  	bunzip2 -d $WOK/$PACKAGE/tmp/$TARBALL
    1.35 -	cp -a $WOK/$PACKAGE/tmp/i386-linux-ppc386 $fs/usr/bin/ppc386
    1.36 -	chmod +x $fs/usr/bin/ppc386
    1.37 +	cp -a $WOK/$PACKAGE/tmp/$BOOTSTRAP $fs/usr/bin/${BOOTSTRAP#*linux-}
    1.38 +	chmod +x $fs/usr/bin/${BOOTSTRAP#*linux-}
    1.39  }