Line 0
Link Here
|
0 |
- |
1 |
# Copyright 1999-2018 Gentoo Foundation |
|
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
4 |
EAPI=6 |
5 |
|
6 |
inherit eutils bash-completion-r1 pax-utils |
7 |
|
8 |
MY_PN="${PN/-bin}" |
9 |
MY_P="${MY_PN}-${PV}" |
10 |
|
11 |
DESCRIPTION="Complete set of tools that provide a virtual environment for Android" |
12 |
HOMEPAGE="http://genymotion.com" |
13 |
SRC_URI="${MY_P}-linux_x64.bin" |
14 |
DOWNLOAD_URL="https://www.genymotion.com/download/" |
15 |
|
16 |
LICENSE="genymotion" |
17 |
SLOT="0" |
18 |
KEYWORDS="-* ~amd64" |
19 |
|
20 |
DEPEND="" |
21 |
RDEPEND="|| ( >=app-emulation/virtualbox-5.0.28 >=app-emulation/virtualbox-bin-5.0.28 ) |
22 |
app-arch/snappy |
23 |
virtual/opengl |
24 |
dev-libs/openssl |
25 |
dev-libs/hiredis |
26 |
media-gfx/graphite2 |
27 |
sys-apps/util-linux |
28 |
media-libs/gst-plugins-base:0.10 |
29 |
" |
30 |
# note if you compile protobuf with >=gcc-5.1 you need to disable the new c++11 abi |
31 |
# -D_GLIBCXX_USE_CXX11_ABI=0 to your CXXFLAGS for protobuf |
32 |
# =dev-libs/protobuf-2.6* |
33 |
|
34 |
RESTRICT="bindist fetch" |
35 |
S="${WORKDIR}" |
36 |
|
37 |
pkg_nofetch() { |
38 |
einfo |
39 |
einfo "Please visit ${DOWNLOAD_URL} and download ${A}" |
40 |
einfo "which must be placed in DISTDIR directory." |
41 |
einfo |
42 |
} |
43 |
|
44 |
src_unpack() { |
45 |
cp "${DISTDIR}/${A}" "${WORKDIR}" || die "cp failed" |
46 |
} |
47 |
|
48 |
src_prepare() { |
49 |
default |
50 |
|
51 |
# removed function _install_desktop_file because happens outside of sandbox |
52 |
sed -i -e "s/_install_desktop_file\ ||\ abort//" ${A} || die "sed failed" |
53 |
chmod +x ${A} || die "chmod failed" |
54 |
yes | ./${A} -d "${S}" > /dev/null || die "unpack failed" |
55 |
|
56 |
# removed windows line for bashcompletion |
57 |
sed -i -e "s/complete\ -F\ _gmtool\ gmtool.exe//" "${S}/${MY_PN}/completion/bash/gmtool.bash" || die "sed failed" |
58 |
} |
59 |
|
60 |
QA_PREBUILT=" |
61 |
opt/${MY_PN}/*.so* |
62 |
opt/${MY_PN}/imageformats/*.so |
63 |
opt/${MY_PN}/plugins/*.so* |
64 |
opt/${MY_PN}/device-upgrade |
65 |
opt/${MY_PN}/${MY_PN} |
66 |
opt/${MY_PN}/genyshell |
67 |
opt/${MY_PN}/player |
68 |
opt/${MY_PN}/${MY_PN}adbtunneld |
69 |
opt/${MY_PN}/gmtool |
70 |
" |
71 |
|
72 |
src_install() { |
73 |
insinto /opt/"${MY_PN}" |
74 |
doins -r "${MY_PN}"/{plugins,translations,icons} |
75 |
|
76 |
doins -r "${MY_PN}"/{QtGraphicalEffects,QtQuick,QtQuick.2,platforms,sqldrivers,imageformats} |
77 |
doins "${MY_PN}"/libQt* |
78 |
doins "${MY_PN}"/qt.conf |
79 |
doins "${MY_PN}"/libicu* |
80 |
|
81 |
doins "${MY_PN}"/{libcom,librendering}.so* |
82 |
# android library |
83 |
doins "${MY_PN}"/{libEGL_translator,libGLES_CM_translator,libGLES_V2_translator,libOpenglRender}.so* |
84 |
|
85 |
insopts -m0755 |
86 |
doins "${MY_PN}"/{device-upgrade,genymotion,genyshell,player,genymotionadbtunneld,gmtool} |
87 |
|
88 |
pax-mark -m "${ED%/}/opt/${MY_PN}/${MY_PN}" |
89 |
pax-mark -m "${ED%/}/opt/${MY_PN}/gmtool" |
90 |
|
91 |
dosym "${ED%/}"/opt/"${MY_PN}"/genyshell /opt/bin/genyshell |
92 |
dosym "${ED%/}"/opt/"${MY_PN}"/"${MY_PN}" /opt/bin/"${MY_PN}" |
93 |
dosym "${ED%/}"/opt/"${MY_PN}"/gmtool /opt/bin/gmtool |
94 |
|
95 |
newbashcomp "${MY_PN}/completion/bash/gmtool.bash" gmtool |
96 |
|
97 |
if has_version "app-shells/zsh" ; then |
98 |
insinto /usr/share/zsh/site-functions |
99 |
doins "${MY_PN}/completion/zsh/_gmtool" |
100 |
fi |
101 |
|
102 |
make_desktop_entry "/opt/${MY_PN}/${MY_PN}" "Genymotion ${PV}" "/opt/${MY_PN}/icons/icon.png" "Development;Emulator;" |
103 |
mv "${ED%/}"/usr/share/applications/*.desktop "${ED%/}"/usr/share/applications/"${MY_PN}".desktop || die "mv failed" |
104 |
} |
105 |
|
106 |
pkg_postinst() { |
107 |
elog "Genymotion needs adb to work correctly: install with android-sdk-update-manager" |
108 |
elog "'Android SDK Platform-tools' and 'Android SDK Tools'" |
109 |
elog "Your user should also be in the android group to work correctly" |
110 |
elog "Then in Genymotion set the android-sdk-update-manager directory: (Settings->ADB)" |
111 |
elog |
112 |
elog " /opt/android-sdk-update-manager" |
113 |
} |