wok-6.x annotate mingw32-gcc/receipt @ rev 25556

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