wok view mingw32-gcc/receipt @ rev 22072
updated ufw (0.34 -> 0.36)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Oct 25 16:22:34 2019 +0100 (2019-10-25) |
parents | 9e01bc6321ea |
children | afae00265386 |
line source
1 # SliTaz package receipt.
3 PACKAGE="mingw32-gcc"
4 SOURCE="gcc-core"
5 VERSION="3.4.5-20060117-2"
6 CATEGORY="development"
7 SHORT_DESC="MinGW32 gcc, for C, C++, and Ada."
8 MAINTAINER="rcx@zoominternet.net"
9 LICENSE="GPL2"
10 PROVIDE="mingw32-gcc-c"
11 TARBALL="$SOURCE-$VERSION-src.tar.gz"
12 EXTRA_SOURCE_FILES="gcc-g++-$VERSION-src.tar.gz gcc-ada-$VERSION-src.tar.gz"
13 WEB_SITE="http://www.mingw.org/"
14 MINGW32_URL="$SF_MIRROR/mingw"
15 WGET_URL="$MINGW32_URL/$TARBALL"
16 MINGW32_ID="i586-pc-mingw32"
17 TAGS="compiler C C++ ada"
19 DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers \
20 mingw32-runtime-headers mingw32-w32api mingw32-runtime"
21 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils \
22 mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c \
23 mingw32-w32api mingw32-runtime"
25 # Configuration only needs included if we're in the build/wok environment
26 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
27 . $WOK/mingw32-toolchain/stuff/mingw32.conf
28 fi
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 mkdir -p $DESTDIR/usr/share/man/man1 $DESTDIR/usr/share/man/man7
34 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
35 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
36 return 1
37 fi
39 ln -s . gcc-$VERSION
40 for tgz in $EXTRA_SOURCE_FILES; do
41 [ -s $SOURCES_REPOSITORY/$tgz ] ||
42 wget -P $SOURCES_REPOSITORY $MINGW32_URL/$tgz
43 [ -s $SOURCES_REPOSITORY/$tgz ] &&
44 tar xzf $SOURCES_REPOSITORY/$tgz && continue
45 echo "Can't download $MINGW32_URL/$tgz abort."
46 return 1
47 done
49 rm -f -r $src/binutils
50 mkdir -p $SOURCE-$VERSION-build
51 cd $SOURCE-$VERSION-build
52 $src/configure \
53 --prefix=/usr \
54 --libexecdir=/usr/lib \
55 --infodir=/usr/share/info \
56 --mandir=/usr/share/man \
57 --with-sysroot=$MINGW32_ROOT \
58 --disable-shared \
59 --disable-debug \
60 --target=$MINGW32_TARGET \
61 --enable-languages=c,c++,ada \
62 --enable-threads=win32 \
63 --disable-win32-registry \
64 --enable-sjlj-exceptions \
65 $CONFIGURE_ARGS &&
66 make -j 4 CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
67 make DESTDIR=$DESTDIR install 2>&1 | grep -v fixinc/fixincl
68 }
70 # Rules to gen a SliTaz package suitable for Tazpkg.
71 genpkg_rules()
72 {
73 mkdir -p $fs/usr/lib $fs$MINGW32_ROOT
74 cp -a $install$MINGW32_ROOT/* $fs$MINGW32_ROOT
75 rm $fs$MINGW32_ROOT/lib/*.la
76 cp -a $install/usr/bin $fs/usr
77 cp -a $install/usr/include $fs/usr
78 # do not need to copy lib/libiberty.a
79 mkdir -p $fs/usr/lib
80 cp -a $install/usr/lib/gcc $fs/usr/lib
81 }
83 # Rules to setup after installation
84 post_install()
85 {
86 # Archives get stripped during packaging; need to run ranlib
87 chroot "$1/" find "/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \;
88 chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
89 }
91 # Rules to clean the package
92 clean_wok()
93 {
94 rm -rf $SOURCE-$VERSION-build
95 }