wok annotate mingw32-gcc-c/receipt @ rev 25386

updated unrar (5.9.2 -> 6.1.7)
author Hans-G?nter Theisgen
date Sat Jul 30 17:51:49 2022 +0100 (2022-07-30)
parents ed8073aa8cf0
children d3556b8f5c3d
rev   line source
pascal@12905 1 # SliTaz package receipt.
pascal@12905 2
pascal@12905 3 PACKAGE="mingw32-gcc-c"
pascal@12905 4 SOURCE="gcc-core"
pascal@12905 5 VERSION="3.4.5-20060117-2"
pascal@12905 6 CATEGORY="development"
pascal@12905 7 SHORT_DESC="MinGW32 gcc, for the C language only."
pascal@12905 8 MAINTAINER="rcx@zoominternet.net"
pascal@15000 9 LICENSE="GPL2"
pascal@12905 10 TARBALL="$SOURCE-$VERSION-src.tar.gz"
pascal@12905 11 WEB_SITE="http://www.mingw.org/"
pascal@12905 12 MINGW32_URL="$SF_MIRROR/mingw"
pascal@12905 13 WGET_URL="$MINGW32_URL/$TARBALL"
pascal@12905 14 MINGW32_ID="i586-pc-mingw32"
pascal@13033 15 TAGS="compiler C"
pascal@12905 16
pascal@15000 17 DEPENDS="glibc-base mingw32-binutils mingw32-w32api-headers mingw32-runtime-headers"
pascal@15000 18 BUILD_DEPENDS="slitaz-toolchain bison flex mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers"
pascal@15000 19
pascal@12905 20 # Configuration only needs included if we're in the build/wok environment
pascal@12905 21 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
pascal@12905 22 . $WOK/mingw32-toolchain/stuff/mingw32.conf
pascal@12905 23 fi
pascal@12905 24
pascal@24402 25 # What is the latest version available today?
pascal@24402 26 current_version()
pascal@24402 27 {
pascal@24402 28 wget -O - https://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/ 2>/dev/null | \
pascal@24402 29 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24402 30 sed '/scope="row/!d;s|.*/gcc-||;s|/.*||;q'
pascal@24402 31 }
pascal@24402 32
pascal@12905 33 # Rules to configure and make the package.
pascal@12905 34 compile_rules()
pascal@12905 35 {
pascal@15171 36 mkdir -p $DESTDIR/usr/share/man/man1 $DESTDIR/usr/share/man/man7
pascal@12905 37 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
pascal@12905 38 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
pascal@12905 39 return 1
pascal@12905 40 fi
pascal@12905 41
pascal@12905 42 rm -f -r $src/binutils
pascal@12905 43 mkdir -p $SOURCE-$VERSION-build
pascal@12905 44 cd $SOURCE-$VERSION-build
pascal@12905 45 $src/configure \
pascal@12905 46 --prefix=/usr \
pascal@12905 47 --libexecdir=/usr/lib \
pascal@12905 48 --infodir=/usr/share/info \
pascal@12905 49 --mandir=/usr/share/man \
pascal@12905 50 --with-sysroot=$MINGW32_ROOT \
pascal@12905 51 --disable-shared \
pascal@12905 52 --disable-debug \
pascal@12905 53 --target=$MINGW32_TARGET \
pascal@12905 54 --enable-languages=c \
pascal@12905 55 --enable-threads=win32 \
pascal@12905 56 --disable-win32-registry \
pascal@12905 57 --enable-sjlj-exceptions \
pascal@12905 58 $CONFIGURE_ARGS &&
pascal@12905 59 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" &&
pascal@15274 60 make DESTDIR=$DESTDIR install 2>&1 | grep -v fixinc/fixincl
pascal@12905 61 }
pascal@12905 62
pascal@12905 63 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@12905 64 genpkg_rules()
pascal@12905 65 {
pascal@12905 66 mkdir -p $fs/usr
pascal@15000 67 cp -a $install/usr/bin $fs/usr
pascal@12905 68 # do not need to copy lib/libiberty.a
pascal@12905 69 mkdir -p $fs/usr/lib
pascal@15000 70 cp -a $install/usr/lib/gcc $fs/usr/lib
pascal@12905 71 }
pascal@12905 72
pascal@12905 73 # Rules to setup after installation
pascal@12905 74 post_install()
pascal@12905 75 {
pascal@12905 76 # Archives get stripped during packaging; need to run ranlib
pascal@18732 77 chroot "$1/" find "/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \;
pascal@12905 78 }
pascal@12905 79
pascal@12905 80 # Rules to clean the package
pascal@12905 81 clean_wok()
pascal@12905 82 {
pascal@12905 83 rm -r $SOURCE-$VERSION-build
pascal@12905 84 }