wok-next view mingw32-gcc/receipt @ rev 9467
Fix receipts that remove lines that removed .pyc and .pyo files. Tazwok does that now.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Apr 03 14:11:25 2011 +0000 (2011-04-03) |
parents | fd43246b4613 |
children | d1768332cee0 |
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 mingw32-g++ mingw32-ada"
14 PROVIDE="mingw32-gcc-c"
15 TARBALL="$SOURCE-$VERSION-src.tar.gz"
16 WEB_SITE="http://www.mingw.org/"
17 MINGW32_URL="$SF_MIRROR/mingw"
18 WGET_URL="$MINGW32_URL/$TARBALL"
19 MINGW32_ID="i586-pc-mingw32"
21 # Configuration only needs included if we're in the build/wok environment
22 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
23 . $WOK/mingw32-toolchain/stuff/mingw32.conf
24 fi
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
30 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
31 return 1
32 fi
34 report open-bloc
36 for s in mingw32-g++ mingw32-ada; do
37 tazwok get-src $s --target=$PACKAGE-$VERSION && continue
38 report close-bloc
39 return 1
40 done
42 report step "Running compilation"
44 rm -f -r $src/binutils
45 mkdir -p $SOURCE-$VERSION-build
46 cd $SOURCE-$VERSION-build
47 {
48 $src/configure \
49 --prefix=/usr \
50 --libexecdir=/usr/lib \
51 --infodir=/usr/share/info \
52 --mandir=/usr/share/man \
53 --with-sysroot=$MINGW32_ROOT \
54 --disable-shared \
55 --disable-debug \
56 --target=$MINGW32_TARGET \
57 --enable-languages=c,c++,ada \
58 --enable-threads=win32 \
59 --disable-win32-registry \
60 --enable-sjlj-exceptions \
61 $CONFIGURE_ARGS &&
62 make -j 4 CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
63 make DESTDIR=$src/_pkg install &&
64 report close-bloc
65 } || { report close-bloc; return 1; }
66 }
68 # Rules to gen a SliTaz package suitable for Tazpkg.
69 genpkg_rules()
70 {
71 mkdir -p $fs/usr/lib $fs$MINGW32_ROOT
72 cp -a $_pkg$MINGW32_ROOT/* $fs$MINGW32_ROOT
73 rm $fs$MINGW32_ROOT/lib/*.la
74 cp -a $_pkg/usr/bin $fs/usr
75 cp -a $_pkg/usr/include $fs/usr
76 # do not need to copy lib/libiberty.a
77 mkdir -p $fs/usr/lib
78 cp -a $_pkg/usr/lib/gcc $fs/usr/lib
79 }
81 # Rules to setup after installation
82 post_install()
83 {
84 # Archives get stripped during packaging; need to run ranlib
85 local root
86 root=$1
87 find $root/usr/lib/gcc/$MINGW32_ID/ -name *.a -exec $MINGW32_ID-ranlib {} \;
88 find $root/usr/$MINGW32_ID/lib/ -name *.a -exec $MINGW32_ID-ranlib {} \;
89 }
91 # Rules to clean the package
92 clean_wok()
93 {
94 rm -rf $SOURCE-$VERSION-build
95 }