forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
esearch-1.3-r1.ebuild
53 lines (42 loc) · 1.51 KB
/
esearch-1.3-r1.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
PYTHON_COMPAT=(python{2_7,3_4})
PYTHON_REQ_USE="readline(+)"
inherit distutils-r1
DESCRIPTION="Replacement for 'emerge --search' with search-index"
HOMEPAGE="https://github.com/fuzzyray/esearch"
SRC_URI="mirror://github/fuzzyray/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
IUSE="linguas_fr linguas_it"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
DEPEND="sys-apps/portage"
RDEPEND="${DEPEND}"
# Populate the patches array for any patches for -rX releases
# It is an array of patch file names of the form:
# "${FILESDIR}"/${PV}-fix-EPREFIX-capability.patch
PATCHES=(
"${FILESDIR}"/${PV}-Fix-setup.py.patch
"${FILESDIR}"/${PV}-Fix-python-3-compatability.patch
)
python_prepare_all() {
python_export_best
echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
VERSION="${PVR}" "${PYTHON}" setup.py set_version \
|| die "setup.py set_version failed"
distutils-r1_python_prepare_all
}
python_install_all() {
distutils-r1_python_install_all
dodoc eupdatedb.cron || die "dodoc failed"
# Remove unused man pages according to the linguas flags
if ! use linguas_fr ; then
rm -rf "${ED}"/usr/share/man/fr \
|| die "rm failed to remove ${ED}/usr/share/man/fr"
fi
if ! use linguas_it ; then
rm -rf "${ED}"/usr/share/man/it \
|| die "rm failed to remove ${ED}/usr/share/man/it"
fi
}