diff --git a/app-misc/gplaycli/files/pyaxmlparser.patch b/app-misc/gplaycli/files/pyaxmlparser.patch new file mode 100644 index 000000000..21161a845 --- /dev/null +++ b/app-misc/gplaycli/files/pyaxmlparser.patch @@ -0,0 +1,42 @@ +reverted: +--- b/gplaycli/gplaycli.py ++++ a/gplaycli/gplaycli.py +@@ -32,7 +32,7 @@ + from gpapi.googleplay import RequestError + from google.protobuf.message import DecodeError + from pkg_resources import get_distribution, DistributionNotFound ++from pyaxmlparser import APK +-from androguard.core.bytecodes.apk import APK + + from clint.textui import progress + +@@ -494,7 +494,7 @@ + apk = APK(filepath) + packagename = apk.package + package_bunch.append(packagename) ++ version_codes.append(util.vcode(apk.version_code)) +- version_codes.append(util.vcode(apk.get_androidversion_code())) + + # BulkDetails requires only one HTTP request + # Get APK info from store +reverted: +--- b/requirements.txt ++++ a/requirements.txt +@@ -1,4 +1,4 @@ + protobuf + gpapi ++pyaxmlparser +-androguard + clint +reverted: +--- b/setup.py ++++ a/setup.py +@@ -33,7 +33,7 @@ + install_requires=[ + 'protobuf', + 'gpapi == 0.4.2', ++ 'pyaxmlparser', +- 'androguard', + 'clint', + ], + ) diff --git a/app-misc/gplaycli/gplaycli-3.22-r1.ebuild b/app-misc/gplaycli/gplaycli-3.22-r1.ebuild new file mode 100644 index 000000000..47ac34d6d --- /dev/null +++ b/app-misc/gplaycli/gplaycli-3.22-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_{5,6} ) +inherit distutils-r1 + +DESCRIPTION="Google Play Downloader via Command line" +HOMEPAGE="https://github.com/matlink/gplaycli" +SRC_URI="https://github.com/matlink/gplaycli/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="pyaxmlparser" + +#https://github.com/matlink/gplaycli/issues/182 +change_deps() { + PATCHES=( "${FILESDIR}/pyaxmlparser.patch" ) +} + +RDEPEND="dev-python/protobuf-python[${PYTHON_USEDEP}] + >=dev-python/gpapi-0.4.2[${PYTHON_USEDEP}] + pyaxmlparser? ( dev-python/pyaxmlparser[${PYTHON_USEDEP}] ) + !pyaxmlparser? ( dev-python/androguard[${PYTHON_USEDEP}] ) + dev-python/clint[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}]" + +python_prepare_all() { + use pyaxmlparser && change_deps + + # disarm pycrypto dep to allow || ( pycryptodome pycrypto ) + sed -i -e "s|os.path.expanduser('~')+'/.config/|'/etc/|" setup.py || die + distutils-r1_python_prepare_all +}