blob: 46f9b8c8391fd186f63eed1e1494f07d495642b7 (
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libreport/libreport-2.0.10.ebuild,v 1.4 2012/10/04 14:49:28 ago Exp $
EAPI="4"
PYTHON_DEPEND="2:2.6"
inherit autotools eutils python 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"
RDEPEND=">=dev-libs/glib-2.21:2
dev-libs/newt
dev-libs/nss
dev-libs/libtar
dev-libs/libxml2
dev-libs/xmlrpc-c
gnome-base/gnome-keyring
net-libs/libproxy
net-misc/curl[ssl]
sys-apps/dbus
x11-libs/gtk+:2"
DEPEND="${RDEPEND}
app-text/asciidoc
app-text/xmlto
>=dev-util/intltool-0.3.50
virtual/pkgconfig
>=sys-devel/gettext-0.17"
# Tests require python-meh, which is highly redhat-specific.
RESTRICT="test"
pkg_setup() {
python_set_active_version 2
python_pkg_setup
enewgroup abrt
enewuser abrt -1 -1 -1 abrt
}
src_prepare() {
# Replace redhat- and fedora-specific defaults with gentoo ones
epatch "${FILESDIR}/${PN}-2.0.9-gentoo.patch"
# Disable bugzilla plugin for now (requires bugs.gentoo.org infra support)
epatch "${FILESDIR}/${PN}-2.0.9-no-bugzilla.patch"
# Modify uploader_event so that the gui recognizes it
epatch "${FILESDIR}/${PN}-2.0.7-uploader_event-syntax.patch"
# automake-1.12
sed \
-e 's:AM_PROG_MKDIR_P:AC_PROG_MKDIR_P:g' \
-i aclocal.m4 || die
sed \
-e 's:mkdir_p:MKDIR_P:g' \
-i src/plugins/Makefile.am src/lib/Makefile.am || die
sed \
-e "/AC_PROG_LIBTOOL/s:^:AM_PROG_AR\n:g" \
-i configure.ac || die
# -Werror should not be used by default
sed -e "s/-Werror\( \|$\)//" \
-i src/client-python/Makefile.* src/cli/Makefile.* \
src/gtk-helpers/Makefile.* src/gui-wizard-gtk/Makefile.* \
src/lib/Makefile.* src/plugins/Makefile.* \
src/report-python/Makefile.* configure.ac || die "sed failed"
python_clean_py-compile_files
mkdir m4
eautoreconf
}
src_configure() {
# Gentoo's xmlrpc-c does not provide a pkgconfig file
# XXX: this is probably cross-compile-unfriendly
export XMLRPC_CFLAGS=$(xmlrpc-c-config --cflags)
export XMLRPC_LIBS=$(xmlrpc-c-config --libs)
export XMLRPC_CLIENT_CFLAGS=$(xmlrpc-c-config client --cflags)
export XMLRPC_CLIENT_LIBS=$(xmlrpc-c-config client --libs)
# Configure checks for python.pc; our python-2.7 installs python-2.7.pc,
# while python-2.6 does not install any pkgconfig file.
export PYTHON_CFLAGS=$(python-config --includes)
export PYTHON_LIBS=$(python-config --libs)
ECONF="--disable-bodhi
--localstatedir=${EPREFIX}/var"
# --disable-debug enables debug!
use debug && ECONF="${ECONF} --enable-debug"
econf ${ECONF}
}
src_install() {
default
# Need to set correct ownership for use by app-admin/abrt
diropts -o abrt -g abrt
keepdir /var/spool/abrt
find "${D}" -name '*.la' -exec rm -f {} + || die
}
pkg_postinst() {
python_mod_optimize report reportclient
}
pkg_postrm() {
python_mod_cleanup report reportclient
}
|