From 8aed1fcd443b550c15a21ddbf1b1d3899803120a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 15:55:20 +0200 Subject: rework hosttools building, add tools into package stuff --- scripts/adkprepare.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/adkprepare.sh b/scripts/adkprepare.sh index 08d1ee1a1..5b18d30e3 100755 --- a/scripts/adkprepare.sh +++ b/scripts/adkprepare.sh @@ -21,36 +21,28 @@ openbsd() { PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/${ver}/packages/${arch}/" export PKG_PATH pkg_add -v gmake - pkg_add -v git pkg_add -v bash pkg_add -v wget pkg_add -v gtar-- pkg_add -v gawk pkg_add -v gsed - pkg_add -v screen-- - pkg_add -v vim--no_x11 - pkg_add -v py-libxml } netbsd() { echo "Preparing NetBSD for OpenADK" PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/${arch}/${ver}/All/" export PKG_PATH - pkg_add -vu scmgit pkg_add -vu gmake pkg_add -vu bash pkg_add -vu wget pkg_add -vu gtar pkg_add -vu gsed pkg_add -vu gawk - pkg_add -vu vim - pkg_add -vu screen - pkg_add -vu mksh } freebsd() { echo "Preparing FreeBSD for OpenADK" - pkg_add -r git gmake bash wget gtar gsed gawk screen mksh vim + pkg_add -r gmake bash wget gtar gsed gawk } case $os in -- cgit v1.2.3 From 3b513e5acf1524d3974e90fdab332c2b794a622f Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 18:12:41 +0200 Subject: build host tools on demand, when not available on the host --- scripts/scan-tools.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'scripts') diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index c16aff609..8be02f690 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -208,6 +208,38 @@ if ! which g++ >/dev/null 2>&1; then out=1 fi +host_need_file=0 +if ! which file >/dev/null 2>&1; then + echo "No file found, will build one." + host_need_file=1 +fi + +host_need_bc=0 +if ! which bc >/dev/null 2>&1; then + echo "No bc found, will build one." + host_need_bc=1 +fi + +host_need_bzip2=0 +if ! which bzip2 >/dev/null 2>&1; then + echo "No bzip2 found, will build one." + host_need_bzip2=1 +fi + +host_need_xz=0 +if ! which xz >/dev/null 2>&1; then + echo "No xz found, will build one." + host_need_xz=1 +fi + +echo "config ADK_HOST_NEED_TOOLS" > $topdir/target/config/Config.in.prereq +printf "\t%s\n" "boolean" >> $topdir/target/config/Config.in.prereq +printf "\t%s\n" "default y" >> $topdir/target/config/Config.in.prereq +if [ $host_need_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_XZ" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_need_bc -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_BC" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_need_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_FILE" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_need_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_BZIP2" >> $topdir/target/config/Config.in.prereq ;fi + cd $topdir rm -rf tmp -- cgit v1.2.3 From 9c8476bd6abc1994ca54b195c92f826de707cc5f Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 19:00:41 +0200 Subject: build hosttools only when not available or required --- scripts/scan-tools.sh | 81 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 17 deletions(-) (limited to 'scripts') diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index 8be02f690..f5d101d6e 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -208,37 +208,84 @@ if ! which g++ >/dev/null 2>&1; then out=1 fi -host_need_file=0 -if ! which file >/dev/null 2>&1; then - echo "No file found, will build one." - host_need_file=1 -fi - -host_need_bc=0 +# always required, but can be provided by host +host_build_bc=0 if ! which bc >/dev/null 2>&1; then echo "No bc found, will build one." - host_need_bc=1 + host_build_bc=1 +fi + +host_build_bison=0 +if ! which bison >/dev/null 2>&1; then + echo "No bison found, will build one." + host_build_bison=1 fi -host_need_bzip2=0 +host_build_bzip2=0 if ! which bzip2 >/dev/null 2>&1; then echo "No bzip2 found, will build one." - host_need_bzip2=1 + host_build_bzip2=1 fi -host_need_xz=0 +host_build_file=0 +if ! which file >/dev/null 2>&1; then + echo "No file found, will build one." + host_build_file=1 +fi + +host_build_flex=0 +if ! which flex >/dev/null 2>&1; then + echo "No flex found, will build one." + host_build_m4=1 +fi + +host_build_m4=0 +if ! which m4 >/dev/null 2>&1; then + echo "No m4 found, will build one." + host_build_m4=1 +fi + +host_build_xz=0 if ! which xz >/dev/null 2>&1; then echo "No xz found, will build one." - host_need_xz=1 + host_build_xz=1 +fi + +# optional +host_build_ccache=0 +if ! which ccache >/dev/null 2>&1; then + echo "No ccache found, will build one when required." + host_build_ccache=1 fi -echo "config ADK_HOST_NEED_TOOLS" > $topdir/target/config/Config.in.prereq +host_build_lzma=0 +if ! which lzma >/dev/null 2>&1; then + echo "No lzma found, will build one when required." + host_build_lzma=1 +fi + +host_build_lzop=0 +if ! which lzop >/dev/null 2>&1; then + echo "No lzop found, will build one when required." + host_build_lzop=1 +fi + + +echo "config ADK_HOST_BUILD_TOOLS" > $topdir/target/config/Config.in.prereq printf "\t%s\n" "boolean" >> $topdir/target/config/Config.in.prereq printf "\t%s\n" "default y" >> $topdir/target/config/Config.in.prereq -if [ $host_need_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_XZ" >> $topdir/target/config/Config.in.prereq ;fi -if [ $host_need_bc -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_BC" >> $topdir/target/config/Config.in.prereq ;fi -if [ $host_need_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_FILE" >> $topdir/target/config/Config.in.prereq ;fi -if [ $host_need_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_BZIP2" >> $topdir/target/config/Config.in.prereq ;fi +# always required +if [ $host_build_bc -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BC" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_bison -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BISON" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BZIP2" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FILE" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_flex -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_m4 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi +# optional +if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_lzma -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZMA if ADK_HOST_NEED_LZMA" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_lzop -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZOP if ADK_HOST_NEED_LZOP" >> $topdir/target/config/Config.in.prereq ;fi cd $topdir rm -rf tmp -- cgit v1.2.3 From 2615fde640b4420ab281006b996360ae7efb2e82 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 19:31:39 +0200 Subject: add pkgconf, always needed --- scripts/scan-tools.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts') diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index f5d101d6e..119a7a6bd 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -245,6 +245,12 @@ if ! which m4 >/dev/null 2>&1; then host_build_m4=1 fi +host_build_pkgconf=0 +if ! which pkgconf >/dev/null 2>&1; then + echo "No pkgconf found, will build one." + host_build_pkgconf=1 +fi + host_build_xz=0 if ! which xz >/dev/null 2>&1; then echo "No xz found, will build one." @@ -281,6 +287,7 @@ if [ $host_build_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BZIP2 if [ $host_build_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FILE" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_flex -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_m4 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_pkgconf -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_PKGCONF" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi # optional if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target/config/Config.in.prereq ;fi -- cgit v1.2.3 From 712a7998a6e64638154c2cc3b3262b0881ca0138 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 19:49:07 +0200 Subject: add findutils do host machinery --- scripts/scan-tools.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index 119a7a6bd..c9b8029d5 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -196,12 +196,6 @@ if ! which perl >/dev/null 2>&1; then out=1 fi -if ! which xargs >/dev/null 2>&1; then - echo "You need xargs to continue." - echo - out=1 -fi - if ! which g++ >/dev/null 2>&1; then echo "You need g++ (GNU C++ compiler) to continue." echo @@ -251,6 +245,21 @@ if ! which pkgconf >/dev/null 2>&1; then host_build_pkgconf=1 fi +host_build_findutils=0 +if ! which gxargs >/dev/null 2>&1; then + if ! which xargs >/dev/null 2>&1; then + echo "No xargs found, will build one." + host_build_findutils=1 + fi +fi + +if ! which gfind >/dev/null 2>&1; then + if ! which find >/dev/null 2>&1; then + echo "No find found, will build one." + host_build_findutils=1 + fi +fi + host_build_xz=0 if ! which xz >/dev/null 2>&1; then echo "No xz found, will build one." @@ -288,6 +297,7 @@ if [ $host_build_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FILE" if [ $host_build_flex -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_m4 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_pkgconf -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_PKGCONF" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_findutils -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FINDUTILS" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi # optional if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target/config/Config.in.prereq ;fi -- cgit v1.2.3