[Xfce4-commits] <xfce4-xkb-plugin:master> Include rsvg-cairo.h for older librsvg versions

Igor Slepchin noreply at xfce.org
Tue Mar 26 23:06:02 CET 2013


Updating branch refs/heads/master
         to 0c6d0d34ca9784a9c279ffd2f72b35597cfd981e (commit)
       from 655047e33de37eefa17d2325434e6cd784e893ae (commit)

commit 0c6d0d34ca9784a9c279ffd2f72b35597cfd981e
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.

 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 97f3612..f57a901 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -76,6 +76,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