wok view mingw32-gcc/receipt @ rev 4029

Update: h8300-gcc3 (add PROVIDE)
author Matthew Sheets <rcx@zoominternet.net>
date Sat Sep 05 15:03:56 2009 +0000 (2009-09-05)
parents c7273ab63c41
children d437e141264c
line source
1 # SliTaz package receipt.
3 PACKAGE="mingw32-gcc"
4 SOURCE="gcc"
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 mingw32-runtime-headers mingw32-w32api mingw32-runtime"
10 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c mingw32-w32api mingw32-runtime"
11 PROVIDE="mingw32-gcc-c"
12 TARBALL="$SOURCE-core-$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_TARGET="i586-pc-mingw32"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 MINGW32_DIR="$PWD"
22 MINGW32_CPP_TARBALL="$SOURCE-g++-$VERSION-src.tar.gz"
23 MINGW32_ADA_TARBALL="$SOURCE-ada-$VERSION-src.tar.gz"
25 for gcc_tgz in $MINGW32_CPP_TARBALL $MINGW32_ADA_TARBALL ; do
26 # Download the additional language tarballs
27 if [ ! -f "$SOURCES_REPOSITORY/$gcc_tgz" ] ; then
28 cd $SOURCES_REPOSITORY
29 download $MINGW32_URL/$gcc_tgz
30 fi
32 # Extract the additional language tarballs
33 if [ -f "$SOURCES_REPOSITORY/$gcc_tgz" ] ; then
34 cd $MINGW32_DIR
35 echo "Extracting $gcc_tgz ..."
36 tar xzf "$SOURCES_REPOSITORY/$gcc_tgz"
37 else
38 # Exit if file not found to avoid errors.
39 echo -e "\nDownload of $gcc_tgz failed, exiting. Please check the URL.\n"
40 exit 1
41 fi
42 done
44 cd $MINGW32_DIR
46 rm -f -r $src/binutils
47 mkdir -p $SOURCE-$VERSION-build
48 cd $SOURCE-$VERSION-build
49 $src/configure \
50 --prefix=/usr \
51 --libexecdir=/usr/lib \
52 --infodir=/usr/share/info \
53 --mandir=/usr/share/man \
54 --with-sysroot=/usr/lib/$MINGW32_TARGET \
55 --disable-shared \
56 --disable-debug \
57 --target=$MINGW32_TARGET \
58 --enable-languages=c,c++,ada \
59 --enable-threads=win32 \
60 --disable-win32-registry \
61 --enable-sjlj-exceptions \
62 $CONFIGURE_ARGS &&
63 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
64 make DESTDIR=$src/_pkg install
65 }
67 # Rules to gen a SliTaz package suitable for Tazpkg.
68 genpkg_rules()
69 {
70 mkdir -p $fs/usr/lib
71 cp -a $_pkg/usr/bin $fs/usr
72 cp -a $_pkg/usr/lib/$MINGW32_TARGET $fs/usr/lib
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_TARGET/ -name *.a -exec $MINGW32_TARGET-ranlib {} \;
86 find $root/usr/lib/$MINGW32_TARGET/lib/ -name *.a -exec $MINGW32_TARGET-ranlib {} \;
87 }
89 # Rules to clean the package
90 clean_wok()
91 {
92 rm -r $SOURCE-$VERSION-build
93 }