# HG changeset patch # User Aleksej Bobylev # Date 1529752862 -10800 # Node ID 98143c4f895008277b8e768b2712c14ddfa3ba7c # Parent b7e296230dd73e304dab053cf659a50e31059cf4 mingw32-runtime: repeat the trick diff -r b7e296230dd7 -r 98143c4f8950 mingw32-runtime/receipt --- a/mingw32-runtime/receipt Sat Jun 23 13:59:48 2018 +0300 +++ b/mingw32-runtime/receipt Sat Jun 23 14:21:02 2018 +0300 @@ -1,28 +1,31 @@ -# SliTaz package receipt. +# SliTaz package receipt v2. PACKAGE="mingw32-runtime" -SOURCE="mingwrt" VERSION="3.15.2-mingw32" CATEGORY="development" SHORT_DESC="MinGW32 runtime." MAINTAINER="rcx@zoominternet.net" LICENSE="PublicDomain" -TARBALL="$SOURCE-$VERSION-src.tar.gz" WEB_SITE="http://www.mingw.org/" + +TARBALL="mingwrt-$VERSION-src.tar.gz" WGET_URL="$SF_MIRROR/mingw/$TARBALL" + MINGW32_ID="i586-pc-mingw32" -DEPENDS="mingw32-w32api" -BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c mingw32-w32api" +BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers \ +mingw32-w32api-headers mingw32-gcc-c mingw32-w32api" -# Configuration only needs included if we're in the build/wok environment -if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then - . $WOK/mingw32-toolchain/stuff/mingw32.conf -fi +compile_rules() { + export CFLAGS="${CFLAGS/-mindirect-branch=thunk/}" + export CXXFLAGS="$CFLAGS" + echo "CFLAGS=CXXFLAGS='$CFLAGS'" -# Rules to configure and make the package. -compile_rules() -{ + # Configuration only needs included if we're in the build/wok environment + if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then + . $WOK/mingw32-toolchain/stuff/mingw32.conf + fi + sed -i 's|/doc/|/share&|' configure */configure Makefile.in if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string" @@ -32,35 +35,38 @@ find $src -name 'Makefile*' | xargs sed -i "s|^inst_.*:= *|&$DESTDIR/|" mkdir -p $DESTDIR/usr/bin rm -f -r $src/binutils - mkdir -p $SOURCE-$VERSION-build - cd $SOURCE-$VERSION-build - + + mkdir -p mingwrt-$VERSION-build + cd mingwrt-$VERSION-build + $src/configure \ --prefix=/usr/$MINGW32_TARGET \ --host=$MINGW32_TARGET \ --build=$BUILD_HOST && - make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I$MINGW32_ROOT/include" LDFLAGS="-s" && + make \ + CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I$MINGW32_ROOT/include" \ + LDFLAGS="-s" && make install } -# Rules to gen a SliTaz package suitable for Tazpkg. -genpkg_rules() -{ +genpkg_rules() { + # Configuration only needs included if we're in the build/wok environment + if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then + . $WOK/mingw32-toolchain/stuff/mingw32.conf + fi + mkdir -p $fs$MINGW32_ROOT cp -a $install/usr/bin $fs$MINGW32_ROOT cp -a $install/usr/lib $fs$MINGW32_ROOT + DEPENDS="mingw32-w32api" } -# Rules to setup after installation -post_install() -{ +post_install() { MINGW32_ID="i586-pc-mingw32" # Archives get stripped during packaging; need to run ranlib chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \; } -# Rules to clean the package -clean_wok() -{ - rm -r $SOURCE-$VERSION-build +clean_wok() { + rm -r mingwrt-$VERSION-build }