Gentoo Archives: gentoo-commits

From: "Jason A. Donenfeld" <zx2c4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/android-studio/files/, dev-util/android-studio/
Date: Mon, 27 Sep 2021 00:13:48
Message-Id: 1632701584.e0f8ffe7bc2c6a664da6df2f1241d2e845e9cb1d.zx2c4@gentoo
1 commit: e0f8ffe7bc2c6a664da6df2f1241d2e845e9cb1d
2 Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 26 23:54:59 2021 +0000
4 Commit: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 27 00:13:04 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0f8ffe7
7
8 dev-util/android-studio: bump to 2020.3.1.24 and simplify
9
10 Gentoo's java is too old to really work as expected, so always use the
11 bundled jre. In the process, simplify quite a bit. Also, this removes
12 the older versions which were much too old to actually use recent SDKs
13 with.
14
15 Package-Manager: Portage-3.0.23, Repoman-3.0.3
16 Signed-off-by: Jason A. Donenfeld <zx2c4 <AT> gentoo.org>
17
18 dev-util/android-studio/Manifest | 6 +-
19 .../android-studio-2020.3.1.24.ebuild | 86 ++++++++++++++
20 .../android-studio-4.0.1.0.193.6626763.ebuild | 129 ---------------------
21 .../android-studio-4.1.0.19.201.6858069.ebuild | 129 ---------------------
22 .../android-studio-4.1.1.0.201.6953283.ebuild | 129 ---------------------
23 .../android-studio-4.1.2.0.201.7042882.ebuild | 129 ---------------------
24 .../android-studio-4.1.3.0.201.7199119.ebuild | 129 ---------------------
25 .../files/0001-use-java-home-before-bundled.patch | 39 -------
26 dev-util/android-studio/metadata.xml | 6 +-
27 9 files changed, 90 insertions(+), 692 deletions(-)
28
29 diff --git a/dev-util/android-studio/Manifest b/dev-util/android-studio/Manifest
30 index 867ddcdab18..1b355a8bab7 100644
31 --- a/dev-util/android-studio/Manifest
32 +++ b/dev-util/android-studio/Manifest
33 @@ -1,5 +1 @@
34 -DIST android-studio-ide-193.6626763-linux.tar.gz 907569312 BLAKE2B 602170eea29e632dd5720ef364510a20056a4d98c61e77d5436a2f624a60e0cfa4e0533174613a74f359d8fdeb4e87489caeb5c34b292fcdc35843a76440a9a3 SHA512 7fba99efccdf3bbbfcbc94625aba3789b1bad0e830b2ac890bd681b9089e6789e87b2dbdc80c6ef3d8db2b2438678a8bb58aefb3c311f61f619042ab1ec9dfac
35 -DIST android-studio-ide-201.6858069-linux.tar.gz 926181537 BLAKE2B ed815f5565ef97ca3f4e1c6cbae3548c70ba94a94a7ae522102044ada31468f241db68ef3d1a1ce6acef60a1bc2e6cd7eba1375a1cebbf01c73063a3d85eb9b2 SHA512 b473e9573e21c666042befa17fde8fc9cb0d6ffd41513d64b74779815079d8971c66afcd1dda5663b503324d14851c4f24a454e5da97e2473550323c09919825
36 -DIST android-studio-ide-201.6953283-linux.tar.gz 926213072 BLAKE2B bdcca29e75348230c37a141423faf27eae75f299ded1abb3aad12605cb5be144c222d15b998ff16203a035311a6a26d8ae4ee28f337098c78377c5df4e7fcf08 SHA512 554d53596280aa96349ed0b3808599cf315c4f1a439ff57cd2368c6a68b57afac620b86d742c2f2ff72d718a62e33f4353202b3bc3671c0fe934cd8d79f74c0c
37 -DIST android-studio-ide-201.7042882-linux.tar.gz 925365363 BLAKE2B 337db94154a44ad95545b1f6ca48d9f95773663607ed2de415ae04ae80ed10670e9906b0bcac539d539455964a41c2af117557c4ec0af58b14fcbd175aa44197 SHA512 c7829df5296172613c8bc01d699c7581d27f7604e182143bc8ba4c8503771b4e290d16c4dd3498f1d5701eb8d54adc7a61b2a0967454d99f5ec2a10d697e5b56
38 -DIST android-studio-ide-201.7199119-linux.tar.gz 925388022 BLAKE2B 64f33e97a0428e332fe6bd9800d3710055a4f2657000cc0d799d6ee05b070fcfca80a8718ec0a5ae5affc05def401e68920d1dd6146c967ff011361dcc4d57c5 SHA512 5757280749f35f149cd776ad7c67e03853a531ca0fc633f2138c18052c09fb9abec6d330bc104f4ab6dd4970cf1dc23e797e14d2b0067ed75208227aadba4403
39 +DIST android-studio-2020.3.1.24-linux.tar.gz 980631631 BLAKE2B 11968ea566b8f03810752ecc1d50068420830fee04df16f579e88bc94e4bd25e7d2c731df608dd27a983e8d0a27b3622d4c73902bde0fc134915f2a3bbf3189b SHA512 a03305b3540a0473b93e0e30ae82a1b7cc77c9aefd6abf96b352092ce5c51012a6be0d55af1b406a62b9bcf3c4b83ec980d0ca1232d22031a97b0f455060f2b4
40
41 diff --git a/dev-util/android-studio/android-studio-2020.3.1.24.ebuild b/dev-util/android-studio/android-studio-2020.3.1.24.ebuild
42 new file mode 100644
43 index 00000000000..041c8f1caa0
44 --- /dev/null
45 +++ b/dev-util/android-studio/android-studio-2020.3.1.24.ebuild
46 @@ -0,0 +1,86 @@
47 +# Copyright 1999-2021 Gentoo Authors
48 +# Distributed under the terms of the GNU General Public License v2
49 +
50 +EAPI=7
51 +
52 +inherit desktop eutils
53 +
54 +RESTRICT="strip"
55 +
56 +QA_PREBUILT="
57 + opt/${PN}/bin/*
58 + opt/${PN}/jre/bin/*
59 + opt/${PN}/jre/lib/*
60 + opt/${PN}/jre/lib/jli/*
61 + opt/${PN}/jre/lib/server/*
62 + opt/${PN}/lib/pty4j-native/linux/*/*
63 + opt/${PN}/plugins/android-ndk/resources/lldb/android/*/*
64 + opt/${PN}/plugins/android-ndk/resources/lldb/bin/*
65 + opt/${PN}/plugins/android-ndk/resources/lldb/lib64/*
66 + opt/${PN}/plugins/android-ndk/resources/lldb/lib/python3.8/lib-dynload/*
67 + opt/${PN}/plugins/android/resources/installer/*/*
68 + opt/${PN}/plugins/android/resources/layoutlib/data/linux/lib64/*
69 + opt/${PN}/plugins/android/resources/perfetto/*/*
70 + opt/${PN}/plugins/android/resources/simpleperf/*/*
71 + opt/${PN}/plugins/android/resources/trace_processor_daemon/*
72 + opt/${PN}/plugins/android/resources/transport/*/*
73 + opt/${PN}/plugins/android/resources/transport/native/agent/*/*
74 + opt/${PN}/plugins/android/resources/transport/*/*
75 + opt/${PN}/plugins/c-plugin/bin/clang/linux/*
76 + opt/${PN}/plugins/webp/lib/libwebp/linux/*
77 +"
78 +
79 +DESCRIPTION="Android development environment based on IntelliJ IDEA"
80 +HOMEPAGE="http://developer.android.com/sdk/installing/studio.html"
81 +SRC_URI="https://redirector.gvt1.com/edgedl/android/studio/ide-zips/${PV}/${P}-linux.tar.gz"
82 +
83 +LICENSE="Apache-2.0"
84 +SLOT="0"
85 +IUSE="selinux"
86 +KEYWORDS="~amd64 ~x86"
87 +
88 +RDEPEND="${DEPEND}
89 + selinux? ( sec-policy/selinux-android )
90 + >=app-arch/bzip2-1.0.6-r4
91 + >=dev-libs/expat-2.1.0-r3
92 + >=dev-libs/libffi-3.0.13-r1
93 + >=media-libs/fontconfig-2.10.92
94 + >=media-libs/freetype-2.5.5
95 + >=media-libs/libpng-1.2.51
96 + >=media-libs/mesa-10.2.8[X(+)]
97 + || ( gnome-extra/zenity kde-apps/kdialog x11-apps/xmessage x11-libs/libnotify )
98 + sys-libs/ncurses-compat:5[tinfo]
99 + >=sys-libs/zlib-1.2.8-r1
100 + >=x11-libs/libX11-1.6.2
101 + >=x11-libs/libXau-1.0.7-r1
102 + >=x11-libs/libXdamage-1.1.4-r1
103 + >=x11-libs/libXdmcp-1.1.1-r1
104 + >=x11-libs/libXext-1.3.2
105 + >=x11-libs/libXfixes-5.0.1
106 + >=x11-libs/libXrender-0.9.8
107 + >=x11-libs/libXxf86vm-1.1.3
108 + >=x11-libs/libdrm-2.4.46
109 + >=x11-libs/libxcb-1.9.1
110 + >=x11-libs/libxshmfence-1.1
111 + virtual/libcrypt:=
112 +"
113 +
114 +S=${WORKDIR}/${PN}
115 +
116 +src_compile() {
117 + :;
118 +}
119 +
120 +src_install() {
121 + local dir="/opt/${PN}"
122 + insinto "${dir}"
123 + doins -r *
124 + fperms 755 "${dir}"/bin/{fsnotifier{,64},printenv.py,restart.py,format.sh,inspect.sh,studio.sh}
125 + fperms -R 755 "${dir}"/bin/lldb
126 + fperms -R 755 "${dir}"/plugins/{android-ndk/resources/lldb,c-plugin/bin}
127 + fperms -R 755 "${dir}"/jre/bin
128 + fperms 755 ${dir}/jre/lib/jexec
129 + newicon "bin/studio.png" "${PN}.png"
130 + make_wrapper ${PN} ${dir}/bin/studio.sh
131 + make_desktop_entry ${PN} "Android Studio" ${PN} "Development;IDE" "StartupWMClass=jetbrains-studio"
132 +}
133
134 diff --git a/dev-util/android-studio/android-studio-4.0.1.0.193.6626763.ebuild b/dev-util/android-studio/android-studio-4.0.1.0.193.6626763.ebuild
135 deleted file mode 100644
136 index e9812c3699a..00000000000
137 --- a/dev-util/android-studio/android-studio-4.0.1.0.193.6626763.ebuild
138 +++ /dev/null
139 @@ -1,129 +0,0 @@
140 -# Copyright 1999-2020 Gentoo Authors
141 -# Distributed under the terms of the GNU General Public License v2
142 -
143 -EAPI=7
144 -inherit desktop eutils java-pkg-2
145 -
146 -RESTRICT="strip"
147 -QA_PREBUILT="
148 - opt/${PN}/bin/fsnotifier*
149 - opt/${PN}/bin/libdbm64.so
150 - opt/${PN}/bin/lldb/*
151 - opt/${PN}/custom-jdk/*
152 - opt/${PN}/lib/pty4j-native/linux/*/libpty.so
153 - opt/${PN}/plugins/android/lib/libwebp_jni*.so
154 - opt/${PN}/plugins/android/resources/installer/*
155 - opt/${PN}/plugins/android/resources/perfetto/*
156 - opt/${PN}/plugins/android/resources/simpleperf/*
157 - opt/${PN}/plugins/android/resources/transport/*
158 -"
159 -
160 -VER_CMP=( $(ver_rs 1- ' ') )
161 -if [[ ${#VER_CMP[@]} -eq 6 ]]; then
162 - STUDIO_V=$(ver_cut 1-4)
163 - BUILD_V=$(ver_cut 5-6)
164 -else
165 - STUDIO_V=$(ver_cut 1-3)
166 - BUILD_V=$(ver_cut 4-5)
167 -fi
168 -
169 -DESCRIPTION="Android development environment based on IntelliJ IDEA"
170 -HOMEPAGE="http://developer.android.com/sdk/installing/studio.html"
171 -SRC_URI="https://dl.google.com/dl/android/studio/ide-zips/${STUDIO_V}/${PN}-ide-${BUILD_V}-linux.tar.gz"
172 -
173 -LICENSE="Apache-2.0"
174 -SLOT="0"
175 -IUSE="custom-jdk selinux"
176 -KEYWORDS="~amd64 ~x86"
177 -
178 -DEPEND="
179 - dev-java/commons-logging:0
180 - dev-java/log4j:0"
181 -
182 -RDEPEND="${DEPEND}
183 - >=virtual/jdk-1.7
184 - selinux? ( sec-policy/selinux-android )
185 - >=app-arch/bzip2-1.0.6-r4
186 - dev-java/commons-logging:0
187 - dev-java/log4j:0
188 - >=dev-libs/expat-2.1.0-r3
189 - >=dev-libs/libffi-3.0.13-r1
190 - >=media-libs/fontconfig-2.10.92
191 - >=media-libs/freetype-2.5.5
192 - >=media-libs/libpng-1.2.51
193 - >=media-libs/mesa-10.2.8[X(+)]
194 - || ( gnome-extra/zenity kde-apps/kdialog x11-apps/xmessage x11-libs/libnotify )
195 - sys-libs/ncurses-compat:5[tinfo]
196 - >=sys-libs/zlib-1.2.8-r1
197 - >=x11-libs/libX11-1.6.2
198 - >=x11-libs/libXau-1.0.7-r1
199 - >=x11-libs/libXdamage-1.1.4-r1
200 - >=x11-libs/libXdmcp-1.1.1-r1
201 - >=x11-libs/libXext-1.3.2
202 - >=x11-libs/libXfixes-5.0.1
203 - >=x11-libs/libXrender-0.9.8
204 - >=x11-libs/libXxf86vm-1.1.3
205 - >=x11-libs/libdrm-2.4.46
206 - >=x11-libs/libxcb-1.9.1
207 - >=x11-libs/libxshmfence-1.1"
208 -BDEPEND="dev-util/patchelf"
209 -S=${WORKDIR}/${PN}
210 -PATCHES=( "${FILESDIR}/0001-use-java-home-before-bundled.patch" )
211 -
212 -src_prepare() {
213 - eapply "${PATCHES[@]}"
214 - eapply_user
215 -
216 - # This is really a bundled jdk not a jre
217 - # If custom-jdk is not set bundled jre is replaced with system vm/jdk
218 - if use custom-jdk; then
219 - mv -f "${S}/jre" "${S}/custom-jdk" || die "Could not move bundled jdk"
220 - else
221 - rm -rf "${S}/jre" || die "Could not remove bundled jdk"
222 - fi
223 - # Replace bundled jars with system
224 - # has problems with newer jdom:0 not updated to jdom:2
225 - cd "${S}/lib" || die
226 - local JARS="commons-logging log4j"
227 - local j
228 - for j in ${JARS}; do
229 - rm -v ${j/:*/}*.jar || die
230 - java-pkg_jar-from ${j}
231 - done
232 -
233 - cd "${S}" || die
234 -
235 - # bug 629404
236 - echo "-Djdk.util.zip.ensureTrailingSlash=false" >> bin/studio64.vmoptions || die
237 - echo "-Djdk.util.zip.ensureTrailingSlash=false" >> bin/studio.vmoptions || die
238 -}
239 -
240 -src_compile() {
241 - patchelf --set-rpath '$ORIGIN' bin/lldb/lib/readline.so || die "Failed to fix insecure RPATH"
242 -}
243 -
244 -src_install() {
245 - local dir="/opt/${PN}"
246 -
247 - insinto "${dir}"
248 - doins -r *
249 -
250 - # This is really a bundled jdk not a jre
251 - # If custom-jdk is not set bundled jre is replaced with system vm/jdk
252 - if use custom-jdk; then
253 - dosym "custom-jdk" "${dir}/jre"
254 - else
255 - dosym "../../etc/java-config-2/current-system-vm" "${dir}/jre"
256 - fi
257 -
258 - fperms 755 "${dir}"/bin/{fsnotifier{,64},printenv.py,restart.py,format.sh,inspect.sh,studio.sh}
259 - fperms -R 755 "${dir}"/bin/lldb/{android,bin}
260 - if use custom-jdk; then
261 - fperms -R 755 "${dir}"/jre/{bin,jre/bin}
262 - fperms 755 ${dir}/jre/jre/lib/jexec
263 - fi
264 -
265 - newicon "bin/studio.png" "${PN}.png"
266 - make_wrapper ${PN} ${dir}/bin/studio.sh
267 - make_desktop_entry ${PN} "Android Studio" ${PN} "Development;IDE" "StartupWMClass=jetbrains-studio"
268 -}
269
270 diff --git a/dev-util/android-studio/android-studio-4.1.0.19.201.6858069.ebuild b/dev-util/android-studio/android-studio-4.1.0.19.201.6858069.ebuild
271 deleted file mode 100644
272 index e9812c3699a..00000000000
273 --- a/dev-util/android-studio/android-studio-4.1.0.19.201.6858069.ebuild
274 +++ /dev/null
275 @@ -1,129 +0,0 @@
276 -# Copyright 1999-2020 Gentoo Authors
277 -# Distributed under the terms of the GNU General Public License v2
278 -
279 -EAPI=7
280 -inherit desktop eutils java-pkg-2
281 -
282 -RESTRICT="strip"
283 -QA_PREBUILT="
284 - opt/${PN}/bin/fsnotifier*
285 - opt/${PN}/bin/libdbm64.so
286 - opt/${PN}/bin/lldb/*
287 - opt/${PN}/custom-jdk/*
288 - opt/${PN}/lib/pty4j-native/linux/*/libpty.so
289 - opt/${PN}/plugins/android/lib/libwebp_jni*.so
290 - opt/${PN}/plugins/android/resources/installer/*
291 - opt/${PN}/plugins/android/resources/perfetto/*
292 - opt/${PN}/plugins/android/resources/simpleperf/*
293 - opt/${PN}/plugins/android/resources/transport/*
294 -"
295 -
296 -VER_CMP=( $(ver_rs 1- ' ') )
297 -if [[ ${#VER_CMP[@]} -eq 6 ]]; then
298 - STUDIO_V=$(ver_cut 1-4)
299 - BUILD_V=$(ver_cut 5-6)
300 -else
301 - STUDIO_V=$(ver_cut 1-3)
302 - BUILD_V=$(ver_cut 4-5)
303 -fi
304 -
305 -DESCRIPTION="Android development environment based on IntelliJ IDEA"
306 -HOMEPAGE="http://developer.android.com/sdk/installing/studio.html"
307 -SRC_URI="https://dl.google.com/dl/android/studio/ide-zips/${STUDIO_V}/${PN}-ide-${BUILD_V}-linux.tar.gz"
308 -
309 -LICENSE="Apache-2.0"
310 -SLOT="0"
311 -IUSE="custom-jdk selinux"
312 -KEYWORDS="~amd64 ~x86"
313 -
314 -DEPEND="
315 - dev-java/commons-logging:0
316 - dev-java/log4j:0"
317 -
318 -RDEPEND="${DEPEND}
319 - >=virtual/jdk-1.7
320 - selinux? ( sec-policy/selinux-android )
321 - >=app-arch/bzip2-1.0.6-r4
322 - dev-java/commons-logging:0
323 - dev-java/log4j:0
324 - >=dev-libs/expat-2.1.0-r3
325 - >=dev-libs/libffi-3.0.13-r1
326 - >=media-libs/fontconfig-2.10.92
327 - >=media-libs/freetype-2.5.5
328 - >=media-libs/libpng-1.2.51
329 - >=media-libs/mesa-10.2.8[X(+)]
330 - || ( gnome-extra/zenity kde-apps/kdialog x11-apps/xmessage x11-libs/libnotify )
331 - sys-libs/ncurses-compat:5[tinfo]
332 - >=sys-libs/zlib-1.2.8-r1
333 - >=x11-libs/libX11-1.6.2
334 - >=x11-libs/libXau-1.0.7-r1
335 - >=x11-libs/libXdamage-1.1.4-r1
336 - >=x11-libs/libXdmcp-1.1.1-r1
337 - >=x11-libs/libXext-1.3.2
338 - >=x11-libs/libXfixes-5.0.1
339 - >=x11-libs/libXrender-0.9.8
340 - >=x11-libs/libXxf86vm-1.1.3
341 - >=x11-libs/libdrm-2.4.46
342 - >=x11-libs/libxcb-1.9.1
343 - >=x11-libs/libxshmfence-1.1"
344 -BDEPEND="dev-util/patchelf"
345 -S=${WORKDIR}/${PN}
346 -PATCHES=( "${FILESDIR}/0001-use-java-home-before-bundled.patch" )
347 -
348 -src_prepare() {
349 - eapply "${PATCHES[@]}"
350 - eapply_user
351 -
352 - # This is really a bundled jdk not a jre
353 - # If custom-jdk is not set bundled jre is replaced with system vm/jdk
354 - if use custom-jdk; then
355 - mv -f "${S}/jre" "${S}/custom-jdk" || die "Could not move bundled jdk"
356 - else
357 - rm -rf "${S}/jre" || die "Could not remove bundled jdk"
358 - fi
359 - # Replace bundled jars with system
360 - # has problems with newer jdom:0 not updated to jdom:2
361 - cd "${S}/lib" || die
362 - local JARS="commons-logging log4j"
363 - local j
364 - for j in ${JARS}; do
365 - rm -v ${j/:*/}*.jar || die
366 - java-pkg_jar-from ${j}
367 - done
368 -
369 - cd "${S}" || die
370 -
371 - # bug 629404
372 - echo "-Djdk.util.zip.ensureTrailingSlash=false" >> bin/studio64.vmoptions || die
373 - echo "-Djdk.util.zip.ensureTrailingSlash=false" >> bin/studio.vmoptions || die
374 -}
375 -
376 -src_compile() {
377 - patchelf --set-rpath '$ORIGIN' bin/lldb/lib/readline.so || die "Failed to fix insecure RPATH"
378 -}
379 -
380 -src_install() {
381 - local dir="/opt/${PN}"
382 -
383 - insinto "${dir}"
384 - doins -r *
385 -
386 - # This is really a bundled jdk not a jre
387 - # If custom-jdk is not set bundled jre is replaced with system vm/jdk
388 - if use custom-jdk; then
389 - dosym "custom-jdk" "${dir}/jre"
390 - else
391 - dosym "../../etc/java-config-2/current-system-vm" "${dir}/jre"
392 - fi
393 -
394 - fperms 755 "${dir}"/bin/{fsnotifier{,64},printenv.py,restart.py,format.sh,inspect.sh,studio.sh}
395 - fperms -R 755 "${dir}"/bin/lldb/{android,bin}
396 - if use custom-jdk; then
397 - fperms -R 755 "${dir}"/jre/{bin,jre/bin}
398 - fperms 755 ${dir}/jre/jre/lib/jexec
399 - fi
400 -
401 - newicon "bin/studio.png" "${PN}.png"
402 - make_wrapper ${PN} ${dir}/bin/studio.sh
403 - make_desktop_entry ${PN} "Android Studio" ${PN} "Development;IDE" "StartupWMClass=jetbrains-studio"
404 -}
405
406 diff --git a/dev-util/android-studio/android-studio-4.1.1.0.201.6953283.ebuild b/dev-util/android-studio/android-studio-4.1.1.0.201.6953283.ebuild
407 deleted file mode 100644
408 index c0c19c66487..00000000000
409 --- a/dev-util/android-studio/android-studio-4.1.1.0.201.6953283.ebuild
410 +++ /dev/null
411 @@ -1,129 +0,0 @@
412 -# Copyright 1999-2021 Gentoo Authors
413 -# Distributed under the terms of the GNU General Public License v2
414 -
415 -EAPI=7
416 -inherit desktop eutils java-pkg-2
417 -
418 -RESTRICT="strip"
419 -QA_PREBUILT="
420 - opt/${PN}/bin/fsnotifier*
421 - opt/${PN}/bin/libdbm64.so
422 - opt/${PN}/bin/lldb/*
423 - opt/${PN}/custom-jdk/*
424 - opt/${PN}/lib/pty4j-native/linux/*/libpty.so
425 - opt/${PN}/plugins/android/lib/libwebp_jni*.so
426 - opt/${PN}/plugins/android/resources/installer/*
427 - opt/${PN}/plugins/android/resources/perfetto/*
428 - opt/${PN}/plugins/android/resources/simpleperf/*
429 - opt/${PN}/plugins/android/resources/transport/*
430 -"
431 -
432 -VER_CMP=( $(ver_rs 1- ' ') )
433 -if [[ ${#VER_CMP[@]} -eq 6 ]]; then
434 - STUDIO_V=$(ver_cut 1-4)
435 - BUILD_V=$(ver_cut 5-6)
436 -else
437 - STUDIO_V=$(ver_cut 1-3)
438 - BUILD_V=$(ver_cut 4-5)
439 -fi
440 -
441 -DESCRIPTION="Android development environment based on IntelliJ IDEA"
442 -HOMEPAGE="http://developer.android.com/sdk/installing/studio.html"
443 -SRC_URI="https://dl.google.com/dl/android/studio/ide-zips/${STUDIO_V}/${PN}-ide-${BUILD_V}-linux.tar.gz"
444 -
445 -LICENSE="Apache-2.0"
446 -SLOT="0"
447 -IUSE="custom-jdk selinux"
448 -KEYWORDS="~amd64 ~x86"
449 -
450 -DEPEND="
451 - dev-java/commons-logging:0
452 - dev-java/log4j:0"
453 -
454 -RDEPEND="${DEPEND}
455 - >=virtual/jdk-1.7
456 - selinux? ( sec-policy/selinux-android )
457 - >=app-arch/bzip2-1.0.6-r4
458 - dev-java/commons-logging:0
459 - dev-java/log4j:0
460 - >=dev-libs/expat-2.1.0-r3
461 - >=dev-libs/libffi-3.0.13-r1
462 - >=media-libs/fontconfig-2.10.92
463 - >=media-libs/freetype-2.5.5
464 - >=media-libs/libpng-1.2.51
465 - >=media-libs/mesa-10.2.8[X(+)]
466 - || ( gnome-extra/zenity kde-apps/kdialog x11-apps/xmessage x11-libs/libnotify )
467 - sys-libs/ncurses-compat:5[tinfo]
468 - >=sys-libs/zlib-1.2.8-r1
469 - >=x11-libs/libX11-1.6.2
470 - >=x11-libs/libXau-1.0.7-r1
471 - >=x11-libs/libXdamage-1.1.4-r1
472 - >=x11-libs/libXdmcp-1.1.1-r1
473 - >=x11-libs/libXext-1.3.2
474 - >=x11-libs/libXfixes-5.0.1
475 - >=x11-libs/libXrender-0.9.8
476 - >=x11-libs/libXxf86vm-1.1.3
477 - >=x11-libs/libdrm-2.4.46
478 - >=x11-libs/libxcb-1.9.1
479 - >=x11-libs/libxshmfence-1.1"
480 -BDEPEND="dev-util/patchelf"
481 -S=${WORKDIR}/${PN}
482 -PATCHES=( "${FILESDIR}/0001-use-java-home-before-bundled.patch" )
483 -
484 -src_prepare() {
485 - eapply "${PATCHES[@]}"
486 - eapply_user
487 -
488 - # This is really a bundled jdk not a jre
489 - # If custom-jdk is not set bundled jre is replaced with system vm/jdk
490 - if use custom-jdk; then
491 - mv -f "${S}/jre" "${S}/custom-jdk" || die "Could not move bundled jdk"
492 - else
493 - rm -rf "${S}/jre" || die "Could not remove bundled jdk"
494 - fi
495 - # Replace bundled jars with system
496 - # has problems with newer jdom:0 not updated to jdom:2
497 - cd "${S}/lib" || die
498 - local JARS="commons-logging log4j"
499 - local j
500 - for j in ${JARS}; do
501 - rm -v ${j/:*/}*.jar || die
502 - java-pkg_jar-from ${j}
503 - done
504 -
505 - cd "${S}" || die
506 -
507 - # bug 629404
508 - echo "-Djdk.util.zip.ensureTrailingSlash=false" >> bin/studio64.vmoptions || die
509 - echo "-Djdk.util.zip.ensureTrailingSlash=false" >> bin/studio.vmoptions || die
510 -}
511 -
512 -src_compile() {
513 - patchelf --set-rpath '$ORIGIN' bin/lldb/lib/readline.so || die "Failed to fix insecure RPATH"
514 -}
515 -
516 -src_install() {
517 - local dir="/opt/${PN}"
518 -
519 - insinto "${dir}"
520 - doins -r *
521 -
522 - # This is really a bundled jdk not a jre
523 - # If custom-jdk is not set bundled jre is replaced with system vm/jdk
524 - if use custom-jdk; then
525 - dosym "custom-jdk" "${dir}/jre"
526 - else
527 - dosym "../../etc/java-config-2/current-system-vm" "${dir}/jre"
528 - fi
529 -
530 - fperms 755 "${dir}"/bin/{fsnotifier{,64},printenv.py,restart.py,format.sh,inspect.sh,studio.sh}
531 - fperms -R 755 "${dir}"/bin/lldb/{android,bin}
532 - if use custom-jdk; then
533 - fperms -R 755 "${dir}"/jre/{bin,jre/bin}
534 - fperms 755 ${dir}/jre/jre/lib/jexec
535 - fi
536 -
537 - newicon "bin/studio.png" "${PN}.png"
538 - make_wrapper ${PN} ${dir}/bin/studio.sh
539 - make_desktop_entry ${PN} "Android Studio" ${PN} "Development;IDE" "StartupWMClass=jetbrains-studio"
540 -}
541
542 diff --git a/dev-util/android-studio/android-studio-4.1.2.0.201.7042882.ebuild b/dev-util/android-studio/android-studio-4.1.2.0.201.7042882.ebuild
543 deleted file mode 100644
544 index c0c19c66487..00000000000
545 --- a/dev-util/android-studio/android-studio-4.1.2.0.201.7042882.ebuild
546 +++ /dev/null
547 @@ -1,129 +0,0 @@
548 -# Copyright 1999-2021 Gentoo Authors
549 -# Distributed under the terms of the GNU General Public License v2
550 -
551 -EAPI=7
552 -inherit desktop eutils java-pkg-2
553 -
554 -RESTRICT="strip"
555 -QA_PREBUILT="
556 - opt/${PN}/bin/fsnotifier*
557 - opt/${PN}/bin/libdbm64.so
558 - opt/${PN}/bin/lldb/*
559 - opt/${PN}/custom-jdk/*
560 - opt/${PN}/lib/pty4j-native/linux/*/libpty.so
561 - opt/${PN}/plugins/android/lib/libwebp_jni*.so
562 - opt/${PN}/plugins/android/resources/installer/*
563 - opt/${PN}/plugins/android/resources/perfetto/*
564 - opt/${PN}/plugins/android/resources/simpleperf/*
565 - opt/${PN}/plugins/android/resources/transport/*
566 -"
567 -
568 -VER_CMP=( $(ver_rs 1- ' ') )
569 -if [[ ${#VER_CMP[@]} -eq 6 ]]; then
570 - STUDIO_V=$(ver_cut 1-4)
571 - BUILD_V=$(ver_cut 5-6)
572 -else
573 - STUDIO_V=$(ver_cut 1-3)
574 - BUILD_V=$(ver_cut 4-5)
575 -fi
576 -
577 -DESCRIPTION="Android development environment based on IntelliJ IDEA"
578 -HOMEPAGE="http://developer.android.com/sdk/installing/studio.html"
579 -SRC_URI="https://dl.google.com/dl/android/studio/ide-zips/${STUDIO_V}/${PN}-ide-${BUILD_V}-linux.tar.gz"
580 -
581 -LICENSE="Apache-2.0"
582 -SLOT="0"
583 -IUSE="custom-jdk selinux"
584 -KEYWORDS="~amd64 ~x86"
585 -
586 -DEPEND="
587 - dev-java/commons-logging:0
588 - dev-java/log4j:0"
589 -
590 -RDEPEND="${DEPEND}
591 - >=virtual/jdk-1.7
592 - selinux? ( sec-policy/selinux-android )
593 - >=app-arch/bzip2-1.0.6-r4
594 - dev-java/commons-logging:0
595 - dev-java/log4j:0
596 - >=dev-libs/expat-2.1.0-r3
597 - >=dev-libs/libffi-3.0.13-r1
598 - >=media-libs/fontconfig-2.10.92
599 - >=media-libs/freetype-2.5.5
600 - >=media-libs/libpng-1.2.51
601 - >=media-libs/mesa-10.2.8[X(+)]
602 - || ( gnome-extra/zenity kde-apps/kdialog x11-apps/xmessage x11-libs/libnotify )
603 - sys-libs/ncurses-compat:5[tinfo]
604 - >=sys-libs/zlib-1.2.8-r1
605 - >=x11-libs/libX11-1.6.2
606 - >=x11-libs/libXau-1.0.7-r1
607 - >=x11-libs/libXdamage-1.1.4-r1
608 - >=x11-libs/libXdmcp-1.1.1-r1
609 - >=x11-libs/libXext-1.3.2
610 - >=x11-libs/libXfixes-5.0.1
611 - >=x11-libs/libXrender-0.9.8
612 - >=x11-libs/libXxf86vm-1.1.3
613 - >=x11-libs/libdrm-2.4.46
614 - >=x11-libs/libxcb-1.9.1
615 - >=x11-libs/libxshmfence-1.1"
616 -BDEPEND="dev-util/patchelf"
617 -S=${WORKDIR}/${PN}
618 -PATCHES=( "${FILESDIR}/0001-use-java-home-before-bundled.patch" )
619 -
620 -src_prepare() {
621 - eapply "${PATCHES[@]}"
622 - eapply_user
623 -
624 - # This is really a bundled jdk not a jre
625 - # If custom-jdk is not set bundled jre is replaced with system vm/jdk
626 - if use custom-jdk; then
627 - mv -f "${S}/jre" "${S}/custom-jdk" || die "Could not move bundled jdk"
628 - else
629 - rm -rf "${S}/jre" || die "Could not remove bundled jdk"
630 - fi
631 - # Replace bundled jars with system
632 - # has problems with newer jdom:0 not updated to jdom:2
633 - cd "${S}/lib" || die
634 - local JARS="commons-logging log4j"
635 - local j
636 - for j in ${JARS}; do
637 - rm -v ${j/:*/}*.jar || die
638 - java-pkg_jar-from ${j}
639 - done
640 -
641 - cd "${S}" || die
642 -
643 - # bug 629404
644 - echo "-Djdk.util.zip.ensureTrailingSlash=false" >> bin/studio64.vmoptions || die
645 - echo "-Djdk.util.zip.ensureTrailingSlash=false" >> bin/studio.vmoptions || die
646 -}
647 -
648 -src_compile() {
649 - patchelf --set-rpath '$ORIGIN' bin/lldb/lib/readline.so || die "Failed to fix insecure RPATH"
650 -}
651 -
652 -src_install() {
653 - local dir="/opt/${PN}"
654 -
655 - insinto "${dir}"
656 - doins -r *
657 -
658 - # This is really a bundled jdk not a jre
659 - # If custom-jdk is not set bundled jre is replaced with system vm/jdk
660 - if use custom-jdk; then
661 - dosym "custom-jdk" "${dir}/jre"
662 - else
663 - dosym "../../etc/java-config-2/current-system-vm" "${dir}/jre"
664 - fi
665 -
666 - fperms 755 "${dir}"/bin/{fsnotifier{,64},printenv.py,restart.py,format.sh,inspect.sh,studio.sh}
667 - fperms -R 755 "${dir}"/bin/lldb/{android,bin}
668 - if use custom-jdk; then
669 - fperms -R 755 "${dir}"/jre/{bin,jre/bin}
670 - fperms 755 ${dir}/jre/jre/lib/jexec
671 - fi
672 -
673 - newicon "bin/studio.png" "${PN}.png"
674 - make_wrapper ${PN} ${dir}/bin/studio.sh
675 - make_desktop_entry ${PN} "Android Studio" ${PN} "Development;IDE" "StartupWMClass=jetbrains-studio"
676 -}
677
678 diff --git a/dev-util/android-studio/android-studio-4.1.3.0.201.7199119.ebuild b/dev-util/android-studio/android-studio-4.1.3.0.201.7199119.ebuild
679 deleted file mode 100644
680 index c0c19c66487..00000000000
681 --- a/dev-util/android-studio/android-studio-4.1.3.0.201.7199119.ebuild
682 +++ /dev/null
683 @@ -1,129 +0,0 @@
684 -# Copyright 1999-2021 Gentoo Authors
685 -# Distributed under the terms of the GNU General Public License v2
686 -
687 -EAPI=7
688 -inherit desktop eutils java-pkg-2
689 -
690 -RESTRICT="strip"
691 -QA_PREBUILT="
692 - opt/${PN}/bin/fsnotifier*
693 - opt/${PN}/bin/libdbm64.so
694 - opt/${PN}/bin/lldb/*
695 - opt/${PN}/custom-jdk/*
696 - opt/${PN}/lib/pty4j-native/linux/*/libpty.so
697 - opt/${PN}/plugins/android/lib/libwebp_jni*.so
698 - opt/${PN}/plugins/android/resources/installer/*
699 - opt/${PN}/plugins/android/resources/perfetto/*
700 - opt/${PN}/plugins/android/resources/simpleperf/*
701 - opt/${PN}/plugins/android/resources/transport/*
702 -"
703 -
704 -VER_CMP=( $(ver_rs 1- ' ') )
705 -if [[ ${#VER_CMP[@]} -eq 6 ]]; then
706 - STUDIO_V=$(ver_cut 1-4)
707 - BUILD_V=$(ver_cut 5-6)
708 -else
709 - STUDIO_V=$(ver_cut 1-3)
710 - BUILD_V=$(ver_cut 4-5)
711 -fi
712 -
713 -DESCRIPTION="Android development environment based on IntelliJ IDEA"
714 -HOMEPAGE="http://developer.android.com/sdk/installing/studio.html"
715 -SRC_URI="https://dl.google.com/dl/android/studio/ide-zips/${STUDIO_V}/${PN}-ide-${BUILD_V}-linux.tar.gz"
716 -
717 -LICENSE="Apache-2.0"
718 -SLOT="0"
719 -IUSE="custom-jdk selinux"
720 -KEYWORDS="~amd64 ~x86"
721 -
722 -DEPEND="
723 - dev-java/commons-logging:0
724 - dev-java/log4j:0"
725 -
726 -RDEPEND="${DEPEND}
727 - >=virtual/jdk-1.7
728 - selinux? ( sec-policy/selinux-android )
729 - >=app-arch/bzip2-1.0.6-r4
730 - dev-java/commons-logging:0
731 - dev-java/log4j:0
732 - >=dev-libs/expat-2.1.0-r3
733 - >=dev-libs/libffi-3.0.13-r1
734 - >=media-libs/fontconfig-2.10.92
735 - >=media-libs/freetype-2.5.5
736 - >=media-libs/libpng-1.2.51
737 - >=media-libs/mesa-10.2.8[X(+)]
738 - || ( gnome-extra/zenity kde-apps/kdialog x11-apps/xmessage x11-libs/libnotify )
739 - sys-libs/ncurses-compat:5[tinfo]
740 - >=sys-libs/zlib-1.2.8-r1
741 - >=x11-libs/libX11-1.6.2
742 - >=x11-libs/libXau-1.0.7-r1
743 - >=x11-libs/libXdamage-1.1.4-r1
744 - >=x11-libs/libXdmcp-1.1.1-r1
745 - >=x11-libs/libXext-1.3.2
746 - >=x11-libs/libXfixes-5.0.1
747 - >=x11-libs/libXrender-0.9.8
748 - >=x11-libs/libXxf86vm-1.1.3
749 - >=x11-libs/libdrm-2.4.46
750 - >=x11-libs/libxcb-1.9.1
751 - >=x11-libs/libxshmfence-1.1"
752 -BDEPEND="dev-util/patchelf"
753 -S=${WORKDIR}/${PN}
754 -PATCHES=( "${FILESDIR}/0001-use-java-home-before-bundled.patch" )
755 -
756 -src_prepare() {
757 - eapply "${PATCHES[@]}"
758 - eapply_user
759 -
760 - # This is really a bundled jdk not a jre
761 - # If custom-jdk is not set bundled jre is replaced with system vm/jdk
762 - if use custom-jdk; then
763 - mv -f "${S}/jre" "${S}/custom-jdk" || die "Could not move bundled jdk"
764 - else
765 - rm -rf "${S}/jre" || die "Could not remove bundled jdk"
766 - fi
767 - # Replace bundled jars with system
768 - # has problems with newer jdom:0 not updated to jdom:2
769 - cd "${S}/lib" || die
770 - local JARS="commons-logging log4j"
771 - local j
772 - for j in ${JARS}; do
773 - rm -v ${j/:*/}*.jar || die
774 - java-pkg_jar-from ${j}
775 - done
776 -
777 - cd "${S}" || die
778 -
779 - # bug 629404
780 - echo "-Djdk.util.zip.ensureTrailingSlash=false" >> bin/studio64.vmoptions || die
781 - echo "-Djdk.util.zip.ensureTrailingSlash=false" >> bin/studio.vmoptions || die
782 -}
783 -
784 -src_compile() {
785 - patchelf --set-rpath '$ORIGIN' bin/lldb/lib/readline.so || die "Failed to fix insecure RPATH"
786 -}
787 -
788 -src_install() {
789 - local dir="/opt/${PN}"
790 -
791 - insinto "${dir}"
792 - doins -r *
793 -
794 - # This is really a bundled jdk not a jre
795 - # If custom-jdk is not set bundled jre is replaced with system vm/jdk
796 - if use custom-jdk; then
797 - dosym "custom-jdk" "${dir}/jre"
798 - else
799 - dosym "../../etc/java-config-2/current-system-vm" "${dir}/jre"
800 - fi
801 -
802 - fperms 755 "${dir}"/bin/{fsnotifier{,64},printenv.py,restart.py,format.sh,inspect.sh,studio.sh}
803 - fperms -R 755 "${dir}"/bin/lldb/{android,bin}
804 - if use custom-jdk; then
805 - fperms -R 755 "${dir}"/jre/{bin,jre/bin}
806 - fperms 755 ${dir}/jre/jre/lib/jexec
807 - fi
808 -
809 - newicon "bin/studio.png" "${PN}.png"
810 - make_wrapper ${PN} ${dir}/bin/studio.sh
811 - make_desktop_entry ${PN} "Android Studio" ${PN} "Development;IDE" "StartupWMClass=jetbrains-studio"
812 -}
813
814 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
815 deleted file mode 100644
816 index 6f97c7d3f92..00000000000
817 --- a/dev-util/android-studio/files/0001-use-java-home-before-bundled.patch
818 +++ /dev/null
819 @@ -1,39 +0,0 @@
820 -Use JAVA_HOME before bundled jre
821 -
822 -Must keep bundled jre symlink around in case "Use Embedded JDK" is selected
823 -
824 -https://bugs.gentoo.org/613868
825 -https://bugs.gentoo.org/660404
826 -
827 ---- android-studio/bin/studio.sh 2018-07-20 13:43:12.339049033 +0800
828 -+++ android-studio/bin/studio.sh 2018-07-20 13:43:38.494932028 +0800
829 -@@ -73,6 +73,14 @@
830 - fi
831 - fi
832 -
833 -+if [ -z "$JDK" -a -n "$JDK_HOME" -a -x "$JDK_HOME/bin/java" ]; then
834 -+ JDK="$JDK_HOME"
835 -+fi
836 -+
837 -+if [ -z "$JDK" -a -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
838 -+ JDK="$JAVA_HOME"
839 -+fi
840 -+
841 - if [ -z "$JDK" -a "$OS_TYPE" = "Linux" ] ; then
842 - BUNDLED_JRE="$IDE_HOME/jre64"
843 - if [ ! -d "$BUNDLED_JRE" ]; then
844 -@@ -83,14 +91,6 @@
845 - fi
846 - fi
847 -
848 --if [ -z "$JDK" -a -n "$JDK_HOME" -a -x "$JDK_HOME/bin/java" ]; then
849 -- JDK="$JDK_HOME"
850 --fi
851 --
852 --if [ -z "$JDK" -a -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
853 -- JDK="$JAVA_HOME"
854 --fi
855 --
856 - if [ -z "$JDK" ]; then
857 - JDK_PATH=`which java`
858 -
859
860 diff --git a/dev-util/android-studio/metadata.xml b/dev-util/android-studio/metadata.xml
861 index 4c831eddc64..c61e3dc74f4 100644
862 --- a/dev-util/android-studio/metadata.xml
863 +++ b/dev-util/android-studio/metadata.xml
864 @@ -1,10 +1,10 @@
865 <?xml version="1.0" encoding="UTF-8"?>
866 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
867 <pkgmetadata>
868 + <maintainer type="person">
869 + <email>zx2c4@g.o</email>
870 + </maintainer>
871 <maintainer type="person">
872 <email>perfinion@g.o</email>
873 </maintainer>
874 - <use>
875 - <flag name="custom-jdk">Install and use Android Studio's custom JRE.</flag>
876 - </use>
877 </pkgmetadata>