1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 # Scan host-tool prerequisites of certain packages before building.
6 if test -z "$BASH_VERSION"; then
7 foo
=`$BASH -c 'echo "$BASH_VERSION"'`
12 if test -z "$foo"; then
13 echo OpenADK requires GNU bash to be installed.
17 test -z "$BASH_VERSION$KSH_VERSION" && exec $BASH $0 "$@"
19 [[ -n $BASH_VERSION ]] && shopt -s extglob
20 topdir
=$
(readlink
-nf $
(dirname $0)/..
2>/dev
/null ||
(cd $
(dirname $0)/..
; pwd -P))
26 if [[ -n $ADK_PACKAGE_KODI ]]; then
27 NEED_JAVA
="$NEED_JAVA kodi"
30 if [[ -n $ADK_PACKAGE_ICU4C ]]; then
31 NEED_STATIC_LIBSTDCXX
="$NEED_STATIC_LIBSTDCXX icu4c"
34 if [[ -n $ADK_PACKAGE_XKEYBOARD_CONFIG ]]; then
35 NEED_XKBCOMP
="$NEED_XKBCOMP xkeyboard-config"
38 if [[ -n $ADK_PACKAGE_FONT_BITSTREAM_100DPI ]]; then
39 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bitstream-100dpi"
42 if [[ -n $ADK_PACKAGE_FONT_BITSTREAM_75DPI ]]; then
43 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bitstream-75dpi"
46 if [[ -n $ADK_PACKAGE_FONT_ADOBE_100DPI ]]; then
47 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-adobe-100dpi"
50 if [[ -n $ADK_PACKAGE_FONT_ADOBE_75DPI ]]; then
51 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-adobe-75dpi"
54 if [[ -n $NEED_MKFONTDIR ]]; then
55 if ! which mkfontdir
>/dev
/null
2>&1; then
56 echo >&2 You need mkfontdir to build
$NEED_MKFONTDIR
61 if [[ -n $NEED_XKBCOMP ]]; then
62 if ! which xkbcomp
>/dev
/null
2>&1; then
63 echo >&2 You need xkbcomp to build
$NEED_XKBCOMP
68 if [[ -n $NEED_JAVA ]]; then
69 if ! which java
>/dev
/null
2>&1; then
70 echo >&2 You need java to build
$NEED_JAVA
75 if [[ -n $NEED_STATIC_LIBSTDCXX ]]; then
84 if ! g
++ -static-libstdc++ -o test test.c
; then
85 echo >&2 You need static version of libstdc
++ installed to build
$NEED_STATIC_LIBSTDCXX