1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=(python{3_6,3_7})
7 PYTHON_REQ_USE="readline(+)"
11 DESCRIPTION="Replacement for 'emerge --search' with search-index"
12 HOMEPAGE="https://github.com/fuzzyray/esearch"
13 SRC_URI="https://github.com/downloads/fuzzyray/${PN}/${P}.tar.gz"
17 IUSE="l10n_fr l10n_it"
19 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
21 DEPEND="sys-apps/portage"
24 # Populate the patches array for any patches for -rX releases
25 # It is an array of patch file names of the form:
26 # "${FILESDIR}"/${PV}-fix-EPREFIX-capability.patch
28 "${FILESDIR}"/${PV}-Fix-setup.py.patch
29 "${FILESDIR}"/${PV}-Fix-python-3-compatability.patch
32 python_configure_all() {
33 echo VERSION="${PVR}" "${EPYTHON}" setup.py set_version
34 VERSION="${PVR}" "${EPYTHON}" setup.py set_version \
35 || die "setup.py set_version failed"
38 python_install_all() {
39 distutils-r1_python_install_all
42 # Remove unused man pages according to the l10n flags
43 if ! use l10n_fr ; then
44 rm -rf "${ED}"/usr/share/man/fr \
45 || die "rm failed to remove ${ED}/usr/share/man/fr"
48 if ! use l10n_it ; then
49 rm -rf "${ED}"/usr/share/man/it \
50 || die "rm failed to remove ${ED}/usr/share/man/it"