[Xfce4-commits] <xfce4-xkb-plugin:4.10_panel_support> Include rsvg-cairo.h for older librsvg versions
Igor Slepchin
noreply at xfce.org
Wed Mar 27 00:12:25 CET 2013
Updating branch refs/heads/4.10_panel_support
to d34f6b4ee2fede6d1652394664cb400ca7d32ed0 (commit)
from 7ed289e10304c9edb26040320f636f65e7c88622 (commit)
commit d34f6b4ee2fede6d1652394664cb400ca7d32ed0
Author: Igor Slepchin <igor.slepchin at gmail.com>
Date: Tue Mar 26 16:16:41 2013 -0400
Include rsvg-cairo.h for older librsvg versions
librsvg 2.6.32 deprecated #including headers other than rsvg.h.
Their standard way to check the version is LIBRSVG_CHECK_VERSION
macro defined in librsvg-features.h. Unfortunately, including *that*
header file directly is also deprecated starting with 2.6.32 and
it was not pulled in by rsvg.h in earlier versions; hence, we need
to resort to configure-time check.
(cherry picked from commit 0c6d0d34ca9784a9c279ffd2f72b35597cfd981e)
configure.in.in | 2 ++
panel-plugin/xkb-cairo.c | 4 ++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/configure.in.in b/configure.in.in
index b55c92b..6d48040 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -75,6 +75,8 @@ XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
XDT_CHECK_PACKAGE([LIBXKLAVIER], [libxklavier], [5.0])
XDT_CHECK_PACKAGE([LIBRSVG], [librsvg-2.0], [2.18])
+dnl check librsvg version to see if including headers other than rsvg.h is deprecated
+XDT_CHECK_OPTIONAL_PACKAGE([LIBRSVG_2_36_2], [librsvg-2.0], [2.36.2], [librsvg_2.36.2], [deprecated includes of librsvg header files (always leave enabled)], yes)
XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12])
dnl ***********************************
diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c
index af598a7..27ad119 100644
--- a/panel-plugin/xkb-cairo.c
+++ b/panel-plugin/xkb-cairo.c
@@ -27,6 +27,10 @@
#include "xkb-util.h"
#include "xfce4-xkb-plugin.h"
+#ifndef HAVE_LIBRSVG_2_36_2
+#include <librsvg/rsvg-cairo.h>
+#endif
+
#define XKB_PREFERRED_FONT "Courier New, Courier 10 Pitch, Monospace Bold"
#define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \
More information about the Xfce4-commits
mailing list