Add a few fixes from upstream

This commit is contained in:
Marc-André Lureau 2013-02-06 19:44:46 +01:00
parent 70d3833276
commit ff5f050d2c
4 changed files with 156 additions and 3 deletions

View File

@ -0,0 +1,29 @@
From 70b568e74bd8f905de2b8d1e65e397de75bde206 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Wed, 6 Feb 2013 16:18:07 +0100
Subject: [PATCH spice-gtk 1/3] build-sys: bump spice-glib version-info
spice-glib version-info should have been bumped, since we have new
symbols.
249dd73132a7ecc1ceb32b4fea6529491ca219d3
---
gtk/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 176cf20..d7cdbc5 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -171,7 +171,7 @@ nodist_libspice_client_gtkinclude_HEADERS = \
$(NULL)
libspice_client_glib_2_0_la_LDFLAGS = \
- -version-info 9:0:1 \
+ -version-info 10:0:2 \
-no-undefined \
$(GLIB_VERSION_LDFLAGS) \
$(NULL)
--
1.8.1.1.439.g50a6b54

View File

@ -0,0 +1,28 @@
From 15bd7ceba1434b5d710bfd16078044f30693467b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Wed, 6 Feb 2013 18:47:35 +0100
Subject: [PATCH spice-gtk 2/3] build-sys: remove GTK_DISABLE_DEPRECATED
Gtk 3.0 no longer includes deprecated headers if it's defined:
http://git.gnome.org/browse/gtk+/commit/?id=a1de67f438f057711353a55b322babce7044226f
We added it as a workaround for Gtk 2.0 build issue.
---
gtk/Makefile.am | 1 -
1 file changed, 1 deletion(-)
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index d7cdbc5..eb64b13 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -69,7 +69,6 @@ KEYMAP_GEN = $(srcdir)/keymap-gen.pl
SPICE_COMMON_CPPFLAGS = \
-DG_LOG_DOMAIN=\"GSpice\" \
-DSPICE_NO_DEPRECATED \
- -DGTK_DISABLE_DEPRECATED \
-DSW_CANVAS_CACHE \
-DSPICE_GTK_LOCALEDIR=\"${SPICE_GTK_LOCALEDIR}\" \
-DPNP_IDS=\""$(PNP_IDS)"\" \
--
1.8.1.1.439.g50a6b54

View File

@ -0,0 +1,76 @@
From b96f7bc26c92c400435144cd0f751820e67af33b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Wed, 6 Feb 2013 19:28:00 +0100
Subject: [PATCH spice-gtk 3/3] build-sys: don't use -Wstrict-prototypes with
Gtk+ 2.0
---
configure.ac | 13 ++++++++++++-
m4/spice-compile-warnings.m4 | 16 +++++++---------
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2a5c72c..f02552f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -627,7 +627,18 @@ fi
dnl ===========================================================================
dnl check compiler flags
-SPICE_COMPILE_WARNINGS
+# We want to enable these, but need to sort out the
+# decl mess with gtk/generated_*.c
+dontwarn="-Wmissing-prototypes -Wmissing-declarations"
+
+# We want to enable these, but Gtk+2.0 has a bad decl
+# gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function declaration
+# isn't a prototype.
+if test "$with_gtk" = "2.0"; then
+ dontwarn="$dontwarn -Wstrict-prototypes"
+fi
+
+SPICE_COMPILE_WARNINGS([$dontwarn])
SPICE_CFLAGS="$SPICE_CFLAGS $WARN_CFLAGS"
diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
index 3c7e0d3..31fc0fc 100644
--- a/m4/spice-compile-warnings.m4
+++ b/m4/spice-compile-warnings.m4
@@ -1,7 +1,8 @@
-dnl
-dnl Enable all known GCC compiler warnings, except for those
-dnl we can't yet cope with
-dnl
+# SPICE_COMPILE_WARNINGS(DONTWARN)
+# --------------------------------------------------------
+# Enable all known GCC compiler warnings, except for those
+# we can't yet cope with
+#
AC_DEFUN([SPICE_COMPILE_WARNINGS],[
dnl ******************************
dnl More compiler warnings
@@ -19,6 +20,8 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
# List of warnings that are not relevant / wanted
+ dontwarn=$1
+
# Don't care about C++ compiler compat
dontwarn="$dontwarn -Wc++-compat"
dontwarn="$dontwarn -Wabi"
@@ -59,11 +62,6 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
dontwarn="$dontwarn -Wbad-function-cast"
dontwarn="$dontwarn -Wshadow"
- # We want to enable thse, but need to sort out the
- # decl mess with gtk/generated_*.c
- dontwarn="$dontwarn -Wmissing-prototypes"
- dontwarn="$dontwarn -Wmissing-declarations"
-
# Get all possible GCC warnings
gl_MANYWARN_ALL_GCC([maybewarn])
--
1.8.1.1.439.g50a6b54

View File

@ -9,6 +9,11 @@
%define with_gtk3 1
%endif
# Default to skipping autoreconf. Distros can change just this one line
# (or provide a command-line override) if they backport any patches that
# touch configure.ac or Makefile.am.
%{!?enable_autotools:%define enable_autotools 1}
#define _version_suffix
Name: spice-gtk
@ -21,6 +26,9 @@ License: LGPLv2+
URL: http://spice-space.org/page/Spice-Gtk
#VCS: git:git://anongit.freedesktop.org/spice/spice-gtk
Source0: http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2
Patch1: 0001-build-sys-bump-spice-glib-version-info.patch
Patch2: 0002-build-sys-remove-GTK_DISABLE_DEPRECATED.patch
Patch3: 0003-build-sys-don-t-use-Wstrict-prototypes-with-Gtk-2.0.patch
BuildRequires: intltool
BuildRequires: gtk2-devel >= 2.14
@ -49,6 +57,13 @@ BuildRequires: spice-protocol
BuildRequires: libtool
Requires: spice-glib%{?_isa} = %{version}-%{release}
%if 0%{?enable_autotools}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext-devel
BuildRequires: libtool
%endif
%description
Client libraries for SPICE desktop servers.
@ -140,13 +155,18 @@ snappy is a tool to capture screen-shots of a SPICE desktop.
%prep
%setup -q -n spice-gtk-%{version}%{?_version_suffix} -c
if [ -n '%{?_version_suffix}' ]; then
mv spice-gtk-%{version}%{?_version_suffix} spice-gtk-%{version}
fi
#pushd spice-gtk-%{version}
#popd
pushd spice-gtk-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%if 0%{?enable_autotools}
autoreconf -if
%endif
popd
%if %{with_gtk3}
cp -a spice-gtk-%{version} spice-gtk3-%{version}