wok annotate mingw32-gcc/receipt @ rev 12905

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