summaryrefslogtreecommitdiff
path: root/scripts/scan-pkgs.sh
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-12-13 17:18:40 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2015-12-13 17:18:44 +0100
commita94d74d9c875b4a1c07945bf9af282221d0178b3 (patch)
treedaa2be873d758ad77006696efde6e76982f24d20 /scripts/scan-pkgs.sh
parent74663fdbbd1dc92dd91f6f88dbc4f972df12c404 (diff)
rework prereq check
The new prereq check is completely implemented in POSIX shell in scripts/prereq.sh. It combines the old features from Makefile, scan-tools.sh, scan-pkgs.sh, reloc.sh and some wrappers for tools. The big benefit is to have all portability stuff in one place. Furthermore we can compile GNU make and bash on the fly, for systems lacking the required tools. All changes on the host are detected on the fly, no make prereq required anymore. The build process is separated in following three phases: 1. small wrapper Makefile is used for BSD make or GNU make 2. prereq.sh is called, doing all checking, calling Makefile.adk 3. old logic in Makefile.adk or mk/build.mk is used Tested successfully on Linux, MacOS X, Cygwin, FreeBSD, OpenBSD and NetBSD. An old depmaker bug was fixed, only optional host tools are compiled. For example, even when a host provides xz, a local xz was compiled in the past, because other packages had a build dependency on it. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Diffstat (limited to 'scripts/scan-pkgs.sh')
-rw-r--r--scripts/scan-pkgs.sh91
1 files changed, 0 insertions, 91 deletions
diff --git a/scripts/scan-pkgs.sh b/scripts/scan-pkgs.sh
deleted file mode 100644
index 416d3a4d4..000000000
--- a/scripts/scan-pkgs.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-#
-# Scan host-tool prerequisites of certain packages before building.
-
-if test -z "$BASH_VERSION"; then
- foo=`$BASH -c 'echo "$BASH_VERSION"'`
-else
- foo=$BASH_VERSION
-fi
-
-if test -z "$foo"; then
- echo OpenADK requires GNU bash to be installed.
- exit 1
-fi
-
-test -z "$BASH_VERSION$KSH_VERSION" && exec $BASH $0 "$@"
-
-[[ -n $BASH_VERSION ]] && shopt -s extglob
-topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P))
-OStype=$(uname)
-out=0
-
-. $topdir/.config
-
-if [[ -n $ADK_PACKAGE_KODI ]]; then
- NEED_JAVA="$NEED_JAVA kodi"
-fi
-
-if [[ -n $ADK_PACKAGE_ICU4C ]]; then
- NEED_STATIC_LIBSTDCXX="$NEED_STATIC_LIBSTDCXX icu4c"
-fi
-
-if [[ -n $ADK_PACKAGE_XKEYBOARD_CONFIG ]]; then
- NEED_XKBCOMP="$NEED_XKBCOMP xkeyboard-config"
-fi
-
-if [[ -n $ADK_PACKAGE_FONT_BITSTREAM_100DPI ]]; then
- NEED_MKFONTDIR="$NEED_MKFONTDIR font-bitstream-100dpi"
-fi
-
-if [[ -n $ADK_PACKAGE_FONT_BITSTREAM_75DPI ]]; then
- NEED_MKFONTDIR="$NEED_MKFONTDIR font-bitstream-75dpi"
-fi
-
-if [[ -n $ADK_PACKAGE_FONT_ADOBE_100DPI ]]; then
- NEED_MKFONTDIR="$NEED_MKFONTDIR font-adobe-100dpi"
-fi
-
-if [[ -n $ADK_PACKAGE_FONT_ADOBE_75DPI ]]; then
- NEED_MKFONTDIR="$NEED_MKFONTDIR font-adobe-75dpi"
-fi
-
-if [[ -n $NEED_MKFONTDIR ]]; then
- if ! which mkfontdir >/dev/null 2>&1; then
- echo >&2 You need mkfontdir to build $NEED_MKFONTDIR
- out=1
- fi
-fi
-
-if [[ -n $NEED_XKBCOMP ]]; then
- if ! which xkbcomp >/dev/null 2>&1; then
- echo >&2 You need xkbcomp to build $NEED_XKBCOMP
- out=1
- fi
-fi
-
-if [[ -n $NEED_JAVA ]]; then
- if ! which java >/dev/null 2>&1; then
- echo >&2 You need java to build $NEED_JAVA
- out=1
- fi
-fi
-
-if [[ -n $NEED_STATIC_LIBSTDCXX ]]; then
-cat >test.c <<-'EOF'
- #include <stdio.h>
- int
- main()
- {
- return (0);
- }
-EOF
- if ! g++ -static-libstdc++ -o test test.c ; then
- echo >&2 You need static version of libstdc++ installed to build $NEED_STATIC_LIBSTDCXX
- out=1
- rm test 2>/dev/null
- fi
-fi
-
-exit $out