wok-6.x annotate mingw32-gcc/receipt @ rev 9319

Up openvas-administrator (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Mar 18 09:32:37 2011 +0100 (2011-03-18)
parents 0b4cf0d9e1b5
children 4308dc535830
rev   line source
rcx@3561 1 # SliTaz package receipt.
rcx@3561 2
rcx@3561 3 PACKAGE="mingw32-gcc"
gokhlayeh@8629 4 SOURCE="gcc-core"
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"
gokhlayeh@8629 9 DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers \
gokhlayeh@8629 10 mingw32-runtime-headers mingw32-w32api mingw32-runtime"
gokhlayeh@8629 11 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils \
gokhlayeh@8629 12 mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c \
gokhlayeh@8629 13 mingw32-w32api mingw32-runtime mingw32-g++ mingw32-ada"
rcx@3561 14 PROVIDE="mingw32-gcc-c"
gokhlayeh@8629 15 TARBALL="$SOURCE-$VERSION-src.tar.gz"
rcx@3561 16 WEB_SITE="http://www.mingw.org/"
rcx@3561 17 MINGW32_URL="$SF_MIRROR/mingw"
rcx@3561 18 WGET_URL="$MINGW32_URL/$TARBALL"
rcx@4036 19 MINGW32_ID="i586-pc-mingw32"
rcx@4036 20
rcx@4036 21 # Configuration only needs included if we're in the build/wok environment
rcx@4036 22 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
rcx@4036 23 . $WOK/mingw32-toolchain/stuff/mingw32.conf
rcx@4036 24 fi
rcx@3561 25
rcx@3561 26 # Rules to configure and make the package.
rcx@3561 27 compile_rules()
rcx@3561 28 {
rcx@4036 29 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
rcx@4036 30 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
gokhlayeh@8615 31 return 1
rcx@4036 32 fi
rcx@4036 33
gokhlayeh@8629 34 report open-bloc
gokhlayeh@8629 35
gokhlayeh@8629 36 for s in mingw32-g++ mingw32-ada; do
gokhlayeh@8629 37 tazwok get-src $s --target=$PACKAGE-$VERSION && continue
gokhlayeh@8629 38 report close-bloc
gokhlayeh@8629 39 return 1
rcx@3561 40 done
gokhlayeh@8629 41
gokhlayeh@8629 42 report step "Running compilation"
rcx@3561 43
rcx@3561 44 rm -f -r $src/binutils
rcx@3561 45 mkdir -p $SOURCE-$VERSION-build
rcx@3561 46 cd $SOURCE-$VERSION-build
gokhlayeh@8629 47 {
rcx@3561 48 $src/configure \
rcx@3561 49 --prefix=/usr \
pascal@4015 50 --libexecdir=/usr/lib \
rcx@3561 51 --infodir=/usr/share/info \
rcx@3561 52 --mandir=/usr/share/man \
rcx@4036 53 --with-sysroot=$MINGW32_ROOT \
rcx@3561 54 --disable-shared \
rcx@3561 55 --disable-debug \
rcx@3561 56 --target=$MINGW32_TARGET \
rcx@3561 57 --enable-languages=c,c++,ada \
rcx@3561 58 --enable-threads=win32 \
rcx@3561 59 --disable-win32-registry \
rcx@3561 60 --enable-sjlj-exceptions \
rcx@3561 61 $CONFIGURE_ARGS &&
pascal@5781 62 make -j 4 CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
gokhlayeh@8629 63 make DESTDIR=$src/_pkg install &&
gokhlayeh@8629 64 report close-bloc
gokhlayeh@8629 65 } || { report close-bloc; return 1; }
rcx@3561 66 }
rcx@3561 67
rcx@3561 68 # Rules to gen a SliTaz package suitable for Tazpkg.
rcx@3561 69 genpkg_rules()
rcx@3561 70 {
rcx@4036 71 mkdir -p $fs/usr/lib $fs$MINGW32_ROOT
rcx@4036 72 cp -a $_pkg$MINGW32_ROOT/* $fs$MINGW32_ROOT
rcx@3561 73 cp -a $_pkg/usr/bin $fs/usr
rcx@3561 74 cp -a $_pkg/usr/include $fs/usr
rcx@3561 75 # do not need to copy lib/libiberty.a
rcx@3561 76 mkdir -p $fs/usr/lib
rcx@3561 77 cp -a $_pkg/usr/lib/gcc $fs/usr/lib
rcx@3561 78 }
rcx@3561 79
rcx@3561 80 # Rules to setup after installation
rcx@3561 81 post_install()
rcx@3561 82 {
rcx@3561 83 # Archives get stripped during packaging; need to run ranlib
rcx@3561 84 local root
rcx@3561 85 root=$1
rcx@4036 86 find $root/usr/lib/gcc/$MINGW32_ID/ -name *.a -exec $MINGW32_ID-ranlib {} \;
rcx@4036 87 find $root/usr/$MINGW32_ID/lib/ -name *.a -exec $MINGW32_ID-ranlib {} \;
rcx@3561 88 }
rcx@3561 89
rcx@3561 90 # Rules to clean the package
rcx@3561 91 clean_wok()
rcx@3561 92 {
gokhlayeh@8629 93 rm -rf $SOURCE-$VERSION-build
rcx@3561 94 }