[137685] trunk/dports/x11/pango-devel
ryandesign at macports.org
ryandesign at macports.org
Wed Jun 17 07:21:41 PDT 2015
Revision: 137685
https://trac.macports.org/changeset/137685
Author: ryandesign at macports.org
Date: 2015-06-17 07:21:41 -0700 (Wed, 17 Jun 2015)
Log Message:
-----------
pango-devel: add upstream patches to fix some regressions that caused crashes
Modified Paths:
--------------
trunk/dports/x11/pango-devel/Portfile
Added Paths:
-----------
trunk/dports/x11/pango-devel/files/patch-pango-pango-language.c.diff
trunk/dports/x11/pango-devel/files/patch-pango-pangocoretext-fontmap.c.diff
Modified: trunk/dports/x11/pango-devel/Portfile
===================================================================
--- trunk/dports/x11/pango-devel/Portfile 2015-06-17 12:44:26 UTC (rev 137684)
+++ trunk/dports/x11/pango-devel/Portfile 2015-06-17 14:21:41 UTC (rev 137685)
@@ -11,6 +11,7 @@
conflicts pango
set my_name pango
version 1.37.0
+revision 1
set branch [join [lrange [split ${version} .] 0 1] .]
categories x11
maintainers ryandesign openmaintainer
@@ -43,6 +44,8 @@
port:harfbuzz
patchfiles patch-ltmain.sh.diff
+patchfiles-append patch-pango-pangocoretext-fontmap.c.diff \
+ patch-pango-pango-language.c.diff
configure.args --enable-static \
--disable-silent-rules \
Added: trunk/dports/x11/pango-devel/files/patch-pango-pango-language.c.diff
===================================================================
--- trunk/dports/x11/pango-devel/files/patch-pango-pango-language.c.diff (rev 0)
+++ trunk/dports/x11/pango-devel/files/patch-pango-pango-language.c.diff 2015-06-17 14:21:41 UTC (rev 137685)
@@ -0,0 +1,32 @@
+Fix regression caught by test "test-layout"
+https://bugzilla.gnome.org/show_bug.cgi?id=750017
+https://git.gnome.org/browse/pango/commit/?id=5ff42dc22274177321ccc698d9388460a2628d2a
+--- pango/pango-language.c.orig
++++ pango/pango-language.c
+@@ -205,7 +205,26 @@ _pango_get_lc_ctype (void)
+ CFArrayRef languages;
+ CFStringRef language;
+ gchar ret[16];
++ gchar *p;
++
++ /* Take the same approach as done for Windows above. First we check
++ * if somebody tried to set the locale through environment variables.
++ */
++ p = getenv ("LC_ALL");
++ if (p != NULL)
++ return g_strdup (p);
+
++ p = getenv ("LC_CTYPE");
++ if (p != NULL)
++ return g_strdup (p);
++
++ p = getenv ("LANG");
++ if (p != NULL)
++ return g_strdup (p);
++
++ /* If the environment variables are not set, determine the locale
++ * through the platform-native API.
++ */
+ languages = CFLocaleCopyPreferredLanguages ();
+ language = CFArrayGetValueAtIndex (languages, 0);
+
Added: trunk/dports/x11/pango-devel/files/patch-pango-pangocoretext-fontmap.c.diff
===================================================================
--- trunk/dports/x11/pango-devel/files/patch-pango-pangocoretext-fontmap.c.diff (rev 0)
+++ trunk/dports/x11/pango-devel/files/patch-pango-pangocoretext-fontmap.c.diff 2015-06-17 14:21:41 UTC (rev 137685)
@@ -0,0 +1,43 @@
+Fix regression caught by test "testiter"
+https://bugzilla.gnome.org/show_bug.cgi?id=750017
+https://git.gnome.org/browse/pango/commit/?id=ea326fdf0d2c12ef0d4c58882b795caa3f0050bc
+--- pango/pangocoretext-fontmap.c
++++ pango/pangocoretext-fontmap.c
+@@ -1593,19 +1593,27 @@ pango_core_text_fontset_new (PangoCoreTextFontsetKey *key,
+ /* Add the cascade list for this language */
+ #if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+ {
+- CFArrayRef language_pref_list;
++ CFArrayRef language_pref_list = NULL;
+ CFStringRef languages[1];
+
+- languages[0] = CFStringCreateWithCString (NULL,
+- pango_language_to_string (key->language),
+- kCFStringEncodingASCII);
+- language_pref_list = CFArrayCreate (kCFAllocatorDefault,
+- (const void **) languages,
+- 1,
+- &kCFTypeArrayCallBacks);
++ if (key->language)
++ {
++ languages[0] = CFStringCreateWithCString (NULL,
++ pango_language_to_string (key->language),
++ kCFStringEncodingASCII);
++ language_pref_list = CFArrayCreate (kCFAllocatorDefault,
++ (const void **) languages,
++ 1,
++ &kCFTypeArrayCallBacks);
++ }
++
+ fontset->cascade_list = CTFontCopyDefaultCascadeListForLanguages (pango_core_text_font_get_ctfont (best_font), language_pref_list);
+- CFRelease (languages[0]);
+- CFRelease (language_pref_list);
++
++ if (language_pref_list)
++ {
++ CFRelease (languages[0]);
++ CFRelease (language_pref_list);
++ }
+ }
+ #else
+ /* There is unfortunately no public API to retrieve the cascade list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150617/8cfce1b9/attachment.html>
More information about the macports-changes
mailing list