diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-1-DllMain.patch | 18 | ||||
-rw-r--r-- | src/cairo-1-ssize-t-defined.patch | 18 | ||||
-rw-r--r-- | src/cairo-2-static-init.patch | 27 | ||||
-rw-r--r-- | src/cairo.mk | 5 |
4 files changed, 48 insertions, 20 deletions
diff --git a/src/cairo-1-DllMain.patch b/src/cairo-1-DllMain.patch deleted file mode 100644 index cb87fde..0000000 --- a/src/cairo-1-DllMain.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -uNr cairo-1.10.2-orig/src/cairo-system.c cairo-1.10.2/src/cairo-system.c ---- cairo-1.10.2-orig/src/cairo-system.c 2010-06-18 13:47:14.000000000 +0200 -+++ cairo-1.10.2/src/cairo-system.c 2012-04-14 22:01:27.848928137 +0200 -@@ -70,12 +70,12 @@ - - /* declare to avoid "no previous prototype for 'DllMain'" warning */ - BOOL WINAPI --DllMain (HINSTANCE hinstDLL, -+cairo_DllMain (HINSTANCE hinstDLL, - DWORD fdwReason, - LPVOID lpvReserved); - - BOOL WINAPI --DllMain (HINSTANCE hinstDLL, -+cairo_DllMain (HINSTANCE hinstDLL, - DWORD fdwReason, - LPVOID lpvReserved) - { diff --git a/src/cairo-1-ssize-t-defined.patch b/src/cairo-1-ssize-t-defined.patch new file mode 100644 index 0000000..3573c1d --- /dev/null +++ b/src/cairo-1-ssize-t-defined.patch @@ -0,0 +1,18 @@ +This file is part of MXE. +See index.html for further information. + +Insist that ssize_t is defined. + +diff --git a/util/cairo-missing/cairo-missing.h b/util/cairo-missing/cairo-missing.h +index 7e4f0a3..c20b869 100644 +--- a/util/cairo-missing/cairo-missing.h ++++ b/util/cairo-missing/cairo-missing.h +@@ -37,6 +37,8 @@ + #include <string.h> + #include <sys/types.h> + ++#define _SSIZE_T_DEFINED 1 ++ + #ifdef _WIN32 + #define WIN32_LEAN_AND_MEAN + #include <windows.h> diff --git a/src/cairo-2-static-init.patch b/src/cairo-2-static-init.patch new file mode 100644 index 0000000..16d74c3 --- /dev/null +++ b/src/cairo-2-static-init.patch @@ -0,0 +1,27 @@ +This file is part of MXE. +See index.html for further information. + +When DllMain is not being run, we need to initialize the font face mutex before using it. + +diff --git a/src/win32/cairo-win32-font.c b/src/win32/cairo-win32-font.c +index a65d81b..31d854d 100644 +--- a/src/win32/cairo-win32-font.c ++++ b/src/win32/cairo-win32-font.c +@@ -1912,6 +1912,8 @@ _cairo_win32_font_face_hash_table_destroy (void) + { + cairo_hash_table_t *hash_table; + ++ CAIRO_MUTEX_INITIALIZE (); ++ + /* We manually acquire the lock rather than calling + * _cairo_win32_font_face_hash_table_lock simply to avoid creating + * the table only to destroy it again. */ +@@ -1927,6 +1929,8 @@ _cairo_win32_font_face_hash_table_destroy (void) + static cairo_hash_table_t * + _cairo_win32_font_face_hash_table_lock (void) + { ++ CAIRO_MUTEX_INITIALIZE (); ++ + CAIRO_MUTEX_LOCK (_cairo_win32_font_face_mutex); + + if (unlikely (cairo_win32_font_face_hash_table == NULL)) diff --git a/src/cairo.mk b/src/cairo.mk index cf0a719..9e42f80 100644 --- a/src/cairo.mk +++ b/src/cairo.mk @@ -3,9 +3,9 @@ PKG := cairo $(PKG)_IGNORE := -$(PKG)_CHECKSUM := ccce5ae03f99c505db97c286a0c9a90a926d3c6e +$(PKG)_CHECKSUM := bc2ee50690575f16dab33af42a2e6cdc6451e3f9 $(PKG)_SUBDIR := cairo-$($(PKG)_VERSION) -$(PKG)_FILE := cairo-$($(PKG)_VERSION).tar.gz +$(PKG)_FILE := cairo-$($(PKG)_VERSION).tar.xz $(PKG)_URL := http://cairographics.org/releases/$($(PKG)_FILE) $(PKG)_DEPS := gcc zlib libpng fontconfig freetype pixman @@ -44,6 +44,7 @@ define $(PKG)_BUILD --enable-pdf \ --enable-svg \ --disable-pthread \ + CFLAGS="$(CFLAGS) -DCAIRO_WIN32_STATIC_BUILD" \ LIBS="-lmsimg32 -lgdi32 `$(TARGET)-pkg-config pixman-1 --libs`" $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= endef |