wok annotate mingw32-w32api/receipt @ rev 25032

giblib: modified configure parameter
author Hans-G?nter Theisgen
date Fri May 20 10:31:08 2022 +0100 (2022-05-20)
parents ed8073aa8cf0
children d3556b8f5c3d
rev   line source
pascal@12905 1 # SliTaz package receipt.
pascal@12905 2
pascal@12905 3 PACKAGE="mingw32-w32api"
pascal@12905 4 SOURCE="w32api"
pascal@12905 5 VERSION="3.13-mingw32"
pascal@12905 6 CATEGORY="development"
pascal@12905 7 SHORT_DESC="MinGW32 w32api."
pascal@12905 8 MAINTAINER="rcx@zoominternet.net"
pascal@15583 9 LICENSE="PublicDomain"
pascal@12905 10 TARBALL="$SOURCE-$VERSION-src.tar.gz"
pascal@12905 11 WEB_SITE="http://www.mingw.org/"
pascal@12905 12 WGET_URL="$SF_MIRROR/mingw/$TARBALL"
pascal@12905 13 MINGW32_ID="i586-pc-mingw32"
pascal@12905 14
pascal@15583 15 DEPENDS=""
pascal@15583 16 BUILD_DEPENDS="slitaz-toolchain mingw32-binutils mingw32-runtime-headers mingw32-w32api-headers mingw32-gcc-c"
pascal@15583 17
pascal@12905 18 # Configuration only needs included if we're in the build/wok environment
pascal@12905 19 if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then
pascal@12905 20 . $WOK/mingw32-toolchain/stuff/mingw32.conf
pascal@12905 21 fi
pascal@12905 22
pascal@24402 23 # What is the latest version available today?
pascal@24402 24 current_version()
pascal@24402 25 {
pascal@24402 26 wget -O - https://sourceforge.net/projects/mingw/files/MinGW/Base/w32api/ 2>/dev/null | \
pascal@24402 27 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24402 28 sed '/scope="row/!d;s|.*/w32api-||;s|-src.*||;q'
pascal@24402 29 }
pascal@24402 30
pascal@12905 31 # Rules to configure and make the package.
pascal@12905 32 compile_rules()
pascal@12905 33 {
pascal@12905 34 if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then
pascal@12905 35 echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string"
pascal@12905 36 return 1
pascal@12905 37 fi
pascal@12905 38
pascal@12905 39 find $src -name 'Makefile*' | xargs sed -i "s|^inst_.*:= *|&$DESTDIR/|"
pascal@12905 40 rm -f -r $src/binutils
pascal@12905 41 mkdir -p $SOURCE-$VERSION-build $DESTDIR/usr/lib
pascal@12905 42 cd $SOURCE-$VERSION-build
pascal@12905 43
pascal@12905 44 # NOTE: DESTDIR not handled correctly; have to fudge --prefix
pascal@12905 45 $src/configure \
pascal@12905 46 --prefix=/usr/$MINGW32_TARGET \
pascal@12905 47 --host=$MINGW32_TARGET \
pascal@12905 48 --build=$BUILD_HOST &&
pascal@12905 49 make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386}" LDFLAGS="-s" &&
pascal@12905 50 make install
pascal@12905 51 }
pascal@12905 52
pascal@12905 53 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@12905 54 genpkg_rules()
pascal@12905 55 {
pascal@12905 56 mkdir -p $fs$MINGW32_ROOT
pascal@15583 57 cp -a $install/usr/lib $fs$MINGW32_ROOT
pascal@12905 58 chown -R root.root $fs
pascal@12905 59 }
pascal@12905 60
pascal@12905 61 # Rules to setup after installation
pascal@12905 62 post_install()
pascal@12905 63 {
pascal@12905 64 # Archives get stripped during packaging; need to run ranlib
pascal@18732 65 chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
pascal@12905 66 }
pascal@12905 67
pascal@12905 68 # Rules to clean the package
pascal@12905 69 clean_wok()
pascal@12905 70 {
pascal@12905 71 rm -r $SOURCE-$VERSION-build
pascal@12905 72 }