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