wok view mingw32-gcc-c/receipt @ rev 8615

Fix: replace exit 1 by return 1 in receipts (exit broke cook-list function)
author Antoine Bodin <gokhlayeh@slitaz.org>
date Mon Feb 14 19:09:46 2011 +0100 (2011-02-14)
parents d437e141264c
children fd43246b4613
line source
1 # SliTaz package receipt.
3 PACKAGE="mingw32-gcc-c"
4 SOURCE="gcc"
5 VERSION="3.4.5-20060117-2"
6 CATEGORY="development"
7 SHORT_DESC="MinGW32 gcc, for the C language only."
8 MAINTAINER="rcx@zoominternet.net"
9 DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers mingw32-runtime-headers"
10 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers"
11 TARBALL="$SOURCE-core-$VERSION-src.tar.gz"
12 WEB_SITE="http://www.mingw.org/"
13 MINGW32_URL="$SF_MIRROR/mingw"
14 WGET_URL="$MINGW32_URL/$TARBALL"
15 MINGW32_ID="i586-pc-mingw32"
17 # Configuration only needs included if we're in the build/wok environment
18 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
19 . $WOK/mingw32-toolchain/stuff/mingw32.conf
20 fi
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
26 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
27 return 1
28 fi
30 rm -f -r $src/binutils
31 mkdir -p $SOURCE-$VERSION-build
32 cd $SOURCE-$VERSION-build
33 $src/configure \
34 --prefix=/usr \
35 --libexecdir=/usr/lib \
36 --infodir=/usr/share/info \
37 --mandir=/usr/share/man \
38 --with-sysroot=$MINGW32_ROOT \
39 --disable-shared \
40 --disable-debug \
41 --target=$MINGW32_TARGET \
42 --enable-languages=c \
43 --enable-threads=win32 \
44 --disable-win32-registry \
45 --enable-sjlj-exceptions \
46 $CONFIGURE_ARGS &&
47 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
48 make DESTDIR=$src/_pkg install
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 mkdir -p $fs/usr
55 cp -a $_pkg/usr/bin $fs/usr
56 # do not need to copy lib/libiberty.a
57 mkdir -p $fs/usr/lib
58 cp -a $_pkg/usr/lib/gcc $fs/usr/lib
59 }
61 # Rules to setup after installation
62 post_install()
63 {
64 # Archives get stripped during packaging; need to run ranlib
65 local root
66 root=$1
67 find $root/usr/lib/gcc/$MINGW32_ID/ -name *.a -exec $MINGW32_ID-ranlib {} \;
68 }
70 # Rules to clean the package
71 clean_wok()
72 {
73 rm -r $SOURCE-$VERSION-build
74 }