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