wok-current view mingw32-gcc/receipt @ rev 24804
updated liblouis and liblouis-dev (3.13.0 -> 3.21.0)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Mar 22 10:57:54 2022 +0100 (2022-03-22) |
parents | ed8073aa8cf0 |
children | a23978bfa665 |
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 # What is the latest version available today?
31 current_version()
32 {
33 wget -O - https://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/ 2>/dev/null | \
34 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
35 sed '/scope="row/!d;s|.*/gcc-||;s|/.*||;q'
36 }
38 # Rules to configure and make the package.
39 compile_rules()
40 {
41 mkdir -p $DESTDIR/usr/share/man/man1 $DESTDIR/usr/share/man/man7
42 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
43 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
44 return 1
45 fi
47 ln -s . gcc-$VERSION
48 for tgz in $EXTRA_SOURCE_FILES; do
49 [ -s $SOURCES_REPOSITORY/$tgz ] ||
50 wget -P $SOURCES_REPOSITORY $MINGW32_URL/$tgz
51 [ -s $SOURCES_REPOSITORY/$tgz ] &&
52 tar xzf $SOURCES_REPOSITORY/$tgz && continue
53 echo "Can't download $MINGW32_URL/$tgz abort."
54 return 1
55 done
57 rm -f -r $src/binutils
58 mkdir -p $SOURCE-$VERSION-build
59 cd $SOURCE-$VERSION-build
60 $src/configure \
61 --prefix=/usr \
62 --libexecdir=/usr/lib \
63 --infodir=/usr/share/info \
64 --mandir=/usr/share/man \
65 --with-sysroot=$MINGW32_ROOT \
66 --disable-shared \
67 --disable-debug \
68 --target=$MINGW32_TARGET \
69 --enable-languages=c,c++,ada \
70 --enable-threads=win32 \
71 --disable-win32-registry \
72 --enable-sjlj-exceptions \
73 $CONFIGURE_ARGS &&
74 make -j 4 CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
75 make DESTDIR=$DESTDIR install 2>&1 | grep -v fixinc/fixincl
76 }
78 # Rules to gen a SliTaz package suitable for Tazpkg.
79 genpkg_rules()
80 {
81 mkdir -p $fs/usr/lib $fs$MINGW32_ROOT
82 cp -a $install$MINGW32_ROOT/* $fs$MINGW32_ROOT
83 rm $fs$MINGW32_ROOT/lib/*.la
84 cp -a $install/usr/bin $fs/usr
85 cp -a $install/usr/include $fs/usr
86 # do not need to copy lib/libiberty.a
87 mkdir -p $fs/usr/lib
88 cp -a $install/usr/lib/gcc $fs/usr/lib
89 }
91 # Rules to setup after installation
92 post_install()
93 {
94 # Archives get stripped during packaging; need to run ranlib
95 chroot "$1/" find "/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \;
96 chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
97 }
99 # Rules to clean the package
100 clean_wok()
101 {
102 rm -rf $SOURCE-$VERSION-build
103 }