Blame view

cfg-android 3.27 KB
c100d13a   Mario Lang   Imported Upstream...
1
2
3
4
5
#!/bin/sh
###############################################################################
# BRLTTY - A background process providing access to the console screen (when in
#          text mode) for a blind person using a refreshable braille display.
#
ec859a60   samuel thibault   New upstream vers...
6
# Copyright (C) 1995-2018 by The BRLTTY Developers.
c100d13a   Mario Lang   Imported Upstream...
7
8
9
10
#
# BRLTTY comes with ABSOLUTELY NO WARRANTY.
#
# This is free software, placed under the terms of the
ec859a60   samuel thibault   New upstream vers...
11
12
13
# GNU Lesser General Public License, as published by the Free Software
# Foundation; either version 2.1 of the License, or (at your option) any
# later version. Please see the file LICENSE-LGPL for details.
c100d13a   Mario Lang   Imported Upstream...
14
#
ca6019f1   Mario Lang   Imported Upstream...
15
# Web Page: http://brltty.com/
c100d13a   Mario Lang   Imported Upstream...
16
17
18
19
#
# This software is maintained by Dave Mielke <dave@mielke.cc>.
###############################################################################

90c515c4   Mario Lang   Imported Upstream...
20
21
. "`dirname "${0}"`/prologue.sh"

c100d13a   Mario Lang   Imported Upstream...
22
23
24
androidPlatform=android-14
androidArchitecture=arm
hostSystem=arm-linux-androideabi
d8488191   samuel thibault   Imported Upstream...
25

90c515c4   Mario Lang   Imported Upstream...
26
27
buildRoot="${initialDirectory}"
sourceRoot="${programDirectory}"
c100d13a   Mario Lang   Imported Upstream...
28

6998b45d   Mario Lang   Imported Upstream...
29
ndkRoot="${buildRoot}/Android/NDK"
d8488191   samuel thibault   Imported Upstream...
30

6998b45d   Mario Lang   Imported Upstream...
31
32
33
34
[ -d "${ndkRoot}" ] || {
   [ -n "${ANDROID_NDK}" ] || {
      semanticError "Android NDK directory not defined: ${ndkRoot}"
   }
c100d13a   Mario Lang   Imported Upstream...
35

6998b45d   Mario Lang   Imported Upstream...
36
37
38
39
40
41
42
43
44
   [  -f "${ANDROID_NDK}/ndk-build" ] || {
      semanticError "not an Android NDK: ${ANDROID_NDK}"
   }

   programMessage "creating symbolic link: ${ndkRoot} -> ${ANDROID_NDK}"
   ln -s "${ANDROID_NDK}" "${ndkRoot}" || exit "${?}"
}

toolchainRoot="${buildRoot}/Android/ToolChain"
c100d13a   Mario Lang   Imported Upstream...
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[ -d "${toolchainRoot}" ] || {
   "${ndkRoot}/build/tools/make-standalone-toolchain.sh" \
      --platform="${androidPlatform}" \
      --arch="${androidArchitecture}" \
      --install-dir="${toolchainRoot}" || exit "${?}"

   buildInclude="/usr/include"
   hostInclude="${toolchainRoot}/sysroot${buildInclude}"

   for header in bluetooth
   do
      hostHeader="${hostInclude}/${header}"
      [ ! -e "${hostHeader}" ] || continue;

      buildHeader="${buildInclude}/${header}"
      [ -e "${buildHeader}" ] || continue;

      ln -s "${buildHeader}" "${hostHeader}" || exit "${?}"
   done
}

export toolchainBinaries="${toolchainRoot}/bin"
6998b45d   Mario Lang   Imported Upstream...
67
68
69
70
71
72
73
export PATH="${PATH}:${toolchainBinaries}"

checkTool() {
   eval export "${1}=\`set -- \"${toolchainBinaries}/\"*\"-$2\" && echo \"\${1}\"\`"
}
checkTool CC gcc

c100d13a   Mario Lang   Imported Upstream...
74
75
76
77
export CFLAGS="-mthumb"
export LDFLAGS="-Wl,--fix-cortex-a8"

# Braille drivers already disabled:
c100d13a   Mario Lang   Imported Upstream...
78
79
80
81
# lb (by --without-libbraille)
# xw (by --disable-x)

"${sourceRoot}/configure" \
c100d13a   Mario Lang   Imported Upstream...
82
   --disable-gpm \
90c515c4   Mario Lang   Imported Upstream...
83
   --disable-icu \
ec859a60   samuel thibault   New upstream vers...
84
   --disable-liblouis \
46c840f8   Mario Lang   Imported Upstream...
85
   --disable-polkit \
90c515c4   Mario Lang   Imported Upstream...
86
87
88
   --disable-x \
   \
   --without-libbraille \
ec859a60   samuel thibault   New upstream vers...
89
   --with-braille-driver=-ba,-bg,-tt,-vr,al,at,bm,bn,ce,eu,fs,hm,ht,hw,ic,ir,md,mm,mt,np,pg,pm,sk,vo \
90c515c4   Mario Lang   Imported Upstream...
90
91
92
93
94
95
96
97
98
99
100
101
   \
   --without-espeak \
   --without-flite \
   --without-mikropuhe \
   --without-speechd \
   --without-swift \
   --without-theta \
   --without-viavoice \
   --with-speech-driver=an,-all \
   \
   --with-screen-driver=an,-all \
   \
ca6019f1   Mario Lang   Imported Upstream...
102
103
104
   --without-bell-package \
   --without-leds-package \
   \
90c515c4   Mario Lang   Imported Upstream...
105
106
107
108
109
110
111
112
113
114
115
   --without-beep-package \
   --without-midi-package \
   --without-fm-package \
   \
   --without-pgmpath-package \
   --without-service-package \
   --without-params-package \
   --without-charset-package \
   --without-hostcmd-package \
   --without-mntpt-package \
   --without-mntfs-package \
d8488191   samuel thibault   Imported Upstream...
116
   \
90c515c4   Mario Lang   Imported Upstream...
117
118
   --without-ports-package \
   \
c100d13a   Mario Lang   Imported Upstream...
119
   --host="${hostSystem}" \
90c515c4   Mario Lang   Imported Upstream...
120
   --quiet \
c100d13a   Mario Lang   Imported Upstream...
121
122
   "${@}"
exit "${?}"