Skip to content

Commit c947b7a

Browse files
authored
Add Debian Rodete support. (flutter#122)
On Rodete, /sbin/init is a symlink, and testing the contents of an arbitrary binary is probably not the way we want to go anyhow. uname -m is already used, and so should be supported on all platforms we run on, so I switched it to that. In addition, libpng needs to be a newer version on Rodete. Fixes flutter/flutter flutter#14140.
1 parent 5d3059b commit c947b7a

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

build/install-build-deps-android.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ else
5656
sudo apt-get -y install libncurses5:i386 libstdc++6:i386 zlib1g:i386
5757
fi
5858

59-
if [[ $lsb_release == "xenial" ]]; then
59+
if [[ $lsb_release == "xenial" || $lsb_release == "rodete" ]]; then
6060
sudo apt-get -y install openjdk-8-jre openjdk-8-jdk
6161
sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
6262
sudo apt-get -y install ant

build/install-build-deps.sh

+13-9
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ fi
6666
distro=$(lsb_release --id --short)
6767
codename=$(lsb_release --codename --short)
6868
ubuntu_codenames="(precise|trusty|utopic|vivid|xenial)"
69-
debian_codenames="(stretch)"
69+
debian_codenames="(stretch|rodete)"
7070
if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then
7171
if [[ ! $codename =~ $ubuntu_codenames && ! $codename =~ $debian_codenames ]]; then
7272
echo "ERROR: Only Ubuntu 12.04 (precise), 14.04 (trusty), " \
73-
"14.10 (utopic), 15.04 (vivid), and 16.04 (xenial), " \
74-
"and Debian Testing (stretch) are currently supported" >&2
73+
"14.10 (utopic), 15.04 (vivid), and 16.04 (xenial), Debian " \
74+
"(rodete and stretch) are currently supported" >&2
7575
exit 1
7676
fi
7777

@@ -105,10 +105,9 @@ dev_list="bison cdbs curl dpkg-dev elfutils devscripts fakeroot
105105
lib_list="libatk1.0-0 libc6 libasound2 libcairo2 libcap2 libcups2 libexpat1
106106
libexif12 libfontconfig1 libfreetype6 libglib2.0-0 libgnome-keyring0
107107
libgtk2.0-0 libpam0g libpango1.0-0 libpci3 libpcre3 libpixman-1-0
108-
libpng12-0 libspeechd2 libstdc++6 libsqlite3-0 libx11-6
109-
libxau6 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6
110-
libxext6 libxfixes3 libxi6 libxinerama1 libxrandr2 libxrender1
111-
libxtst6 zlib1g"
108+
libspeechd2 libstdc++6 libsqlite3-0 libx11-6 libxau6 libxcb1
109+
libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3
110+
libxi6 libxinerama1 libxrandr2 libxrender1 libxtst6 zlib1g"
112111

113112
# Debugging symbols for all of the run-time libraries
114113
dbg_list="libatk1.0-dbg libc6-dbg libcairo2-dbg libfontconfig1-dbg
@@ -148,7 +147,7 @@ if [ "x$codename" = "xtrusty" ]; then
148147
fi
149148

150149
# Find the proper version of libgbm-dev. We can't just install libgbm-dev as
151-
# it depends on mesa, and only one version of mesa can exists on the system.
150+
# it depends on mesa, and only one version of mesa can exist on the system.
152151
# Hence we must match the same version or this entire script will fail.
153152
mesa_variant=""
154153
for variant in "-lts-trusty" "-lts-utopic"; do
@@ -185,6 +184,11 @@ else
185184
dev_list="${dev_list} libbrlapi0.5"
186185
fi
187186

187+
if package_exists libpng16-16; then
188+
lib_list="$lib_list libpng16-16"
189+
else
190+
lib_list="$lib_list libpng12-0"
191+
fi
188192

189193
# Some packages are only needed if the distribution actually supports
190194
# installing them.
@@ -195,7 +199,7 @@ fi
195199
# When cross building for arm/Android on 64-bit systems the host binaries
196200
# that are part of v8 need to be compiled with -m32 which means
197201
# that basic multilib support is needed.
198-
if file /sbin/init | grep -q 'ELF 64-bit'; then
202+
if [[ "$(uname -m)" == "x86_64" ]]; then
199203
# gcc-multilib conflicts with the arm cross compiler (at least in trusty) but
200204
# g++-X.Y-multilib gives us the 32-bit support that we need. Find out the
201205
# appropriate value of X and Y by seeing what version the current

0 commit comments

Comments
 (0)