[100042] trunk/dports/x11/pango

ryandesign at macports.org ryandesign at macports.org
Sat Nov 24 23:26:36 PST 2012


Revision: 100042
          https://trac.macports.org/changeset/100042
Author:   ryandesign at macports.org
Date:     2012-11-24 23:26:36 -0800 (Sat, 24 Nov 2012)
Log Message:
-----------
pango: cherry-pick upstream patch to fix some GLib-GObject-CRITICAL and Pango-CRITICAL assertion failures (#37129)

Modified Paths:
--------------
    trunk/dports/x11/pango/Portfile

Added Paths:
-----------
    trunk/dports/x11/pango/files/patch-pango-pangocoretext-fontmap.c.diff

Modified: trunk/dports/x11/pango/Portfile
===================================================================
--- trunk/dports/x11/pango/Portfile	2012-11-25 06:26:07 UTC (rev 100041)
+++ trunk/dports/x11/pango/Portfile	2012-11-25 07:26:36 UTC (rev 100042)
@@ -7,7 +7,7 @@
 conflicts               pango-devel
 epoch                   1
 version                 1.30.1
-revision                2
+revision                3
 set branch              [join [lrange [split ${version} .] 0 1] .]
 categories              x11
 maintainers             ryandesign openmaintainer
@@ -39,6 +39,7 @@
     port:libpng
 
 patchfiles              patch-ltmain.sh.diff
+patchfiles-append       patch-pango-pangocoretext-fontmap.c.diff
 
 configure.ccache        no
 

Added: trunk/dports/x11/pango/files/patch-pango-pangocoretext-fontmap.c.diff
===================================================================
--- trunk/dports/x11/pango/files/patch-pango-pangocoretext-fontmap.c.diff	                        (rev 0)
+++ trunk/dports/x11/pango/files/patch-pango-pangocoretext-fontmap.c.diff	2012-11-25 07:26:36 UTC (rev 100042)
@@ -0,0 +1,60 @@
+coretext: don't insert item in the hash if it originated from the hash
+https://github.com/GNOME/pango/commit/70a85d441d973883af4afb57599bc570eeea4c83
+--- pango/pangocoretext-fontmap.c.orig
++++ pango/pangocoretext-fontmap.c
+@@ -1284,13 +1284,11 @@ struct _PangoCoreTextFontKey
+ 
+   if (G_UNLIKELY (!fontset))
+     {
++      gboolean insert_in_hash = TRUE;
++
+       fontset = pango_core_text_fontset_new (&key, desc);
+ 
+-      if (G_LIKELY (fontset))
+-        g_hash_table_insert (ctfontmap->fontset_hash,
+-                             pango_core_text_fontset_get_key (fontset),
+-                             fontset);
+-      else
++      if (G_UNLIKELY (!fontset))
+         {
+           /* If no font(set) could be loaded, we fallback to "Sans",
+            * which should always work on Mac. We try to adhere to the
+@@ -1308,7 +1306,9 @@ struct _PangoCoreTextFontKey
+                                             language);
+ 
+           fontset = g_hash_table_lookup (ctfontmap->fontset_hash, &key);
+-          if (G_UNLIKELY (!fontset))
++          if (G_LIKELY (fontset))
++            insert_in_hash = FALSE;
++          else
+             fontset = pango_core_text_fontset_new (&key, tmp_desc);
+ 
+           if (G_UNLIKELY (!fontset))
+@@ -1335,7 +1335,9 @@ struct _PangoCoreTextFontKey
+                 }
+ 
+               fontset = g_hash_table_lookup (ctfontmap->fontset_hash, &key);
+-              if (G_UNLIKELY (!fontset))
++              if (G_LIKELY (fontset))
++                insert_in_hash = FALSE;
++              else
+                 fontset = pango_core_text_fontset_new (&key, tmp_desc);
+ 
+               if (G_UNLIKELY (!fontset))
+@@ -1346,11 +1348,12 @@ struct _PangoCoreTextFontKey
+                   g_error ("Could not load fallback font, bailing out.");
+                 }
+             }
+-
+-          g_hash_table_insert (ctfontmap->fontset_hash,
+-                               pango_core_text_fontset_get_key (fontset),
+-                               fontset);
+         }
++
++      if (insert_in_hash)
++        g_hash_table_insert (ctfontmap->fontset_hash,
++                             pango_core_text_fontset_get_key (fontset),
++                             fontset);
+     }
+ 
+   /* Cannot use pango_core_text_fontset_key_free() here */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121124/a81d9088/attachment.html>


More information about the macports-changes mailing list