wok-next view mingw32-runtime/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 98143c4f8950
children e19ff076dc63
line source
1 # SliTaz package receipt v2.
3 PACKAGE="mingw32-runtime"
4 VERSION="3.15.2-mingw32"
5 CATEGORY="development"
6 SHORT_DESC="MinGW32 runtime"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="PublicDomain"
9 WEB_SITE="http://www.mingw.org/"
11 TARBALL="mingwrt-$VERSION-src.tar.gz"
12 WGET_URL="$SF_MIRROR/mingw/$TARBALL"
14 MINGW32_ID="i586-pc-mingw32"
16 BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers \
17 mingw32-w32api-headers mingw32-gcc-c mingw32-w32api"
19 compile_rules() {
20 export CFLAGS="${CFLAGS/-mindirect-branch=thunk/}"
21 export CXXFLAGS="$CFLAGS"
22 echo "CFLAGS=CXXFLAGS='$CFLAGS'"
24 # Configuration only needs included if we're in the build/wok environment
25 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ]; then
26 . $WOK/mingw32-toolchain/stuff/mingw32.conf
27 fi
29 sed -i 's|/doc/|/share&|' configure */configure Makefile.in
30 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ]; then
31 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
32 return 1
33 fi
35 find $src -name 'Makefile*' | xargs sed -i "s|^inst_.*:= *|&$install/|"
36 mkdir -p $install/usr/bin
37 rm -f -r $src/binutils
39 mkdir -p mingwrt-$VERSION-build
40 cd mingwrt-$VERSION-build
42 $src/configure \
43 --prefix=/usr/$MINGW32_TARGET \
44 --host=$MINGW32_TARGET \
45 --build=$BUILD_HOST &&
46 make \
47 CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I$MINGW32_ROOT/include" \
48 LDFLAGS="-s" &&
49 make install
50 }
52 genpkg_rules() {
53 # Configuration only needs included if we're in the build/wok environment
54 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ]; then
55 . $WOK/mingw32-toolchain/stuff/mingw32.conf
56 fi
58 mkdir -p $fs$MINGW32_ROOT
59 cp -a $install/usr/bin $fs$MINGW32_ROOT
60 cp -a $install/usr/lib $fs$MINGW32_ROOT
61 DEPENDS="mingw32-w32api"
62 }
64 post_install() {
65 MINGW32_ID="i586-pc-mingw32"
66 # Archives get stripped during packaging; need to run ranlib
67 chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
68 }