diff options
author | gregsimon@chromium.org <gregsimon@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-26 21:47:07 +0000 |
---|---|---|
committer | gregsimon@chromium.org <gregsimon@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-26 21:47:07 +0000 |
commit | 457088f21bb0d09545f031ee2bc5416042863a71 (patch) | |
tree | c5e7f18974e17773fed02a629e3de49273437874 /build | |
parent | 4146080729cdc9a84c2dd54540e34e8e8e15533d (diff) | |
download | chromium_src-457088f21bb0d09545f031ee2bc5416042863a71.zip chromium_src-457088f21bb0d09545f031ee2bc5416042863a71.tar.gz chromium_src-457088f21bb0d09545f031ee2bc5416042863a71.tar.bz2 |
Fix android build deps to work on ubuntu 12.04+
BUG=
Review URL: https://chromiumcodereview.appspot.com/10963014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/install-build-deps-android.sh | 80 |
1 files changed, 54 insertions, 26 deletions
diff --git a/build/install-build-deps-android.sh b/build/install-build-deps-android.sh index 5d90439..0a90d3b 100755 --- a/build/install-build-deps-android.sh +++ b/build/install-build-deps-android.sh @@ -39,34 +39,62 @@ sudo apt-get update sudo apt-get -f install # Install deps -sudo apt-get -y install python-pexpect ant1.8 xvfb x11-utils - -# Install sun-java6 stuff -sudo apt-get -y install sun-java6-bin sun-java6-jre sun-java6-jdk - -# Switch version of Java to java-6-sun -# Sun's java is missing certain Java plugins (e.g. for firefox, mozilla). These -# are not required to build, and thus are treated only as warnings. Any errors -# in updating java alternatives which are not '*-javaplugin.so' will cause -# errors and stop the script from completing successfully. -if ! sudo update-java-alternatives -s java-6-sun \ - >& "${TEMPDIR}"/update-java-alternatives.out -then - # Check that there are the expected javaplugin.so errors for the update - if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& /dev/null - then - # Print as warnings all the javaplugin.so errors - echo 'WARNING: java-6-sun has no alternatives for the following plugins:' - grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out +# This step differs depending on what Ubuntu release we are running +# on since the package names are different, and Sun's Java must +# be installed manually on late-model versions. + +# common +sudo apt-get -y install python-pexpect xvfb x11-utils + +if /usr/bin/lsb_release -r -s | grep -q "12."; then + # Ubuntu 12.x + sudo apt-get -y install ant + + # Java can not be installed via ppa on Ubuntu 12.04+ so we'll + # simply check to see if it has been setup properly -- if not + # let the user know. + + if ! java -version 2>&1 | grep -q "Java(TM)"; then + echo "****************************************************************" + echo "You need to install the Oracle Java SDK from http://goo.gl/uPRSq" + echo "and configure it as the default command-line Java environment." + echo "****************************************************************" + exit fi - # Check if there are any errors that are not javaplugin.so - if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \ - >& /dev/null + +else + # Ubuntu 10.x + + sudo apt-get -y install ant1.8 + + # Install sun-java6 stuff + sudo apt-get -y install sun-java6-bin sun-java6-jre sun-java6-jdk + + # Switch version of Java to java-6-sun + # Sun's java is missing certain Java plugins (e.g. for firefox, mozilla). + # These are not required to build, and thus are treated only as warnings. + # Any errors in updating java alternatives which are not '*-javaplugin.so' + # will cause errors and stop the script from completing successfully. + if ! sudo update-java-alternatives -s java-6-sun \ + >& "${TEMPDIR}"/update-java-alternatives.out then - # If there are non-javaplugin.so errors, treat as errors and exit - echo 'ERRORS: Failed to update alternatives for java-6-sun:' - grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out - exit 1 + # Check that there are the expected javaplugin.so errors for the update + if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& \ + /dev/null + then + # Print as warnings all the javaplugin.so errors + echo 'WARNING: java-6-sun has no alternatives for the following plugins:' + grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out + fi + # Check if there are any errors that are not javaplugin.so + if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \ + >& /dev/null + then + # If there are non-javaplugin.so errors, treat as errors and exit + echo 'ERRORS: Failed to update alternatives for java-6-sun:' + grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out + exit 1 + fi fi fi |