1
0

scan-pkgs.sh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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_COMPILE_COROSYNC ]]; then
  27. NEED_GROFF="$NEED_GROFF corosync"
  28. fi
  29. if [[ -n $ADK_PACKAGE_LIBXFONT ]]; then
  30. NEED_XMLTO="$NEED_XMLTO libXfont"
  31. fi
  32. if [[ -n $ADK_PACKAGE_FONT_BITSTREAM_100DPI ]]; then
  33. NEED_MKFONTDIR="$NEED_MKFONTDIR font-bitstream-100dpi"
  34. fi
  35. if [[ -n $ADK_PACKAGE_FONT_BITSTREAM_75DPI ]]; then
  36. NEED_MKFONTDIR="$NEED_MKFONTDIR font-bitstream-75dpi"
  37. fi
  38. if [[ -n $ADK_PACKAGE_FONT_ADOBE_100DPI ]]; then
  39. NEED_MKFONTDIR="$NEED_MKFONTDIR font-adobe-100dpi"
  40. fi
  41. if [[ -n $ADK_PACKAGE_FONT_ADOBE_75DPI ]]; then
  42. NEED_MKFONTDIR="$NEED_MKFONTDIR font-adobe-75dpi"
  43. fi
  44. if [[ -n $NEED_GROFF ]]; then
  45. if ! which groff >/dev/null 2>&1; then
  46. echo >&2 You need groff to build $NEED_GROFF
  47. out=1
  48. fi
  49. fi
  50. if [[ -n $NEED_MKFONTDIR ]]; then
  51. if ! which mkfontdir >/dev/null 2>&1; then
  52. echo >&2 You need mkfontdir to build $NEED_MKFONTDIR
  53. out=1
  54. fi
  55. fi
  56. if [[ -n $NEED_XKBCOMP ]]; then
  57. if ! which xkbcomp >/dev/null 2>&1; then
  58. echo >&2 You need xkbcomp to build $NEED_XKBCOMP
  59. out=1
  60. fi
  61. fi
  62. if [[ -n $NEED_JAVA ]]; then
  63. if ! which java >/dev/null 2>&1; then
  64. echo >&2 You need java to build $NEED_JAVA
  65. out=1
  66. fi
  67. fi
  68. if [[ -n $ADK_USE_CCACHE ]]; then
  69. if ! which ccache >/dev/null 2>&1; then
  70. echo >&2 You have selected to build with ccache, but ccache could not be found.
  71. out=1
  72. fi
  73. fi
  74. exit $out