summaryrefslogtreecommitdiffstats
path: root/src/gdk-pixbuf-1-fixes.patch
blob: d48c21f3857641e44d3383d0247cd7d1e1c61382 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
This file is part of MXE.
See index.html for further information.

Contains ad hoc patches for cross building.

From 38f4e914e458de6963a3fddbb57dbf8cd0fb83b4 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Fri, 24 Sep 2010 23:31:24 +0200
Subject: [PATCH 1/4] s,DllMain,static _disabled_DllMain,


diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 411ceb6..64db155 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -230,12 +230,12 @@ get_file_formats (void)
 
 #ifdef G_OS_WIN32
 
-/* DllMain function needed to tuck away the gdk-pixbuf DLL handle */
+/* static _disabled_DllMain function needed to tuck away the gdk-pixbuf DLL handle */
 
 static HMODULE gdk_pixbuf_dll;
 
 BOOL WINAPI
-DllMain (HINSTANCE hinstDLL,
+gdkpixbuf_DllMain (HINSTANCE hinstDLL,
          DWORD     fdwReason,
          LPVOID    lpvReserved)
 {
-- 
1.7.10.4


From 0903d316c228bf2a6ba9fe11188851a357cde43e Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Fri, 12 Oct 2012 12:24:51 +0200
Subject: [PATCH 2/4] add libtiff to required.private in .pc


diff --git a/gdk-pixbuf-2.0.pc.in b/gdk-pixbuf-2.0.pc.in
index 7addefc..a07a46f 100644
--- a/gdk-pixbuf-2.0.pc.in
+++ b/gdk-pixbuf-2.0.pc.in
@@ -12,7 +12,7 @@ Name: GdkPixbuf
 Description: Image loading and scaling
 Version: @VERSION@
 Requires: gobject-2.0
-Requires.private: gmodule-no-export-2.0 @PNG_DEP_CFLAGS_PACKAGES@
+Requires.private: gmodule-no-export-2.0 @PNG_DEP_CFLAGS_PACKAGES@ libtiff-4
 Libs: -L${libdir} -lgdk_pixbuf-@GDK_PIXBUF_API_VERSION@
 Libs.private: @GDK_PIXBUF_EXTRA_LIBS@
 Cflags: -I${includedir}/gdk-pixbuf-@GDK_PIXBUF_API_VERSION@ @GDK_PIXBUF_EXTRA_CFLAGS@
-- 
1.7.10.4


From 1e76ff73dcd6f191584bb05c8ccc9b0a16394a0d Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Fri, 12 Oct 2012 12:25:27 +0200
Subject: [PATCH 3/4] allow static


diff --git a/configure.ac b/configure.ac
index a5224f8..a1fc2d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,16 +131,16 @@ case $host in
     ;;
 esac
 
-if test "$os_win32" = "yes"; then
-  if test x$enable_static = xyes -o x$enable_static = x; then
-    AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
-    enable_static=no
-  fi
-  if test x$enable_shared = xno; then
-    AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
-  fi
-  enable_shared=yes
-fi
+dnl if test "$os_win32" = "yes"; then
+dnl   if test x$enable_static = xyes -o x$enable_static = x; then
+dnl     AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
+dnl     enable_static=no
+dnl   fi
+dnl   if test x$enable_shared = xno; then
+dnl     AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
+dnl   fi
+dnl   enable_shared=yes
+dnl fi
 
 dnl Initialize libtool
 LT_PREREQ([2.2.6])
-- 
1.7.10.4


[PATCH 4/4] pixbuf-randomly-modified.c includes sys/resource.h which does not
exist in MXE.


diff -ur a/tests/pixbuf-randomly-modified.c b/tests/pixbuf-randomly-modified.c
--- a/tests/pixbuf-randomly-modified.c	2013-09-23 15:06:17.000000000 +0200
+++ b/tests/pixbuf-randomly-modified.c	2013-11-09 09:57:29.838931133 +0100
@@ -26,7 +26,9 @@
 #include <time.h>
 #include <string.h>
 #include <sys/time.h>
+#ifndef __MINGW32__
 #include <sys/resource.h>
+#endif
 
 static void
 disaster (const char *what)
@@ -104,12 +106,14 @@
   gboolean got_seed = FALSE;
   GPtrArray *files = g_ptr_array_new ();
   int l, iterations;
+#ifndef __MINGW32__
   struct rlimit max_mem_size;
 
   max_mem_size.rlim_cur = 100 * 1024 * 1024; /* 100M */
   max_mem_size.rlim_max = max_mem_size.rlim_cur;
   setrlimit (RLIMIT_DATA, &max_mem_size);
   setrlimit (RLIMIT_AS, &max_mem_size);
+#endif
 
   g_test_init (&argc, &argv, NULL);