]> git.bzium.org/ - embe/overlay.git/blob - app-portage/eix/eix-9999.ebuild
4d24bd46e3a58c613caf0d6ac7a8aa531bb9c5db
[embe/overlay.git] / app-portage / eix / eix-9999.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 EGIT_REPO_URI="https://github.com/vaeth/eix.git"
7
8 WANT_LIBTOOL="none"
9
10 PLOCALES="de ru"
11 inherit autotools git-r3 bash-completion-r1 l10n systemd
12
13 DESCRIPTION="Search and query ebuilds"
14 HOMEPAGE="https://github.com/vaeth/eix/"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS=""
19 IUSE="debug doc nls sqlite"
20
21 BOTHDEPEND="nls? ( virtual/libintl )
22         sqlite? ( >=dev-db/sqlite-3:= )"
23 RDEPEND="${BOTHDEPEND}
24         >=app-shells/push-2.0
25         >=app-shells/quoter-3.0"
26 DEPEND="${BOTHDEPEND}
27         doc? ( dev-python/docutils )
28         >=sys-devel/gettext-0.18.3"
29
30 pkg_setup() {
31         # remove stale cache file to prevent collisions
32         local old_cache=${EROOT%/}/var/cache/${PN}
33         if [[ -f ${old_cache} ]]; then
34                 rm "${old_cache}" || die
35         fi
36 }
37
38 src_prepare() {
39         default
40         sed -i -e "s:/:${EPREFIX}/:" tmpfiles.d/eix.conf || die
41         eautoreconf
42 }
43
44 src_configure() {
45         local myconf=(
46                 $(use_enable debug paranoicasserts)
47                 $(use_enable nls)
48                 $(use_with doc extra-doc)
49                 $(use_with sqlite)
50
51                 # default configuration
52                 $(use_with prefix always-accept-keywords)
53                 --with-dep-default
54                 --with-required-use-default
55
56                 # paths
57                 --with-portage-rootpath="${ROOTPATH}"
58                 --with-eprefix-default="${EPREFIX}"
59
60                 # build a single executable with symlinks
61                 --disable-separate-binaries
62                 --disable-separate-tools
63
64                 # used purely to control/disrespect *FLAGS
65                 --disable-debugging
66                 --enable-new_dialect
67                 --disable-optimization
68                 --disable-strong-optimization
69                 --disable-security
70                 --disable-nopie-security
71                 --disable-strong-security
72         )
73
74         econf "${myconf[@]}"
75 }
76
77 src_install() {
78         default
79         dobashcomp bash/eix
80         systemd_dotmpfilesd tmpfiles.d/eix.conf
81 }
82
83 pkg_postinst() {
84         if ! use prefix; then
85                 # note: if this is done in src_install(), portage:portage
86                 # ownership may be reset to root
87                 chown portage:portage "${EROOT%/}"/var/cache/eix || die
88         fi
89
90         local obs=${EROOT%/}/var/cache/eix.previous
91         if [[ -f ${obs} ]]; then
92                 ewarn "Found obsolete ${obs}, please remove it"
93         fi
94 }
95
96 pkg_postrm() {
97         if [[ ! -n ${REPLACED_BY_VERSION} ]]; then
98                 rm -rf "${EROOT%/}/var/cache/${PN}" || die
99         fi
100 }