2 # This file is part of the OpenADK project. OpenADK is copyrighted
3 # material, please see the LICENCE file in the top-level directory.
7 # resolve prerequisites for OpenADK build
14 mirror
=https
://distfiles.openadk.org
18 # detect operating system
21 printf " ---> $os $osver for build detected.\n"
23 # check if the filesystem is case sensitive
27 printf "ERROR: OpenADK cannot be built in a case-insensitive file system.\n"
30 printf "Building OpenADK on $os needs a small registry change.\n"
31 printf "http://cygwin.com/cygwin-ug-net/using-specialnames.html\n"
34 printf "Building OpenADK on $os needs a case-sensitive disk partition.\n"
35 printf "For Snow Leopard and above you can use diskutil to resize your existing disk.\n"
36 printf "Example: sudo diskutil resizeVolume disk0s2 90G 1 jhfsx adk 30G\n"
37 printf "For older versions you might consider to use a disk image:\n"
38 printf "hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 30g ~/openadk.dmg\n"
46 # do we have a download tool?
48 for tool
in $tools; do
49 printf " ---> checking if $tool is installed.. "
50 if which $tool >/dev
/null
; then
54 FETCHCMD
="$(which $tool) --progress-bar -L -k -f -o "
57 FETCHCMD
="$(which $tool) -t2 --no-check-certificate -O "
66 if [ -z "$FETCHCMD" ]; then
67 printf "ERROR: no download tool found. Fatal error.\n"
71 # do we have a checksum tool?
72 tools
="sha256sum sha256 cksum shasum"
73 for tool
in $tools; do
74 printf " ---> checking if $tool is installed.. "
75 if which $tool >/dev
/null
2>/dev
/null
; then
77 # check if cksum is usable
83 SHA256
="$(which $tool) -q"
86 if cksum -t >/dev
/null
2>/dev
/null
; then
87 SHA256
="$(which $tool) -q -a sha256"
93 SHA256
="$(which $tool) -a 256"
102 if [ -z "$SHA256" ]; then
103 printf "ERROR: no checksum tool found. Fatal error.\n"
107 # create download dir
108 if [ ! -d $topdir/dl
]; then
112 # check for c compiler
113 if [ $os = "Darwin" ]; then
114 compilerbins
="clang cc gcc"
116 compilerbins
="cc gcc clang"
118 for compilerbin
in $compilerbins; do
119 printf " ---> checking if $compilerbin is installed.. "
120 if which $compilerbin >/dev
/null
; then
130 if [ -z "$CCFOUND" ]; then
131 printf "ERROR: no C compiler found. Fatal error.\n"
135 # check for c++ compiler
136 if [ $os = "Darwin" ]; then
137 compilerbins
="clang++ c++ g++"
139 compilerbins
="c++ g++ clang++"
141 for compilerbin
in $compilerbins; do
142 printf " ---> checking if $compilerbin is installed.. "
143 if which $compilerbin >/dev
/null
; then
153 if [ -z "$CXXFOUND" ]; then
154 printf "ERROR: no C++ compiler found. Fatal error.\n"
158 gnu_host_name
=$
(${CC} -dumpmachine)
160 # relocation of topdir?
161 olddir
=$
(grep "^ADK_TOPDIR" prereq.mk
2>/dev
/null |cut
-d '=' -f 2)
164 if [ ! -z "$olddir" ]; then
165 if [ "$olddir" != "$newdir" ]; then
166 printf " ---> adk directory was relocated, fixing .."
167 sed -i -e "s#$olddir#$newdir#g" $
(find target_
* -name \
*.pc
2>/dev
/null|
xargs) 2>/dev
/null
168 sed -i -e "s#$olddir#$newdir#g" $
(find host_
${gnu_host_name} -type f
2>/dev
/null|
xargs) 2>/dev
/null
169 sed -i -e "s#$olddir#$newdir#g" $
(find target_
*/scripts
-type f
2>/dev
/null|
xargs) 2>/dev
/null
170 sed -i -e "s#$olddir#$newdir#" target_
*/etc
/ipkg.conf
2>/dev
/null
178 (*:$topdir/host_
${gnu_host_name}/bin
:*) ;;
179 (*) export PATH
=$topdir/host_
${gnu_host_name}/bin
:$PATH ;;
183 makebins
="gmake make"
184 for makebin
in $makebins; do
185 printf " ---> checking if $makebin is installed.. "
186 if which $makebin >/dev
/null
2>/dev
/null
; then
188 printf " ---> checking if it is GNU make.. "
189 $makebin --version 2>/dev
/null|
grep GNU
>/dev
/null
190 if [ $?
-eq 0 ]; then
192 MAKE
=$
(which $makebin)
194 printf " ---> checking if it is make 4.x.. "
195 LC_ALL
=C
$makebin --version 2>/dev
/null|
grep -i "Make 4" >/dev
/null
196 if [ $?
-eq 0 ]; then
200 # we need to build GNU make
202 printf " ---> compiling missing GNU make.. "
204 $FETCHCMD make-
${makever}.
tar.gz
$mirror/make-
${makever}.
tar.gz
205 if [ $?
-ne 0 ]; then
206 printf "ERROR: failed to download make from $mirror\n"
212 tar xzf ..
/dl
/make-
${makever}.
tar.gz
214 .
/configure
--prefix=$topdir/host_
$gnu_host_name
220 (cd $topdir/host_
$gnu_host_name/bin
/; ln -sf make gnumake
)
221 MAKE
=$topdir/host_
$gnu_host_name/bin
/make
222 makebin
=$topdir/host_
$gnu_host_name/bin
/make
232 printf " ---> checking if bash is installed.. "
233 if which bash
>/dev
/null
; then
235 printf " ---> checking if it is bash 4.x or 5.x.. "
236 LC_ALL
=C bash
--version 2>/dev
/null|
egrep -i 'version 4|5' >/dev
/null
237 if [ $?
-eq 0 ]; then
240 # we need to build GNU bash 4.x
242 printf " ---> compiling missing GNU bash.. "
244 $FETCHCMD bash-
${bashver}.
tar.gz
$mirror/bash-
${bashver}.
tar.gz
245 if [ $?
-ne 0 ]; then
246 printf "ERROR: failed to download make from $mirror\n"
252 tar xzf ..
/dl
/bash-
${bashver}.
tar.gz
254 .
/configure
--prefix=$topdir/host_
$gnu_host_name/
264 # skip the script if distclean / cleandir
265 if [ "$target" = "distclean" -o "$target" = "cleandir" ]; then
267 $makebin ADK_TOPDIR
=$topdir -s -f Makefile.adk
$flags $target
271 printf " ---> checking if strings is installed.. "
272 if ! which strings >/dev
/null
2>&1; then
273 echo You must
install strings to
continue.
280 printf " ---> checking if perl is installed.. "
281 if ! which perl
>/dev
/null
2>&1; then
282 echo You must
install perl to
continue.
289 printf " ---> checking if gzip is installed.. "
290 if ! which gzip >/dev
/null
2>&1; then
291 echo You must
install gzip to
continue.
298 printf " ---> checking if git is installed.. "
299 if ! which git
>/dev
/null
2>&1; then
300 echo You must
install git to
continue.
307 printf " ---> checking if ncurses is installed.. "
308 check_lxdialog
=${topdir}/adk
/config
/lxdialog
/check-lxdialog.sh
309 CURSES_CFLAGS
=$
(/bin
/sh
${check_lxdialog} -ccflags |
tr '\n' ' ')
310 CURSES_LIBS
=$
(/bin
/sh
${check_lxdialog} -ldflags ${CC})
311 if [ $?
-eq 0 ]; then
319 echo "ADK_TOPDIR:=$(readlink -nf . 2>/dev/null || pwd -P)" > $topdir/prereq.mk
320 echo "BASH:=$(which bash)" >> $topdir/prereq.mk
321 echo "SHELL:=$(which bash)" >> $topdir/prereq.mk
322 echo "GMAKE:=$MAKE" >> $topdir/prereq.mk
323 echo "MAKE:=$MAKE" >> $topdir/prereq.mk
324 echo "FETCHCMD:=$FETCHCMD" >> $topdir/prereq.mk
325 echo "SHA256:=$SHA256" >> $topdir/prereq.mk
326 echo "GNU_HOST_NAME:=${gnu_host_name}" >> $topdir/prereq.mk
327 echo "OS_FOR_BUILD:=${os}" >> $topdir/prereq.mk
328 echo "ARCH_FOR_BUILD:=$(${CC} -dumpmachine | sed \
329 -e 's/x86_64-linux-gnux32/x32/' \
331 -e 's/sparc.*/sparc/' \
332 -e 's/armeb.*/armeb/g' \
334 -e 's/m68k.*/m68k/' \
336 -e 's/mips-.*/mips/' \
337 -e 's/mipsel-.*/mipsel/' \
338 -e 's/i[3-9]86/x86/' \
340 echo "CURSES_LIBS:=${CURSES_LIBS}" >> $topdir/prereq.mk
341 echo "CURSES_CFLAGS:=${CURSES_CFLAGS}" >> $topdir/prereq.mk
343 if [ "$CC" = "clang" ]; then
344 echo "HOST_CC:=${CC} -fbracket-depth=1024" >> $topdir/prereq.mk
346 echo "HOST_CC:=${CC}" >> $topdir/prereq.mk
348 if [ "$CXX" = "clang++" ]; then
349 echo "HOST_CXX:=${CXX} -fbracket-depth=1024" >> $topdir/prereq.mk
351 echo "HOST_CXX:=${CXX}" >> $topdir/prereq.mk
354 echo "HOST_CFLAGS:=-O0 -g0 -fcommon" >> $topdir/prereq.mk
355 echo "HOST_CXXFLAGS:=-O0 -g0 -fcommon" >> $topdir/prereq.mk
356 echo 'LANGUAGE:=C' >> $topdir/prereq.mk
357 echo 'LC_ALL:=C' >> $topdir/prereq.mk
358 echo "_PATH:=$PATH" >> $topdir/prereq.mk
359 echo "PATH:=${topdir}/scripts:/usr/sbin:$PATH" >> $topdir/prereq.mk
360 echo "GIT:=$(which git 2>/dev/null)" >> $topdir/prereq.mk
361 echo "export ADK_TOPDIR GIT SHA256 BASH SHELL" >> $topdir/prereq.mk
363 # create temporary Makefile
364 cat >Makefile.tmp
<<'EOF'
365 include ${ADK_TOPDIR}/prereq.mk
369 @${HOST_CC} ${HOST_CFLAGS} -o $@ $^ ${LDADD}
372 # check if compiler works
383 printf " ---> checking if compiler is working.. "
384 $MAKE --no-print-directory ADK_TOPDIR
=$topdir -f Makefile.tmp
>/dev
/null
2>&1
385 X
=$
(.
/test 2>/dev
/null
)
386 if [ X
$X != XYES
]; then
387 echo Cannot compile a simple
test programme.
388 echo You must
install a
host make and C compiler.
394 rm test.c
test 2>/dev
/null
396 printf " ---> checking if zlib is installed.. "
403 #define STDIN_FILENO 0
413 zstdin = gzdopen(STDIN_FILENO, "rb");
414 i = gzread(zstdin, buf, sizeof (buf));
415 if ((i > 0) && (i < sizeof (buf)))
417 buf[sizeof (buf) - 1] = '\0';
423 $MAKE --no-print-directory LDADD
=-lz ADK_TOPDIR
=$topdir -f Makefile.tmp
>/dev
/null
2>&1
424 X
=$
(echo YES |
gzip | .
/test 2>/dev
/null
)
425 if [ X
$X != XYES
]; then
426 echo Cannot compile a libz
test program.
427 echo You must
install the zlib development package
,
428 echo usually called libz-dev
, and the run-time library.
435 rm test.c
test 2>/dev
/null
436 rm Makefile.tmp
2>/dev
/null
438 # error out on any required prerequisite
439 if [ $out -ne 0 ]; then
443 printf " ---> checking if bc is installed.. "
445 if which bc >/dev
/null
2>&1; then
446 if ! echo quit|
bc -q 2>/dev
/null
>/dev
/null
; then
447 printf "not usable\n"
450 if bc -v 2>&1|
grep -q BSD
>/dev
/null
2>&1; then
452 printf "not usable\n"
461 printf " ---> checking if bison is installed.. "
463 if ! which bison
>/dev
/null
2>&1; then
470 printf " ---> checking if bzip2 is installed.. "
472 if ! which bzip2 >/dev
/null
2>&1; then
479 printf " ---> checking if file is installed.. "
481 if ! which file >/dev
/null
2>&1; then
488 printf " ---> checking if flex is installed.. "
490 if ! which flex
>/dev
/null
2>&1; then
498 if ! which m4 >/dev
/null
2>&1; then
503 if ! which mkimage
>/dev
/null
2>&1; then
507 printf " ---> checking if mksh is installed.. "
509 if ! which mksh
>/dev
/null
2>&1; then
516 printf " ---> checking if patch is installed.. "
518 if ! which patch >/dev
/null
2>&1; then
525 printf " ---> checking if rsync is installed.. "
527 if ! which rsync
>/dev
/null
2>&1; then
535 if which tar >/dev
/null
2>&1; then
536 if ! tar --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
543 printf " ---> checking if xargs is installed.. "
544 host_build_findutils
=0
545 if which xargs >/dev
/null
2>&1; then
546 if ! xargs --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
547 printf "found but not usable\n"
548 host_build_findutils
=1
554 host_build_findutils
=1
557 printf " ---> checking if find is installed.. "
558 if which find >/dev
/null
2>&1; then
559 if ! find --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
560 printf "found but not usable\n"
561 host_build_findutils
=1
567 host_build_findutils
=1
570 printf " ---> checking if grep is installed.. "
572 if which grep >/dev
/null
2>&1; then
573 if ! grep --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
574 printf "found but not usable\n"
584 printf " ---> checking if gawk is installed.. "
586 if ! which gawk
>/dev
/null
2>&1; then
593 printf " ---> checking if sed is installed.. "
595 if which sed >/dev
/null
2>&1; then
596 if ! sed --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
597 printf "found but not usable\n"
607 printf " ---> checking if cpio is installed.. "
609 if which cpio >/dev
/null
2>&1; then
610 if ! cpio --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
611 printf "found but not usable\n"
621 printf " ---> checking if xz is installed.. "
623 if ! which xz
>/dev
/null
2>&1; then
631 host_build_cdrtools
=0
632 if ! which mkisofs
>/dev
/null
2>&1; then
633 host_build_cdrtools
=1
636 host_build_genext2fs
=0
637 if ! which genext2fs
>/dev
/null
2>&1; then
638 host_build_genext2fs
=1
642 if ! which lzma
>/dev
/null
2>&1; then
647 if ! which zstd
>/dev
/null
2>&1; then
652 if ! which lz4c
>/dev
/null
2>&1; then
657 if ! which lzop
>/dev
/null
2>&1; then
662 if ! which qemu-img
>/dev
/null
2>&1; then
666 host_build_coreutils
=0
667 if which tr >/dev
/null
2>&1; then
668 if ! tr --version 2>/dev
/null|
grep GNU
>/dev
/null
;then
669 host_build_coreutils
=1
673 echo "config ADK_HOST_BUILD_TOOLS" > $topdir/target
/config
/Config.
in.prereq
674 printf "\t%s\n" "bool" >> $topdir/target
/config
/Config.
in.prereq
675 printf "\t%s\n" "default y" >> $topdir/target
/config
/Config.
in.prereq
677 if [ $host_build_bc -eq 1 ]; then
678 printf "\t%s\n" "select ADK_HOST_BUILD_BC" >> $topdir/target
/config
/Config.
in.prereq
680 if [ $host_build_bison -eq 1 ]; then
681 printf "\t%s\n" "select ADK_HOST_BUILD_BISON" >> $topdir/target
/config
/Config.
in.prereq
683 if [ $host_build_bzip2 -eq 1 ]; then
684 printf "\t%s\n" "select ADK_HOST_BUILD_BZIP2" >> $topdir/target
/config
/Config.
in.prereq
686 if [ $host_build_file -eq 1 ]; then
687 printf "\t%s\n" "select ADK_HOST_BUILD_FILE" >> $topdir/target
/config
/Config.
in.prereq
689 if [ $host_build_flex -eq 1 ]; then
690 printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target
/config
/Config.
in.prereq
692 if [ $host_build_gawk -eq 1 ]; then
693 printf "\t%s\n" "select ADK_HOST_BUILD_GAWK" >> $topdir/target
/config
/Config.
in.prereq
695 if [ $host_build_grep -eq 1 ]; then
696 printf "\t%s\n" "select ADK_HOST_BUILD_GREP" >> $topdir/target
/config
/Config.
in.prereq
698 if [ $host_build_m4 -eq 1 ]; then
699 printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target
/config
/Config.
in.prereq
701 if [ $host_build_mkimage -eq 1 ]; then
702 printf "\t%s\n" "select ADK_HOST_NEED_U_BOOT" >> $topdir/target
/config
/Config.
in.prereq
704 if [ $host_build_mksh -eq 1 ]; then
705 printf "\t%s\n" "select ADK_HOST_BUILD_MKSH" >> $topdir/target
/config
/Config.
in.prereq
707 if [ $host_build_patch -eq 1 ]; then
708 printf "\t%s\n" "select ADK_HOST_BUILD_PATCH" >> $topdir/target
/config
/Config.
in.prereq
710 if [ $host_build_rsync -eq 1 ]; then
711 printf "\t%s\n" "select ADK_HOST_BUILD_RSYNC" >> $topdir/target
/config
/Config.
in.prereq
713 if [ $host_build_findutils -eq 1 ]; then
714 printf "\t%s\n" "select ADK_HOST_BUILD_FINDUTILS" >> $topdir/target
/config
/Config.
in.prereq
716 if [ $host_build_sed -eq 1 ]; then
717 printf "\t%s\n" "select ADK_HOST_BUILD_SED" >> $topdir/target
/config
/Config.
in.prereq
719 if [ $host_build_tar -eq 1 ]; then
720 printf "\t%s\n" "select ADK_HOST_BUILD_TAR" >> $topdir/target
/config
/Config.
in.prereq
722 if [ $host_build_coreutils -eq 1 ]; then
723 printf "\t%s\n" "select ADK_HOST_BUILD_COREUTILS" >> $topdir/target
/config
/Config.
in.prereq
725 if [ $host_build_cpio -eq 1 ]; then
726 printf "\t%s\n" "select ADK_HOST_BUILD_CPIO" >> $topdir/target
/config
/Config.
in.prereq
728 if [ $host_build_xz -eq 1 ]; then
729 printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target
/config
/Config.
in.prereq
732 if [ $host_build_cdrtools -eq 1 ]; then
733 printf "\t%s\n" "select ADK_HOST_BUILD_CDRTOOLS if ADK_HOST_NEED_CDRTOOLS" >> $topdir/target
/config
/Config.
in.prereq
735 if [ $host_build_genext2fs -eq 1 ]; then
736 printf "\t%s\n" "select ADK_HOST_BUILD_GENEXT2FS if ADK_HOST_NEED_GENEXT2FS" >> $topdir/target
/config
/Config.
in.prereq
738 if [ $host_build_lzma -eq 1 ]; then
739 printf "\t%s\n" "select ADK_HOST_BUILD_LZMA if ADK_HOST_NEED_LZMA" >> $topdir/target
/config
/Config.
in.prereq
741 if [ $host_build_zstd -eq 1 ]; then
742 printf "\t%s\n" "select ADK_HOST_BUILD_ZSTD if ADK_HOST_NEED_ZSTD" >> $topdir/target
/config
/Config.
in.prereq
744 if [ $host_build_lz4 -eq 1 ]; then
745 printf "\t%s\n" "select ADK_HOST_BUILD_LZ4 if ADK_HOST_NEED_LZ4" >> $topdir/target
/config
/Config.
in.prereq
747 if [ $host_build_lzop -eq 1 ]; then
748 printf "\t%s\n" "select ADK_HOST_BUILD_LZOP if ADK_HOST_NEED_LZOP" >> $topdir/target
/config
/Config.
in.prereq
750 if [ $host_build_qemu -eq 1 ]; then
751 printf "\t%s\n" "select ADK_HOST_BUILD_QEMU if ADK_HOST_NEED_QEMU" >> $topdir/target
/config
/Config.
in.prereq
754 # create Host OS symbols
757 printf "\nconfig ADK_HOST_LINUX\n" >> $topdir/target
/config
/Config.
in.prereq
758 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
759 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
762 printf "\nconfig ADK_HOST_DARWIN\n" >> $topdir/target
/config
/Config.
in.prereq
763 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
764 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
767 printf "\nconfig ADK_HOST_OPENBSD\n" >> $topdir/target
/config
/Config.
in.prereq
768 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
769 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
772 printf "\nconfig ADK_HOST_FREEBSD\n" >> $topdir/target
/config
/Config.
in.prereq
773 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
774 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
777 printf "\nconfig ADK_HOST_NETBSD\n" >> $topdir/target
/config
/Config.
in.prereq
778 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
779 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
782 printf "\nconfig ADK_HOST_MIRBSD\n" >> $topdir/target
/config
/Config.
in.prereq
783 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
784 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
787 printf "\nconfig ADK_HOST_CYGWIN\n" >> $topdir/target
/config
/Config.
in.prereq
788 printf "\tbool\n" >> $topdir/target
/config
/Config.
in.prereq
789 printf "\tdefault y\n" >> $topdir/target
/config
/Config.
in.prereq
793 if [ "$target" = "defconfig" ]; then
794 $makebin ADK_TOPDIR
=$topdir --no-print-directory -f Makefile.adk
$flags $target
798 if [ ! -f $topdir/.config
]; then
799 # create a config if no exist
801 $makebin ADK_TOPDIR
=$topdir --no-print-directory -f Makefile.adk menuconfig
803 # scan host-tool prerequisites of certain packages before building.
806 if [ -n "$ADK_PACKAGE_FIREFOX" ]; then
807 NEED_RUST
="$NEED_RUST firefox"
809 if [ -n "$ADK_PACKAGE_FIREFOX" ]; then
810 NEED_CARGO
="$NEED_CARGO firefox"
812 if [ -n "$ADK_PACKAGE_FIREFOX" ]; then
813 NEED_CLANG
="$NEED_CLANG firefox"
815 if [ -n "$ADK_PACKAGE_FIREFOX" ]; then
816 NEED_CBINDGEN
="$NEED_CBINDGEN firefox"
818 if [ -n "$ADK_PACKAGE_KODI" ]; then
819 NEED_JAVA
="$NEED_JAVA kodi"
822 if [ -n "$ADK_PACKAGE_ICU4C" ]; then
823 NEED_STATIC_LIBSTDCXX
="$NEED_STATIC_LIBSTDCXX icu4c"
826 if [ -n "$ADK_PACKAGE_XKEYBOARD_CONFIG" ]; then
827 NEED_XKBCOMP
="$NEED_XKBCOMP xkeyboard-config"
830 if [ -n "$ADK_PACKAGE_FONT_BH_100DPI" ]; then
831 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-100dpi"
834 if [ -n "$ADK_PACKAGE_FONT_BH_75DPI" ]; then
835 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-75dpi"
838 if [ -n "$ADK_PACKAGE_FONT_BH_TYPE1" ]; then
839 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-type1"
842 if [ -n "$ADK_PACKAGE_FONT_BH_TTF" ]; then
843 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-ttf"
846 if [ -n "$ADK_PACKAGE_FONT_BH_LUCIDATYPEWRITER_100DPI" ]; then
847 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-lucidatypewriter-100dpi"
850 if [ -n "$ADK_PACKAGE_FONT_BH_LUCIDATYPEWRITER_75DPI" ]; then
851 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bh-lucidatypewriter-75dpi"
854 if [ -n "$ADK_PACKAGE_FONT_BITSTREAM_100DPI" ]; then
855 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bitstream-100dpi"
858 if [ -n "$ADK_PACKAGE_FONT_BITSTREAM_75DPI" ]; then
859 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bitstream-75dpi"
862 if [ -n "$ADK_PACKAGE_FONT_BITSTREAM_TYPE1" ]; then
863 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-bitstream-type1"
866 if [ -n "$ADK_PACKAGE_FONT_ADOBE_100DPI" ]; then
867 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-adobe-100dpi"
870 if [ -n "$ADK_PACKAGE_FONT_ADOBE_75DPI" ]; then
871 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-adobe-75dpi"
874 if [ -n "$ADK_PACKAGE_FONT_XFREE86_TYPE1" ]; then
875 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-xfree86-type1"
878 if [ -n "$ADK_PACKAGE_FONT_MISC_MISC" ]; then
879 NEED_MKFONTDIR
="$NEED_MKFONTDIR font-misc-misc"
882 if [ -n "$ADK_PACKAGE_LIBERATION_FONTS_TTF" ]; then
883 NEED_MKFONTSCALE
="$NEED_MKFONTSCALE liberation-fonts-ttf"
886 if [ -n "$NEED_MKFONTDIR" ]; then
887 if ! which mkfontdir
>/dev
/null
2>&1; then
888 printf "You need mkfontdir to build $NEED_MKFONTDIR \n"
893 if [ -n "$NEED_MKFONTSCALE" ]; then
894 if ! which mkfontscale
>/dev
/null
2>&1; then
895 printf "You need mkfontscale to build $NEED_MKFONTSCALE \n"
900 if [ -n "$NEED_XKBCOMP" ]; then
901 if ! which xkbcomp
>/dev
/null
2>&1; then
902 printf "You need xkbcomp to build $NEED_XKBCOMP \n"
907 if [ -n "$NEED_JAVA" ]; then
908 if ! which java
>/dev
/null
2>&1; then
909 printf "You need java to build $NEED_JAVA \n"
914 if [ -n "$NEED_RUST" ]; then
915 if ! which rustc
>/dev
/null
2>&1; then
916 printf "You need rustc to build $NEED_RUST \n"
921 if [ -n "$NEED_CARGO" ]; then
922 if ! which cargo
>/dev
/null
2>&1; then
923 printf "You need cargo to build $NEED_CARGO \n"
928 if [ -n "$NEED_CLANG" ]; then
929 if ! which clang-13
>/dev
/null
2>&1; then
930 printf "You need clang-13 to build $NEED_CLANG \n"
935 if [ -n "$NEED_CBINDGEN" ]; then
936 if ! which cbindgen
>/dev
/null
2>&1; then
937 printf "You need cbindgen to build $NEED_CBINDGEN \n"
942 if [ -n "$NEED_STATIC_LIBSTDCXX" ]; then
951 if ! $CXX -static-libstdc++ -o test test.c
2>/dev
/null
; then
952 printf "You need static version of libstdc++ installed to build $NEED_STATIC_LIBSTDCXX \n"
954 rm test test.c
2>/dev
/null
959 if [ $out -ne 0 ]; then
964 $makebin ADK_TOPDIR
=$topdir --no-print-directory -f Makefile.adk
$flags $target