wok annotate mingw32-gcc/receipt @ rev 3970

Update: firefox-dev reporting wrong version in pkg-config firefox-xpcom
author Matthew Sheets <rcx@zoominternet.net>
date Wed Aug 26 14:28:35 2009 +0000 (2009-08-26)
parents 1aa4817e0aff
children 05b5a901936b
rev   line source
rcx@3561 1 # SliTaz package receipt.
rcx@3561 2
rcx@3561 3 PACKAGE="mingw32-gcc"
rcx@3561 4 SOURCE="gcc"
rcx@3561 5 VERSION="3.4.5-20060117-2"
rcx@3561 6 CATEGORY="development"
rcx@3561 7 SHORT_DESC="MinGW32 gcc, for C, C++, and Ada."
rcx@3561 8 MAINTAINER="rcx@zoominternet.net"
rcx@3561 9 DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers mingw32-runtime-headers mingw32-w32api mingw32-runtime"
rcx@3561 10 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c mingw32-w32api mingw32-runtime"
rcx@3561 11 PROVIDE="mingw32-gcc-c"
rcx@3561 12 TARBALL="$SOURCE-core-$VERSION-src.tar.gz"
rcx@3561 13 WEB_SITE="http://www.mingw.org/"
rcx@3561 14 MINGW32_URL="$SF_MIRROR/mingw"
rcx@3561 15 WGET_URL="$MINGW32_URL/$TARBALL"
rcx@3561 16 MINGW32_TARGET="i586-pc-mingw32"
rcx@3561 17
rcx@3561 18 # Rules to configure and make the package.
rcx@3561 19 compile_rules()
rcx@3561 20 {
rcx@3561 21 MINGW32_DIR="$PWD"
rcx@3561 22 MINGW32_CPP_TARBALL="$SOURCE-g++-$VERSION-src.tar.gz"
rcx@3561 23 MINGW32_ADA_TARBALL="$SOURCE-ada-$VERSION-src.tar.gz"
rcx@3561 24
rcx@3561 25 for gcc_tgz in $MINGW32_CPP_TARBALL $MINGW32_ADA_TARBALL ; do
rcx@3561 26 # Download the additional language tarballs
rcx@3561 27 if [ ! -f "$SOURCES_REPOSITORY/$gcc_tgz" ] ; then
rcx@3561 28 cd $SOURCES_REPOSITORY
rcx@3561 29 download $MINGW32_URL/$gcc_tgz
rcx@3561 30 fi
rcx@3561 31
rcx@3561 32 # Extract the additional language tarballs
rcx@3561 33 if [ -f "$SOURCES_REPOSITORY/$gcc_tgz" ] ; then
rcx@3561 34 cd $MINGW32_DIR
rcx@3561 35 echo "Extracting $gcc_tgz ..."
rcx@3561 36 tar xzf "$SOURCES_REPOSITORY/$gcc_tgz"
rcx@3561 37 else
rcx@3561 38 # Exit if file not found to avoid errors.
rcx@3561 39 echo -e "\nDownload of $gcc_tgz failed, exiting. Please check the URL.\n"
rcx@3561 40 exit 1
rcx@3561 41 fi
rcx@3561 42 done
rcx@3561 43
rcx@3561 44 cd $MINGW32_DIR
rcx@3561 45
rcx@3561 46 rm -f -r $src/binutils
rcx@3561 47 mkdir -p $SOURCE-$VERSION-build
rcx@3561 48 cd $SOURCE-$VERSION-build
rcx@3561 49 $src/configure \
rcx@3561 50 --prefix=/usr \
rcx@3561 51 --infodir=/usr/share/info \
rcx@3561 52 --mandir=/usr/share/man \
rcx@3561 53 --with-sysroot=/usr/$MINGW32_TARGET \
rcx@3561 54 --disable-shared \
rcx@3561 55 --disable-debug \
rcx@3561 56 --target=$MINGW32_TARGET \
rcx@3561 57 --enable-languages=c,c++,ada \
rcx@3561 58 --enable-threads=win32 \
rcx@3561 59 --disable-win32-registry \
rcx@3561 60 --enable-sjlj-exceptions \
rcx@3561 61 $CONFIGURE_ARGS &&
rcx@3561 62 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
rcx@3561 63 make DESTDIR=$src/_pkg install
rcx@3561 64 }
rcx@3561 65
rcx@3561 66 # Rules to gen a SliTaz package suitable for Tazpkg.
rcx@3561 67 genpkg_rules()
rcx@3561 68 {
rcx@3561 69 mkdir -p $fs/usr
rcx@3561 70 cp -a $_pkg/usr/bin $fs/usr
rcx@3561 71 cp -a $_pkg/usr/$MINGW32_TARGET $fs/usr
rcx@3561 72 cp -a $_pkg/usr/include $fs/usr
rcx@3561 73 # do not need to copy lib/libiberty.a
rcx@3561 74 mkdir -p $fs/usr/lib
rcx@3561 75 cp -a $_pkg/usr/lib/gcc $fs/usr/lib
rcx@3561 76 cp -a $_pkg/usr/libexec $fs/usr
rcx@3561 77 }
rcx@3561 78
rcx@3561 79 # Rules to setup after installation
rcx@3561 80 post_install()
rcx@3561 81 {
rcx@3561 82 # Archives get stripped during packaging; need to run ranlib
rcx@3561 83 local root
rcx@3561 84 root=$1
rcx@3561 85 find $root/usr/lib/gcc/$MINGW32_TARGET/ -name *.a -exec $MINGW32_TARGET-ranlib {} \;
rcx@3562 86 find $root/usr/$MINGW32_TARGET/lib/ -name *.a -exec $MINGW32_TARGET-ranlib {} \;
rcx@3561 87 }
rcx@3561 88
rcx@3561 89 # Rules to clean the package
rcx@3561 90 clean_wok()
rcx@3561 91 {
rcx@3561 92 rm -r $SOURCE-$VERSION-build
rcx@3561 93 }