wok-next view mingw32-runtime/receipt @ rev 21303
updated gujin (2.8.6 -> 2.8.7)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Dec 10 07:57:29 2019 +0100 (2019-12-10) |
parents | d5aab818505e |
children |
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 COOKOPTS="force-arch" # different .dll, .o, .a
16 MINGW32_ID="i586-pc-mingw32"
18 BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers \
19 mingw32-w32api-headers mingw32-gcc-c mingw32-w32api"
21 compile_rules() {
22 export CFLAGS="${CFLAGS/-mindirect-branch=thunk/}"
23 export CXXFLAGS="$CFLAGS"
24 echo "CFLAGS=CXXFLAGS='$CFLAGS'"
26 # Configuration only needs included if we're in the build/wok environment
27 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ]; then
28 . $WOK/mingw32-toolchain/stuff/mingw32.conf
29 fi
31 sed -i 's|/doc/|/share&|' configure */configure Makefile.in
32 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ]; then
33 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
34 return 1
35 fi
37 find $src -name 'Makefile*' | xargs sed -i "s|^inst_.*:= *|&$install/|"
38 mkdir -p $install/usr/bin
39 rm -f -r $src/binutils
41 mkdir -p mingwrt-$VERSION-build
42 cd mingwrt-$VERSION-build
44 $src/configure \
45 --prefix=/usr/$MINGW32_TARGET \
46 --host=$MINGW32_TARGET \
47 --build=$BUILD_HOST &&
48 make \
49 CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I$MINGW32_ROOT/include" \
50 LDFLAGS="-s" &&
51 make install
52 }
54 genpkg_rules() {
55 # Configuration only needs included if we're in the build/wok environment
56 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ]; then
57 . $WOK/mingw32-toolchain/stuff/mingw32.conf
58 fi
60 mkdir -p $fs$MINGW32_ROOT
61 cp -a $install/usr/bin $fs$MINGW32_ROOT
62 cp -a $install/usr/lib $fs$MINGW32_ROOT
63 DEPENDS="mingw32-w32api"
64 }
66 post_install() {
67 MINGW32_ID="i586-pc-mingw32"
68 # Archives get stripped during packaging; need to run ranlib
69 chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
70 }