wok-current view mingw32-gcc-c/receipt @ rev 25351
updated tesseract and tesseract-dev (3.02.02 -> 5.2.0)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Jul 26 13:57:27 2022 +0100 (2022-07-26) |
parents | ed8073aa8cf0 |
children | a23978bfa665 |
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 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 # What is the latest version available today?
26 current_version()
27 {
28 wget -O - https://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/ 2>/dev/null | \
29 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
30 sed '/scope="row/!d;s|.*/gcc-||;s|/.*||;q'
31 }
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 mkdir -p $DESTDIR/usr/share/man/man1 $DESTDIR/usr/share/man/man7
37 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
38 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
39 return 1
40 fi
42 rm -f -r $src/binutils
43 mkdir -p $SOURCE-$VERSION-build
44 cd $SOURCE-$VERSION-build
45 $src/configure \
46 --prefix=/usr \
47 --libexecdir=/usr/lib \
48 --infodir=/usr/share/info \
49 --mandir=/usr/share/man \
50 --with-sysroot=$MINGW32_ROOT \
51 --disable-shared \
52 --disable-debug \
53 --target=$MINGW32_TARGET \
54 --enable-languages=c \
55 --enable-threads=win32 \
56 --disable-win32-registry \
57 --enable-sjlj-exceptions \
58 $CONFIGURE_ARGS &&
59 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
60 make DESTDIR=$DESTDIR install 2>&1 | grep -v fixinc/fixincl
61 }
63 # Rules to gen a SliTaz package suitable for Tazpkg.
64 genpkg_rules()
65 {
66 mkdir -p $fs/usr
67 cp -a $install/usr/bin $fs/usr
68 # do not need to copy lib/libiberty.a
69 mkdir -p $fs/usr/lib
70 cp -a $install/usr/lib/gcc $fs/usr/lib
71 }
73 # Rules to setup after installation
74 post_install()
75 {
76 # Archives get stripped during packaging; need to run ranlib
77 chroot "$1/" find "/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \;
78 }
80 # Rules to clean the package
81 clean_wok()
82 {
83 rm -r $SOURCE-$VERSION-build
84 }