app-emulation/genymotion-bin/genymotion-bin-2.9.0.ebuild
changeset 213 83b6f114ac24
child 214 39e314e94c59
equal deleted inserted replaced
212:13f8d9ef4e05 213:83b6f114ac24
       
     1 # Copyright 1999-2017 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 	virtual/opengl
       
    23 	dev-libs/openssl
       
    24 	dev-qt/qtgui:5
       
    25 	dev-qt/qtnetwork:5
       
    26 	dev-qt/qtopengl:5
       
    27 	dev-qt/qtsql:5[sqlite]
       
    28 	dev-qt/qtwebkit:5
       
    29 	dev-qt/qtwebsockets:5
       
    30 	dev-qt/qtsvg:5
       
    31 	dev-qt/qtwidgets:5
       
    32 	dev-qt/qtx11extras:5
       
    33 	dev-qt/qtdeclarative:5
       
    34 	dev-qt/qtquickcontrols:5
       
    35 	dev-qt/qtconcurrent:5
       
    36 	dev-qt/qtgraphicaleffects:5
       
    37 	sys-apps/util-linux
       
    38 "
       
    39 # note if you compile protobuf with >=gcc-5.1 you need to disable the new c++11 abi
       
    40 # -D_GLIBCXX_USE_CXX11_ABI=0  to your CXXFLAGS for protobuf
       
    41 #	=dev-libs/protobuf-2.6*
       
    42 
       
    43 RESTRICT="bindist fetch"
       
    44 
       
    45 pkg_nofetch() {
       
    46 	einfo
       
    47 	einfo "Please visit ${DOWNLOAD_URL} and download ${A}"
       
    48 	einfo "which must be placed in DISTDIR directory."
       
    49 	einfo
       
    50 }
       
    51 
       
    52 src_unpack() {
       
    53 	mkdir -p "${S}"
       
    54 	skip=$(awk '/^__TARFILE_FOLLOWS__/ { print NR + 1; exit 0; }' "${DISTDIR}/${A}")
       
    55 	tail -n +$skip "${DISTDIR}/${A}" | tar -xj -C "${S}"
       
    56 }
       
    57 
       
    58 QA_PREBUILT="
       
    59 	opt/${MY_PN}/*.so*
       
    60 	opt/${MY_PN}/imageformats/*.so
       
    61 	opt/${MY_PN}/plugins/*.so*
       
    62 	opt/${MY_PN}/device-upgrade
       
    63 	opt/${MY_PN}/${MY_PN}
       
    64 	opt/${MY_PN}/genyshell
       
    65 	opt/${MY_PN}/player
       
    66 	opt/${MY_PN}/${MY_PN}adbtunneld
       
    67 	opt/${MY_PN}/gmtool
       
    68 "
       
    69 
       
    70 src_install() {
       
    71 	insinto /opt/"${MY_PN}"
       
    72 	doins -r plugins translations icons
       
    73 
       
    74 	doins {libcom,librendering}.so*
       
    75 	# library that differ from system version
       
    76 	doins {libswscale,libavutil,libprotobuf}.so*
       
    77 	# android library
       
    78 	doins {libEGL_translator,libGLES_CM_translator,libGLES_V2_translator,libOpenglRender,libemugl_logger}.so*
       
    79 
       
    80 	insopts -m0755
       
    81 	doins {device-upgrade,genymotion,genyshell,player,genymotionadbtunneld,gmtool}
       
    82 
       
    83 	pax-mark -m "${ED%/}/opt/genymotion/genymotion"
       
    84 	pax-mark -m "${ED%/}/opt/genymotion/gmtool"
       
    85 
       
    86 	dosym "${ED%/}"/opt/"${MY_PN}"/genyshell /opt/bin/genyshell
       
    87 	dosym "${ED%/}"/opt/"${MY_PN}"/"${MY_PN}" /opt/bin/"${MY_PN}"
       
    88 	dosym "${ED%/}"/opt/"${MY_PN}"/gmtool /opt/bin/gmtool
       
    89 
       
    90 	# Workaround
       
    91 	dosym "${ED%/}/"usr/$(get_libdir)/qt5/plugins/imageformats/libqsvg.so /opt/"${MY_PN}"/imageformats/libqsvg.so
       
    92 	dosym "${ED%/}/"usr/$(get_libdir)/qt5/plugins/sqldrivers/libqsqlite.so /opt/"${MY_PN}"/sqldrivers/libqsqlite.so
       
    93 
       
    94 	newbashcomp "completion/bash/gmtool.bash" gmtool
       
    95 
       
    96 	if has_version "app-shells/zsh" ; then
       
    97 		insinto /usr/share/zsh/site-functions
       
    98 		doins "completion/zsh/_gmtool"
       
    99 	fi
       
   100 
       
   101 	make_desktop_entry "/opt/${MY_PN}/${MY_PN}" "Genymotion ${PV}" "/opt/${MY_PN}/icons/icon.png" "Development;Emulator;"
       
   102 	mv "${ED%/}"/usr/share/applications/*.desktop "${ED%/}"/usr/share/applications/"${MY_PN}".desktop || die "mv failed"
       
   103 }
       
   104 
       
   105 pkg_postinst() {
       
   106 	elog "Genymotion needs adb to work correctly: install with android-sdk-update-manager"
       
   107 	elog "'Android SDK Platform-tools' and 'Android SDK Tools'"
       
   108 	elog "Your user should also be in the android group to work correctly"
       
   109 	elog "Then in Genymotion set the android-sdk-update-manager directory: (Settings->ADB)"
       
   110 	elog
       
   111 	elog "      /opt/android-sdk-update-manager"
       
   112 }