wok-undigest annotate cross-arm-glibc/receipt @ rev 695

Add cross-* packages from cooking
author Christophe Lincoln <pankso@slitaz.org>
date Thu May 10 04:42:24 2012 +0200 (2012-05-10)
parents
children 1ef621db1c6d
rev   line source
pankso@695 1 # SliTaz package receipt.
pankso@695 2
pankso@695 3 PACKAGE="cross-arm-glibc"
pankso@695 4 VERSION="2.14.1"
pankso@695 5 CATEGORY="system-tools"
pankso@695 6 SHORT_DESC="The GNU C libraries for the ARM cross toolchain"
pankso@695 7 MAINTAINER="pankso@slitaz.org"
pankso@695 8 SOURCE="glibc"
pankso@695 9 TARBALL="$SOURCE-$VERSION.tar.gz"
pankso@695 10 WEB_SITE="http://www.gnu.org/software/libc/"
pankso@695 11 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pankso@695 12
pankso@695 13 DEPENDS=""
pankso@695 14 BUILD_DEPENDS="linux-arm-api-headers cross-arm-binutils cross-arm-gcc \
pankso@695 15 autoconf bash gawk"
pankso@695 16
pankso@695 17 # Cross toolchain variables. We dont use CROSS_TRIPLET here, we cross build
pankso@695 18 # with: --build=$HOST_SYSTEM --host=$CROSS_TARGET
pankso@695 19 CROSS_TARGET="arm-slitaz-linux-gnueabi"
pankso@695 20 CROSS_PREFIX="/usr/cross/arm"
pankso@695 21
pankso@695 22 # CFLAGS and CXXFLAGS must not be set during the building of cross-tools.
pankso@695 23 unset CFLAGS CXXFLAGS CONFIG_SITE
pankso@695 24
pankso@695 25 # Path to cross tools
pankso@695 26 export PATH=$PATH:$CROSS_PREFIX/bin
pankso@695 27
pankso@695 28 # Rules to configure and make the package.
pankso@695 29 compile_rules()
pankso@695 30 {
pankso@695 31 cd $src
pankso@695 32
pankso@695 33 # Glibc ports.
pankso@695 34 if [ ! -f "$SRC/glibc-ports-$VERSION.tar.bz2" ]; then
pankso@695 35 wget $GNU_MIRROR/$SOURCE/glibc-ports-$VERSION.tar.bz2 \
pankso@695 36 -O $SRC/glibc-ports-$VERSION.tar.bz2
pankso@695 37 fi
pankso@695 38 echo "Extracting: glibc-ports-$VERSION.tar.bz2"
pankso@695 39 tar xjf $SRC/glibc-ports-$VERSION.tar.bz2
pankso@695 40 mv glibc-ports-$VERSION ports
pankso@695 41
pankso@695 42 mkdir ../build && cd ../build
pankso@695 43
pankso@695 44 CC=$CROSS_PREFIX/bin/$CROSS_TARGET-gcc
pankso@695 45 echo "libc_cv_forced_unwind=yes" > config.cache
pankso@695 46 echo "libc_cv_c_cleanup=yes" >> config.cache
pankso@695 47 #--enable-add-ons
pankso@695 48 $src/configure \
pankso@695 49 --prefix=$CROSS_PREFIX \
pankso@695 50 --libexecdir=$CROSS_PREFIX/lib/glibc \
pankso@695 51 --with-headers=$CROSS_PREFIX/include \
pankso@695 52 --with-binutils=$CROSS_PREFIX/bin \
pankso@695 53 --config-cache \
pankso@695 54 --disable-sanity-checks \
pankso@695 55 --disable-profile \
pankso@695 56 --enable-kernel=2.6.30 \
pankso@695 57 --build=$HOST_SYSTEM \
pankso@695 58 --host=$CROSS_TARGET &&
pankso@695 59 make && make install_root=$DESTDIR install
pankso@695 60 }
pankso@695 61
pankso@695 62 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@695 63 genpkg_rules()
pankso@695 64 {
pankso@695 65 mkdir -p $fs/usr
pankso@695 66 cp -a $install/usr/cross $fs/usr
pankso@695 67 }