wok-current view mingw32-gcc-c/receipt @ rev 25728
Merge wok for both arch and few updates
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Thu Dec 05 08:39:45 2024 +0000 (5 weeks ago) |
parents | a23978bfa665 |
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="rcx@zoominternet.net"
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"
16 HOST_ARCH="i486 x86_64"
18 DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers mingw32-runtime-headers"
19 BUILD_DEPENDS="slitaz-toolchain bison flex gcc49 mingw32-binutils \
20 mingw32-runtime-headers mingw32-w32api-headers"
22 # Configuration only needs included if we're in the build/wok environment
23 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
24 . $WOK/mingw32-toolchain/stuff/mingw32.conf
25 fi
27 # What is the latest version available today?
28 current_version()
29 {
30 wget -O - https://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/ 2>/dev/null | \
31 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
32 sed '/scope="row/!d;s|.*/gcc-||;s|/.*||;q'
33 }
35 # Rules to configure and make the package.
36 compile_rules()
37 {
38 mkdir -p $DESTDIR/usr/share/man/man1 $DESTDIR/usr/share/man/man7
39 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
40 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
41 return 1
42 fi
44 rm -f -r $src/binutils
45 mkdir -p $SOURCE-$VERSION-build
46 cd $SOURCE-$VERSION-build
48 export CC=gcc-49
49 export CXX=gcc-49
51 $src/configure \
52 --prefix=/usr \
53 --libexecdir=/usr/lib \
54 --infodir=/usr/share/info \
55 --mandir=/usr/share/man \
56 --with-sysroot=$MINGW32_ROOT \
57 --disable-shared \
58 --disable-debug \
59 --target=$MINGW32_TARGET \
60 --enable-languages=c \
61 --enable-threads=win32 \
62 --disable-win32-registry \
63 --enable-sjlj-exceptions \
64 $CONFIGURE_ARGS &&
65 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
66 make DESTDIR=$DESTDIR install 2>&1 | grep -v fixinc/fixincl
67 }
69 # Rules to gen a SliTaz package suitable for Tazpkg.
70 genpkg_rules()
71 {
72 mkdir -p $fs/usr
73 cp -a $install/usr/bin $fs/usr
74 # do not need to copy lib/libiberty.a
75 mkdir -p $fs/usr/lib
76 cp -a $install/usr/lib/gcc $fs/usr/lib
77 }
79 # Rules to setup after installation
80 post_install()
81 {
82 # Archives get stripped during packaging; need to run ranlib
83 chroot "$1/" find "/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \;
84 }
86 # Rules to clean the package
87 clean_wok()
88 {
89 rm -r $SOURCE-$VERSION-build
90 }