public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gnome:master commit in: dev-libs/libreport/files/, dev-libs/libreport/
@ 2011-10-08  9:21 Alexandre Restovtsev
  0 siblings, 0 replies; only message in thread
From: Alexandre Restovtsev @ 2011-10-08  9:21 UTC (permalink / raw
  To: gentoo-commits

commit:     5ecb56f30d8ea9a89806fbdcf80606cce761dcf9
Author:     Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Sat Oct  8 09:18:01 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Sat Oct  8 09:20:16 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=5ecb56f3

dev-libs/libreport: new package

Needed for abrt

---
 .../libreport/files/libreport-2.0.6-gentoo.patch   |  151 ++++++++++++++
 .../files/libreport-2.0.6-no-bugzilla.patch        |   78 +++++++
 .../files/libreport-2.0.6-not-reportable.patch     |  218 ++++++++++++++++++++
 dev-libs/libreport/libreport-2.0.6.ebuild          |  100 +++++++++
 4 files changed, 547 insertions(+), 0 deletions(-)

diff --git a/dev-libs/libreport/files/libreport-2.0.6-gentoo.patch b/dev-libs/libreport/files/libreport-2.0.6-gentoo.patch
new file mode 100644
index 0000000..8aca7b1
--- /dev/null
+++ b/dev-libs/libreport/files/libreport-2.0.6-gentoo.patch
@@ -0,0 +1,151 @@
+From 003f49be7c44ea85c1ae5826342749b11aac28ee Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gmail.com>
+Date: Fri, 7 Oct 2011 23:25:14 -0400
+Subject: [PATCH] Replace RedHat defaults with Gentoo ones
+
+---
+ src/plugins/Makefile.am            |   34 +---------------------------------
+ src/plugins/bugzilla.conf          |    2 +-
+ src/plugins/report_Bugzilla.conf   |    2 +-
+ src/plugins/report_Bugzilla.xml.in |    4 ++--
+ src/plugins/reporter-bugzilla.txt  |    2 +-
+ 5 files changed, 6 insertions(+), 38 deletions(-)
+
+diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
+index 19e53fc..607c1b9 100644
+--- a/src/plugins/Makefile.am
++++ b/src/plugins/Makefile.am
+@@ -4,7 +4,6 @@ pluginslibdir = $(PLUGINS_LIB_DIR)
+ 
+ bin_PROGRAMS = \
+     reporter-bugzilla \
+-    reporter-rhtsupport \
+     reporter-kerneloops \
+     reporter-upload \
+     reporter-mailx \
+@@ -16,8 +15,7 @@ pluginsconfdir = $(PLUGINS_CONF_DIR)
+ reportpluginsconfdir = $(REPORT_PLUGINS_CONF_DIR)
+ 
+ dist_reportpluginsconf_DATA = \
+-    bugzilla.conf \
+-    rhtsupport.conf
++    bugzilla.conf
+ 
+ eventsdir = $(EVENTS_DIR)
+ 
+@@ -27,7 +25,6 @@ dist_events_DATA = \
+     report_Logger.conf \
+     report_Logger.xml \
+     report_Mailx.xml \
+-    report_RHTSupport.xml \
+     report_Kerneloops.xml \
+     report_Uploader.xml
+ 
+@@ -39,14 +36,12 @@ dist_eventsconf_DATA = \
+     mailx_event.conf \
+     print_event.conf \
+     bugzilla_event.conf \
+-    rhtsupport_event.conf \
+     uploader_event.conf
+ 
+ MAN_TXT = \
+     reporter-print.txt \
+     reporter-mailx.txt \
+     reporter-bugzilla.txt \
+-    reporter-rhtsupport.txt \
+     reporter-kerneloops.txt \
+     reporter-upload.txt \
+     report.txt
+@@ -71,7 +66,6 @@ EXTRA_DIST = \
+     report_Logger.conf \
+     report_Logger.xml.in \
+     report_Mailx.xml.in \
+-    report_RHTSupport.xml.in \
+     report_Kerneloops.xml.in \
+     report_Uploader.xml.in
+ 
+@@ -100,32 +94,6 @@ reporter_bugzilla_LDADD = \
+     ../lib/libabrt_web.la \
+     ../lib/libreport.la
+ 
+-reporter_rhtsupport_SOURCES = \
+-    abrt_rh_support.h abrt_rh_support.c \
+-    reporter-rhtsupport.c
+-reporter_rhtsupport_CPPFLAGS = \
+-    -I$(srcdir)/../include \
+-    -I$(srcdir)/../lib \
+-    -DBIN_DIR=\"$(bindir)\" \
+-    -DVAR_RUN=\"$(VAR_RUN)\" \
+-    -DCONF_DIR=\"$(CONF_DIR)\" \
+-    -DLOCALSTATEDIR='"$(localstatedir)"' \
+-    -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
+-    -DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
+-    -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
+-    -DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
+-    $(GLIB_CFLAGS) \
+-    $(LIBREPORT_CFLAGS) \
+-    $(XMLRPC_CFLAGS) $(XMLRPC_CLIENT_CFLAGS) \
+-    -D_GNU_SOURCE \
+-    -Wall -Wwrite-strings -Werror
+-reporter_rhtsupport_LDFLAGS = -ltar
+-reporter_rhtsupport_LDADD = \
+-    $(GLIB_LIBS) \
+-    $(XMLRPC_LIBS) $(XMLRPC_CLIENT_LIBS) \
+-    ../lib/libabrt_web.la \
+-    ../lib/libreport.la
+-
+ reporter_upload_SOURCES = \
+     reporter-upload.c
+ reporter_upload_CPPFLAGS = \
+diff --git a/src/plugins/bugzilla.conf b/src/plugins/bugzilla.conf
+index 18eba5a..f5afe6f 100644
+--- a/src/plugins/bugzilla.conf
++++ b/src/plugins/bugzilla.conf
+@@ -1,5 +1,5 @@
+ # Bugzilla URL
+-BugzillaURL = https://bugzilla.redhat.com/
++BugzillaURL = https://bugs.gentoo.org/
+ # yes means that ssl certificates will be checked
+ SSLVerify = yes
+ # your login has to exist, if you don have any, please create one
+diff --git a/src/plugins/report_Bugzilla.conf b/src/plugins/report_Bugzilla.conf
+index f1a77f5..9e9c7d0 100644
+--- a/src/plugins/report_Bugzilla.conf
++++ b/src/plugins/report_Bugzilla.conf
+@@ -1,4 +1,4 @@
+-Bugzilla_BugzillaURL = https://bugzilla.redhat.com
++Bugzilla_BugzillaURL = https://bugs.gentoo.org
+ Bugzilla_Login =
+ Bugzilla_Password =
+ Bugzilla_SSLVerify = yes
+diff --git a/src/plugins/report_Bugzilla.xml.in b/src/plugins/report_Bugzilla.xml.in
+index f8dac8f..e91115f 100644
+--- a/src/plugins/report_Bugzilla.xml.in
++++ b/src/plugins/report_Bugzilla.xml.in
+@@ -15,8 +15,8 @@
+             <_label>Bugzilla URL</_label>
+             <allow-empty>no</allow-empty>
+             <_description>Address of Bugzilla server</_description>
+-            <default-value>https://bugzilla.redhat.com</default-value>
+-            <_note-html>You can create bugzilla.redhat.com account &lt;a href="https://bugzilla.redhat.com/createaccount.cgi"&gt;here&lt;/a&gt;</_note-html>
++            <default-value>https://bugs.gentoo.org</default-value>
++            <_note-html>You can create a Gentoo Bugzilla account &lt;a href="https://bugs.gentoo.org/createaccount.cgi"&gt;here&lt;/a&gt;</_note-html>
+         </option>
+         <option type="text" name="Bugzilla_Login">
+             <_label>User name</_label>
+diff --git a/src/plugins/reporter-bugzilla.txt b/src/plugins/reporter-bugzilla.txt
+index 4285600..29c45ce 100644
+--- a/src/plugins/reporter-bugzilla.txt
++++ b/src/plugins/reporter-bugzilla.txt
+@@ -41,7 +41,7 @@ Configuration file lines should have 'PARAM = VALUE' format. The parameters are:
+ 	Password to Bugzilla account.
+ 
+ 'BugzillaURL'::
+-	Bugzilla HTTP(S) address. (default: https://bugzilla.redhat.com)
++	Bugzilla HTTP(S) address. (default: https://bugs.gentoo.org)
+ 
+ 'SSLVerify'::
+ 	Use yes/true/on/1 to verify server's SSL certificate. (default: yes)
+-- 
+1.7.7
+

diff --git a/dev-libs/libreport/files/libreport-2.0.6-no-bugzilla.patch b/dev-libs/libreport/files/libreport-2.0.6-no-bugzilla.patch
new file mode 100644
index 0000000..4a11c7f
--- /dev/null
+++ b/dev-libs/libreport/files/libreport-2.0.6-no-bugzilla.patch
@@ -0,0 +1,78 @@
+From 4cbdd212a9cb77ae586aa76936a6af8e4aaa1344 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gmail.com>
+Date: Sat, 8 Oct 2011 00:26:15 -0400
+Subject: [PATCH] Disable bugzilla plugin (requires Gentoo infrastructure
+ changes)
+
+---
+ src/plugins/Makefile.am |   28 +---------------------------
+ 1 files changed, 1 insertions(+), 27 deletions(-)
+
+diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
+index 607c1b9..5addc10 100644
+--- a/src/plugins/Makefile.am
++++ b/src/plugins/Makefile.am
+@@ -3,7 +3,6 @@
+ pluginslibdir = $(PLUGINS_LIB_DIR)
+ 
+ bin_PROGRAMS = \
+-    reporter-bugzilla \
+     reporter-kerneloops \
+     reporter-upload \
+     reporter-mailx \
+@@ -14,8 +13,7 @@ pluginsconfdir = $(PLUGINS_CONF_DIR)
+ 
+ reportpluginsconfdir = $(REPORT_PLUGINS_CONF_DIR)
+ 
+-dist_reportpluginsconf_DATA = \
+-    bugzilla.conf
++dist_reportpluginsconf_DATA = 
+ 
+ eventsdir = $(EVENTS_DIR)
+ 
+@@ -35,13 +33,11 @@ eventsconfdir = $(EVENTS_CONF_DIR)
+ dist_eventsconf_DATA = \
+     mailx_event.conf \
+     print_event.conf \
+-    bugzilla_event.conf \
+     uploader_event.conf
+ 
+ MAN_TXT = \
+     reporter-print.txt \
+     reporter-mailx.txt \
+-    reporter-bugzilla.txt \
+     reporter-kerneloops.txt \
+     reporter-upload.txt \
+     report.txt
+@@ -72,28 +68,6 @@ EXTRA_DIST = \
+ $(DESTDIR)/$(DEBUG_INFO_DIR):
+ 	$(mkdir_p) '$@'
+ 
+-reporter_bugzilla_SOURCES = \
+-    reporter-bugzilla.c rhbz.c rhbz.h
+-reporter_bugzilla_CPPFLAGS = \
+-    -I$(srcdir)/../include \
+-    -I$(srcdir)/../lib \
+-    -DBIN_DIR=\"$(bindir)\" \
+-    -DVAR_RUN=\"$(VAR_RUN)\" \
+-    -DCONF_DIR=\"$(CONF_DIR)\" \
+-    -DLOCALSTATEDIR='"$(localstatedir)"' \
+-    -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
+-    -DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
+-    -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
+-    -DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
+-    $(GLIB_CFLAGS) \
+-    $(LIBREPORT_CFLAGS) \
+-    -D_GNU_SOURCE \
+-    -Wall -Wwrite-strings
+-reporter_bugzilla_LDADD = \
+-    $(GLIB_LIBS) \
+-    ../lib/libabrt_web.la \
+-    ../lib/libreport.la
+-
+ reporter_upload_SOURCES = \
+     reporter-upload.c
+ reporter_upload_CPPFLAGS = \
+-- 
+1.7.7
+

diff --git a/dev-libs/libreport/files/libreport-2.0.6-not-reportable.patch b/dev-libs/libreport/files/libreport-2.0.6-not-reportable.patch
new file mode 100644
index 0000000..e1e1ae4
--- /dev/null
+++ b/dev-libs/libreport/files/libreport-2.0.6-not-reportable.patch
@@ -0,0 +1,218 @@
+commit fbcf816140baa534e390fc7d4124189a3d406659
+Author: Nikola Pajkovsky <npajkovs@redhat.com>
+Date:   Wed Oct 5 15:50:20 2011 +0200
+
+    refuse reporting when *not-reportable* file exist
+    
+    Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
+
+diff --git a/src/cli/cli-report.c b/src/cli/cli-report.c
+index 0011ebc..c8fa672 100644
+--- a/src/cli/cli-report.c
++++ b/src/cli/cli-report.c
+@@ -750,6 +750,26 @@ int report(const char *dump_dir_name, int flags)
+     if (!dd)
+         return -1;
+ 
++    char *not_reportable = dd_load_text_ext(dd, FILENAME_NOT_REPORTABLE, 0
++                                            | DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE
++                                            | DD_FAIL_QUIETLY_ENOENT
++                                            | DD_FAIL_QUIETLY_EACCES);
++
++    if (not_reportable)
++    {
++        char *reason = dd_load_text_ext(dd, FILENAME_REASON, 0
++                                        | DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE);
++        char *t = xasprintf("%s%s%s",
++                            not_reportable ?: "",
++                            not_reportable ? ": " : "",
++                            reason ?: _("(no description)"));
++
++        dd_close(dd);
++        error_msg("%s", t);
++        free(t);
++        xfunc_die();
++    }
++
+     if (!(flags & CLI_REPORT_ONLY))
+     {
+         char *analyze_events_as_lines = list_possible_events(dd, NULL, "analyze");
+diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
+index 0279f83..8bdc8d1 100644
+--- a/src/gui-wizard-gtk/wizard.c
++++ b/src/gui-wizard-gtk/wizard.c
+@@ -1032,7 +1032,16 @@ void update_gui_state_from_problem_data(void)
+     gtk_window_set_title(GTK_WINDOW(g_assistant), g_dump_dir_name);
+ 
+     const char *reason = get_problem_item_content_or_NULL(g_cd, FILENAME_REASON);
+-    gtk_label_set_text(g_lbl_cd_reason, reason ? reason : _("(no description)"));
++    const char *not_reportable = get_problem_item_content_or_NULL(g_cd,
++                                                                  FILENAME_NOT_REPORTABLE);
++
++    char *t = xasprintf("%s%s%s",
++                        not_reportable ?: "",
++                        not_reportable ? ": " : "",
++                        reason ?: _("(no description)"));
++
++    gtk_label_set_text(g_lbl_cd_reason, t);
++    free(t);
+ 
+     gtk_list_store_clear(g_ls_details);
+     struct cd_stats stats = { 0 };
+@@ -2281,12 +2290,21 @@ static void add_pages()
+             error_msg_and_die("Can't load %s: %s", g_glade_file, error->message);
+     }
+ 
++    struct dump_dir *dd = dd_opendir(g_dump_dir_name, DD_OPEN_READONLY | DD_FAIL_QUIETLY_EACCES);
++    if (!dd)
++        return;
++    char *not_reportable = dd_load_text_ext(dd, FILENAME_NOT_REPORTABLE, 0
++                                            | DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE
++                                            | DD_FAIL_QUIETLY_ENOENT
++                                            | DD_FAIL_QUIETLY_EACCES);
++    dd_close(dd);
++
+     int i;
+     int page_no = 0;
+     for (i = 0; page_names[i] != NULL; i++)
+     {
+         char *delim = strrchr(page_names[i], '_');
+-        if (delim != NULL)
++        if (!not_reportable && delim)
+         {
+             if (g_report_only && (strncmp(delim + 1, "report", strlen("report"))) != 0)
+             {
+@@ -2308,10 +2326,14 @@ static void add_pages()
+         gtk_assistant_set_page_complete(g_assistant, page, true);
+ 
+         gtk_assistant_set_page_title(g_assistant, page, pages[i].title);
+-        gtk_assistant_set_page_type(g_assistant, page, pages[i].type);
++        if (not_reportable && i == 0)
++            gtk_assistant_set_page_type(g_assistant, pages[i].page_widget, GTK_ASSISTANT_PAGE_SUMMARY);
++        else
++            gtk_assistant_set_page_type(g_assistant, page, pages[i].type);
+ 
+         VERB1 log("added page: %s", page_names[i]);
+     }
++    free(not_reportable);
+ 
+     /* Set pointers to objects we might need to work with */
+     g_lbl_cd_reason        = GTK_LABEL(        gtk_builder_get_object(builder, "lbl_cd_reason"));
+@@ -2369,10 +2391,14 @@ static void add_pages()
+ 
+     /* Add "Close" button */
+     GtkWidget *w;
+-    w = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+-    g_signal_connect(w, "clicked", G_CALLBACK(gtk_main_quit), NULL);
+-    gtk_widget_show(w);
+-    gtk_assistant_add_action_widget(g_assistant, w);
++    if (!not_reportable)
++    {
++        w = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
++        g_signal_connect(w, "clicked", G_CALLBACK(gtk_main_quit), NULL);
++        gtk_widget_show(w);
++        gtk_assistant_add_action_widget(g_assistant, w);
++    }
++
+     /* and hide "Cancel" button - "Close" is a better name for what we want */
+     gtk_assistant_commit(g_assistant);
+ 
+diff --git a/src/include/internal_libreport.h b/src/include/internal_libreport.h
+index 67a7ea3..5fc09c3 100644
+--- a/src/include/internal_libreport.h
++++ b/src/include/internal_libreport.h
+@@ -581,7 +581,7 @@ int delete_dump_dir_possibly_using_abrtd(const char *dump_dir_name);
+ struct dump_dir *steal_directory(const char *base_dir, const char *dump_dir_name);
+ 
+ #define kernel_tainted_short libreport_kernel_tainted_short
+-char *kernel_tainted_short(unsigned tainted);
++char *kernel_tainted_short(const char *kernel_bt);
+ #define kernel_tainted_long libreport_kernel_tainted_long
+ GList *kernel_tainted_long(unsigned tainted);
+ 
+@@ -635,6 +635,7 @@ GList *kernel_tainted_long(unsigned tainted);
+  */
+ #define FILENAME_REPORTED_TO  "reported_to"
+ #define FILENAME_EVENT_LOG    "event_log"
++#define FILENAME_NOT_REPORTABLE "not-reportable"
+ 
+ // Not stored as files, added "on the fly":
+ #define CD_DUMPDIR            "Directory"
+diff --git a/src/lib/kernel-tainted.c b/src/lib/kernel-tainted.c
+index 3595408..217587c 100644
+--- a/src/lib/kernel-tainted.c
++++ b/src/lib/kernel-tainted.c
+@@ -18,6 +18,12 @@
+ */
+ #include "internal_libreport.h"
+ 
++/* reading /proc/sys/kernel/tainted file after an oops is ALWAYS going
++ * to show it as tainted.
++ *
++ * https://bugzilla.redhat.com/show_bug.cgi?id=724838
++ */
++
+ /* From RHEL6 kernel/panic.c: */
+ static const int tnts_short[] = {
+ 	 'P' ,
+@@ -106,21 +112,16 @@ static const char *const tnts_long[] = {
+     "Tech_preview",
+ };
+ 
+-char *kernel_tainted_short(unsigned tainted)
++char *kernel_tainted_short(const char *kernel_bt)
+ {
+-    char *tnt = xzalloc(ARRAY_SIZE(tnts_short) + 1);
+-    int i = 0;
+-    while (tainted)
+-    {
+-        if (0x1 & tainted)
+-            tnt[i] = tnts_short[i];
+-        else
+-            tnt[i] = '-';
+ 
+-        ++i;
+-        tainted >>= 1;
+-    }
++    /* example of flags: |G    B      | */
++    char *tainted = strstr(kernel_bt, "Tainted: ");
++    if (!tainted)
++        return NULL;
+ 
++    /* 12 == count of flags */
++    char *tnt = xstrndup(tainted + strlen("Tainted: "), 12);
+     return tnt;
+ }
+ 
+diff --git a/src/report-newt/report-newt.c b/src/report-newt/report-newt.c
+index b8dddbc..02f75c8 100644
+--- a/src/report-newt/report-newt.c
++++ b/src/report-newt/report-newt.c
+@@ -318,6 +318,27 @@ static int report(const char *dump_dir_name)
+     if (!(dd = dd_opendir(dump_dir_name, 0)))
+         return -1;
+     events_as_lines = list_possible_events(dd, NULL, "report");
++
++    char *not_reportable = dd_load_text_ext(dd, FILENAME_NOT_REPORTABLE, 0
++                                            | DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE
++                                            | DD_FAIL_QUIETLY_ENOENT
++                                            | DD_FAIL_QUIETLY_EACCES);
++
++    if (not_reportable)
++    {
++        char *reason = dd_load_text_ext(dd, FILENAME_REASON, 0
++                                        | DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE);
++        char *t = xasprintf("%s%s%s",
++                            not_reportable ?: "",
++                            not_reportable ? ": " : "",
++                            reason ?: _("(no description)"));
++
++        dd_close(dd);
++        newtWinMessage(_("Error"), _("Ok"), "%s", t);
++        free(t);
++        return -1;
++    }
++
+     dd_close(dd);
+ 
+     reporters = get_available_reporters(events_as_lines);

diff --git a/dev-libs/libreport/libreport-2.0.6.ebuild b/dev-libs/libreport/libreport-2.0.6.ebuild
new file mode 100644
index 0000000..8ca0a0d
--- /dev/null
+++ b/dev-libs/libreport/libreport-2.0.6.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="3"
+PYTHON_DEPEND="2:2.6"
+
+inherit autotools eutils python
+
+DESCRIPTION="Generic library for reporting various problems"
+HOMEPAGE="https://fedorahosted.org/abrt/"
+SRC_URI="https://fedorahosted.org/released/abrt/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+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-misc/curl[ssl]
+	sys-apps/dbus
+	x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+	app-text/asciidoc
+	app-text/xmlto
+	>=dev-util/intltool-0.3.50
+	>=dev-util/pkgconfig-0.9.0
+	>=sys-devel/gettext-0.17"
+
+# Tests require python-meh, which is highly redhat-specific.
+RESTRICT="tests"
+
+pkg_setup() {
+	python_set_active_version 2
+
+	enewgroup abrt
+	enewuser abrt -1 -1 -1 abrt
+}
+
+src_prepare() {
+	# Replace redhat-specific defaults with gentoo ones
+	epatch "${FILESDIR}/${PN}-2.0.6-gentoo.patch"
+
+	# Disable bugzilla plugin for now (requires bugs.gentoo.org infra support)
+	epatch "${FILESDIR}/${PN}-2.0.6-no-bugzilla.patch"
+
+	# Needed for abrt-2.0.5, will be in next release
+	epatch "${FILESDIR}/${P}-not-reportable.patch"
+
+	# Wizard does not build with -Werror under gcc-4.6 (fails format-security
+	# in gtk_message_dialog_new() calls)
+	sed -e "s/ -Werror$//" -i src/gui-wizard-gtk/Makefile.* || die
+
+	mkdir m4
+	eautoreconf
+	ln -sfn $(type -P true) py-compile
+}
+
+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="--localstatedir=${EPREFIX}/var"
+	# --disable-debug enables debug!
+	use debug && ECONF="${ECONF} --enable-debug"
+	econf ${ECONF}
+}
+
+src_install() {
+	emake DESTDIR="${D}" install || die "emake install failed"
+	dodoc README
+
+	# 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
+}



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-08  9:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-08  9:21 [gentoo-commits] proj/gnome:master commit in: dev-libs/libreport/files/, dev-libs/libreport/ Alexandre Restovtsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox