wok view 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
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 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 ln -s . gcc-$VERSION
35 for tgz in gcc-g++-$VERSION-src.tar.gz gcc-ada-$VERSION-src.tar.gz; do
36 [ -s $SOURCES_REPOSITORY/$tgz ] ||
37 wget -P $SOURCES_REPOSITORY $MINGW32_URL/$tgz
38 [ -s $SOURCES_REPOSITORY/$tgz ] &&
39 tar xzf $SOURCES_REPOSITORY/$tgz && continue
40 echo "Can't download $MINGW32_URL/$tgz abort."
41 return 1
42 done
44 rm -f -r $src/binutils
45 mkdir -p $SOURCE-$VERSION-build
46 cd $SOURCE-$VERSION-build
47 $src/configure \
48 --prefix=/usr \
49 --libexecdir=/usr/lib \
50 --infodir=/usr/share/info \
51 --mandir=/usr/share/man \
52 --with-sysroot=$MINGW32_ROOT \
53 --disable-shared \
54 --disable-debug \
55 --target=$MINGW32_TARGET \
56 --enable-languages=c,c++,ada \
57 --enable-threads=win32 \
58 --disable-win32-registry \
59 --enable-sjlj-exceptions \
60 $CONFIGURE_ARGS &&
61 make -j 4 CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
62 make DESTDIR=$DESTDIR install
63 }
65 # Rules to gen a SliTaz package suitable for Tazpkg.
66 genpkg_rules()
67 {
68 mkdir -p $fs/usr/lib $fs$MINGW32_ROOT
69 cp -a $_pkg$MINGW32_ROOT/* $fs$MINGW32_ROOT
70 rm $fs$MINGW32_ROOT/lib/*.la
71 cp -a $_pkg/usr/bin $fs/usr
72 cp -a $_pkg/usr/include $fs/usr
73 # do not need to copy lib/libiberty.a
74 mkdir -p $fs/usr/lib
75 cp -a $_pkg/usr/lib/gcc $fs/usr/lib
76 }
78 # Rules to setup after installation
79 post_install()
80 {
81 # Archives get stripped during packaging; need to run ranlib
82 local root
83 root=$1
84 find $root/usr/lib/gcc/$MINGW32_ID/ -name *.a -exec $MINGW32_ID-ranlib {} \;
85 find $root/usr/$MINGW32_ID/lib/ -name *.a -exec $MINGW32_ID-ranlib {} \;
86 }
88 # Rules to clean the package
89 clean_wok()
90 {
91 rm -rf $SOURCE-$VERSION-build
92 }