diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-03-30 21:56:07 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-03-30 21:56:07 +0200 |
commit | 1a81ab3b835f3b77bb16e47ddb1be9c751e79e0e (patch) | |
tree | b325e977182b293bb8382072f2e4f0a3f88f3089 /scripts | |
parent | e56895aca43c2de824228aa3ae00345318a0cb51 (diff) | |
parent | 712a7998a6e64638154c2cc3b3262b0881ca0138 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/adkprepare.sh | 10 | ||||
-rw-r--r-- | scripts/scan-tools.sh | 108 |
2 files changed, 103 insertions, 15 deletions
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 diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index c16aff609..c9b8029d5 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -196,18 +196,114 @@ 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 out=1 fi +# 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_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_build_bzip2=0 +if ! which bzip2 >/dev/null 2>&1; then + echo "No bzip2 found, will build one." + host_build_bzip2=1 +fi + +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_pkgconf=0 +if ! which pkgconf >/dev/null 2>&1; then + echo "No pkgconf found, will build one." + 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." + 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 + +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 +# 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_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 +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 |