Fix including rsvg.h always causing a deprecated warning, as this breaks

apps compiling with -Werror
This commit is contained in:
Hans de Goede 2011-12-10 10:06:22 +01:00
parent 4649e167e3
commit 2ba98b2530
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,22 @@
Fix rsvg.h causing an "internal" deprated warning
Before this patch rsvg.h marks the RsvgSizeFunc *type* as deprecated, and
then uses it to declare other deprecated functions, causing gcc to always
emit a depecrated warning as soon as rsvg.h is included. This breaks
compilation of apps which compile with -Werror.
Fix this by not making the RsvgSizeFunc type deprecated, but leaving
the function prototypes using it as deprecated.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
--- librsvg-2.35.0/rsvg.h~ 2011-11-10 19:22:34.000000000 +0100
+++ librsvg-2.35.0/rsvg.h 2011-12-10 09:11:30.525804670 +0100
@@ -203,7 +203,7 @@ void rsvg_handle_free (RsvgHandle * hand
*
* Deprecated: Set up a cairo matrix and use rsvg_handle_render_cairo() instead.
*/
-typedef RSVG_DEPRECATED void (*RsvgSizeFunc) (gint * width, gint * height, gpointer user_data);
+typedef void (*RsvgSizeFunc) (gint * width, gint * height, gpointer user_data);
RSVG_DEPRECATED
void rsvg_handle_set_size_callback (RsvgHandle * handle,

View File

@ -1,7 +1,7 @@
Name: librsvg2
Summary: An SVG library based on cairo
Version: 2.35.0
Release: 2%{?dist}
Release: 3%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
@ -9,6 +9,8 @@ Group: System Environment/Libraries
Source: http://download.gnome.org/sources/librsvg/2.35/librsvg-%{version}.tar.xz
Patch0: librsvg2-build-gir.patch
# filed upstream as: https://bugzilla.gnome.org/show_bug.cgi?id=665905
Patch1: librsvg-2.35.0-fix-depcr-warning.patch
Requires(post): gdk-pixbuf2
@ -53,6 +55,7 @@ files to allow you to develop with librsvg.
%prep
%setup -q -n librsvg-%{version}
%patch0 -p1
%patch1 -p1
autoreconf -i -f
%build
@ -105,6 +108,10 @@ gdk-pixbuf-query-loaders-%{__isa_bits} --update-cache || :
%changelog
* Sat Dec 10 2011 Hans de Goede <hdegoede@redhat.com> - 2.35.0-3
- Fix including rsvg.h always causing a deprecated warning, as this breaks
apps compiling with -Werror
* Fri Nov 25 2011 Daniel Drake <dsd@laptop.org> - 2.35.0-2
- Build gobject-introspection bindings