dev-libs/libreport: Version bump to 2.12.0
[gentoo.git] / dev-libs / libreport / libreport-2.12.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python3_{6,7} )
6
7 inherit autotools python-r1
8
9 DESCRIPTION="Generic library for reporting software bugs"
10 HOMEPAGE="https://github.com/abrt/libreport"
11 SRC_URI="https://github.com/abrt/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16
17 IUSE="gtk +python"
18 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
19
20 DEPEND="${PYTHON_DEPS}
21         app-admin/augeas
22         >=dev-libs/glib-2.43.4:2
23         dev-libs/satyr:0=
24         dev-libs/json-c:=
25         dev-libs/libtar
26         dev-libs/libxml2:2
27         dev-libs/nettle:=
28         dev-libs/newt:=
29         dev-libs/xmlrpc-c:=
30         net-libs/libproxy:=
31         net-misc/curl:=[ssl]
32         sys-apps/dbus
33         sys-apps/systemd
34         gtk? ( >=x11-libs/gtk+-3.3.12:3 )
35         python? ( ${PYTHON_DEPS} )
36         x11-misc/xdg-utils
37 "
38 RDEPEND="${DEPEND}
39         acct-user/abrt
40         acct-group/abrt
41 "
42 BDEPEND="
43         app-text/asciidoc
44         app-text/xmlto
45         >=dev-util/intltool-0.3.50
46         >=sys-devel/gettext-0.17
47         virtual/pkgconfig
48 "
49
50 # Tests require python-meh, which is highly redhat-specific.
51 RESTRICT="test"
52
53 src_prepare() {
54         default
55         ./gen-version || die # Needed to be run before autoreconf
56         eautoreconf
57         use python && python_copy_sources
58 }
59
60 src_configure() {
61         use python && python_setup
62
63         local myargs=(
64                 --localstatedir="${EPREFIX}/var"
65                 --without-bugzilla
66                 $(use_with gtk)
67                 $(use_with python python3)
68         )
69         if use python; then
70                 python_foreach_impl run_in_build_dir econf "${myargs[@]}"
71         else
72                 econf "${myargs[@]}"
73         fi
74 }
75
76 src_compile() {
77         if use python; then
78                 python_foreach_impl run_in_build_dir default
79         else
80                 default
81         fi
82 }
83
84 src_install() {
85         if use python; then
86                 python_install() {
87                         default
88                         python_optimize
89                 }
90                 python_foreach_impl run_in_build_dir python_install
91         else
92                 default
93         fi
94
95         # Need to set correct ownership for use by app-admin/abrt
96         diropts -o abrt -g abrt
97         keepdir /var/spool/abrt
98
99         find "${D}" -name '*.la' -exec rm -f {} + || die
100 }