wok-next rev 20846
mingw32-gcc: fix CFLAGS, CXXFLAGS as it is not recent GCC and it don't understand something
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jun 23 13:59:48 2018 +0300 (2018-06-23) |
parents | 5ae348053c83 |
children | 98143c4f8950 |
files | mingw32-gcc/receipt |
line diff
1.1 --- a/mingw32-gcc/receipt Sat Jun 23 09:45:42 2018 +0300 1.2 +++ b/mingw32-gcc/receipt Sat Jun 23 13:59:48 2018 +0300 1.3 @@ -1,35 +1,33 @@ 1.4 -# SliTaz package receipt. 1.5 +# SliTaz package receipt v2. 1.6 1.7 PACKAGE="mingw32-gcc" 1.8 -SOURCE="gcc-core" 1.9 VERSION="3.4.5-20060117-2" 1.10 CATEGORY="development" 1.11 -SHORT_DESC="MinGW32 gcc, for C, C++, and Ada." 1.12 +SHORT_DESC="MinGW32 gcc, for C, C++, and Ada" 1.13 MAINTAINER="rcx@zoominternet.net" 1.14 LICENSE="GPL2" 1.15 -PROVIDE="mingw32-gcc-c" 1.16 -TARBALL="$SOURCE-$VERSION-src.tar.gz" 1.17 +WEB_SITE="http://www.mingw.org/" 1.18 + 1.19 +TARBALL="gcc-core-$VERSION-src.tar.gz" 1.20 +WGET_URL="$SF_MIRROR/mingw/$TARBALL" 1.21 + 1.22 EXTRA_SOURCE_FILES="gcc-g++-$VERSION-src.tar.gz gcc-ada-$VERSION-src.tar.gz" 1.23 -WEB_SITE="http://www.mingw.org/" 1.24 -MINGW32_URL="$SF_MIRROR/mingw" 1.25 -WGET_URL="$MINGW32_URL/$TARBALL" 1.26 MINGW32_ID="i586-pc-mingw32" 1.27 -TAGS="compiler C C++ ada" 1.28 1.29 -DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers \ 1.30 -mingw32-runtime-headers mingw32-w32api mingw32-runtime" 1.31 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils \ 1.32 mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c \ 1.33 -mingw32-w32api mingw32-runtime" 1.34 +mingw32-w32api mingw32-runtime perl" 1.35 1.36 -# Configuration only needs included if we're in the build/wok environment 1.37 -if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 1.38 - . $WOK/mingw32-toolchain/stuff/mingw32.conf 1.39 -fi 1.40 +compile_rules() { 1.41 + export CFLAGS="${CFLAGS/-mindirect-branch=thunk/}" 1.42 + export CXXFLAGS="$CFLAGS" 1.43 + echo "CFLAGS=CXXFLAGS='$CFLAGS'" 1.44 1.45 -# Rules to configure and make the package. 1.46 -compile_rules() 1.47 -{ 1.48 + # Configuration only needs included if we're in the build/wok environment 1.49 + if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 1.50 + . $WOK/mingw32-toolchain/stuff/mingw32.conf 1.51 + fi 1.52 + 1.53 mkdir -p $DESTDIR/usr/share/man/man1 $DESTDIR/usr/share/man/man7 1.54 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then 1.55 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string" 1.56 @@ -38,17 +36,17 @@ 1.57 1.58 ln -s . gcc-$VERSION 1.59 for tgz in $EXTRA_SOURCE_FILES; do 1.60 - [ -s $SRC/$tgz ] || 1.61 - wget -P $SRC $MINGW32_URL/$tgz 1.62 - [ -s $SRC/$tgz ] && 1.63 - tar xzf $SRC/$tgz && continue 1.64 - echo "Can't download $MINGW32_URL/$tgz abort." 1.65 + [ -s $SRC/$tgz ] || wget -P $SRC $SF_MIRROR/mingw/$tgz 1.66 + [ -s $SRC/$tgz ] && tar xzf $SRC/$tgz && continue 1.67 + echo "Can't download $SF_MIRROR/mingw/$tgz abort." 1.68 return 1 1.69 done 1.70 1.71 - rm -f -r $src/binutils 1.72 - mkdir -p $SOURCE-$VERSION-build 1.73 - cd $SOURCE-$VERSION-build 1.74 + rm -rf $src/binutils 1.75 + 1.76 + mkdir -p gcc-core-$VERSION-build 1.77 + cd gcc-core-$VERSION-build 1.78 + 1.79 $src/configure \ 1.80 --prefix=/usr \ 1.81 --libexecdir=/usr/lib \ 1.82 @@ -63,34 +61,41 @@ 1.83 --disable-win32-registry \ 1.84 --enable-sjlj-exceptions \ 1.85 $CONFIGURE_ARGS && 1.86 - make -j 4 CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" && 1.87 - make DESTDIR=$DESTDIR install 2>&1 | grep -v fixinc/fixincl 1.88 + make -j4 \ 1.89 + CFLAGS="-O2 -fomit-frame-pointer" \ 1.90 + LDFLAGS="-s" && 1.91 + make \ 1.92 + DESTDIR=$DESTDIR \ 1.93 + install 2>&1 | grep -v fixinc/fixincl 1.94 } 1.95 1.96 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.97 -genpkg_rules() 1.98 -{ 1.99 +genpkg_rules() { 1.100 + # Configuration only needs included if we're in the build/wok environment 1.101 + if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 1.102 + . $WOK/mingw32-toolchain/stuff/mingw32.conf 1.103 + fi 1.104 + 1.105 mkdir -p $fs/usr/lib $fs$MINGW32_ROOT 1.106 cp -a $install$MINGW32_ROOT/* $fs$MINGW32_ROOT 1.107 rm $fs$MINGW32_ROOT/lib/*.la 1.108 - cp -a $install/usr/bin $fs/usr 1.109 + cp -a $install/usr/bin $fs/usr 1.110 cp -a $install/usr/include $fs/usr 1.111 # do not need to copy lib/libiberty.a 1.112 mkdir -p $fs/usr/lib 1.113 cp -a $install/usr/lib/gcc $fs/usr/lib 1.114 + DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers \ 1.115 + mingw32-runtime-headers mingw32-w32api mingw32-runtime" 1.116 + PROVIDE="mingw32-gcc-c" 1.117 + TAGS="compiler C C++ ada" 1.118 } 1.119 1.120 -# Rules to setup after installation 1.121 -post_install() 1.122 -{ 1.123 +post_install() { 1.124 MINGW32_ID="i586-pc-mingw32" 1.125 # Archives get stripped during packaging; need to run ranlib 1.126 chroot "$1/" find "/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \; 1.127 - chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \; 1.128 + chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \; 1.129 } 1.130 1.131 -# Rules to clean the package 1.132 -clean_wok() 1.133 -{ 1.134 - rm -rf $SOURCE-$VERSION-build 1.135 +clean_wok() { 1.136 + rm -rf gcc-core-$VERSION-build 1.137 }