2 # This file is part of the OpenADK project. OpenADK is copyrighted
3 # material, please see the LICENCE file in the top-level directory.
5 # resolve prerequisites for OpenADK build
12 mirror
=http
://distfiles.openadk.org
16 # detect operating system
19 printf " ---> $os $osver for build detected.\n"
21 # check if the filesystem is case sensitive
25 printf "ERROR: OpenADK cannot be built in a case-insensitive file system."
28 printf "Building OpenADK on $os needs a small registry change."
29 printf "http://cygwin.com/cygwin-ug-net/using-specialnames.html"
32 printf "Building OpenADK on $os needs a case-sensitive disk partition."
33 printf "For Snow Leopard and above you can use diskutil to resize your existing disk."
34 printf "Example: sudo diskutil resizeVolume disk0s2 90G 1 jhfsx adk 30G"
35 printf "For older versions you might consider to use a disk image:"
36 printf "hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 30g ~/openadk.dmg"
44 # do we have a download tool?
46 for tool
in $tools; do
47 printf " ---> checking if $tool is installed.. "
48 if which $tool >/dev
/null
; then
52 FETCHCMD
="$(which $tool) -L -k -f -\# -o "
55 FETCHCMD
="$(which $tool) --no-check-certificate -O "
64 if [ -z "$FETCHCMD" ]; then
65 printf "ERROR: no download tool found. Fatal error.\n"
69 # do we have a checksum tool?
70 tools
="sha256sum sha256 cksum shasum"
71 for tool
in $tools; do
72 printf " ---> checking if $tool is installed.. "
73 if which $tool >/dev
/null
2>/dev
/null
; then
75 # check if cksum is usable
81 SHA256
="$(which $tool) -q"
84 if cksum -q >/dev
/null
2>/dev
/null
; then
85 SHA256
="$(which $tool) -q -a sha256"
91 SHA256
="$(which $tool) -a 256"
100 if [ -z "$SHA256" ]; then
101 printf "ERROR: no checksum tool found. Fatal error.\n"
105 # create download dir
106 if [ ! -d $topdir/dl
]; then
110 # check for c compiler
111 if [ $os = "Darwin" ]; then
112 compilerbins
="clang cc gcc"
114 compilerbins
="cc gcc clang"
116 for compilerbin
in $compilerbins; do
117 printf " ---> checking if $compilerbin is installed.. "
118 if which $compilerbin >/dev
/null
; then
128 if [ -z "$CCFOUND" ]; then
129 printf "ERROR: no C compiler found. Fatal error.\n"
133 # check for c++ compiler
134 if [ $os = "Darwin" ]; then
135 compilerbins
="clang++ c++ g++"
137 compilerbins
="c++ g++ clang++"
139 for compilerbin
in $compilerbins; do
140 printf " ---> checking if $compilerbin is installed.. "
141 if which $compilerbin >/dev
/null
; then
151 if [ -z "$CXXFOUND" ]; then
152 printf "ERROR: no C++ compiler found. Fatal error.\n"
156 gnu_host_name
=$
(${CC} -dumpmachine)
158 # relocation of topdir?
159 olddir
=$
(grep "^ADK_TOPDIR" prereq.mk
2>/dev
/null |cut
-d '=' -f 2)
162 if [ ! -z "$olddir" ]; then
163 if [ "$olddir" != "$newdir" ]; then
164 printf " ---> adk directory was relocated, fixing .."
165 sed -i -e "s#$olddir#$newdir#g" $
(find target_
* -name \
*.pc|
xargs) 2>/dev
/null
166 sed -i -e "s#$olddir#$newdir#g" $
(find host_
${gnu_host_name} -type f|
xargs) 2>/dev
/null
167 sed -i -e "s#$olddir#$newdir#g" $
(find target_
*/scripts
-type f|
xargs) 2>/dev
/null
168 sed -i -e "s#$olddir#$newdir#" target_
*/etc
/ipkg.conf
2>/dev
/null
176 (*:$topdir/host_
${gnu_host_name}/bin
:*) ;;
177 (*) export PATH
=$topdir/host_
${gnu_host_name}/bin
:$PATH ;;
181 makebins
="gmake make"
182 for makebin
in $makebins; do
183 printf " ---> checking if $makebin is installed.. "
184 if which $makebin >/dev
/null
2>/dev
/null
; then
186 printf " ---> checking if it is GNU make.. "
187 $makebin --version 2>/dev
/null|
grep GNU
>/dev
/null
188 if [ $?
-eq 0 ]; then
190 MAKE
=$
(which $makebin)
193 # we need to build GNU make
195 printf " ---> compiling missing GNU make.. "
197 $FETCHCMD make-
${makever}.
tar.gz
$mirror/make-
${makever}.
tar.gz
198 if [ $?
-ne 0 ]; then
199 printf "ERROR: failed to download make from $mirror\n"
205 tar xzf ..
/dl
/make-
${makever}.
tar.gz
207 .
/configure
--prefix=$topdir/host_
$gnu_host_name/
213 MAKE
=$topdir/host_
$gnu_host_name/bin
/make
214 makebin
=$topdir/host_
$gnu_host_name/bin
/make
224 printf " ---> checking if bash is installed.. "
225 if which bash
>/dev
/null
; then
227 printf " ---> checking if it is bash 4.x.. "
228 bash
--version 2>/dev
/null|
grep -i "Version 4" >/dev
/null
229 if [ $?
-eq 0 ]; then
232 # we need to build GNU bash 4.x
234 printf " ---> compiling missing GNU bash.. "
236 $FETCHCMD bash-
${bashver}.
tar.gz
$mirror/bash-
${bashver}.
tar.gz
237 if [ $?
-ne 0 ]; then
238 printf "ERROR: failed to download make from $mirror\n"
244 tar xzf ..
/dl
/bash-
${bashver}.
tar.gz
246 .
/configure
--prefix=$topdir/host_
$gnu_host_name/
256 # skip the script if distclean / cleandir
257 if [ "$target" = "distclean" -o "$target" = "cleandir" ]; then
259 $makebin ADK_TOPDIR
=$topdir -s -f Makefile.adk
$flags $target
263 printf " ---> checking if strings is installed.. "
264 if ! which strings >/dev
/null
2>&1; then
265 echo You must
install strings to
continue.
272 printf " ---> checking if perl is installed.. "
273 if ! which perl
>/dev
/null
2>&1; then
274 echo You must
install perl to
continue.
281 printf " ---> checking if gzip is installed.. "
282 if ! which gzip >/dev
/null
2>&1; then
283 echo You must
install gzip to
continue.
290 printf " ---> checking if git is installed.. "
291 if ! which git
>/dev
/null
2>&1; then
292 echo You must
install git to
continue.
301 echo "ADK_TOPDIR:=$(readlink -nf . 2>/dev/null || pwd -P)" > $topdir/prereq.mk
302 echo "BASH:=$(which bash)" >> $topdir/prereq.mk
303 echo "SHELL:=$(which bash)" >> $topdir/prereq.mk
304 echo "GMAKE:=$MAKE" >> $topdir/prereq.mk
305 echo "MAKE:=$MAKE" >> $topdir/prereq.mk
306 echo "FETCHCMD:=$FETCHCMD" >> $topdir/prereq.mk
307 echo "SHA256:=$SHA256" >> $topdir/prereq.mk
308 echo "GNU_HOST_NAME:=${gnu_host_name}" >> $topdir/prereq.mk
309 echo "OS_FOR_BUILD:=${os}" >> $topdir/prereq.mk
310 echo "ARCH_FOR_BUILD:=$(${CC} -dumpmachine | sed \
311 -e 's/x86_64-linux-gnux32/x32/' \
313 -e 's/sparc.*/sparc/' \
314 -e 's/armeb.*/armeb/g' \
316 -e 's/m68k.*/m68k/' \
318 -e 's/mips-.*/mips/' \
319 -e 's/mipsel-.*/mipsel/' \
320 -e 's/i[3-9]86/x86/' \
323 if [ "$CC" = "clang" ]; then
324 echo "HOST_CC:=${CC} -fbracket-depth=1024" >> $topdir/prereq.mk
326 echo "HOST_CC:=${CC}" >> $topdir/prereq.mk
328 if [ "$CXX" = "clang++" ]; then
329 echo "HOST_CXX:=${CXX} -fbracket-depth=1024" >> $topdir/prereq.mk
331 echo "HOST_CXX:=${CXX}" >> $topdir/prereq.mk
334 echo "HOST_CFLAGS:=-O0 -g0" >> $topdir/prereq.mk
335 echo "HOST_CXXFLAGS:=-O0 -g0" >> $topdir/prereq.mk
336 echo 'LANGUAGE:=C' >> $topdir/prereq.mk
337 echo 'LC_ALL:=C' >> $topdir/prereq.mk
338 echo "_PATH:=$PATH" >> $topdir/prereq.mk
339 echo "PATH:=${topdir}/scripts:/usr/sbin:$PATH" >> $topdir/prereq.mk
340 echo "GIT:=$(which git 2>/dev/null)" >> $topdir/prereq.mk
341 echo "GITOPTS:=" >> $topdir/prereq.mk
342 echo "export ADK_TOPDIR GIT GITOPTS SHA256 BASH SHELL" >> $topdir/prereq.mk
344 # create temporary Makefile
345 cat >Makefile.tmp
<<'EOF'
346 include ${ADK_TOPDIR}/prereq.mk
350 @${HOST_CC} ${HOST_CFLAGS} -o $@ $^ ${LDADD}
353 # check if compiler works
364 printf " ---> checking if compiler is working.. "
365 $MAKE --no-print-directory ADK_TOPDIR
=$topdir -f Makefile.tmp
>/dev
/null
2>&1
366 X
=$
(.
/test 2>/dev
/null
)
367 if [ X
$X != XYES
]; then
368 echo Cannot compile a simple
test programme.
369 echo You must
install a
host make and C compiler.
375 rm test.c
test 2>/dev
/null
377 printf " ---> checking if zlib is installed.. "
384 #define STDIN_FILENO 0
394 zstdin = gzdopen(STDIN_FILENO, "rb");
395 i = gzread(zstdin, buf, sizeof (buf));
396 if ((i > 0) && (i < sizeof (buf)))
398 buf[sizeof (buf) - 1] = '\0';
404 $MAKE --no-print-directory LDADD
=-lz ADK_TOPDIR
=$topdir -f Makefile.tmp
>/dev
/null
2>&1
405 X
=$
(echo YES |
gzip | .
/test 2>/dev
/null
)
406 if [ X
$X != XYES
]; then
407 echo Cannot compile a libz
test programm.
408 echo You must
install the zlib development package
,
409 echo usually called libz-dev
, and the run-time library.
416 rm test.c
test 2>/dev
/null
417 rm Makefile.tmp
2>/dev
/null
419 # error out on any required prerequisite
420 if [ $out -ne 0 ]; then
424 printf " ---> checking if bc is installed.. "
426 if which bc >/dev
/null
2>&1; then
427 if ! echo quit|
bc -q 2>/dev
/null
>/dev
/null
; then
428 printf "not usable\n"
431 if bc -v 2>&1|
grep -q BSD
>/dev
/null
2>&1; then
433 printf "not usable\n"
442 printf " ---> checking if bison is installed.. "
444 if ! which bison
>/dev
/null
2>&1; then
451 printf " ---> checking if bzip2 is installed.. "
453 if ! which bzip2 >/dev
/null
2>&1; then
460 printf " ---> checking if file is installed.. "
462 if ! which file >/dev
/null
2>&1; then
469 printf " ---> checking if flex is installed.. "
471 if ! which flex
>/dev
/null
2>&1; then
479 if ! which m4 >/dev
/null
2>&1; then
484 if ! which mkimage
>/dev
/null
2>&1; then
488 printf " ---> checking if mksh is installed.. "
490 if ! which mksh
>/dev
/null
2>&1; then
497 printf " ---> checking if patch is installed.. "
499 if ! which patch >/dev
/null
2>&1; then
507 if ! which pkgconf
>/dev
/null
2>&1; then
512 if which tar >/dev
/null
2>&1; then
513 if ! tar --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
520 printf " ---> checking if xargs is installed.. "
521 host_build_findutils
=0
522 if which xargs >/dev
/null
2>&1; then
523 if ! xargs --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
524 printf "found but not usable\n"
525 host_build_findutils
=1
531 host_build_findutils
=1
534 printf " ---> checking if find is installed.. "
535 if which find >/dev
/null
2>&1; then
536 if ! find --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
537 printf "found but not usable\n"
538 host_build_findutils
=1
544 host_build_findutils
=1
547 printf " ---> checking if grep is installed.. "
549 if which grep >/dev
/null
2>&1; then
550 if ! grep --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
551 printf "found but not usable\n"
561 printf " ---> checking if gawk is installed.. "
563 if ! which gawk
>/dev
/null
2>&1; then
570 printf " ---> checking if sed is installed.. "
572 if which sed >/dev
/null
2>&1; then
573 if ! sed --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
574 printf "found but not usable\n"
584 printf " ---> checking if xz is installed.. "
586 if ! which xz
>/dev
/null
2>&1; then
594 host_build_cdrtools
=0
595 if ! which mkisofs
>/dev
/null
2>&1; then
596 host_build_cdrtools
=1
600 if ! which ccache
>/dev
/null
2>&1; then
604 host_build_genext2fs
=0
605 if ! which genext2fs
>/dev
/null
2>&1; then
606 host_build_genext2fs
=1
610 if ! which lzma
>/dev
/null
2>&1; then
615 if ! which lz4c
>/dev
/null
2>&1; then
620 if ! which lzop
>/dev
/null
2>&1; then
625 if ! which qemu-img
>/dev
/null
2>&1; then
629 host_build_coreutils
=0
630 if which tr >/dev
/null
2>&1; then
631 if ! tr --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
632 host_build_coreutils
=1
636 echo "config ADK_HOST_BUILD_TOOLS" > $topdir/target
/config
/Config.
in.prereq
637 printf "\t%s\n" "bool" >> $topdir/target
/config
/Config.
in.prereq
638 printf "\t%s\n" "default y" >> $topdir/target
/config
/Config.
in.prereq
640 if [ $host_build_bc -eq 1 ]; then
641 printf "\t%s\n" "select ADK_HOST_BUILD_BC" >> $topdir/target
/config
/Config.
in.prereq
643 if [ $host_build_bison -eq 1 ]; then
644 printf "\t%s\n" "select ADK_HOST_BUILD_BISON" >> $topdir/target
/config
/Config.
in.prereq
646 if [ $host_build_bzip2 -eq 1 ]; then
647 printf "\t%s\n" "select ADK_HOST_BUILD_BZIP2" >> $topdir/target
/config
/Config.
in.prereq
649 if [ $host_build_file -eq 1 ]; then
650 printf "\t%s\n" "select ADK_HOST_BUILD_FILE" >> $topdir/target
/config
/Config.
in.prereq
652 if [ $host_build_flex -eq 1 ]; then
653 printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target
/config
/Config.
in.prereq
655 if [ $host_build_gawk -eq 1 ]; then
656 printf "\t%s\n" "select ADK_HOST_BUILD_GAWK" >> $topdir/target
/config
/Config.
in.prereq
658 if [ $host_build_grep -eq 1 ]; then
659 printf "\t%s\n" "select ADK_HOST_BUILD_GREP" >> $topdir/target
/config
/Config.
in.prereq
661 if [ $host_build_m4 -eq 1 ]; then
662 printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target
/config
/Config.
in.prereq
664 if [ $host_build_mkimage -eq 1 ]; then
665 printf "\t%s\n" "select ADK_HOST_BUILD_U_BOOT" >> $topdir/target
/config
/Config.
in.prereq
667 if [ $host_build_mksh -eq 1 ]; then
668 printf "\t%s\n" "select ADK_HOST_BUILD_MKSH" >> $topdir/target
/config
/Config.
in.prereq
670 if [ $host_build_patch -eq 1 ]; then
671 printf "\t%s\n" "select ADK_HOST_BUILD_PATCH" >> $topdir/target
/config
/Config.
in.prereq
673 if [ $host_build_pkgconf -eq 1 ]; then
674 printf "\t%s\n" "select ADK_HOST_BUILD_PKGCONF" >> $topdir/target
/config
/Config.
in.prereq
676 if [ $host_build_findutils -eq 1 ]; then
677 printf "\t%s\n" "select ADK_HOST_BUILD_FINDUTILS" >> $topdir/target
/config
/Config.
in.prereq
679 if [ $host_build_sed -eq 1 ]; then
680 printf "\t%s\n" "select ADK_HOST_BUILD_SED" >> $topdir/target
/config
/Config.
in.prereq
682 if [ $host_build_tar -eq 1 ]; then
683 printf "\t%s\n" "select ADK_HOST_BUILD_TAR" >> $topdir/target
/config
/Config.
in.prereq
685 if [ $host_build_xz -eq 1 ]; then
686 printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target
/config
/Config.
in.prereq
689 if [ $host_build_ccache -eq 1 ]; then
690 printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target
/config
/Config.
in.prereq
692 if [ $host_build_cdrtools -eq 1 ]; then
693 printf "\t%s\n" "select ADK_HOST_BUILD_CDRTOOLS if ADK_HOST_NEED_CDRTOOLS" >> $topdir/target
/config
/Config.
in.prereq
695 if [ $host_build_genext2fs -eq 1 ]; then
696 printf "\t%s\n" "select ADK_HOST_BUILD_GENEXT2FS if ADK_HOST_NEED_GENEXT2FS" >> $topdir/target
/config
/Config.
in.prereq
698 if [ $host_build_lzma -eq 1 ]; then
699 printf "\t%s\n" "select ADK_HOST_BUILD_LZMA if ADK_HOST_NEED_LZMA" >> $topdir/target
/config
/Config.
in.prereq
701 if [ $host_build_lz4 -eq 1 ]; then
702 printf "\t%s\n" "select ADK_HOST_BUILD_LZ4 if ADK_HOST_NEED_LZ4" >> $topdir/target
/config
/Config.
in.prereq
704 if [ $host_build_lzop -eq 1 ]; then
705 printf "\t%s\n" "select ADK_HOST_BUILD_LZOP if ADK_HOST_NEED_LZOP" >> $topdir/target
/config
/Config.
in.prereq
707 if [ $host_build_qemu -eq 1 ]; then
708 printf "\t%s\n" "select ADK_HOST_BUILD_QEMU if ADK_HOST_NEED_QEMU" >> $topdir/target
/config
/Config.
in.prereq
710 if [ $host_build_coreutils -eq 1 ]; then
711 printf "\t%s\n" "select ADK_HOST_BUILD_COREUTILS if ADK_HOST_NEED_COREUTILS" >> $topdir/target
/config
/Config.
in.prereq
714 # create Host OS symbols
717 printf "\nconfig ADK_HOST_LINUX\n" >> $topdir/target
/config
/Config.
in.prereq
718 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
719 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
722 printf "\nconfig ADK_HOST_DARWIN\n" >> $topdir/target
/config
/Config.
in.prereq
723 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
724 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
727 printf "\nconfig ADK_HOST_OPENBSD\n" >> $topdir/target
/config
/Config.
in.prereq
728 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
729 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
732 printf "\nconfig ADK_HOST_FREEBSD\n" >> $topdir/target
/config
/Config.
in.prereq
733 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
734 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
737 printf "\nconfig ADK_HOST_NETBSD\n" >> $topdir/target
/config
/Config.
in.prereq
738 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
739 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
742 printf "\nconfig ADK_HOST_MIRBSD\n" >> $topdir/target
/config
/Config.
in.prereq
743 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
744 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
747 printf "\nconfig ADK_HOST_CYGWIN\n" >> $topdir/target
/config
/Config.
in.prereq
748 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
749 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
753 if [ "$target" = "defconfig" ]; then
754 $makebin ADK_TOPDIR
=$topdir --no-print-directory -f Makefile.adk
$flags $target
758 if [ ! -f $topdir/.config
]; then
759 # create a config if no exist
761 $makebin ADK_TOPDIR
=$topdir --no-print-directory -f Makefile.adk menuconfig
763 # scan host-tool prerequisites of certain packages before building.
765 if [ -n "$ADK_PACKAGE_KODI" ]; then
766 NEED_JAVA
="$NEED_JAVA kodi"
769 if [ -n "$ADK_PACKAGE_ICU4C" ]; then
770 NEED_STATIC_LIBSTDCXX
="$NEED_STATIC_LIBSTDCXX icu4c"
773 if [ -n "$ADK_PACKAGE_XKEYBOARD_CONFIG" ]; then
774 NEED_XKBCOMP
="$NEED_XKBCOMP xkeyboard-config"
777 if [ -n "$ADK_PACKAGE_FONT_BH_100DPI" ]; then
778 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-100dpi"
781 if [ -n "$ADK_PACKAGE_FONT_BH_75DPI" ]; then
782 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-75dpi"
785 if [ -n "$ADK_PACKAGE_FONT_BH_TYPE1" ]; then
786 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-type1"
789 if [ -n "$ADK_PACKAGE_FONT_BH_TTF" ]; then
790 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-ttf"
793 if [ -n "$ADK_PACKAGE_FONT_BH_LUCIDATYPEWRITER_100DPI" ]; then
794 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-lucidatypewriter-100dpi"
797 if [ -n "$ADK_PACKAGE_FONT_BH_LUCIDATYPEWRITER_75DPI" ]; then
798 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-lucidatypewriter-75dpi"
801 if [ -n "$ADK_PACKAGE_FONT_BITSTREAM_100DPI" ]; then
802 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bitstream-100dpi"
805 if [ -n "$ADK_PACKAGE_FONT_BITSTREAM_75DPI" ]; then
806 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bitstream-75dpi"
809 if [ -n "$ADK_PACKAGE_FONT_BITSTREAM_TYPE1" ]; then
810 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bitstream-type1"
813 if [ -n "$ADK_PACKAGE_FONT_ADOBE_100DPI" ]; then
814 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-adobe-100dpi"
817 if [ -n "$ADK_PACKAGE_FONT_ADOBE_75DPI" ]; then
818 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-adobe-75dpi"
821 if [ -n "$ADK_PACKAGE_FONT_XFREE86_TYPE1" ]; then
822 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-xfree86-type1"
825 if [ -n "$ADK_PACKAGE_FONT_MISC_MISC" ]; then
826 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-misc-misc"
829 if [ -n "$ADK_PACKAGE_LIBERATION_FONTS_TTF" ]; then
830 NEED_MKFONTSCALE
="$NEED_MKFONTSCALE liberation-fonts-ttf"
833 if [ -n "$NEED_MKFONTDIR" ]; then
834 if ! which mkfontdir
>/dev
/null
2>&1; then
835 printf "You need mkfontdir to build $NEED_MKFONTDIR \n"
840 if [ -n "$NEED_MKFONTSCALE" ]; then
841 if ! which mkfontscale
>/dev
/null
2>&1; then
842 printf "You need mkfontscale to build $NEED_MKFONTSCALE \n"
847 if [ -n "$NEED_XKBCOMP" ]; then
848 if ! which xkbcomp
>/dev
/null
2>&1; then
849 printf "You need xkbcomp to build $NEED_XKBCOMP \n"
854 if [ -n "$NEED_JAVA" ]; then
855 if ! which java
>/dev
/null
2>&1; then
856 printf "You need java to build $NEED_JAVA \n"
861 if [ -n "$NEED_STATIC_LIBSTDCXX" ]; then
870 if ! $CXX -static-libstdc++ -o test test.c
2>/dev
/null
; then
871 printf "You need static version of libstdc++ installed to build $NEED_STATIC_LIBSTDCXX \n"
873 rm test test.c
2>/dev
/null
878 if [ $out -ne 0 ]; then
883 $makebin ADK_TOPDIR
=$topdir --no-print-directory -f Makefile.adk
$flags $target