[mingw-pango: 8/37] Add some already upstreamed patches to get pango compiled on mingw32

Kalev Lember kalev at fedoraproject.org
Tue Mar 6 20:14:54 UTC 2012


commit c037eef80d048134cd9eb9b23a99a498b61643da
Author: epienbro <epienbro at fedoraproject.org>
Date:   Fri Aug 14 09:48:47 2009 +0000

    Add some already upstreamed patches to get pango compiled on mingw32

 mingw32-pango.spec |   17 ++++++++++++++-
 pango-87f9fe.patch |   37 ++++++++++++++++++++++++++++++++
 pango-b4f105.patch |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 pango-f48680.patch |   22 +++++++++++++++++++
 4 files changed, 134 insertions(+), 1 deletions(-)
---
diff --git a/mingw32-pango.spec b/mingw32-pango.spec
index 1fc90af..f0c7c9e 100644
--- a/mingw32-pango.spec
+++ b/mingw32-pango.spec
@@ -6,7 +6,7 @@
 %define __debug_install_post %{_mingw32_debug_install_post}
 
 Name:           mingw32-pango
-Version:        1.25.2
+Version:        1.25.3
 Release:        1%{?dist}
 Summary:        MinGW Windows Pango library
 
@@ -27,6 +27,13 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 # wine %{_mingw32_bindir}/pango-querymodules.exe > pango.modules
 Source1:        pango.modules
 
+# Upstream commit b4f10583ea84d02ed0278fc2cb2846aaf075864d
+Patch0:         pango-b4f105.patch
+# Upstream commit 87f9fedcd27baa62043cb59b03dfd5ce0a9214db
+Patch1:         pango-87f9fe.patch
+# Upstream commit f4868084a55e3abd0b45ee2fb7b477e038a81d1a 
+Patch2:         pango-f48680.patch
+
 Patch1000:      pango_enable_static_build.patch
 
 BuildArch:      noarch
@@ -75,6 +82,9 @@ Static version of the MinGW Windows Pango library.
 
 %prep
 %setup -q -n pango-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 %patch1000
 
 # Regenerate the configure script
@@ -196,6 +206,11 @@ rm -rf $RPM_BUILD_ROOT
   
 
 %changelog
+* Fri Aug 14 2009 Erik van Pienbroek <epienbro at fedoraproject.org. - 1.25.3-1
+- Update to 1.25.3
+- Drop upstreamed patch
+- Added some (already upstreamed) patches to get pango compiled on mingw32
+
 * Thu Aug 13 2009 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.25.2-1
 - Update to 1.25.2
 - Added BR: mingw32-gcc-c++
