From 4669cde481de658a1821a7bb6a83bfc3011b8eee Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Mon, 4 Jun 2012 17:56:56 +0200 Subject: update package cairo --- index.html | 2 +- src/cairo-1-DllMain.patch | 18 ------------------ src/cairo-1-ssize-t-defined.patch | 18 ++++++++++++++++++ src/cairo-2-static-init.patch | 27 +++++++++++++++++++++++++++ src/cairo.mk | 5 +++-- 5 files changed, 49 insertions(+), 21 deletions(-) delete mode 100644 src/cairo-1-DllMain.patch create mode 100644 src/cairo-1-ssize-t-defined.patch create mode 100644 src/cairo-2-static-init.patch diff --git a/index.html b/index.html index 3ef710d..422fc07 100644 --- a/index.html +++ b/index.html @@ -965,7 +965,7 @@ USE_OSGPLUGIN(<plugin2>) cairo - 1.10.2 + 1.12.2 cairo 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 + #include + ++#define _SSIZE_T_DEFINED 1 ++ + #ifdef _WIN32 + #define WIN32_LEAN_AND_MEAN + #include 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 -- cgit v0.12