Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-portage/eix/
Date: Sat, 29 Sep 2018 08:17:04
Message-Id: 1538209008.f8039025292b2bbac64eedc22c6321ac442559fb.mgorny@gentoo
1 commit: f8039025292b2bbac64eedc22c6321ac442559fb
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 29 08:06:58 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 29 08:16:48 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8039025
7
8 app-portage/eix: Fix C++ standard to C++14 to fix code bugs
9
10 Closes: https://bugs.gentoo.org/649558
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12
13 app-portage/eix/eix-0.33.2-r1.ebuild | 109 +++++++++++++++++++++++++++++++++++
14 1 file changed, 109 insertions(+)
15
16 diff --git a/app-portage/eix/eix-0.33.2-r1.ebuild b/app-portage/eix/eix-0.33.2-r1.ebuild
17 new file mode 100644
18 index 00000000000..507d7acf722
19 --- /dev/null
20 +++ b/app-portage/eix/eix-0.33.2-r1.ebuild
21 @@ -0,0 +1,109 @@
22 +# Copyright 1999-2018 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +inherit autotools bash-completion-r1 flag-o-matic tmpfiles
28 +
29 +DESCRIPTION="Search and query ebuilds"
30 +HOMEPAGE="https://github.com/vaeth/eix/"
31 +SRC_URI="https://github.com/vaeth/eix/releases/download/v${PV}/${P}.tar.xz"
32 +
33 +LICENSE="GPL-2"
34 +SLOT="0"
35 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
36 +IUSE="debug doc nls sqlite"
37 +
38 +BOTHDEPEND="nls? ( virtual/libintl )
39 + sqlite? ( >=dev-db/sqlite-3:= )"
40 +RDEPEND="${BOTHDEPEND}
41 + >=app-shells/push-2.0-r1
42 + >=app-shells/quoter-3.0_p2-r1"
43 +DEPEND="${BOTHDEPEND}
44 + app-arch/xz-utils
45 + nls? ( sys-devel/gettext )"
46 +
47 +pkg_setup() {
48 + # remove stale cache file to prevent collisions
49 + local old_cache=${EROOT%/}/var/cache/${PN}
50 + if [[ -f ${old_cache} ]]; then
51 + rm "${old_cache}" || die
52 + fi
53 +}
54 +
55 +src_prepare() {
56 + default
57 + sed -i -e "s:/:${EPREFIX}/:" tmpfiles.d/eix.conf || die
58 +
59 + sed -e "/eixf_source=/s:push.sh:cat \"${EROOT}usr/share/push/push.sh\":" \
60 + -e "/eixf_source=/s:quoter_pipe.sh:cat \"${EROOT}usr/share/quoter/quoter_pipe.sh\":" \
61 + -i src/eix-functions.sh.in || die
62 + sed -e "s:'\$(bindir)/eix-functions.sh':cat \\\\\"${EROOT}usr/share/eix/eix-functions\\\\\":" \
63 + -i src/Makefile.am || die
64 + eautoreconf
65 +}
66 +
67 +src_configure() {
68 + local myconf=(
69 + $(use_enable debug paranoic-asserts)
70 + $(use_enable nls)
71 + $(use_with doc extra-doc)
72 + $(use_with sqlite)
73 +
74 + # default configuration
75 + $(use_with prefix always-accept-keywords)
76 + --with-dep-default
77 + --with-required-use-default
78 +
79 + # paths
80 + --with-portage-rootpath="${ROOTPATH}"
81 + --with-eprefix-default="${EPREFIX}"
82 +
83 + # build a single executable with symlinks
84 + --disable-separate-binaries
85 + --disable-separate-tools
86 +
87 + # used purely to control/disrespect *FLAGS
88 + --disable-debugging
89 + --disable-new_dialect
90 + --disable-optimization
91 + --disable-strong-optimization
92 + --disable-security
93 + --disable-nopie-security
94 + --disable-strong-security
95 + )
96 +
97 + # https://github.com/vaeth/eix/issues/35
98 + append-cxxflags -std=c++14
99 +
100 + econf "${myconf[@]}"
101 +}
102 +
103 +src_install() {
104 + default
105 + dobashcomp bash/eix
106 + dotmpfiles tmpfiles.d/eix.conf
107 +
108 + rm -r "${ED%/}"/usr/bin/eix-functions.sh || die
109 +
110 + keepdir /var/cache/eix
111 +}
112 +
113 +pkg_postinst() {
114 + if ! use prefix; then
115 + # note: if this is done in src_install(), portage:portage
116 + # ownership may be reset to root
117 + tmpfiles_process eix.conf
118 + fi
119 +
120 + local obs=${EROOT%/}/var/cache/eix.previous
121 + if [[ -f ${obs} ]]; then
122 + ewarn "Found obsolete ${obs}, please remove it"
123 + fi
124 +}
125 +
126 +pkg_postrm() {
127 + if [[ ! -n ${REPLACED_BY_VERSION} ]]; then
128 + rm -rf "${EROOT%/}/var/cache/${PN}" || die
129 + fi
130 +}