Fix linking on Windows
[LibreOffice.git] / gdk-pixbuf / gdk-pixbuf-2.23.0-win32.patch
blob142ea346f2d064afa5c85f41dbbaef90d5ec344d
1 --- misc/gdk-pixbuf-2.23.0/config.h.win32 2011-03-24 04:59:07.000000000 +0100
2 +++ misc/build/gdk-pixbuf-2.23.0/config.h.win32 2011-03-22 01:58:24.296875000 +0100
3 @@ -1 +1,126 @@
4 -dummy
5 +/* config.h.in. Generated from configure.ac by autoheader. */
7 +/* Define to 1 if translation of program messages to the user's native
8 + language is requested. */
9 +#undef ENABLE_NLS
11 +/* Define if gio can sniff image data */
12 +#undef GDK_PIXBUF_USE_GIO_MIME
14 +/* The prefix for our gettext translation domains. */
15 +#define GETTEXT_PACKAGE "intl.dll"
17 +/* Define to 1 if you have the `bind_textdomain_codeset' function. */
18 +#undef HAVE_BIND_TEXTDOMAIN_CODESET
20 +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
21 + CoreFoundation framework. */
22 +#undef HAVE_CFLOCALECOPYCURRENT
24 +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
25 + the CoreFoundation framework. */
26 +#undef HAVE_CFPREFERENCESCOPYAPPVALUE
28 +/* Define if the GNU dcgettext() function is already present or preinstalled.
29 + */
30 +#undef HAVE_DCGETTEXT
32 +/* Define to 1 if you have the <dlfcn.h> header file. */
33 +#undef HAVE_DLFCN_H
35 +/* Define if the GNU gettext() function is already present or preinstalled. */
36 +#define HAVE_GETTEXT 1
38 +/* Define if you have the iconv() function and it works. */
39 +#define HAVE_ICONV 1
41 +/* Define to 1 if you have the <inttypes.h> header file. */
42 +#undef HAVE_INTTYPES_H
44 +/* Define to 1 if you have the <memory.h> header file. */
45 +#undef HAVE_MEMORY_H
47 +/* Define to 1 is libjpeg supports progressive JPEG */
48 +#define HAVE_PROGRESSIVE_JPEG 1
50 +/* Define to 1 if sigsetjmp is available */
51 +#undef HAVE_SIGSETJMP
53 +/* Define to 1 if you have the <stdint.h> header file. */
54 +#undef HAVE_STDINT_H
56 +/* Define to 1 if you have the <stdlib.h> header file. */
57 +#define HAVE_STDLIB_H 1
59 +/* Define to 1 if you have the <strings.h> header file. */
60 +#define HAVE_STRINGS_H 1
62 +/* Define to 1 if you have the <string.h> header file. */
63 +#undef HAVE_STRING_H
65 +/* Define to 1 if you have the <sys/stat.h> header file. */
66 +#undef HAVE_SYS_STAT_H
68 +/* Define to 1 if sys/sysinfo.h is available */
69 +#undef HAVE_SYS_SYSINFO_H
71 +/* Define to 1 if sys/systeminfo.h is available */
72 +#undef HAVE_SYS_SYSTEMINFO_H
74 +/* Define to 1 if you have the <sys/types.h> header file. */
75 +#undef HAVE_SYS_TYPES_H
77 +/* Define to 1 if you have the <unistd.h> header file. */
78 +#undef HAVE_UNISTD_H
80 +/* Define to the sub-directory in which libtool stores uninstalled libraries.
81 + */
82 +#undef LT_OBJDIR
84 +/* Define to 1 if your C compiler doesn't accept -c and -o together. */
85 +#undef NO_MINUS_C_MINUS_O
87 +/* Define to the address where bug reports for this package should be sent. */
88 +#undef PACKAGE_BUGREPORT
90 +/* Define to the full name of this package. */
91 +#undef PACKAGE_NAME
93 +/* Define to the full name and version of this package. */
94 +#undef PACKAGE_STRING
96 +/* Define to the one symbol short name of this package. */
97 +#undef PACKAGE_TARNAME
99 +/* Define to the home page for this package. */
100 +#undef PACKAGE_URL
102 +/* Define to the version of this package. */
103 +#undef PACKAGE_VERSION
105 +/* Define to 1 if you have the ANSI C header files. */
106 +#undef STDC_HEADERS
108 +/* Define to 1 if gmodule works and should be used */
109 +#undef USE_GMODULE
111 +/* Whether to load modules via .la files rather than directly */
112 +#undef USE_LA_MODULES
114 +/* Define to 1 if medialib is available and should be used */
115 +#undef USE_MEDIALIB
117 +/* Define to 1 if medialib 2.5 is available */
118 +#undef USE_MEDIALIB25
120 +/* Define to 1 if XXM is available and should be used */
121 +#undef USE_MMX
123 +/* Number of bits in a file offset, on hosts where this is settable. */
124 +#undef _FILE_OFFSET_BITS
126 +/* Define for large files, on AIX-style hosts. */
127 +#undef _LARGE_FILES
129 +/* Define to empty if `const' does not conform to ANSI C. */
130 +#undef const
131 --- misc/gdk-pixbuf-2.23.0/gdk-pixbuf/io-png.c 2010-07-10 02:54:35.000000000 +0200
132 +++ misc/build/gdk-pixbuf-2.23.0/gdk-pixbuf/io-png.c 2011-03-22 02:18:55.515625000 +0100
133 @@ -27,6 +27,7 @@
134 #include <stdio.h>
135 #include <stdlib.h>
136 #include <png.h>
137 +#include <pngstruct.h>
138 #include "gdk-pixbuf-private.h"
141 @@ -183,7 +184,7 @@
142 error_msg);
145 - longjmp (png_save_ptr->jmpbuf, 1);
146 + longjmp (png_save_ptr->png_jmpbuf, 1);
149 static void
150 @@ -287,7 +288,7 @@
151 return NULL;
154 - if (setjmp (png_ptr->jmpbuf)) {
155 + if (setjmp (png_ptr->png_jmpbuf)) {
156 g_free (rows);
158 if (pixbuf)
159 @@ -459,7 +460,7 @@
160 return NULL;
163 - if (setjmp (lc->png_read_ptr->jmpbuf)) {
164 + if (setjmp (lc->png_read_ptr->png_jmpbuf)) {
165 if (lc->png_info_ptr)
166 png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL);
167 g_free(lc);
168 @@ -531,7 +532,7 @@
169 lc->error = error;
171 /* Invokes our callbacks as needed */
172 - if (setjmp (lc->png_read_ptr->jmpbuf)) {
173 + if (setjmp (lc->png_read_ptr->png_jmpbuf)) {
174 lc->error = NULL;
175 return FALSE;
176 } else {
177 @@ -769,7 +770,7 @@
178 error_msg);
181 - longjmp (png_read_ptr->jmpbuf, 1);
182 + longjmp (png_read_ptr->png_jmpbuf, 1);
185 static void
186 @@ -978,7 +979,7 @@
187 success = FALSE;
188 goto cleanup;
190 - if (setjmp (png_ptr->jmpbuf)) {
191 + if (setjmp (png_ptr->png_jmpbuf)) {
192 success = FALSE;
193 goto cleanup;
195 --- misc/gdk-pixbuf-2.23.0/gdk-pixbuf/makefile.msc 2010-06-25 23:40:10.000000000 +0200
196 +++ misc/build/gdk-pixbuf-2.23.0/gdk-pixbuf/makefile.msc 2011-03-24 06:13:30.515625000 +0100
197 @@ -1,9 +1,19 @@
198 -TOP = ..\..
199 PRJ_TOP = ..
200 +GLIB_TOP =
201 PACKAGE = gdk_pixbuf
202 PKG_VER = $(GDK_PIXBUF_VER)
203 +GLIB_INC = -I$(OUTDIR)\inc\external\glib-2.0
204 +LIBPNG_INC = -I$(OUTDIR)\inc\external\libpng
205 +LIBJPEG_INC = -I$(OUTDIR)\inc\external\libjpeg
207 +INTL_LIB = $(OUTDIR)\lib\intl.lib
208 +GLIB_LIB = $(OUTDIR)\lib\glib-2.0.lib $(OUTDIR)\lib\gobject-2.0.lib $(OUTDIR)\lib\gmodule-2.0.lib $(OUTDIR)\lib\gio-2.0.lib $(OUTDIR)\lib\gthread-2.0.lib
209 +LIBJPEG_LIB = $(OUTDIR)\lib\jpeg.lib
210 +LIBPNG_LIB = $(OUTDIR)\lib\libpng.lib
211 +ZLIB_LIB = $(OUTDIR)\lib\zlib.lib
212 +GDIPLUS_LIB = gdiplus.lib
214 -!INCLUDE $(TOP)/glib/build/win32/make.msc
215 +!INCLUDE $(OUTDIR)\inc\external\glib-2.0\make.msc
217 !IFNDEF PERL
218 PERL = perl
219 @@ -13,22 +23,22 @@
221 # -DINCLUDE_gdiplus _replaces_ -DINCLUDE_bmp -DINCLUDE_gif -DINCLUDE_ico -DINCLUDE_jpeg -DINCLUDE_tiff
222 # but not yet -DINCLUDE_png
223 -##USEGDIP=1
224 +USEGDIP=1
225 # to get _working_ include modules we need respective defines ...
227 BUILT_IN_FORMATS = \
228 !IFDEF USEGDIP
229 -DINCLUDE_gdiplus \
230 !ELSE
231 - -DINCLUDE_bmp -DINCLUDE_gif -DINCLUDE_ico -DINCLUDE_jpeg -DINCLUDE_tiff \
232 + -DINCLUDE_bmp -DINCLUDE_gif -DINCLUDE_ico -DINCLUDE_jpeg \
233 !ENDIF
234 -DINCLUDE_png \
235 -DINCLUDE_xpm -DINCLUDE_wbmp \
236 -DINCLUDE_pnm -DINCLUDE_ras
238 -PKG_CFLAGS = -FImsvc_recommended_pragmas.h \
239 +PKG_CFLAGS = -FI$(PRJ_TOP)\msvc_recommended_pragmas.h \
240 !IFNDEF USEGDIP
241 - $(JPEG_CFLAGS) $(TIFF_CFLAGS) \
242 + $(JPEG_CFLAGS) \
243 !ENDIF
244 -I. -I.. $(GLIB_CFLAGS) \
245 $(BUILT_IN_FORMATS) \
246 @@ -39,13 +49,14 @@
247 -UUSE_GMODULE # use built-in
248 # -DUSE_GMODULE -DPIXBUF_LIBDIR=\".\"
250 -PKG_LINK = $(GLIB_LIBS) \
251 -!IFNDEF USEGDIP
252 - $(TIFF_LIBS) $(JPEG_LIBS) \
253 -!ENDIF
254 - $(PNG_LIBS) $(INTL_LIBS) \
255 - pixops\pixops.lib \
257 +PKG_LINK = $(INTL_LIB) \
258 + $(GLIB_LIB) \
259 + $(LIBPNG_LIB) \
260 + $(LIBJPEG_LIB) \
261 + $(ZLIB_LIB) \
262 + $(GDIPLUS_LIB) \
263 + pixops\pixops.lib
265 OBJECTS_NON_NATIVE = \
266 io-bmp.obj \
267 io-gif.obj \
268 @@ -95,13 +106,13 @@
269 gdk-pixbuf-transform.h
271 gdk-pixbuf-marshal.h: gdk-pixbuf-marshal.list
272 - ..\..\glib\gobject\glib-genmarshal --prefix=_gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >gdk-pixbuf-marshal.h
273 + $(OUTDIR)\bin\glib-genmarshal --prefix=_gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >gdk-pixbuf-marshal.h
275 gdk-pixbuf-marshal.c: gdk-pixbuf-marshal.h gdk-pixbuf-marshal.list
276 - ..\..\glib\gobject\glib-genmarshal --prefix=_gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >gdk-pixbuf-marshal.c
277 + $(OUTDIR)\bin\glib-genmarshal --prefix=_gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >gdk-pixbuf-marshal.c
279 -gdk-pixbuf-alias.h: gdk-pixbuf.symbols
280 - perl makegdkpixbufalias.pl < gdk-pixbuf.symbols > gdk-pixbuf-alias.h
281 +#gdk-pixbuf-alias.h: gdk-pixbuf.symbols
282 +# perl makegdkpixbufalias.pl < gdk-pixbuf.symbols > gdk-pixbuf-alias.h
284 gdk_pixbuf.def: gdk-pixbuf.symbols makefile.msc
285 echo EXPORTS > gdk_pixbuf.def
286 @@ -109,14 +120,15 @@
287 -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= -DG_GNUC_PRINTF=;G_GNUC_PRINTF \
288 gdk-pixbuf.symbols >> gdk_pixbuf.def
290 -gdk-pixbuf-aliasdef.c: gdk-pixbuf.symbols
291 - perl makegdkpixbufalias.pl -def < gdk-pixbuf.symbols > gdk-pixbuf-aliasdef.c
292 +#gdk-pixbuf-aliasdef.c: gdk-pixbuf.symbols
293 +# perl makegdkpixbufalias.pl -def < gdk-pixbuf.symbols > gdk-pixbuf-aliasdef.c
295 ## common stuff
297 INSTALL = copy
299 -CFLAGS = -I. -DHAVE_CONFIG_H
300 +CFLAGS = -I. $(SOLARINC) $(GLIB_INC) $(LIBPNG_INC) $(LIBJPEG_INC) \
301 + -DHAVE_CONFIG_H -DGDK_PIXBUF_LOCALEDIR="\"locale_dummy\""
303 sub-pixops :
304 cd pixops
305 @@ -126,19 +138,19 @@
306 ## targets
307 all : \
308 $(PRJ_TOP)\config.h \
309 - gdk-pixbuf-alias.h \
310 - gdk-pixbuf-aliasdef.c \
311 +# gdk-pixbuf-alias.h \
312 +# gdk-pixbuf-aliasdef.c \
313 gdk-pixbuf-marshal.h \
314 gdk-pixbuf-marshal.c \
315 sub-pixops \
316 lib$(PACKAGE)-$(PKG_VER)-0.dll \
317 - $(PACKAGE)-$(PKG_VER)s.lib \
318 + $(PACKAGE)-$(PKG_VER)s.lib
319 # make-inline-pixbuf.exe \
320 - gdk-pixbuf-csource.exe \
321 - test-gdk-pixbuf.exe
322 +# gdk-pixbuf-csource.exe \
323 +# test-gdk-pixbuf.exe
325 $(PACKAGE).res : $(PACKAGE).rc
326 - rc -DBUILDNUMBER=0 -r -fo $(PACKAGE).res $(PACKAGE).rc
327 + rc -I $(SOLARINCLUDES) -DBUILDNUMBER=0 -r -fo $(PACKAGE).res $(PACKAGE).rc
329 $(PACKAGE)-$(PKG_VER)s.lib : $(OBJECTS)
330 lib /out:$(PACKAGE)-$(PKG_VER)s.lib $(OBJECTS) pixops\pixops.lib
331 @@ -160,7 +172,7 @@
332 # gdk-pixbuf-enum-types.h
334 gdk-pixbuf-enum-types.h : $(gdk_pixbuf_headers) makefile.msc
335 - $(PERL) $(GLIB)\gobject\glib-mkenums \
336 + perl $(OUTDIR)\bin\glib-mkenums \
337 --fhead "#ifndef __GDK_PIXBUF__ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n" \
338 --fprod "/* enumerations from \"@filename@\" */\n" \
339 --vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
340 @@ -171,8 +183,8 @@
341 # gdk-pixbuf-enum-types.c
343 gdk-pixbuf-enum-types.c: $(gdk_pixbuf_headers) makefile.msc
344 - $(PERL) $(GLIB)\gobject\glib-mkenums \
345 - --fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
346 + perl $(OUTDIR)\bin\glib-mkenums \
347 + --fhead "#include <gdk-pixbuf.h>" \
348 --fprod "\n/* enumerations from \"@filename@\" */" \
349 --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
350 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
351 @@ -188,10 +200,10 @@
352 $(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<
354 clean::
355 - del config.h
356 - del gdk-pixbuf-marshal.h
357 - del gdk-pixbuf-marshal.c
358 - del gdk-pixbuf-alaias.h
359 + rm config.h
360 + rm gdk-pixbuf-marshal.h
361 + rm gdk-pixbuf-marshal.c
362 + rm gdk-pixbuf-alaias.h
366 --- misc/gdk-pixbuf-2.23.0/gdk-pixbuf/pixops/makefile.msc 2010-06-25 23:40:10.000000000 +0200
367 +++ misc/build/gdk-pixbuf-2.23.0/gdk-pixbuf/pixops/makefile.msc 2011-03-24 06:03:59.062500000 +0100
368 @@ -1,10 +1,11 @@
369 -TOP = ../../..
370 -PACKAGE = pixops
371 PRJ_TOP = ..\..
372 +PACKAGE = pixops
373 +GLIB_TOP =
374 +GLIB_INC = -I$(OUTDIR)\inc\external\glib-2.0
376 -!INCLUDE $(TOP)/glib/build/win32/make.msc
377 +!INCLUDE $(OUTDIR)\inc\external\glib-2.0\make.msc
379 -PKG_CFLAGS = -I.. $(GLIB_CFLAGS)
380 +PKG_CFLAGS = -I.. $(SOLARINC) $(GLIB_INC) $(GLIB_CFLAGS)
382 OBJECTS = \
383 pixops.obj \
384 @@ -50,16 +51,16 @@
385 $(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<
387 clean::
388 - del config.h
389 - del *.exe
390 - del *.obj
391 - del *.dll
392 - del *.lib
393 - del *.err
394 - del *.map
395 - del *.sym
396 - del *.exp
397 - del *.lk1
398 - del *.mk1
399 - del *.pdb
400 - del *.ilk
401 + rm config.h
402 + rm *.exe
403 + rm *.obj
404 + rm *.dll
405 + rm *.lib
406 + rm *.err
407 + rm *.map
408 + rm *.sym
409 + rm *.exp
410 + rm *.lk1
411 + rm *.mk1
412 + rm *.pdb
413 + rm *.ilk
414 --- misc/gdk-pixbuf-2.23.0/gdk-pixbuf/pixops/pixops.c 2010-06-25 23:40:10.000000000 +0200
415 +++ misc/build/gdk-pixbuf-2.23.0/gdk-pixbuf/pixops/pixops.c 2011-03-22 01:58:24.281250000 +0100
416 @@ -21,7 +21,7 @@
418 #include "config.h"
419 #include <math.h>
420 -#include <glib.h>
421 +#include <glib-2.0\glib.h>
423 #include "pixops.h"
424 #include "pixops-internal.h"
425 --- misc/gdk-pixbuf-2.23.0/msvc_recommended_pragmas.h 2011-03-24 04:59:07.625000000 +0100
426 +++ misc/build/gdk-pixbuf-2.23.0/msvc_recommended_pragmas.h 2011-03-22 01:58:24.359375000 +0100
427 @@ -1 +1,31 @@
428 -dummy
429 +#ifndef _MSC_VER
430 +#pragma error "This header is for Microsoft VC only."
431 +#endif /* _MSC_VER */
433 +/* Make MSVC more pedantic, this is a recommended pragma list
434 + * from _Win32_Programming_ by Rector and Newcomer.
435 + */
436 +#pragma warning(error:4002) /* too many actual parameters for macro */
437 +#pragma warning(error:4003) /* not enough actual parameters for macro */
438 +#pragma warning(1:4010) /* single-line comment contains line-continuation character */
439 +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */
440 +#pragma warning(1:4016) /* no function return type; using int as default */
441 +#pragma warning(error:4020) /* too many actual parameters */
442 +#pragma warning(error:4021) /* too few actual parameters */
443 +#pragma warning(error:4027) /* function declared without formal parameter list */
444 +#pragma warning(error:4029) /* declared formal parameter list different from definition */
445 +#pragma warning(error:4033) /* 'function' must return a value */
446 +#pragma warning(error:4035) /* 'function' : no return value */
447 +#pragma warning(error:4045) /* array bounds overflow */
448 +#pragma warning(error:4047) /* different levels of indirection */
449 +#pragma warning(error:4049) /* terminating line number emission */
450 +#pragma warning(error:4053) /* An expression of type void was used as an operand */
451 +#pragma warning(error:4071) /* no function prototype given */
452 +#pragma warning(disable:4101) /* unreferenced local variable */
453 +#pragma warning(error:4150)
455 +#pragma warning(disable:4244) /* No possible loss of data warnings */
456 +#pragma warning(disable:4305) /* No truncation from int to char warnings */
458 +/* work around Microsoft's premature attempt to deprecate the C-Library */
459 +#pragma warning(disable:4996) /* This function or variable may be unsafe. */