1 |
commit: 399d6a4f972b38d44b0e6a764996edce4335e59f |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 17 17:16:21 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 17 17:17:02 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=399d6a4f |
7 |
|
8 |
dev-util/android-sdk-update-manager: migrate to glep 81 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/729194 |
11 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
.../android-sdk-update-manager-24.4.1-r1.ebuild | 88 ++++++++++++++++++++++ |
15 |
1 file changed, 88 insertions(+) |
16 |
|
17 |
diff --git a/dev-util/android-sdk-update-manager/android-sdk-update-manager-24.4.1-r1.ebuild b/dev-util/android-sdk-update-manager/android-sdk-update-manager-24.4.1-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..2a9d244bfb9 |
20 |
--- /dev/null |
21 |
+++ b/dev-util/android-sdk-update-manager/android-sdk-update-manager-24.4.1-r1.ebuild |
22 |
@@ -0,0 +1,88 @@ |
23 |
+# Copyright 1999-2021 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+inherit desktop udev |
29 |
+ |
30 |
+ANDROID_SDK_DIR="/opt/android-sdk-update-manager" |
31 |
+MY_P="android-sdk_r${PV}-linux" |
32 |
+ |
33 |
+DESCRIPTION="Open Handset Alliance's Android SDK" |
34 |
+HOMEPAGE="https://developer.android.com" |
35 |
+SRC_URI="https://dl.google.com/android/${MY_P}.tgz" |
36 |
+S="${WORKDIR}/android-sdk-linux" |
37 |
+ |
38 |
+LICENSE="android" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~x86" |
41 |
+RESTRICT="mirror" |
42 |
+ |
43 |
+DEPEND="acct-group/android" |
44 |
+RDEPEND=" |
45 |
+ ${DEPEND} |
46 |
+ dev-java/ant-core |
47 |
+ dev-java/swt:3.7[cairo] |
48 |
+ >=virtual/jdk-1.8 |
49 |
+ sys-libs/ncurses-compat:5[abi_x86_32(-)] |
50 |
+ sys-libs/zlib[abi_x86_32(-)] |
51 |
+" |
52 |
+ |
53 |
+QA_PREBUILT="*" |
54 |
+ |
55 |
+src_prepare() { |
56 |
+ default |
57 |
+ rm -rf tools/lib/x86* || die |
58 |
+} |
59 |
+ |
60 |
+src_install() { |
61 |
+ dodoc tools/NOTICE.txt "SDK Readme.txt" |
62 |
+ rm -f tools/NOTICE.txt "SDK Readme.txt" || die |
63 |
+ |
64 |
+ dodir "${ANDROID_SDK_DIR}/tools" |
65 |
+ cp -pPR tools/* "${ED}${ANDROID_SDK_DIR}/tools" || die |
66 |
+ |
67 |
+ # Maybe this is needed for the tools directory too. |
68 |
+ dodir "${ANDROID_SDK_DIR}"/{add-ons,build-tools,docs,extras,platforms,platform-tools,samples,sources,system-images,temp} |
69 |
+ |
70 |
+ fowners -R root:android "${ANDROID_SDK_DIR}"/{.,add-ons,build-tools,docs,extras,platforms,platform-tools,samples,sources,system-images,temp,tools} |
71 |
+ fperms -R 0775 "${ANDROID_SDK_DIR}"/{.,add-ons,build-tools,docs,extras,platforms,platform-tools,samples,sources,system-images,temp,tools} |
72 |
+ |
73 |
+ echo "PATH=\"${EPREFIX}${ANDROID_SDK_DIR}/tools:${EPREFIX}${ANDROID_SDK_DIR}/platform-tools\"" > "${T}/80${PN}" || die |
74 |
+ |
75 |
+ SWT_PATH= |
76 |
+ SWT_VERSIONS="3.7 3.6" |
77 |
+ for version in $SWT_VERSIONS; do |
78 |
+ # redirecting stderr to /dev/null |
79 |
+ # not sure if this is best, but avoids misleading error messages |
80 |
+ SWT_PATH="`dirname \`java-config -p swt-\$version 2>/dev/null\` 2>/dev/null`" |
81 |
+ if [ $SWT_PATH ]; then |
82 |
+ einfo "SWT_PATH=$SWT_PATH selecting version $version of SWT." |
83 |
+ break |
84 |
+ fi |
85 |
+ done |
86 |
+ |
87 |
+ echo "ANDROID_SWT=\"${SWT_PATH}\"" >> "${T}/80${PN}" || die |
88 |
+ echo "ANDROID_HOME=\"${EPREFIX}${ANDROID_SDK_DIR}\"" >> "${T}/80${PN}" || die |
89 |
+ |
90 |
+ doenvd "${T}/80${PN}" |
91 |
+ |
92 |
+ echo "SEARCH_DIRS_MASK=\"${EPREFIX}${ANDROID_SDK_DIR}\"" > "${T}/80${PN}" || die |
93 |
+ |
94 |
+ insinto "/etc/revdep-rebuild" && doins "${T}/80${PN}" |
95 |
+ |
96 |
+ udev_dorules "${FILESDIR}"/80-android.rules || die |
97 |
+ domenu "${FILESDIR}"/android-sdk-update-manager.desktop |
98 |
+} |
99 |
+ |
100 |
+pkg_postinst() { |
101 |
+ elog "The Android SDK now uses its own manager for the development environment." |
102 |
+ elog "Run 'android' to download the full SDK, including some of the platform tools." |
103 |
+ elog "You must be in the android group to manage the development environment." |
104 |
+ elog "Just run 'gpasswd -a <USER> android', then have <USER> re-login." |
105 |
+ elog "See https://developer.android.com/sdk/adding-components.html for more" |
106 |
+ elog "information." |
107 |
+ elog "If you have problems downloading the SDK, see https://code.google.com/p/android/issues/detail?id=4406" |
108 |
+ elog "You need to run env-update and source /etc/profile in any open shells" |
109 |
+ elog "if you get an SWT error." |
110 |
+} |