summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam L. Thomson Jr <wlt@o-sinc.com>2016-09-23 19:05:20 -0400
committerJason Zaman <perfinion@gentoo.org>2016-10-04 23:32:29 +0800
commit844ff714334633a5ae03ac348cee75ae78423c3b (patch)
tree312689b302354055433d660e2141e64e05fa4f90 /dev-util/android-studio
parentdev-python/paste: fix patch (diff)
downloadgentoo-844ff714334633a5ae03ac348cee75ae78423c3b.tar.gz
gentoo-844ff714334633a5ae03ac348cee75ae78423c3b.tar.bz2
gentoo-844ff714334633a5ae03ac348cee75ae78423c3b.zip
dev-util/android-studio: Unbundled some stuff, fixed bug
1. Unbundled jdk posing as a jre, replaced with symlink to system vm/jdk 2. Unbundled a few jars for system installed, more can be done, as usually several deps in gentoo are outdated so need to be updated 3. Unbundling jre/jdk fixes bug #594584, otherwise that directory needs to be added to the list of fperms. Using system should be a better approach, and will be updated with security updates, etc. 4. chmod gradle/gradle-*/bin/gradle because fperms does not work with globs. Package-Manager: portage-2.3.1 Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'dev-util/android-studio')
-rw-r--r--dev-util/android-studio/android-studio-2.2.0.12.145.3276617-r1.ebuild (renamed from dev-util/android-studio/android-studio-2.2.0.12.145.3276617.ebuild)39
1 files changed, 36 insertions, 3 deletions
diff --git a/dev-util/android-studio/android-studio-2.2.0.12.145.3276617.ebuild b/dev-util/android-studio/android-studio-2.2.0.12.145.3276617-r1.ebuild
index 857b4d36824c..f2de70746970 100644
--- a/dev-util/android-studio/android-studio-2.2.0.12.145.3276617.ebuild
+++ b/dev-util/android-studio/android-studio-2.2.0.12.145.3276617-r1.ebuild
@@ -3,7 +3,7 @@
# $Id$
EAPI=6
-inherit eutils versionator
+inherit eutils java-pkg-2 versionator
RESTRICT="strip"
QA_PREBUILT="opt/${PN}/bin/libbreakgen*.so opt/${PN}/bin/fsnotifier*"
@@ -24,10 +24,16 @@ SLOT="0"
IUSE="selinux"
KEYWORDS="~amd64 ~x86"
-DEPEND="app-arch/zip"
+DEPEND="app-arch/zip
+ dev-java/commons-logging:0
+ dev-java/log4j:0"
+
+# dev-java/guava:18
RDEPEND=">=virtual/jdk-1.7
selinux? ( sec-policy/selinux-android )
>=app-arch/bzip2-1.0.6-r4
+ dev-java/commons-logging:0
+ dev-java/log4j:0
>=dev-libs/expat-2.1.0-r3
>=dev-libs/libffi-3.0.13-r1
>=media-libs/fontconfig-2.10.92
@@ -49,12 +55,39 @@ RDEPEND=">=virtual/jdk-1.7
>=x11-libs/libxshmfence-1.1"
S=${WORKDIR}/${PN}
+java_prepare() {
+ eapply_user
+ # This is really a bundled jdk not a jre
+ rm -R "${S}/jre" || die "Could not remove bundled jdk"
+
+ # Replace bundled jars with system
+ # has problems with newer jdom:0 not updated to jdom:2
+ cd "${S}/lib"
+ local JARS="commons-logging log4j"
+ local j
+ for j in ${JARS}; do
+ rm -v ${j/:*/}*.jar
+ java-pkg_jar-from ${j}
+ done
+}
+
+src_compile() {
+ :
+}
+
src_install() {
local dir="/opt/${PN}"
insinto "${dir}"
+ # Replaced bundled jre with system vm/jdk
+ # This is really a bundled jdk not a jre
doins -r *
- fperms 755 "${dir}/bin/studio.sh" "${dir}/bin/fsnotifier" "${dir}/bin/fsnotifier64"
+
+ 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
newicon "bin/studio.png" "${PN}.png"
make_wrapper ${PN} ${dir}/bin/studio.sh