[libreport] Fix build
Jakub Filak
jfilak at fedoraproject.org
Wed Jan 8 18:40:34 UTC 2014
commit 0ecc49267d49c27e88602e16e675807783d8eff0
Author: Jakub Filak <jfilak at redhat.com>
Date: Wed Jan 8 19:27:37 2014 +0100
Fix build
libreport-2.1.11-fix_0CFLAGS_in_configure.patch | 26 +++++++++++++++++
...1.11-get_rid_of_gtk3_deprecated_functions.patch | 29 ++++++++++++++++++++
libreport.spec | 12 +++++++-
3 files changed, 66 insertions(+), 1 deletions(-)
---
diff --git a/libreport-2.1.11-fix_0CFLAGS_in_configure.patch b/libreport-2.1.11-fix_0CFLAGS_in_configure.patch
new file mode 100644
index 0000000..13b5dce
--- /dev/null
+++ b/libreport-2.1.11-fix_0CFLAGS_in_configure.patch
@@ -0,0 +1,26 @@
+diff -ruN libreport-2.1.11/configure libreport-2.1.11.fix/configure
+--- libreport-2.1.11/configure 2014-01-08 18:46:48.057001105 +0100
++++ libreport-2.1.11.fix/configure 2014-01-08 18:46:33.880000782 +0100
+@@ -17814,7 +17814,8 @@
+ AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
+
+ # Needed by tests/atlocal.in.
+-O0CFLAGS=`echo $CFLAGS | sed 's/-O[0-9] *//' | sed 's/-Werror//'`
++# CFLAGS may contain '-Werror=format-security'
++O0CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]] *//' | sed 's/-Werror\(=[^ ]*\)\?//g'`
+
+
+ ac_config_headers="$ac_config_headers config.h"
+diff -ruN libreport-2.1.11/configure.ac libreport-2.1.11.fix/configure.ac
+--- libreport-2.1.11/configure.ac 2013-12-10 10:16:15.000000000 +0100
++++ libreport-2.1.11.fix/configure.ac 2014-01-08 18:46:33.857000781 +0100
+@@ -307,7 +307,8 @@
+ AC_CONFIG_FILES([tests/Makefile tests/atlocal])
+ AM_MISSING_PROG([AUTOM4TE], [autom4te])
+ # Needed by tests/atlocal.in.
+-AC_SUBST([O0CFLAGS], [`echo $CFLAGS | sed 's/-O[[0-9]] *//' | sed 's/-Werror//'`])
++# CFLAGS may contain '-Werror=format-security'
++AC_SUBST([O0CFLAGS], [`echo $CFLAGS | sed 's/-O[[0-9]] *//' | sed 's/-Werror\(=[[^ ]]*\)\?//g'`])
+
+ AC_CONFIG_HEADERS([config.h])
+
diff --git a/libreport-2.1.11-get_rid_of_gtk3_deprecated_functions.patch b/libreport-2.1.11-get_rid_of_gtk3_deprecated_functions.patch
new file mode 100644
index 0000000..a7a7e3f
--- /dev/null
+++ b/libreport-2.1.11-get_rid_of_gtk3_deprecated_functions.patch
@@ -0,0 +1,29 @@
+From c193f2d12a6abed6b7e30ba2431e52913dddc26d Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Wed, 8 Jan 2014 09:38:30 +0100
+Subject: [LIBREPORT PATCH] wizard: do not use deprecated gtk3 API
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/gui-wizard-gtk/wizard.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
+index c37f69f..3faa8e8 100644
+--- a/src/gui-wizard-gtk/wizard.c
++++ b/src/gui-wizard-gtk/wizard.c
+@@ -2597,7 +2597,11 @@ static void add_workflow_buttons(GtkBox *box, GHashTable *workflows, GCallback f
+ gtk_label_set_use_markup(GTK_LABEL(label), true);
+ gtk_widget_set_halign(label, GTK_ALIGN_START);
+ gtk_widget_set_margin_top(label, 10);
++#if ((GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 11) || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 11 && GTK_MICRO_VERSION < 2))
+ gtk_widget_set_margin_left(label, 40);
++#else
++ gtk_widget_set_margin_start(label, 40);
++#endif
+ gtk_widget_set_margin_bottom(label, 10);
+ free(btn_label);
+ g_signal_connect(button, "clicked", func, w);
+--
+1.8.3.1
+
diff --git a/libreport.spec b/libreport.spec
index 3210754..b640ff2 100644
--- a/libreport.spec
+++ b/libreport.spec
@@ -7,13 +7,17 @@
Summary: Generic library for reporting various problems
Name: libreport
Version: 2.1.11
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: https://fedorahosted.org/abrt/
Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz
Source1: autogen.sh
+# Remove with libreport > 2.1.11
+Patch1: libreport-2.1.11-get_rid_of_gtk3_deprecated_functions.patch
+Patch2: libreport-2.1.11-fix_0CFLAGS_in_configure.patch
+
BuildRequires: dbus-devel
BuildRequires: gtk3-devel
BuildRequires: curl-devel
@@ -289,6 +293,8 @@ data over ftp/scp...
%prep
%setup -q
+%patch1 -p1
+%patch2 -p1
# koji in f19 has new autotools, so we need to regenerate everything
cp %SOURCE1 %_builddir/%{name}-%{version}
@@ -603,6 +609,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Wed Jan 8 2014 Peter Robinson <pbrobinson at fedoraproject.org> 2.1.11-3
+- Don't use deprecated GTK3 API
+- Fix unit tests
+
* Wed Jan 8 2014 Peter Robinson <pbrobinson at fedoraproject.org> 2.1.11-2
- Build latest version on F-21/rawhide
- Fix descriptions
More information about the scm-commits
mailing list