wok-current rev 4036
Fix: MinGW cross-toolchain hierarchy
author | Matthew Sheets <rcx@zoominternet.net> |
---|---|
date | Mon Sep 07 21:44:04 2009 +0000 (2009-09-07) |
parents | df32eed71d9b |
children | 2b5224af9d78 |
files | mingw32-binutils/receipt mingw32-gcc-c/receipt mingw32-gcc/receipt mingw32-runtime-headers/receipt mingw32-runtime/receipt mingw32-toolchain/receipt mingw32-toolchain/stuff/mingw32.conf mingw32-w32api-headers/receipt mingw32-w32api/receipt |
line diff
1.1 --- a/mingw32-binutils/receipt Mon Sep 07 17:17:20 2009 +0000 1.2 +++ b/mingw32-binutils/receipt Mon Sep 07 21:44:04 2009 +0000 1.3 @@ -11,7 +11,11 @@ 1.4 TARBALL="$SOURCE-$VERSION-src.tar.gz" 1.5 WEB_SITE="http://www.mingw.org/" 1.6 WGET_URL="$SF_MIRROR/mingw/$TARBALL" 1.7 -MINGW32_TARGET="i586-pc-mingw32" 1.8 + 1.9 +# Configuration only needs included if we're in the build/wok environment 1.10 +if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 1.11 + . $WOK/mingw32-toolchain/stuff/mingw32.conf 1.12 +fi 1.13 1.14 # Rules to configure and make the package. 1.15 compile_rules() 1.16 @@ -21,7 +25,7 @@ 1.17 --prefix=/usr \ 1.18 --infodir=/usr/share/info \ 1.19 --mandir=/usr/share/man \ 1.20 - --with-sysroot=/usr/lib/$MINGW32_TARGET \ 1.21 + --with-sysroot=$MINGW32_ROOT \ 1.22 --disable-shared \ 1.23 --disable-debug \ 1.24 --target=$MINGW32_TARGET \ 1.25 @@ -33,11 +37,13 @@ 1.26 # Rules to gen a SliTaz package suitable for Tazpkg. 1.27 genpkg_rules() 1.28 { 1.29 - mkdir -p $fs/usr/lib 1.30 + mkdir -p $fs/usr/lib $fs$MINGW32_ROOT 1.31 cp -a $_pkg/usr/bin $fs/usr 1.32 - cp -a $_pkg/usr/lib/$MINGW32_TARGET $fs/usr/lib 1.33 + cp -a $_pkg$MINGW32_ROOT/* $fs$MINGW32_ROOT 1.34 # do not need to copy lib/libiberty.a 1.35 + 1.36 + strip -s $fs$MINGW32_ROOT/bin/* 1.37 1.38 #Create a symlink for --with-sysroot 1.39 - ( cd $fs/usr/lib/$MINGW32_TARGET && ln -s . usr ) 1.40 + ln -s . $fs$MINGW32_ROOT/usr 1.41 }
2.1 --- a/mingw32-gcc-c/receipt Mon Sep 07 17:17:20 2009 +0000 2.2 +++ b/mingw32-gcc-c/receipt Mon Sep 07 21:44:04 2009 +0000 2.3 @@ -12,11 +12,21 @@ 2.4 WEB_SITE="http://www.mingw.org/" 2.5 MINGW32_URL="$SF_MIRROR/mingw" 2.6 WGET_URL="$MINGW32_URL/$TARBALL" 2.7 -MINGW32_TARGET="i586-pc-mingw32" 2.8 +MINGW32_ID="i586-pc-mingw32" 2.9 + 2.10 +# Configuration only needs included if we're in the build/wok environment 2.11 +if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 2.12 + . $WOK/mingw32-toolchain/stuff/mingw32.conf 2.13 +fi 2.14 2.15 # Rules to configure and make the package. 2.16 compile_rules() 2.17 { 2.18 + if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then 2.19 + echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string" 2.20 + exit 1 2.21 + fi 2.22 + 2.23 rm -f -r $src/binutils 2.24 mkdir -p $SOURCE-$VERSION-build 2.25 cd $SOURCE-$VERSION-build 2.26 @@ -25,7 +35,7 @@ 2.27 --libexecdir=/usr/lib \ 2.28 --infodir=/usr/share/info \ 2.29 --mandir=/usr/share/man \ 2.30 - --with-sysroot=/usr/lib/$MINGW32_TARGET \ 2.31 + --with-sysroot=$MINGW32_ROOT \ 2.32 --disable-shared \ 2.33 --disable-debug \ 2.34 --target=$MINGW32_TARGET \ 2.35 @@ -35,7 +45,6 @@ 2.36 --enable-sjlj-exceptions \ 2.37 $CONFIGURE_ARGS && 2.38 make CFLAGS="-O2 -fomit-frame-pointer" LDFLAGS="-s" && 2.39 - $MINGW32_TARGET-ranlib gcc/*.a && 2.40 make DESTDIR=$src/_pkg install 2.41 } 2.42 2.43 @@ -55,7 +64,7 @@ 2.44 # Archives get stripped during packaging; need to run ranlib 2.45 local root 2.46 root=$1 2.47 - find $root/usr/lib/gcc/$MINGW32_TARGET/ -name *.a -exec $MINGW32_TARGET-ranlib {} \; 2.48 + find $root/usr/lib/gcc/$MINGW32_ID/ -name *.a -exec $MINGW32_ID-ranlib {} \; 2.49 } 2.50 2.51 # Rules to clean the package
3.1 --- a/mingw32-gcc/receipt Mon Sep 07 17:17:20 2009 +0000 3.2 +++ b/mingw32-gcc/receipt Mon Sep 07 21:44:04 2009 +0000 3.3 @@ -13,11 +13,21 @@ 3.4 WEB_SITE="http://www.mingw.org/" 3.5 MINGW32_URL="$SF_MIRROR/mingw" 3.6 WGET_URL="$MINGW32_URL/$TARBALL" 3.7 -MINGW32_TARGET="i586-pc-mingw32" 3.8 +MINGW32_ID="i586-pc-mingw32" 3.9 + 3.10 +# Configuration only needs included if we're in the build/wok environment 3.11 +if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 3.12 + . $WOK/mingw32-toolchain/stuff/mingw32.conf 3.13 +fi 3.14 3.15 # Rules to configure and make the package. 3.16 compile_rules() 3.17 { 3.18 + if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then 3.19 + echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string" 3.20 + exit 1 3.21 + fi 3.22 + 3.23 MINGW32_DIR="$PWD" 3.24 MINGW32_CPP_TARBALL="$SOURCE-g++-$VERSION-src.tar.gz" 3.25 MINGW32_ADA_TARBALL="$SOURCE-ada-$VERSION-src.tar.gz" 3.26 @@ -51,7 +61,7 @@ 3.27 --libexecdir=/usr/lib \ 3.28 --infodir=/usr/share/info \ 3.29 --mandir=/usr/share/man \ 3.30 - --with-sysroot=/usr/lib/$MINGW32_TARGET \ 3.31 + --with-sysroot=$MINGW32_ROOT \ 3.32 --disable-shared \ 3.33 --disable-debug \ 3.34 --target=$MINGW32_TARGET \ 3.35 @@ -67,9 +77,9 @@ 3.36 # Rules to gen a SliTaz package suitable for Tazpkg. 3.37 genpkg_rules() 3.38 { 3.39 - mkdir -p $fs/usr/lib 3.40 + mkdir -p $fs/usr/lib $fs$MINGW32_ROOT 3.41 + cp -a $_pkg$MINGW32_ROOT/* $fs$MINGW32_ROOT 3.42 cp -a $_pkg/usr/bin $fs/usr 3.43 - cp -a $_pkg/usr/lib/$MINGW32_TARGET $fs/usr/lib 3.44 cp -a $_pkg/usr/include $fs/usr 3.45 # do not need to copy lib/libiberty.a 3.46 mkdir -p $fs/usr/lib 3.47 @@ -82,8 +92,8 @@ 3.48 # Archives get stripped during packaging; need to run ranlib 3.49 local root 3.50 root=$1 3.51 - find $root/usr/lib/gcc/$MINGW32_TARGET/ -name *.a -exec $MINGW32_TARGET-ranlib {} \; 3.52 - find $root/usr/lib/$MINGW32_TARGET/lib/ -name *.a -exec $MINGW32_TARGET-ranlib {} \; 3.53 + find $root/usr/lib/gcc/$MINGW32_ID/ -name *.a -exec $MINGW32_ID-ranlib {} \; 3.54 + find $root/usr/$MINGW32_ID/lib/ -name *.a -exec $MINGW32_ID-ranlib {} \; 3.55 } 3.56 3.57 # Rules to clean the package
4.1 --- a/mingw32-runtime-headers/receipt Mon Sep 07 17:17:20 2009 +0000 4.2 +++ b/mingw32-runtime-headers/receipt Mon Sep 07 21:44:04 2009 +0000 4.3 @@ -11,15 +11,20 @@ 4.4 TARBALL="$SOURCE-$VERSION-src.tar.gz" 4.5 WEB_SITE="http://www.mingw.org/" 4.6 WGET_URL="$SF_MIRROR/mingw/$TARBALL" 4.7 -MINGW32_TARGET="i586-pc-mingw32" 4.8 + 4.9 +# Configuration only needs included if we're in the build/wok environment 4.10 +if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 4.11 + . $WOK/mingw32-toolchain/stuff/mingw32.conf 4.12 +fi 4.13 4.14 # Rules to configure and make the package. 4.15 compile_rules() 4.16 { 4.17 cd $src 4.18 4.19 - mkdir -p _pkg/usr/lib/$MINGW32_TARGET 4.20 - cp -a include _pkg/usr/lib/$MINGW32_TARGET 4.21 + mkdir -p _pkg$MINGW32_ROOT 4.22 + cp -a include _pkg$MINGW32_ROOT 4.23 + cp -a profile/*.h _pkg$MINGW32_ROOT/include 4.24 } 4.25 4.26 # Rules to gen a SliTaz package suitable for Tazpkg. 4.27 @@ -27,5 +32,4 @@ 4.28 { 4.29 mkdir -p $fs 4.30 cp -a $_pkg/* $fs 4.31 - ln -s . $fs/usr/lib/$MINGW32_TARGET/usr 4.32 }
5.1 --- a/mingw32-runtime/receipt Mon Sep 07 17:17:20 2009 +0000 5.2 +++ b/mingw32-runtime/receipt Mon Sep 07 21:44:04 2009 +0000 5.3 @@ -11,14 +11,19 @@ 5.4 TARBALL="$SOURCE-$VERSION-src.tar.gz" 5.5 WEB_SITE="http://www.mingw.org/" 5.6 WGET_URL="$SF_MIRROR/mingw/$TARBALL" 5.7 -MINGW32_TARGET="i586-pc-mingw32" 5.8 +MINGW32_ID="i586-pc-mingw32" 5.9 + 5.10 +# Configuration only needs included if we're in the build/wok environment 5.11 +if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 5.12 + . $WOK/mingw32-toolchain/stuff/mingw32.conf 5.13 +fi 5.14 5.15 # Rules to configure and make the package. 5.16 compile_rules() 5.17 { 5.18 - # Set a default value for BUILD_HOST if it is not defined in tazwok.conf as it should be 5.19 - if [ -z "$BUILD_HOST" ] ; then 5.20 - BUILD_HOST=i486-pc-linux-gnu 5.21 + if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then 5.22 + echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string" 5.23 + exit 1 5.24 fi 5.25 5.26 rm -f -r $src/binutils 5.27 @@ -30,17 +35,16 @@ 5.28 --prefix=$src/_pkg/usr \ 5.29 --host=$MINGW32_TARGET \ 5.30 --build=$BUILD_HOST && 5.31 - make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I/usr/$MINGW32_TARGET/include" LDFLAGS="-s" && 5.32 + make CFLAGS="-O2 -mms-bitfields -march=${TARGET_CPU-i386} -I$MINGW32_ROOT/include" LDFLAGS="-s" && 5.33 make DESTDIR=$src/_pkg install 5.34 } 5.35 5.36 # Rules to gen a SliTaz package suitable for Tazpkg. 5.37 genpkg_rules() 5.38 { 5.39 - mkdir -p $fs/usr/lib/$MINGW32_TARGET 5.40 - cp -a $_pkg/usr/bin $fs/usr/lib/$MINGW32_TARGET 5.41 - cp -a $_pkg/usr/include $fs/usr/lib/$MINGW32_TARGET 5.42 - cp -a $_pkg/usr/lib $fs/usr/lib/$MINGW32_TARGET 5.43 + mkdir -p $fs$MINGW32_ROOT 5.44 + cp -a $_pkg/usr/bin $fs$MINGW32_ROOT 5.45 + cp -a $_pkg/usr/lib $fs$MINGW32_ROOT 5.46 } 5.47 5.48 # Rules to setup after installation 5.49 @@ -49,7 +53,7 @@ 5.50 # Archives get stripped during packaging; need to run ranlib 5.51 local root 5.52 root=$1 5.53 - find $root/usr/lib/$MINGW32_TARGET/lib/ -name *.a -exec $MINGW32_TARGET-ranlib {} \; 5.54 + find $root/usr/$MINGW32_ID/lib/ -name *.a -exec $MINGW32_ID-ranlib {} \; 5.55 } 5.56 5.57 # Rules to clean the package
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/mingw32-toolchain/receipt Mon Sep 07 21:44:04 2009 +0000 6.3 @@ -0,0 +1,15 @@ 6.4 +# SliTaz package receipt. 6.5 + 6.6 +PACKAGE="mingw32-toolchain" 6.7 +VERSION="1.0" 6.8 +CATEGORY="meta" 6.9 +SHORT_DESC="MinGW32 toolchain meta package for devel." 6.10 +MAINTAINER="rcx@zoominternet.net" 6.11 +DEPENDS="mingw32-gcc" 6.12 +WEB_SITE="http://www.slitaz.org/" 6.13 + 6.14 +# Rules to gen a SliTaz package suitable for Tazpkg. 6.15 +genpkg_rules() 6.16 +{ 6.17 + mkdir -p $fs/var 6.18 +}
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/mingw32-toolchain/stuff/mingw32.conf Mon Sep 07 21:44:04 2009 +0000 7.3 @@ -0,0 +1,6 @@ 7.4 + 7.5 +MINGW32_TARGET="i586-pc-mingw32" 7.6 +MINGW32_ROOT="/usr/$MINGW32_TARGET" 7.7 + 7.8 +# Need exception for FSH incompleteness 7.9 +FSH="$FSH $MINGW32_ROOT"
8.1 --- a/mingw32-w32api-headers/receipt Mon Sep 07 17:17:20 2009 +0000 8.2 +++ b/mingw32-w32api-headers/receipt Mon Sep 07 21:44:04 2009 +0000 8.3 @@ -11,15 +11,19 @@ 8.4 TARBALL="$SOURCE-$VERSION-src.tar.gz" 8.5 WEB_SITE="http://www.mingw.org/" 8.6 WGET_URL="$SF_MIRROR/mingw/$TARBALL" 8.7 -MINGW32_TARGET="i586-pc-mingw32" 8.8 + 8.9 +# Configuration only needs included if we're in the build/wok environment 8.10 +if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 8.11 + . $WOK/mingw32-toolchain/stuff/mingw32.conf 8.12 +fi 8.13 8.14 # Rules to configure and make the package. 8.15 compile_rules() 8.16 { 8.17 cd $src 8.18 8.19 - mkdir -p _pkg/usr/lib/$MINGW32_TARGET 8.20 - cp -a include _pkg/usr/lib/$MINGW32_TARGET 8.21 + mkdir -p _pkg$MINGW32_ROOT 8.22 + cp -a include _pkg$MINGW32_ROOT 8.23 } 8.24 8.25 # Rules to gen a SliTaz package suitable for Tazpkg.
9.1 --- a/mingw32-w32api/receipt Mon Sep 07 17:17:20 2009 +0000 9.2 +++ b/mingw32-w32api/receipt Mon Sep 07 21:44:04 2009 +0000 9.3 @@ -11,14 +11,19 @@ 9.4 TARBALL="$SOURCE-$VERSION-src.tar.gz" 9.5 WEB_SITE="http://www.mingw.org/" 9.6 WGET_URL="$SF_MIRROR/mingw/$TARBALL" 9.7 -MINGW32_TARGET="i586-pc-mingw32" 9.8 +MINGW32_ID="i586-pc-mingw32" 9.9 + 9.10 +# Configuration only needs included if we're in the build/wok environment 9.11 +if [ -e $WOK/mingw32-toolchain/stuff/mingw32.conf ] ; then 9.12 + . $WOK/mingw32-toolchain/stuff/mingw32.conf 9.13 +fi 9.14 9.15 # Rules to configure and make the package. 9.16 compile_rules() 9.17 { 9.18 - # Set a default value for BUILD_HOST if it is not defined in tazwok.conf as it should be 9.19 - if [ -z "$BUILD_HOST" ] ; then 9.20 - BUILD_HOST=i486-pc-linux-gnu 9.21 + if [ "$MINGW32_ID" != "$MINGW32_TARGET" ] ; then 9.22 + echo "ERROR: Conf 'TARGET' string differs from Receipt 'ID' string" 9.23 + exit 1 9.24 fi 9.25 9.26 rm -f -r $src/binutils 9.27 @@ -37,8 +42,8 @@ 9.28 # Rules to gen a SliTaz package suitable for Tazpkg. 9.29 genpkg_rules() 9.30 { 9.31 - mkdir -p $fs/usr/lib/$MINGW32_TARGET 9.32 - cp -a $_pkg/usr/lib $fs/usr/lib/$MINGW32_TARGET 9.33 + mkdir -p $fs$MINGW32_ROOT 9.34 + cp -a $_pkg/usr/lib $fs$MINGW32_ROOT 9.35 } 9.36 9.37 # Rules to setup after installation 9.38 @@ -47,7 +52,7 @@ 9.39 # Archives get stripped during packaging; need to run ranlib 9.40 local root 9.41 root=$1 9.42 - find $root/usr/lib/$MINGW32_TARGET/lib/ -name *.a -exec $MINGW32_TARGET-ranlib {} \; 9.43 + find $root/usr/$MINGW32_ID/lib/ -name *.a -exec $MINGW32_ID-ranlib {} \; 9.44 } 9.45 9.46 # Rules to clean the package