cookutils rev 367
cook: handle HOST_ARCH (some package may bor build for an arch)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu May 10 04:28:16 2012 +0200 (2012-05-10) |
parents | 23aed475bdf2 |
children | 897463926883 |
files | cook |
line diff
1.1 --- a/cook Thu May 10 04:24:25 2012 +0200 1.2 +++ b/cook Thu May 10 04:28:16 2012 +0200 1.3 @@ -141,6 +141,7 @@ 1.4 # Executed before sourcing a receipt. 1.5 unset_receipt() { 1.6 unset DEPENDS BUILD_DEPENDS WANTED EXTRAVERSION WGET_URL PROVIDE TARBALL 1.7 + unset HOST_ARCH CROSS_BUG 1.8 } 1.9 1.10 # Paths used in receipt and by cook itself. 1.11 @@ -426,6 +427,9 @@ 1.12 set_paths 1.13 1.14 # Handle cross compilation 1.15 + if [ "$HOST_ARCH" ] && [ ! $(echo "$HOST_ARCH" | fgrep $ARCH) ]; then 1.16 + echo "ERROR: This package dont build on: $ARCH" && exit 1 1.17 + fi 1.18 case "$ARCH" in 1.19 arm|x86_64) 1.20 echo "cook: adding /usr/cross/$ARCH/bin to PATH" 1.21 @@ -931,6 +935,7 @@ 1.22 echo "Cross compiler: ${HOST_SYSTEM}-gcc" 1.23 else 1.24 echo "ERROR: C compiler is missing: ${HOST_SYSTEM}-gcc" 1.25 + echo "Run 'cross compile' for cook a toolchain" 1.26 fi ;; 1.27 test) 1.28 # Test a cook environment.