wok-current view mingw32-gcc/receipt @ rev 8908
libdrm-mach64: do not use host kernel version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 28 10:38:12 2011 +0100 (2011-02-28) |
parents | 0b4cf0d9e1b5 |
children | 4308dc535830 |
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 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 }