app-portage/pram: Bump to v9
[gentoo.git] / app-portage / esearch / esearch-1.3-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=(python{3_6,3_7})
7 PYTHON_REQ_USE="readline(+)"
8
9 inherit distutils-r1
10
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"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 IUSE="l10n_fr l10n_it"
18
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"
20
21 DEPEND="sys-apps/portage"
22 RDEPEND="${DEPEND}"
23
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
27 PATCHES=(
28         "${FILESDIR}"/${PV}-Fix-setup.py.patch
29         "${FILESDIR}"/${PV}-Fix-python-3-compatability.patch
30 )
31
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"
36 }
37
38 python_install_all() {
39         distutils-r1_python_install_all
40         dodoc eupdatedb.cron
41
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"
46         fi
47
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"
51         fi
52 }