1
0

scan-pkgs.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. #
  4. # Scan host-tool prerequisites of certain packages before building.
  5. if test -z "$BASH_VERSION"; then
  6. foo=`$BASH -c 'echo "$BASH_VERSION"'`
  7. else
  8. foo=$BASH_VERSION
  9. fi
  10. if test -z "$foo"; then
  11. echo OpenADK requires GNU bash to be installed.
  12. exit 1
  13. fi
  14. test -z "$BASH_VERSION$KSH_VERSION" && exec $BASH $0 "$@"
  15. [[ -n $BASH_VERSION ]] && shopt -s extglob
  16. topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P))
  17. OStype=$(uname)
  18. out=0
  19. . $topdir/.config
  20. if [[ -n $ADK_PACKAGE_XBMC ]]; then
  21. NEED_JAVA="$NEED_JAVA xbmc"
  22. fi
  23. if [[ -n $ADK_PACKAGE_XKEYBOARD_CONFIG ]]; then
  24. NEED_XKBCOMP="$NEED_XKBCOMP xkeyboard-config"
  25. fi
  26. if [[ -n $ADK_PACKAGE_FONT_BITSTREAM_100DPI ]]; then
  27. NEED_MKFONTDIR="$NEED_MKFONTDIR font-bitstream-100dpi"
  28. fi
  29. if [[ -n $ADK_PACKAGE_FONT_BITSTREAM_75DPI ]]; then
  30. NEED_MKFONTDIR="$NEED_MKFONTDIR font-bitstream-75dpi"
  31. fi
  32. if [[ -n $ADK_PACKAGE_FONT_ADOBE_100DPI ]]; then
  33. NEED_MKFONTDIR="$NEED_MKFONTDIR font-adobe-100dpi"
  34. fi
  35. if [[ -n $ADK_PACKAGE_FONT_ADOBE_75DPI ]]; then
  36. NEED_MKFONTDIR="$NEED_MKFONTDIR font-adobe-75dpi"
  37. fi
  38. if [[ -n $NEED_MKFONTDIR ]]; then
  39. if ! which mkfontdir >/dev/null 2>&1; then
  40. echo >&2 You need mkfontdir to build $NEED_MKFONTDIR
  41. out=1
  42. fi
  43. fi
  44. if [[ -n $NEED_XKBCOMP ]]; then
  45. if ! which xkbcomp >/dev/null 2>&1; then
  46. echo >&2 You need xkbcomp to build $NEED_XKBCOMP
  47. out=1
  48. fi
  49. fi
  50. if [[ -n $NEED_JAVA ]]; then
  51. if ! which java >/dev/null 2>&1; then
  52. echo >&2 You need java to build $NEED_JAVA
  53. out=1
  54. fi
  55. fi
  56. exit $out