wok-current view mingw32-gcc/receipt @ rev 3720
Update: xorg-libXft (DEPENDS)
author | Matthew Sheets <rcx@zoominternet.net> |
---|---|
date | Tue Jul 21 14:55:12 2009 +0000 (2009-07-21) |
parents | 1aa4817e0aff |
children | 05b5a901936b |
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 --infodir=/usr/share/info \
52 --mandir=/usr/share/man \
53 --with-sysroot=/usr/$MINGW32_TARGET \
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 CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
63 make DESTDIR=$src/_pkg install
64 }
66 # Rules to gen a SliTaz package suitable for Tazpkg.
67 genpkg_rules()
68 {
69 mkdir -p $fs/usr
70 cp -a $_pkg/usr/bin $fs/usr
71 cp -a $_pkg/usr/$MINGW32_TARGET $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 cp -a $_pkg/usr/libexec $fs/usr
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/$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 }