[librsvg] Do not depend on gio-unix-2.0 as it breaks the MinGW build



commit 1811f207653e36c301260203866d958e443b2150
Author: Alexey Pavlov <alexey pawlow gmail com>
Date:   Wed Dec 3 09:33:50 2014 +0000

    Do not depend on gio-unix-2.0 as it breaks the MinGW build
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 configure.in   |    9 ++++++++-
 rsvg-convert.c |    8 ++++++++
 2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/configure.in b/configure.in
index 7fb4daa..074f4df 100644
--- a/configure.in
+++ b/configure.in
@@ -111,7 +111,14 @@ PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= $GLIB_REQUIRED])
 
 PKG_CHECK_MODULES([GMODULE],[gmodule-2.0])
 
-PKG_CHECK_MODULES([RSVG_CONVERT],[gio-2.0 gio-unix-2.0 gdk-pixbuf-2.0 cairo pangocairo])
+case "$host" in
+  *-*-mingw*)
+    PKG_CHECK_MODULES([RSVG_CONVERT],[gio-2.0 gio-windows-2.0 gdk-pixbuf-2.0 cairo pangocairo])
+    ;;
+  *)
+    PKG_CHECK_MODULES([RSVG_CONVERT],[gio-2.0 gio-unix-2.0 gdk-pixbuf-2.0 cairo pangocairo])
+    ;;
+esac
 
 dnl ===========================================================================
 
diff --git a/rsvg-convert.c b/rsvg-convert.c
index 6380107..7ab4721 100644
--- a/rsvg-convert.c
+++ b/rsvg-convert.c
@@ -36,7 +36,11 @@
 #include <locale.h>
 #include <glib/gi18n.h>
 #include <gio/gio.h>
+#ifdef _WIN32
+#include <gio/gwin32inputstream.h>
+#else
 #include <gio/gunixinputstream.h>
+#endif
 
 #include "rsvg-css.h"
 #include "rsvg.h"
@@ -213,7 +217,11 @@ main (int argc, char **argv)
 
         if (using_stdin) {
             file = NULL;
+#ifdef _WIN32
+            stream = g_win32_input_stream_new (STDIN_FILENO, FALSE);
+#else
             stream = g_unix_input_stream_new (STDIN_FILENO, FALSE);
+#endif
         } else {
             GFileInfo *file_info;
             gboolean compressed = FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]