wok-next rev 20847
mingw32-runtime: repeat the trick
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jun 23 14:21:02 2018 +0300 (2018-06-23) |
parents | b7e296230dd7 |
children | 77e1b313c637 |
files | mingw32-runtime/receipt |
line diff
1.1 --- a/mingw32-runtime/receipt Sat Jun 23 13:59:48 2018 +0300 1.2 +++ b/mingw32-runtime/receipt Sat Jun 23 14:21:02 2018 +0300 1.3 @@ -1,28 +1,31 @@ 1.4 -# SliTaz package receipt. 1.5 +# SliTaz package receipt v2. 1.6 1.7 PACKAGE="mingw32-runtime" 1.8 -SOURCE="mingwrt" 1.9 VERSION="3.15.2-mingw32" 1.10 CATEGORY="development" 1.11 SHORT_DESC="MinGW32 runtime." 1.12 MAINTAINER="rcx@zoominternet.net" 1.13 LICENSE="PublicDomain" 1.14 -TARBALL="$SOURCE-$VERSION-src.tar.gz" 1.15 WEB_SITE="http://www.mingw.org/" 1.16 + 1.17 +TARBALL="mingwrt-$VERSION-src.tar.gz" 1.18 WGET_URL="$SF_MIRROR/mingw/$TARBALL" 1.19 + 1.20 MINGW32_ID="i586-pc-mingw32" 1.21 1.22 -DEPENDS="mingw32-w32api" 1.23 -BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c mingw32-w32api" 1.24 +BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers \ 1.25 +mingw32-w32api-headers mingw32-gcc-c mingw32-w32api" 1.26 1.27 -# Configuration only needs included if we're in the build/wok environment 1.28 -if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 1.29 - . $WOK/mingw32-toolchain/stuff/mingw32.conf 1.30 -fi 1.31 +compile_rules() { 1.32 + export CFLAGS="${CFLAGS/-mindirect-branch=thunk/}" 1.33 + export CXXFLAGS="$CFLAGS" 1.34 + echo "CFLAGS=CXXFLAGS='$CFLAGS'" 1.35 1.36 -# Rules to configure and make the package. 1.37 -compile_rules() 1.38 -{ 1.39 + # Configuration only needs included if we're in the build/wok environment 1.40 + if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 1.41 + . $WOK/mingw32-toolchain/stuff/mingw32.conf 1.42 + fi 1.43 + 1.44 sed -i 's|/doc/|/share&|' configure */configure Makefile.in 1.45 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then 1.46 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string" 1.47 @@ -32,35 +35,38 @@ 1.48 find $src -name 'Makefile*' | xargs sed -i "s|^inst_.*:= *|&$DESTDIR/|" 1.49 mkdir -p $DESTDIR/usr/bin 1.50 rm -f -r $src/binutils 1.51 - mkdir -p $SOURCE-$VERSION-build 1.52 - cd $SOURCE-$VERSION-build 1.53 - 1.54 + 1.55 + mkdir -p mingwrt-$VERSION-build 1.56 + cd mingwrt-$VERSION-build 1.57 + 1.58 $src/configure \ 1.59 --prefix=/usr/$MINGW32_TARGET \ 1.60 --host=$MINGW32_TARGET \ 1.61 --build=$BUILD_HOST && 1.62 - make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I$MINGW32_ROOT/include" LDFLAGS="-s" && 1.63 + make \ 1.64 + CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I$MINGW32_ROOT/include" \ 1.65 + LDFLAGS="-s" && 1.66 make install 1.67 } 1.68 1.69 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.70 -genpkg_rules() 1.71 -{ 1.72 +genpkg_rules() { 1.73 + # Configuration only needs included if we're in the build/wok environment 1.74 + if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 1.75 + . $WOK/mingw32-toolchain/stuff/mingw32.conf 1.76 + fi 1.77 + 1.78 mkdir -p $fs$MINGW32_ROOT 1.79 cp -a $install/usr/bin $fs$MINGW32_ROOT 1.80 cp -a $install/usr/lib $fs$MINGW32_ROOT 1.81 + DEPENDS="mingw32-w32api" 1.82 } 1.83 1.84 -# Rules to setup after installation 1.85 -post_install() 1.86 -{ 1.87 +post_install() { 1.88 MINGW32_ID="i586-pc-mingw32" 1.89 # Archives get stripped during packaging; need to run ranlib 1.90 chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \; 1.91 } 1.92 1.93 -# Rules to clean the package 1.94 -clean_wok() 1.95 -{ 1.96 - rm -r $SOURCE-$VERSION-build 1.97 +clean_wok() { 1.98 + rm -r mingwrt-$VERSION-build 1.99 }