diff --git a/pango-87f9fe.patch b/pango-87f9fe.patch
new file mode 100644
index 0000000..b3566e5
--- /dev/null
+++ b/pango-87f9fe.patch
@@ -0,0 +1,37 @@
+From 87f9fedcd27baa62043cb59b03dfd5ce0a9214db Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad at behdad.org>
+Date: Thu, 13 Aug 2009 09:20:46 +0000
+Subject: [HB] Fix buffer sizing issue with mingw gcc
+
+Bit field packing is a delicate field.  Issue reported in comment 3 here:
+http://bugzilla.gnome.org/show_bug.cgi?id=591511
+---
+diff --git a/pango/opentype/hb-buffer-private.h b/pango/opentype/hb-buffer-private.h
+index 2d2ea06..0456125 100644
+--- a/pango/opentype/hb-buffer-private.h
++++ b/pango/opentype/hb-buffer-private.h
+@@ -50,15 +50,15 @@ typedef struct _hb_internal_glyph_position_t {
+   hb_position_t  y_pos;
+   hb_position_t  x_advance;
+   hb_position_t  y_advance;
+-  hb_bool_t      new_advance :1;	/* if set, the advance width values are
+-					   absolute, i.e., they won't be
+-					   added to the original glyph's value
+-					   but rather replace them */
++  unsigned short new_advance :1;	/* if set, the advance width values are
++					 * absolute, i.e., they won't be
++					 * added to the original glyph's value
++					 * but rather replace them */
+   unsigned short back : 15;		/* number of glyphs to go back
+-					   for drawing current glyph */
++					 * for drawing current glyph */
+   short          cursive_chain : 16;	/* character to which this connects,
+-					   may be positive or negative; used
+-					   only internally */
++					 * may be positive or negative; used
++					 * only internally */
+ } hb_internal_glyph_position_t;
+ 
+ ASSERT_STATIC (sizeof (hb_glyph_info_t) == sizeof (hb_internal_glyph_info_t));
+--
+cgit v0.8.2
diff --git a/pango-b4f105.patch b/pango-b4f105.patch
new file mode 100644
index 0000000..e3bbfe1
--- /dev/null
+++ b/pango-b4f105.patch
@@ -0,0 +1,59 @@
+From b4f10583ea84d02ed0278fc2cb2846aaf075864d Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad at behdad.org>
+Date: Thu, 13 Aug 2009 09:25:23 +0000
+Subject: Bug 591511 – hh-blob.c does not compile using mingw on windows
+
+Check for sys/mman.h, not mprotect().
+---
+diff --git a/configure.in b/configure.in
+index 7ea8648..f3f242e 100644
+--- a/configure.in
++++ b/configure.in
+@@ -128,7 +128,7 @@ AC_LANG_RESTORE
+ #
+ 
+ AC_PROG_CXX
+-AC_CHECK_FUNCS(mprotect)
++AC_CHECK_HEADERS(unistd.h sys/mman.h)
+ 
+ # Make sure we don't link to libstdc++ (needs de-gcc-fication)
+ CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
+diff --git a/pango/opentype/hb-blob.c b/pango/opentype/hb-blob.c
+index 178bc8e..2abd4ca 100644
+--- a/pango/opentype/hb-blob.c
++++ b/pango/opentype/hb-blob.c
+@@ -28,12 +28,12 @@
+ 
+ #include "hb-blob.h"
+ 
+-#ifdef HAVE_MPROTECT
++#ifdef HAVE_SYS_MMAN_H
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif /* HAVE_UNISTD_H */
+ #include <sys/mman.h>
+-#endif /* HAVE_MPROTECT */
++#endif /* HAVE_SYS_MMAN_H */
+ 
+ struct _hb_blob_t {
+   hb_reference_count_t ref_count;
+@@ -244,7 +244,7 @@ hb_blob_try_writeable_inplace (hb_blob_t *blob)
+ 
+   hb_mutex_lock (blob->lock);
+ 
+-#ifdef HAVE_MPROTECT
++#ifdef HAVE_SYS_MMAN_H
+   if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITEABLE) {
+     unsigned int pagesize, mask, length;
+     const char *addr;
+@@ -286,7 +286,7 @@ hb_blob_try_writeable_inplace (hb_blob_t *blob)
+ 	     addr, addr+length, length);
+ #endif
+   }
+-#else /* !HAVE_MPROTECT */
++#else /* !HAVE_SYS_MMAN_H */
+ #warning "No way to make readonly memory writeable.  This is suboptimal."
+ #endif
+ 
+--
+cgit v0.8.2
diff --git a/pango-f48680.patch b/pango-f48680.patch
new file mode 100644
index 0000000..a502b84
--- /dev/null
+++ b/pango-f48680.patch
@@ -0,0 +1,22 @@
+From f4868084a55e3abd0b45ee2fb7b477e038a81d1a Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad at behdad.org>
+Date: Thu, 13 Aug 2009 15:47:08 +0000
+Subject: [HB] Bitfield packing *is* very delicate
+
+Fix the second instance.
+---
+diff --git a/pango/opentype/hb-buffer.h b/pango/opentype/hb-buffer.h
+index f06a255..f27739f 100644
+--- a/pango/opentype/hb-buffer.h
++++ b/pango/opentype/hb-buffer.h
+@@ -56,7 +56,7 @@ typedef struct _hb_glyph_position_t {
+   hb_position_t  x_advance;
+   hb_position_t  y_advance;
+   /* XXX these should all be replaced by "uint32_t internal" */
+-  hb_bool_t      new_advance :1;	/* if set, the advance width values are
++  unsigned short new_advance :1;	/* if set, the advance width values are
+ 					   absolute, i.e., they won't be
+ 					   added to the original glyph's value
+ 					   but rather replace them */
+--
+cgit v0.8.2


More information about the scm-commits mailing list