wok diff mingw32-gcc/receipt @ rev 3561
Add: mingw32
author | Matthew Sheets <rcx@zoominternet.net> |
---|---|
date | Wed Jun 24 10:32:56 2009 +0000 (2009-06-24) |
parents | |
children | c7273ab63c41 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mingw32-gcc/receipt Wed Jun 24 10:32:56 2009 +0000 1.3 @@ -0,0 +1,92 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="mingw32-gcc" 1.7 +SOURCE="gcc" 1.8 +VERSION="3.4.5-20060117-2" 1.9 +CATEGORY="development" 1.10 +SHORT_DESC="MinGW32 gcc, for C, C++, and Ada." 1.11 +MAINTAINER="rcx@zoominternet.net" 1.12 +DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers mingw32-runtime-headers mingw32-w32api mingw32-runtime" 1.13 +BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c mingw32-w32api mingw32-runtime" 1.14 +PROVIDE="mingw32-gcc-c" 1.15 +TARBALL="$SOURCE-core-$VERSION-src.tar.gz" 1.16 +WEB_SITE="http://www.mingw.org/" 1.17 +MINGW32_URL="$SF_MIRROR/mingw" 1.18 +WGET_URL="$MINGW32_URL/$TARBALL" 1.19 +MINGW32_TARGET="i586-pc-mingw32" 1.20 + 1.21 +# Rules to configure and make the package. 1.22 +compile_rules() 1.23 +{ 1.24 + MINGW32_DIR="$PWD" 1.25 + MINGW32_CPP_TARBALL="$SOURCE-g++-$VERSION-src.tar.gz" 1.26 + MINGW32_ADA_TARBALL="$SOURCE-ada-$VERSION-src.tar.gz" 1.27 + 1.28 + for gcc_tgz in $MINGW32_CPP_TARBALL $MINGW32_ADA_TARBALL ; do 1.29 + # Download the additional language tarballs 1.30 + if [ ! -f "$SOURCES_REPOSITORY/$gcc_tgz" ] ; then 1.31 + cd $SOURCES_REPOSITORY 1.32 + download $MINGW32_URL/$gcc_tgz 1.33 + fi 1.34 + 1.35 + # Extract the additional language tarballs 1.36 + if [ -f "$SOURCES_REPOSITORY/$gcc_tgz" ] ; then 1.37 + cd $MINGW32_DIR 1.38 + echo "Extracting $gcc_tgz ..." 1.39 + tar xzf "$SOURCES_REPOSITORY/$gcc_tgz" 1.40 + else 1.41 + # Exit if file not found to avoid errors. 1.42 + echo -e "\nDownload of $gcc_tgz failed, exiting. Please check the URL.\n" 1.43 + exit 1 1.44 + fi 1.45 + done 1.46 + 1.47 + cd $MINGW32_DIR 1.48 + 1.49 + rm -f -r $src/binutils 1.50 + mkdir -p $SOURCE-$VERSION-build 1.51 + cd $SOURCE-$VERSION-build 1.52 + $src/configure \ 1.53 + --prefix=/usr \ 1.54 + --infodir=/usr/share/info \ 1.55 + --mandir=/usr/share/man \ 1.56 + --with-sysroot=/usr/$MINGW32_TARGET \ 1.57 + --disable-shared \ 1.58 + --disable-debug \ 1.59 + --target=$MINGW32_TARGET \ 1.60 + --enable-languages=c,c++,ada \ 1.61 + --enable-threads=win32 \ 1.62 + --disable-win32-registry \ 1.63 + --enable-sjlj-exceptions \ 1.64 + $CONFIGURE_ARGS && 1.65 + make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" && 1.66 + make DESTDIR=$src/_pkg install 1.67 +} 1.68 + 1.69 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.70 +genpkg_rules() 1.71 +{ 1.72 + mkdir -p $fs/usr 1.73 + cp -a $_pkg/usr/bin $fs/usr 1.74 + cp -a $_pkg/usr/$MINGW32_TARGET $fs/usr 1.75 + cp -a $_pkg/usr/include $fs/usr 1.76 + # do not need to copy lib/libiberty.a 1.77 + mkdir -p $fs/usr/lib 1.78 + cp -a $_pkg/usr/lib/gcc $fs/usr/lib 1.79 + cp -a $_pkg/usr/libexec $fs/usr 1.80 +} 1.81 + 1.82 +# Rules to setup after installation 1.83 +post_install() 1.84 +{ 1.85 + # Archives get stripped during packaging; need to run ranlib 1.86 + local root 1.87 + root=$1 1.88 + find $root/usr/lib/gcc/$MINGW32_TARGET/ -name *.a -exec $MINGW32_TARGET-ranlib {} \; 1.89 +} 1.90 + 1.91 +# Rules to clean the package 1.92 +clean_wok() 1.93 +{ 1.94 + rm -r $SOURCE-$VERSION-build 1.95 +}