wok view mingw32-gcc-c/receipt @ rev 15146

cocoalib: create Makefile_dependencies (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Aug 15 12:56:59 2013 +0000 (2013-08-15)
parents 4c16797dce28
children 036b997ec7e1
line source
1 # SliTaz package receipt.
3 PACKAGE="mingw32-gcc-c"
4 SOURCE="gcc-core"
5 VERSION="3.4.5-20060117-2"
6 CATEGORY="development"
7 SHORT_DESC="MinGW32 gcc, for the C language only."
8 MAINTAINER="rcx@zoominternet.net"
9 LICENSE="GPL2"
10 TARBALL="$SOURCE-$VERSION-src.tar.gz"
11 WEB_SITE="http://www.mingw.org/"
12 MINGW32_URL="$SF_MIRROR/mingw"
13 WGET_URL="$MINGW32_URL/$TARBALL"
14 MINGW32_ID="i586-pc-mingw32"
15 TAGS="compiler C"
17 DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers mingw32-runtime-headers"
18 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers"
20 # Configuration only needs included if we're in the build/wok environment
21 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
22 . $WOK/mingw32-toolchain/stuff/mingw32.conf
23 fi
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
29 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
30 return 1
31 fi
33 rm -f -r $src/binutils
34 mkdir -p $SOURCE-$VERSION-build
35 cd $SOURCE-$VERSION-build
36 $src/configure \
37 --prefix=/usr \
38 --libexecdir=/usr/lib \
39 --infodir=/usr/share/info \
40 --mandir=/usr/share/man \
41 --with-sysroot=$MINGW32_ROOT \
42 --disable-shared \
43 --disable-debug \
44 --target=$MINGW32_TARGET \
45 --enable-languages=c \
46 --enable-threads=win32 \
47 --disable-win32-registry \
48 --enable-sjlj-exceptions \
49 $CONFIGURE_ARGS &&
50 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
51 make DESTDIR=$DESTDIR install
52 }
54 # Rules to gen a SliTaz package suitable for Tazpkg.
55 genpkg_rules()
56 {
57 mkdir -p $fs/usr
58 cp -a $install/usr/bin $fs/usr
59 # do not need to copy lib/libiberty.a
60 mkdir -p $fs/usr/lib
61 cp -a $install/usr/lib/gcc $fs/usr/lib
62 }
64 # Rules to setup after installation
65 post_install()
66 {
67 # Archives get stripped during packaging; need to run ranlib
68 local root
69 root=$1
70 find $root/usr/lib/gcc/$MINGW32_ID/ -name *.a -exec $MINGW32_ID-ranlib {} \;
71 }
73 # Rules to clean the package
74 clean_wok()
75 {
76 rm -r $SOURCE-$VERSION-build
77 }