Initial version of Xerces-c.
[fedora-mingw.git] / inkscape / mingw32-inkscape-20081027.patch
1 Index: src/libgdl/gdl-win32.c
2 ===================================================================
3 --- src/libgdl/gdl-win32.c      (revision 20069)
4 +++ src/libgdl/gdl-win32.c      (working copy)
5 @@ -14,6 +14,8 @@
6  
7  #include "gdl-win32.h"
8  
9 +#ifdef WIN32
10 +
11  /* Platform detection */
12  gboolean
13  is_os_vista()
14 @@ -40,3 +42,5 @@
15  
16         return is_vista;
17  }
18 +
19 +#endif
20 Index: src/libgdl/gdl-win32.h
21 ===================================================================
22 --- src/libgdl/gdl-win32.h      (revision 20069)
23 +++ src/libgdl/gdl-win32.h      (working copy)
24 @@ -1,6 +1,8 @@
25  #ifndef __INKSCAPE_GDL_WIN32_H__
26  #define __INKSCAPE_GDL_WIN32_H__
27  
28 +#ifdef WIN32
29 +
30  /*
31   * Windows stuff
32   *
33 @@ -20,11 +22,9 @@
34  #include <windows.h>
35  #include <gdk/gdk.h>
36  
37 -#ifndef WIN32
38 -#error "This file is only usable for Windows"
39 -#endif
40 -
41  /* Platform detection */
42  gboolean is_os_vista();
43  
44 +#endif /* WIN32 */
45 +
46  #endif /* __INKSCAPE_GDL_WIN32_H__ */
47 Index: src/libgdl/Makefile_insert
48 ===================================================================
49 --- src/libgdl/Makefile_insert  (revision 20069)
50 +++ src/libgdl/Makefile_insert  (working copy)
51 @@ -34,6 +34,8 @@
52         libgdl/gdl-stock.c              \
53         libgdl/gdl-switcher.h           \
54         libgdl/gdl-switcher.c           \
55 +       libgdl/gdl-win32.c              \
56 +       libgdl/gdl-win32.h              \
57         libgdl/libgdltypebuiltins.h     \
58         libgdl/libgdltypebuiltins.c     \
59         libgdl/libgdlmarshal.h          \
60 Index: src/extension/internal/win32.h
61 ===================================================================
62 --- src/extension/internal/win32.h      (revision 20069)
63 +++ src/extension/internal/win32.h      (working copy)
64 @@ -14,9 +14,7 @@
65  
66  #include <config.h>
67  
68 -#ifndef WIN32
69 -#error "This file is only usable for Windows"
70 -#endif
71 +#ifdef WIN32
72  
73  #ifdef DATADIR
74  #undef DATADIR
75 @@ -84,4 +82,6 @@
76  }  /* namespace Extension */
77  }  /* namespace Inkscape */
78  
79 +#endif /* WIN32 */
80 +
81  #endif /* __INKSCAPE_EXTENSION_INTERNAL_PRINT_WIN32_H__ */
82 Index: src/extension/internal/Makefile_insert
83 ===================================================================
84 --- src/extension/internal/Makefile_insert      (revision 20069)
85 +++ src/extension/internal/Makefile_insert      (working copy)
86 @@ -144,5 +144,10 @@
87         extension/internal/filter/filter-all.cpp \
88         extension/internal/filter/filter-file.cpp \
89         extension/internal/filter/filter.cpp \
90 -       extension/internal/filter/filter.h
91 -
92 +       extension/internal/filter/filter.h \
93 +       extension/internal/win32.h \
94 +       extension/internal/win32.cpp \
95 +       extension/internal/emf-win32-print.h \
96 +       extension/internal/emf-win32-print.cpp \
97 +       extension/internal/emf-win32-inout.h \
98 +       extension/internal/emf-win32-inout.cpp
99 \ No newline at end of file
100 Index: src/extension/internal/win32.cpp
101 ===================================================================
102 --- src/extension/internal/win32.cpp    (revision 20069)
103 +++ src/extension/internal/win32.cpp    (working copy)
104 @@ -13,6 +13,8 @@
105  # include "config.h"
106  #endif
107  
108 +#ifdef WIN32
109 +
110  #include <glib/gmem.h>
111  #include <libnr/nr-macros.h>
112  #include <libnr/nr-matrix.h>
113 @@ -494,3 +496,5 @@
114  }  /* namespace Internal */
115  }  /* namespace Extension */
116  }  /* namespace Inkscape */
117 +
118 +#endif /* WIN32 */
119 Index: src/Makefile.am
120 ===================================================================
121 --- src/Makefile.am     (revision 20069)
122 +++ src/Makefile.am     (working copy)
123 @@ -27,7 +27,8 @@
124         $(POPPLER_GLIB_CFLAGS)  \
125         -DPOTRACE=\"potrace\"   \
126         $(INKSCAPE_CFLAGS) \
127 -       -I$(top_srcdir)/cxxtest
128 +       -I$(top_srcdir)/cxxtest \
129 +       $(WIN32_CFLAGS)
130  
131  include Makefile_insert
132  include application/Makefile_insert
133 Index: src/libnrtype/FontFactory.cpp
134 ===================================================================
135 --- src/libnrtype/FontFactory.cpp       (revision 20069)
136 +++ src/libnrtype/FontFactory.cpp       (working copy)
137 @@ -8,6 +8,8 @@
138   *
139   */
140  
141 +#define PANGO_ENABLE_ENGINE
142 +
143  #include "FontFactory.h"
144  #include <libnrtype/font-instance.h>
145  
146 Index: src/libnrtype/Layout-TNG-Input.cpp
147 ===================================================================
148 --- src/libnrtype/Layout-TNG-Input.cpp  (revision 20069)
149 +++ src/libnrtype/Layout-TNG-Input.cpp  (working copy)
150 @@ -9,6 +9,8 @@
151   * Released under GNU GPL, read the file 'COPYING' for more information
152   */
153  
154 +#define PANGO_ENABLE_ENGINE
155 +
156  #include <gtk/gtkversion.h>
157  #include "Layout-TNG.h"
158  #include "style.h"
159 Index: src/libnrtype/FontInstance.cpp
160 ===================================================================
161 --- src/libnrtype/FontInstance.cpp      (revision 20069)
162 +++ src/libnrtype/FontInstance.cpp      (working copy)
163 @@ -8,6 +8,8 @@
164   *
165   */
166  
167 +#define PANGO_ENABLE_ENGINE
168 +
169  #ifdef HAVE_CONFIG_H
170  # include <config.h>
171  #endif
172 Index: src/ui/dialog/Makefile_insert
173 ===================================================================
174 --- src/ui/dialog/Makefile_insert       (revision 20069)
175 +++ src/ui/dialog/Makefile_insert       (working copy)
176 @@ -60,6 +60,8 @@
177         ui/dialog/aboutbox.cpp              \
178         ui/dialog/aboutbox.h            \
179         ui/dialog/ocaldialogs.cpp       \
180 -       ui/dialog/ocaldialogs.h
181 +       ui/dialog/ocaldialogs.h \
182 +       ui/dialog/filedialogimpl-win32.h \
183 +       ui/dialog/filedialogimpl-win32.cpp
184  
185  ui/dialog/aboutbox.$(OBJEXT): inkscape_version.h
186 Index: src/main.cpp
187 ===================================================================
188 --- src/main.cpp        (revision 20069)
189 +++ src/main.cpp        (working copy)
190 @@ -511,7 +511,7 @@
191   */
192  static int set_extensions_env()
193  {
194 -    char *oldenv = getenv("PYTHONPATH");
195 +    const char *oldenv = g_getenv("PYTHONPATH");
196      Glib::ustring tmp = INKSCAPE_EXTENSIONDIR;
197      if (oldenv != NULL) {
198  #ifdef WIN32
199 @@ -521,7 +521,7 @@
200  #endif
201          tmp += oldenv;
202      }
203 -    setenv("PYTHONPATH", tmp.c_str(), 1);
204 +    g_setenv("PYTHONPATH", tmp.c_str(), 1);
205      
206      return 0;
207  }
208 Index: configure.ac
209 ===================================================================
210 --- configure.ac        (revision 20069)
211 +++ configure.ac        (working copy)
212 @@ -192,7 +192,7 @@
213                                   break], [gc_ok=no], [$gc_libs])
214                     break],
215                   [gc_ok=no])
216 -if test "x$gc_ok" = "xyes"; then
217 +if test "x$gc_ok" = "xyes" && "x$cross_compiling" = "xno" ; then
218         AC_MSG_CHECKING([libgc version 6.4+])
219         AC_RUN_IFELSE(
220                 [AC_LANG_SOURCE([[
221 @@ -248,7 +248,7 @@
222  case "$host" in
223    *-*-mingw*)
224      platform_win32=yes
225 -    INKSCAPE_CFLAGS="$INKSCAPE_CFLAGS -mms-bitfields -DLIBXML_STATIC"
226 +    WIN32_CFLAGS="-mms-bitfields -DLIBXML_STATIC"
227      ;;
228    *)
229      platform_win32=no
230 @@ -257,6 +257,8 @@
231  AC_MSG_RESULT([$platform_win32])
232  AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
233  
234 +AC_SUBST(WIN32_CFLAGS)
235 +
236  AC_MSG_CHECKING([for Solaris platform])
237  case "$host" in
238    *-solaris2.*)
239 @@ -282,10 +284,10 @@
240  
241  if test "x$with_xft" != "xno" ; then
242         dnl Test fontconfig package
243 -       PKG_CHECK_MODULES(XFT, xft, xft_ok=yes, xft_ok=no)
244 +       PKG_CHECK_MODULES(XFT, fontconfig, xft_ok=yes, xft_ok=no)
245         if test "x$xft_ok" != "xyes"; then
246                 dnl test xft package
247 -               PKG_CHECK_MODULES(XFT, fontconfig, xft_ok=yes, xft_ok=no)
248 +               PKG_CHECK_MODULES(XFT, xft, xft_ok=yes, xft_ok=no)
249                 if test "x$xft_ok" != "xyes"; then
250                         dnl Have to test xft presence
251                         AC_CHECK_HEADER(X11/Xft/Xft.h, xft_ok=yes, xft_ok=no)