wok-next view mingw32-gcc-c/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 | da5256dcf31a |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="mingw32-gcc-c"
4 SOURCE="gcc-core"
5 VERSION="3.4.5-20060117-2"
6 CATEGORY="development"
7 SHORT_DESC="MinGW32 gcc, for the C language only"
8 MAINTAINER="devel@slitaz.org"
9 LICENSE="GPL2"
10 TARBALL="$SOURCE-$VERSION-src.tar.gz"
11 WEB_SITE="http://www.mingw.org/"
12 MINGW32_URL="$SF_MIRROR/mingw"
13 WGET_URL="$MINGW32_URL/$TARBALL"
14 MINGW32_ID="i586-pc-mingw32"
15 TAGS="compiler C"
17 DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers mingw32-runtime-headers"
18 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers"
20 # Configuration only needs included if we're in the build/wok environment
21 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ]; then
22 . $WOK/mingw32-toolchain/stuff/mingw32.conf
23 fi
25 compile_rules() {
26 mkdir -p $install/usr/share/man/man1 $install/usr/share/man/man7
27 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ]; then
28 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
29 return 1
30 fi
32 rm -f -r $src/binutils
33 mkdir -p $SOURCE-$VERSION-build
34 cd $SOURCE-$VERSION-build
35 $src/configure \
36 --prefix=/usr \
37 --libexecdir=/usr/lib \
38 --infodir=/usr/share/info \
39 --mandir=/usr/share/man \
40 --with-sysroot=$MINGW32_ROOT \
41 --disable-shared \
42 --disable-debug \
43 --target=$MINGW32_TARGET \
44 --enable-languages=c \
45 --enable-threads=win32 \
46 --disable-win32-registry \
47 --enable-sjlj-exceptions \
48 $CONFIGURE_ARGS &&
49 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
50 make DESTDIR=$install install
51 }
53 genpkg_rules() {
54 mkdir -p $fs/usr
55 cp -a $install/usr/bin $fs/usr
56 # do not need to copy lib/libiberty.a
57 mkdir -p $fs/usr/lib
58 cp -a $install/usr/lib/gcc $fs/usr/lib
59 }
61 post_install() {
62 MINGW32_ID="i586-pc-mingw32"
63 # Archives get stripped during packaging; need to run ranlib
64 chroot "$1/" find "/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \;
65 }