wok view mingw32-gcc/receipt @ rev 13720

galculator: try to fix patching (again)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Dec 21 05:15:23 2012 +0000 (2012-12-21)
parents 42924af752bc
children b2a632fc9587
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"
20 TAGS="compiler C C++ ada"
22 # Configuration only needs included if we're in the build/wok environment
23 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
24 . $WOK/mingw32-toolchain/stuff/mingw32.conf
25 fi
27 # Rules to configure and make the package.
28 compile_rules()
29 {
30 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
31 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
32 return 1
33 fi
35 ln -s . gcc-$VERSION
36 for tgz in gcc-g++-$VERSION-src.tar.gz gcc-ada-$VERSION-src.tar.gz; do
37 [ -s $SOURCES_REPOSITORY/$tgz ] ||
38 wget -P $SOURCES_REPOSITORY $MINGW32_URL/$tgz
39 [ -s $SOURCES_REPOSITORY/$tgz ] &&
40 tar xzf $SOURCES_REPOSITORY/$tgz && continue
41 echo "Can't download $MINGW32_URL/$tgz abort."
42 return 1
43 done
45 rm -f -r $src/binutils
46 mkdir -p $SOURCE-$VERSION-build
47 cd $SOURCE-$VERSION-build
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=$DESTDIR install
64 }
66 # Rules to gen a SliTaz package suitable for Tazpkg.
67 genpkg_rules()
68 {
69 mkdir -p $fs/usr/lib $fs$MINGW32_ROOT
70 cp -a $_pkg$MINGW32_ROOT/* $fs$MINGW32_ROOT
71 rm $fs$MINGW32_ROOT/lib/*.la
72 cp -a $_pkg/usr/bin $fs/usr
73 cp -a $_pkg/usr/include $fs/usr
74 # do not need to copy lib/libiberty.a
75 mkdir -p $fs/usr/lib
76 cp -a $_pkg/usr/lib/gcc $fs/usr/lib
77 }
79 # Rules to setup after installation
80 post_install()
81 {
82 # Archives get stripped during packaging; need to run ranlib
83 local root
84 root=$1
85 find $root/usr/lib/gcc/$MINGW32_ID/ -name *.a -exec $MINGW32_ID-ranlib {} \;
86 find $root/usr/$MINGW32_ID/lib/ -name *.a -exec $MINGW32_ID-ranlib {} \;
87 }
89 # Rules to clean the package
90 clean_wok()
91 {
92 rm -rf $SOURCE-$VERSION-build
93 }