wok-next annotate mingw32-runtime/receipt @ rev 21727
created recipe for vbindiff
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 21 14:32:44 2020 +0100 (2020-11-21) |
parents | d5aab818505e |
children |
rev | line source |
---|---|
al@20847 | 1 # SliTaz package receipt v2. |
pascal@12905 | 2 |
pascal@12905 | 3 PACKAGE="mingw32-runtime" |
pascal@12905 | 4 VERSION="3.15.2-mingw32" |
pascal@12905 | 5 CATEGORY="development" |
al@21020 | 6 SHORT_DESC="MinGW32 runtime" |
al@21020 | 7 MAINTAINER="devel@slitaz.org" |
pascal@15583 | 8 LICENSE="PublicDomain" |
pascal@12905 | 9 WEB_SITE="http://www.mingw.org/" |
al@20847 | 10 |
al@20847 | 11 TARBALL="mingwrt-$VERSION-src.tar.gz" |
pascal@12905 | 12 WGET_URL="$SF_MIRROR/mingw/$TARBALL" |
al@20847 | 13 |
al@21094 | 14 COOKOPTS="force-arch" # different .dll, .o, .a |
al@21094 | 15 |
pascal@12905 | 16 MINGW32_ID="i586-pc-mingw32" |
pascal@12905 | 17 |
al@20847 | 18 BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers \ |
al@20847 | 19 mingw32-w32api-headers mingw32-gcc-c mingw32-w32api" |
pascal@15583 | 20 |
al@20847 | 21 compile_rules() { |
al@20847 | 22 export CFLAGS="${CFLAGS/-mindirect-branch=thunk/}" |
al@20847 | 23 export CXXFLAGS="$CFLAGS" |
al@20847 | 24 echo "CFLAGS=CXXFLAGS='$CFLAGS'" |
pascal@12905 | 25 |
al@20847 | 26 # Configuration only needs included if we're in the build/wok environment |
al@21020 | 27 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ]; then |
al@20847 | 28 . $WOK/mingw32-toolchain/stuff/mingw32.conf |
al@20847 | 29 fi |
al@20847 | 30 |
pascal@19292 | 31 sed -i 's|/doc/|/share&|' configure */configure Makefile.in |
al@21020 | 32 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ]; then |
pascal@12905 | 33 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string" |
pascal@12905 | 34 return 1 |
pascal@12905 | 35 fi |
pascal@12905 | 36 |
al@21020 | 37 find $src -name 'Makefile*' | xargs sed -i "s|^inst_.*:= *|&$install/|" |
al@21020 | 38 mkdir -p $install/usr/bin |
pascal@12905 | 39 rm -f -r $src/binutils |
al@20847 | 40 |
al@20847 | 41 mkdir -p mingwrt-$VERSION-build |
al@20847 | 42 cd mingwrt-$VERSION-build |
al@20847 | 43 |
pascal@12905 | 44 $src/configure \ |
pascal@12905 | 45 --prefix=/usr/$MINGW32_TARGET \ |
pascal@12905 | 46 --host=$MINGW32_TARGET \ |
pascal@12905 | 47 --build=$BUILD_HOST && |
al@20847 | 48 make \ |
al@20847 | 49 CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I$MINGW32_ROOT/include" \ |
al@20847 | 50 LDFLAGS="-s" && |
pascal@12905 | 51 make install |
pascal@12905 | 52 } |
pascal@12905 | 53 |
al@20847 | 54 genpkg_rules() { |
al@20847 | 55 # Configuration only needs included if we're in the build/wok environment |
al@21020 | 56 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ]; then |
al@20847 | 57 . $WOK/mingw32-toolchain/stuff/mingw32.conf |
al@20847 | 58 fi |
al@20847 | 59 |
pascal@12905 | 60 mkdir -p $fs$MINGW32_ROOT |
pascal@15583 | 61 cp -a $install/usr/bin $fs$MINGW32_ROOT |
pascal@15583 | 62 cp -a $install/usr/lib $fs$MINGW32_ROOT |
al@20847 | 63 DEPENDS="mingw32-w32api" |
pascal@12905 | 64 } |
pascal@12905 | 65 |
al@20847 | 66 post_install() { |
pascal@20248 | 67 MINGW32_ID="i586-pc-mingw32" |
pascal@12905 | 68 # Archives get stripped during packaging; need to run ranlib |
pascal@18732 | 69 chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \; |
pascal@12905 | 70 } |