wok-current annotate mingw32-gcc/receipt @ rev 5009

asterisk: busybox tar fix
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 28 18:30:37 2010 +0100 (2010-02-28)
parents 05b5a901936b
children 49e501a55595
rev   line source
rcx@3561 1 # SliTaz package receipt.
rcx@3561 2
rcx@3561 3 PACKAGE="mingw32-gcc"
rcx@3561 4 SOURCE="gcc"
rcx@3561 5 VERSION="3.4.5-20060117-2"
rcx@3561 6 CATEGORY="development"
rcx@3561 7 SHORT_DESC="MinGW32 gcc, for C, C++, and Ada."
rcx@3561 8 MAINTAINER="rcx@zoominternet.net"
rcx@3561 9 DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers mingw32-runtime-headers mingw32-w32api mingw32-runtime"
rcx@3561 10 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c mingw32-w32api mingw32-runtime"
rcx@3561 11 PROVIDE="mingw32-gcc-c"
rcx@3561 12 TARBALL="$SOURCE-core-$VERSION-src.tar.gz"
rcx@3561 13 WEB_SITE="http://www.mingw.org/"
rcx@3561 14 MINGW32_URL="$SF_MIRROR/mingw"
rcx@3561 15 WGET_URL="$MINGW32_URL/$TARBALL"
rcx@4036 16 MINGW32_ID="i586-pc-mingw32"
rcx@4036 17
rcx@4036 18 # Configuration only needs included if we're in the build/wok environment
rcx@4036 19 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
rcx@4036 20 . $WOK/mingw32-toolchain/stuff/mingw32.conf
rcx@4036 21 fi
rcx@3561 22
rcx@3561 23 # Rules to configure and make the package.
rcx@3561 24 compile_rules()
rcx@3561 25 {
rcx@4036 26 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
rcx@4036 27 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
rcx@4036 28 exit 1
rcx@4036 29 fi
rcx@4036 30
rcx@3561 31 MINGW32_DIR="$PWD"
rcx@3561 32 MINGW32_CPP_TARBALL="$SOURCE-g++-$VERSION-src.tar.gz"
rcx@3561 33 MINGW32_ADA_TARBALL="$SOURCE-ada-$VERSION-src.tar.gz"
rcx@3561 34
rcx@3561 35 for gcc_tgz in $MINGW32_CPP_TARBALL $MINGW32_ADA_TARBALL ; do
rcx@3561 36 # Download the additional language tarballs
rcx@3561 37 if [ ! -f "$SOURCES_REPOSITORY/$gcc_tgz" ] ; then
rcx@3561 38 cd $SOURCES_REPOSITORY
rcx@3561 39 download $MINGW32_URL/$gcc_tgz
rcx@3561 40 fi
rcx@3561 41
rcx@3561 42 # Extract the additional language tarballs
rcx@3561 43 if [ -f "$SOURCES_REPOSITORY/$gcc_tgz" ] ; then
rcx@3561 44 cd $MINGW32_DIR
rcx@3561 45 echo "Extracting $gcc_tgz ..."
rcx@3561 46 tar xzf "$SOURCES_REPOSITORY/$gcc_tgz"
rcx@3561 47 else
rcx@3561 48 # Exit if file not found to avoid errors.
rcx@3561 49 echo -e "\nDownload of $gcc_tgz failed, exiting. Please check the URL.\n"
rcx@3561 50 exit 1
rcx@3561 51 fi
rcx@3561 52 done
rcx@3561 53
rcx@3561 54 cd $MINGW32_DIR
rcx@3561 55
rcx@3561 56 rm -f -r $src/binutils
rcx@3561 57 mkdir -p $SOURCE-$VERSION-build
rcx@3561 58 cd $SOURCE-$VERSION-build
rcx@3561 59 $src/configure \
rcx@3561 60 --prefix=/usr \
pascal@4015 61 --libexecdir=/usr/lib \
rcx@3561 62 --infodir=/usr/share/info \
rcx@3561 63 --mandir=/usr/share/man \
rcx@4036 64 --with-sysroot=$MINGW32_ROOT \
rcx@3561 65 --disable-shared \
rcx@3561 66 --disable-debug \
rcx@3561 67 --target=$MINGW32_TARGET \
rcx@3561 68 --enable-languages=c,c++,ada \
rcx@3561 69 --enable-threads=win32 \
rcx@3561 70 --disable-win32-registry \
rcx@3561 71 --enable-sjlj-exceptions \
rcx@3561 72 $CONFIGURE_ARGS &&
rcx@3561 73 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
rcx@3561 74 make DESTDIR=$src/_pkg install
rcx@3561 75 }
rcx@3561 76
rcx@3561 77 # Rules to gen a SliTaz package suitable for Tazpkg.
rcx@3561 78 genpkg_rules()
rcx@3561 79 {
rcx@4036 80 mkdir -p $fs/usr/lib $fs$MINGW32_ROOT
rcx@4036 81 cp -a $_pkg$MINGW32_ROOT/* $fs$MINGW32_ROOT
rcx@3561 82 cp -a $_pkg/usr/bin $fs/usr
rcx@3561 83 cp -a $_pkg/usr/include $fs/usr
rcx@3561 84 # do not need to copy lib/libiberty.a
rcx@3561 85 mkdir -p $fs/usr/lib
rcx@3561 86 cp -a $_pkg/usr/lib/gcc $fs/usr/lib
rcx@3561 87 }
rcx@3561 88
rcx@3561 89 # Rules to setup after installation
rcx@3561 90 post_install()
rcx@3561 91 {
rcx@3561 92 # Archives get stripped during packaging; need to run ranlib
rcx@3561 93 local root
rcx@3561 94 root=$1
rcx@4036 95 find $root/usr/lib/gcc/$MINGW32_ID/ -name *.a -exec $MINGW32_ID-ranlib {} \;
rcx@4036 96 find $root/usr/$MINGW32_ID/lib/ -name *.a -exec $MINGW32_ID-ranlib {} \;
rcx@3561 97 }
rcx@3561 98
rcx@3561 99 # Rules to clean the package
rcx@3561 100 clean_wok()
rcx@3561 101 {
rcx@3561 102 rm -r $SOURCE-$VERSION-build
rcx@3561 103 }