summaryrefslogtreecommitdiff
path: root/dev-libs/libreport/libreport-2.1.9.ebuild
blob: bf03a8599de31f8ad2991e28f97b6a359455dec0 (plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="5"

PYTHON_COMPAT=( python{2_6,2_7} )

inherit autotools eutils python-r1 user

DESCRIPTION="Generic library for reporting software bugs"
HOMEPAGE="https://fedorahosted.org/abrt/"
SRC_URI="https://fedorahosted.org/released/abrt/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="debug +gtk"

COMMON_DEPEND="!dev-python/python-report
	>=dev-libs/glib-2.21:2
	dev-libs/satyr
	dev-libs/json-c:=
	dev-libs/libtar
	dev-libs/libxml2:2
	dev-libs/newt:=
	dev-libs/nss:=
	dev-libs/xmlrpc-c:=
	net-libs/libproxy:=
	net-misc/curl:=[ssl]
	sys-apps/dbus
	gtk? ( >=x11-libs/gtk+-3.3.12:3 )
	x11-misc/xdg-utils
	${PYTHON_DEPS}
"
RDEPEND="${COMMON_DEPEND}"
DEPEND="${COMMON_DEPEND}
	app-text/asciidoc
	app-text/xmlto
	>=dev-util/intltool-0.3.50
	>=sys-devel/gettext-0.17
	virtual/pkgconfig
"

# Tests require python-meh, which is highly redhat-specific.
RESTRICT="test"

pkg_setup() {
	enewgroup abrt
	enewuser abrt -1 -1 -1 abrt
}

src_prepare() {
	# Replace redhat- and fedora-specific defaults with gentoo ones, and disable
	# code that requires gentoo infra support.
	epatch "${FILESDIR}/0001-Add-Kogaion-customizations.patch"
	epatch "${FILESDIR}/0002-Drop-Fedora-workflows-add-Kogaion-one.patch"

	# json-c support
	epatch "${FILESDIR}/libreport-2.1.9-json-c.patch"

	mkdir -p m4
	eautoreconf

	python_copy_sources
}

src_configure() {
	python_foreach_impl run_in_build_dir econf \
		--localstatedir="${EPREFIX}/var" \
		$(usex debug --enable-debug "")
	# --disable-debug enables debug!
}

src_compile() {
	python_foreach_impl run_in_build_dir default
}

src_install() {
	python_foreach_impl run_in_build_dir default

	# Need to set correct ownership for use by app-admin/abrt
	diropts -o abrt -g abrt
	keepdir /var/spool/abrt

	prune_libtool_files --modules
}