wok-next annotate mingw32-gcc-c/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | da5256dcf31a |
children |
rev | line source |
---|---|
pascal@12905 | 1 # SliTaz package receipt. |
pascal@12905 | 2 |
pascal@12905 | 3 PACKAGE="mingw32-gcc-c" |
pascal@12905 | 4 SOURCE="gcc-core" |
pascal@12905 | 5 VERSION="3.4.5-20060117-2" |
pascal@12905 | 6 CATEGORY="development" |
al@21020 | 7 SHORT_DESC="MinGW32 gcc, for the C language only" |
al@21020 | 8 MAINTAINER="devel@slitaz.org" |
pascal@15000 | 9 LICENSE="GPL2" |
pascal@12905 | 10 TARBALL="$SOURCE-$VERSION-src.tar.gz" |
pascal@12905 | 11 WEB_SITE="http://www.mingw.org/" |
pascal@12905 | 12 MINGW32_URL="$SF_MIRROR/mingw" |
pascal@12905 | 13 WGET_URL="$MINGW32_URL/$TARBALL" |
pascal@12905 | 14 MINGW32_ID="i586-pc-mingw32" |
pascal@13033 | 15 TAGS="compiler C" |
pascal@12905 | 16 |
pascal@15000 | 17 DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers mingw32-runtime-headers" |
pascal@15000 | 18 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers" |
pascal@15000 | 19 |
pascal@12905 | 20 # Configuration only needs included if we're in the build/wok environment |
al@21020 | 21 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ]; then |
pascal@12905 | 22 . $WOK/mingw32-toolchain/stuff/mingw32.conf |
pascal@12905 | 23 fi |
pascal@12905 | 24 |
al@21020 | 25 compile_rules() { |
al@21020 | 26 mkdir -p $install/usr/share/man/man1 $install/usr/share/man/man7 |
al@21020 | 27 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ]; then |
pascal@12905 | 28 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string" |
pascal@12905 | 29 return 1 |
pascal@12905 | 30 fi |
pascal@12905 | 31 |
pascal@12905 | 32 rm -f -r $src/binutils |
pascal@12905 | 33 mkdir -p $SOURCE-$VERSION-build |
pascal@12905 | 34 cd $SOURCE-$VERSION-build |
pascal@12905 | 35 $src/configure \ |
pascal@12905 | 36 --prefix=/usr \ |
pascal@12905 | 37 --libexecdir=/usr/lib \ |
pascal@12905 | 38 --infodir=/usr/share/info \ |
pascal@12905 | 39 --mandir=/usr/share/man \ |
pascal@12905 | 40 --with-sysroot=$MINGW32_ROOT \ |
pascal@12905 | 41 --disable-shared \ |
pascal@12905 | 42 --disable-debug \ |
pascal@12905 | 43 --target=$MINGW32_TARGET \ |
pascal@12905 | 44 --enable-languages=c \ |
pascal@12905 | 45 --enable-threads=win32 \ |
pascal@12905 | 46 --disable-win32-registry \ |
pascal@12905 | 47 --enable-sjlj-exceptions \ |
pascal@12905 | 48 $CONFIGURE_ARGS && |
al@21020 | 49 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" && |
al@21020 | 50 make DESTDIR=$install install |
pascal@12905 | 51 } |
pascal@12905 | 52 |
al@21020 | 53 genpkg_rules() { |
pascal@12905 | 54 mkdir -p $fs/usr |
pascal@15000 | 55 cp -a $install/usr/bin $fs/usr |
pascal@12905 | 56 # do not need to copy lib/libiberty.a |
pascal@12905 | 57 mkdir -p $fs/usr/lib |
pascal@15000 | 58 cp -a $install/usr/lib/gcc $fs/usr/lib |
pascal@12905 | 59 } |
pascal@12905 | 60 |
al@21020 | 61 post_install() { |
pascal@20248 | 62 MINGW32_ID="i586-pc-mingw32" |
pascal@12905 | 63 # Archives get stripped during packaging; need to run ranlib |
pascal@18732 | 64 chroot "$1/" find "/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \; |
pascal@12905 | 65 } |