diff options
author | Jason Zaman <perfinion@gentoo.org> | 2018-07-20 14:33:04 +0800 |
---|---|---|
committer | Jason Zaman <perfinion@gentoo.org> | 2018-07-20 14:40:26 +0800 |
commit | 50b76a4c5cbb02f0cb677e9be122597cbdd22d76 (patch) | |
tree | b4dfcfe8d181a319a7df19531cf5c5c4b34bb975 /dev-util/android-studio | |
parent | x11-plugins/wmamixer: 1.0 bump (diff) | |
download | gentoo-50b76a4c5cbb02f0cb677e9be122597cbdd22d76.tar.gz gentoo-50b76a4c5cbb02f0cb677e9be122597cbdd22d76.tar.bz2 gentoo-50b76a4c5cbb02f0cb677e9be122597cbdd22d76.zip |
dev-util/android-studio: keep jre symlink but use JAVA_HOME first
Closes: https://bugs.gentoo.org/660404
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'dev-util/android-studio')
-rw-r--r-- | dev-util/android-studio/android-studio-3.1.3.0.173.4819257-r1.ebuild (renamed from dev-util/android-studio/android-studio-3.1.3.0.173.4819257.ebuild) | 6 | ||||
-rw-r--r-- | dev-util/android-studio/files/0001-use-java-home-before-bundled.patch | 39 |
2 files changed, 44 insertions, 1 deletions
diff --git a/dev-util/android-studio/android-studio-3.1.3.0.173.4819257.ebuild b/dev-util/android-studio/android-studio-3.1.3.0.173.4819257-r1.ebuild index 1ac8561ea03c..2659a27fd7b7 100644 --- a/dev-util/android-studio/android-studio-3.1.3.0.173.4819257.ebuild +++ b/dev-util/android-studio/android-studio-3.1.3.0.173.4819257-r1.ebuild @@ -62,11 +62,14 @@ RDEPEND=">=virtual/jdk-1.7 >=x11-libs/libxcb-1.9.1 >=x11-libs/libxshmfence-1.1" S=${WORKDIR}/${PN} +PATCHES=( "${FILESDIR}/0001-use-java-home-before-bundled.patch" ) src_prepare() { + eapply "${PATCHES[@]}" eapply_user + # This is really a bundled jdk not a jre - rm -R "${S}/jre" || die "Could not remove bundled jdk" + rm -rf "${S}/jre" || die "Could not remove bundled jdk" # Replace bundled jars with system # has problems with newer jdom:0 not updated to jdom:2 @@ -98,6 +101,7 @@ src_install() { doins -r * rm -rf "${D}${dir}/jre" || die + dosym "../../etc/java-config-2/current-system-vm" "${dir}/jre" fperms 755 "${dir}/bin/studio.sh" "${dir}"/bin/fsnotifier{,64} chmod 755 "${D}${dir}"/gradle/gradle-*/bin/gradle || die diff --git a/dev-util/android-studio/files/0001-use-java-home-before-bundled.patch b/dev-util/android-studio/files/0001-use-java-home-before-bundled.patch new file mode 100644 index 000000000000..6f97c7d3f925 --- /dev/null +++ b/dev-util/android-studio/files/0001-use-java-home-before-bundled.patch @@ -0,0 +1,39 @@ +Use JAVA_HOME before bundled jre + +Must keep bundled jre symlink around in case "Use Embedded JDK" is selected + +https://bugs.gentoo.org/613868 +https://bugs.gentoo.org/660404 + +--- android-studio/bin/studio.sh 2018-07-20 13:43:12.339049033 +0800 ++++ android-studio/bin/studio.sh 2018-07-20 13:43:38.494932028 +0800 +@@ -73,6 +73,14 @@ + fi + fi + ++if [ -z "$JDK" -a -n "$JDK_HOME" -a -x "$JDK_HOME/bin/java" ]; then ++ JDK="$JDK_HOME" ++fi ++ ++if [ -z "$JDK" -a -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then ++ JDK="$JAVA_HOME" ++fi ++ + if [ -z "$JDK" -a "$OS_TYPE" = "Linux" ] ; then + BUNDLED_JRE="$IDE_HOME/jre64" + if [ ! -d "$BUNDLED_JRE" ]; then +@@ -83,14 +91,6 @@ + fi + fi + +-if [ -z "$JDK" -a -n "$JDK_HOME" -a -x "$JDK_HOME/bin/java" ]; then +- JDK="$JDK_HOME" +-fi +- +-if [ -z "$JDK" -a -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then +- JDK="$JAVA_HOME" +-fi +- + if [ -z "$JDK" ]; then + JDK_PATH=`which java` + |