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