<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[118051] trunk/dports/devel/gtk-mac-bundler</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/118051">118051</a></dd>
<dt>Author</dt> <dd>macsforever2000@macports.org</dd>
<dt>Date</dt> <dd>2014-03-20 08:00:17 -0700 (Thu, 20 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>gtk-mac-bundler: Fixes for pango and pixbuf. Add openmaintainer. (#42766)</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsdevelgtkmacbundlerPortfile">trunk/dports/devel/gtk-mac-bundler/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsdevelgtkmacbundlerfilespatch073_20140224diff">trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.3_2014.02.24.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsdevelgtkmacbundlerPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/devel/gtk-mac-bundler/Portfile (118050 => 118051)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/gtk-mac-bundler/Portfile        2014-03-20 14:59:25 UTC (rev 118050)
+++ trunk/dports/devel/gtk-mac-bundler/Portfile        2014-03-20 15:00:17 UTC (rev 118051)
</span><span class="lines">@@ -2,42 +2,35 @@
</span><span class="cx"> # $Id$
</span><span class="cx"> 
</span><span class="cx"> PortSystem          1.0
</span><ins>+PortGroup           github 1.0
</ins><span class="cx"> 
</span><del>-name                gtk-mac-bundler
</del><ins>+github.setup        jralls gtk-mac-bundler bundler-0.7.3
+
</ins><span class="cx"> version             0.7.3
</span><del>-set branch          0.7
</del><ins>+revision            1
</ins><span class="cx"> categories          devel
</span><span class="cx"> license             GPL-2
</span><span class="cx"> platforms           darwin
</span><del>-maintainers         gmail.com:gellule.xg
</del><ins>+maintainers         gmail.com:gellule.xg \
+                    openmaintainer
</ins><span class="cx"> supported_archs     noarch
</span><span class="cx"> 
</span><span class="cx"> description         Mac OS X application bundle utility
</span><del>-
</del><span class="cx"> long_description    A utility that aids in the creation of Mac OS X \
</span><span class="cx">                     application bundles
</span><span class="cx"> 
</span><del>-homepage            http://sourceforge.net/projects/gtk-osx
-
</del><span class="cx"> #---------
</span><del>-# FETCHING
</del><ins>+# CHECKSUM
</ins><span class="cx"> #---------
</span><del>-master_sites        ftp://ftp.gnome.org/pub/GNOME/sources/${name}/${branch}
</del><ins>+checksums           rmd160  d7773e2394ea46c70510e7481a390db19fca937e \
+                    sha256  f35828c539879bab3d00d53f9c05bbad739756ba733afcfd61ee7e8e3b49d339
</ins><span class="cx"> 
</span><del>-distfiles           ${name}-${version}.tar.xz
-
-#----------------------------
-# EXTRACTION AND CHECKSUMMING
-#----------------------------
-use_xz yes
-
-checksums           rmd160  05837f17ce94fe6822c0896007419b9b5ae4bc2c \
-                    sha256  799d8d2bbd747ddddba55d32b7c9f08116e5f2b349358175b05544a4baa91365
-
</del><span class="cx"> #---------
</span><span class="cx"> # PATCHING
</span><span class="cx"> #---------
</span><del>-patchfiles          patch-bundler_py.diff \
</del><ins>+# Note: patch-0.73_2014.02.24.diff brings 0.7.3 to commit dated 2014.02.24, remove on next release version
+patchfiles          patch-0.7.3_2014.02.24.diff \
+                    patch-bundler_py.diff \
</ins><span class="cx">                     patch-launcher_sh.diff
</span><span class="cx"> 
</span><span class="cx"> #---------------------------
</span><span class="lines">@@ -57,8 +50,3 @@
</span><span class="cx">     copy ${worksrcpath}/bundler ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
</span><span class="cx"> }
</span><span class="cx"> destroot.args       bindir=${destroot}${prefix}/bin
</span><del>-
-#-----------
-# LIVECHECK
-#-----------
-livecheck.type      gnome-with-unstable
</del></span></pre></div>
<a id="trunkdportsdevelgtkmacbundlerfilespatch073_20140224diff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.3_2014.02.24.diff (0 => 118051)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.3_2014.02.24.diff                                (rev 0)
+++ trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.3_2014.02.24.diff        2014-03-20 15:00:17 UTC (rev 118051)
</span><span class="lines">@@ -0,0 +1,414 @@
</span><ins>+diff --git bundler/bundler.py bundler/bundler.py
+index abca042..8db5e13 100644
+--- bundler/bundler.py
++++ bundler/bundler.py
+@@ -73,7 +73,7 @@ class Bundler:
+         module_version = utils.evaluate_pkgconfig_variables(&quot;${pkg:pango:pango_module_version}&quot;)
+         modulespath = self.project.get_bundle_path(&quot;Contents/Resources/lib/pango/&quot; +
+                                                    module_version +
+-                                                   &quot;modules/&quot;)
++                                                   &quot;/modules/&quot;)

+         from distutils.version import StrictVersion as V
+         import tempfile
+diff --git bundler/launcher.sh bundler/launcher.sh
+index 7b15121..069fbda 100755
+--- bundler/launcher.sh
++++ bundler/launcher.sh
+@@ -33,7 +33,8 @@ export GTK_PATH=&quot;$bundle_res&quot;
+ export GTK2_RC_FILES=&quot;$bundle_etc/gtk-2.0/gtkrc&quot;
+ export GTK_IM_MODULE_FILE=&quot;$bundle_etc/gtk-2.0/gtk.immodules&quot;
+ export GDK_PIXBUF_MODULE_FILE=&quot;$bundle_etc/gtk-2.0/gdk-pixbuf.loaders&quot;
+-export PANGO_RC_FILE=&quot;$bundle_etc/pango/pangorc&quot;
++export PANGO_LIBDIR=&quot;$bundle_lib&quot;
++export PANGO_SYSCONFDIR=&quot;$bundle_etc&quot;

+ # Localization settings. It's better to do this inside your program
+ # using NSLocale if possible.
+diff --git bundler/run-install-name-tool-change.sh bundler/run-install-name-tool-change.sh
+index 3a3b6a8..a69796a 100755
+--- bundler/run-install-name-tool-change.sh
++++ bundler/run-install-name-tool-change.sh
+@@ -10,6 +10,8 @@ WRONG_PREFIX=$2
+ RIGHT_PREFIX=&quot;@executable_path/../$3&quot;
+ ACTION=$4

++chmod u+w $LIBRARY
++
+ if [ &quot;x$ACTION&quot; == &quot;xchange&quot; ]; then
+     libs=&quot;`otool -L $LIBRARY 2&gt;/dev/null | fgrep compatibility | cut -d\( -f1 | grep $WRONG_PREFIX | sort | uniq`&quot;
+     for lib in $libs; do
+diff --git examples/Info-gtk-demo.plist examples/Info-gtk-demo.plist
+index a47c60d..80b04f4 100644
+--- examples/Info-gtk-demo.plist
++++ examples/Info-gtk-demo.plist
+@@ -7,7 +7,7 @@
+     &lt;key&gt;CFBundleExecutable&lt;/key&gt;
+     &lt;string&gt;GtkDemo&lt;/string&gt;
+     &lt;key&gt;CFBundleGetInfoString&lt;/key&gt;
+-    &lt;string&gt;2.16.2, (C) 1997-2009 The GTK+ Team http://www.gtk.org&lt;/string&gt;
++    &lt;string&gt;2.24.18, (C) 1997-2013 The GTK+ Team http://www.gtk.org&lt;/string&gt;
+     &lt;key&gt;CFBundleIconFile&lt;/key&gt;
+     &lt;string&gt;Giggle.icns&lt;/string&gt;
+     &lt;key&gt;CFBundleIdentifier&lt;/key&gt;
+@@ -17,13 +17,13 @@
+     &lt;key&gt;CFBundlePackageType&lt;/key&gt;
+     &lt;string&gt;APPL&lt;/string&gt;
+     &lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
+-    &lt;string&gt;2.16.2&lt;/string&gt;
++    &lt;string&gt;2.24.18&lt;/string&gt;
+     &lt;key&gt;CFBundleSignature&lt;/key&gt;
+     &lt;string&gt;????&lt;/string&gt;
+     &lt;key&gt;CFBundleVersion&lt;/key&gt;
+-    &lt;string&gt;2.16.2&lt;/string&gt;
++    &lt;string&gt;2.24.18&lt;/string&gt;
+     &lt;key&gt;NSHumanReadableCopyright&lt;/key&gt;
+-    &lt;string&gt;Copyright 1997 - 2009 The GTK+ Tean, GNU General Public License.&lt;/string&gt;
++    &lt;string&gt;Copyright 1997 - 2013 The GTK+ Team, GNU General Public License.&lt;/string&gt;
+     &lt;key&gt;LSMinimumSystemVersion&lt;/key&gt;
+     &lt;string&gt;10.4&lt;/string&gt;
+ &lt;/dict&gt;
+diff --git examples/Info-pygtk-demo.plist examples/Info-pygtk-demo.plist
+index 37876b4..55b6807 100644
+--- examples/Info-pygtk-demo.plist
++++ examples/Info-pygtk-demo.plist
+@@ -7,7 +7,7 @@
+     &lt;key&gt;CFBundleExecutable&lt;/key&gt;
+     &lt;string&gt;PyGtkDemo&lt;/string&gt;
+     &lt;key&gt;CFBundleGetInfoString&lt;/key&gt;
+-    &lt;string&gt;2.16.0, (C) 1997-2009 The GTK+ Team http://www.gtk.org&lt;/string&gt;
++    &lt;string&gt;2.24.0, (C) 1997-2012 The GTK+ Team http://www.gtk.org&lt;/string&gt;
+     &lt;key&gt;CFBundleIconFile&lt;/key&gt;
+     &lt;string&gt;Giggle.icns&lt;/string&gt;
+     &lt;key&gt;CFBundleIdentifier&lt;/key&gt;
+@@ -17,13 +17,13 @@
+     &lt;key&gt;CFBundlePackageType&lt;/key&gt;
+     &lt;string&gt;APPL&lt;/string&gt;
+     &lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
+-    &lt;string&gt;2.16.0&lt;/string&gt;
++    &lt;string&gt;2.24.0&lt;/string&gt;
+     &lt;key&gt;CFBundleSignature&lt;/key&gt;
+     &lt;string&gt;????&lt;/string&gt;
+     &lt;key&gt;CFBundleVersion&lt;/key&gt;
+-    &lt;string&gt;2.16.0&lt;/string&gt;
++    &lt;string&gt;2.24.0&lt;/string&gt;
+     &lt;key&gt;NSHumanReadableCopyright&lt;/key&gt;
+-    &lt;string&gt;Copyright 1997 - 2009 The GTK+ Tean, GNU General Public License.&lt;/string&gt;
++    &lt;string&gt;Copyright 1997 - 2012 The GTK+ Team GNU General Public License.&lt;/string&gt;
+     &lt;key&gt;LSMinimumSystemVersion&lt;/key&gt;
+     &lt;string&gt;10.5&lt;/string&gt;
+ &lt;/dict&gt;
+diff --git examples/gtk-demo.bundle examples/gtk-demo.bundle
+index 32173b9..4b32d6b 100644
+--- examples/gtk-demo.bundle
++++ examples/gtk-demo.bundle
+@@ -69,16 +69,25 @@
+   &lt;binary&gt;
+     ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/engines/*.so
+   &lt;/binary&gt;
++
+   &lt;binary&gt;
+     ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so
+   &lt;/binary&gt;

+ &lt;!-- Starting with 2.24, gdk-pixbuf installs into its own directory. --&gt;
+   &lt;binary&gt;
+-    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/*.so
++    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/loaders/*.so
++  &lt;/binary&gt;
++
++   &lt;binary&gt;
++    ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
+   &lt;/binary&gt;

+-  &lt;!-- Translation filenames, one for each program or library that you
++  &lt;data&gt;
++    ${prefix}/etc/pango/
++  &lt;/data&gt;
++
++ &lt;!-- Translation filenames, one for each program or library that you
+        want to copy in to the bundle. The &quot;dest&quot; attribute is
+        optional, as usual. Bundler will find all translations of that
+        library/program under the indicated directory and copy them.--&gt;
+diff --git examples/gtk3-demo.bundle examples/gtk3-demo.bundle
+index b74f2ca..ba15cd3 100644
+--- examples/gtk3-demo.bundle
++++ examples/gtk3-demo.bundle
+@@ -33,7 +33,7 @@
+          not needed. If the source path is left out, the default
+          script will be used.
+     --&gt;
+-    &lt;launcher-script&gt;${project}/launcher.sh&lt;/launcher-script &gt;
++    &lt;launcher-script&gt;${project}/gtk3-launcher.sh&lt;/launcher-script &gt;

+     &lt;!-- Not implemented: Optional runtime, could be python or mono
+          for example.
+@@ -52,23 +52,14 @@

+   &lt;main-binary&gt;${prefix}/bin/gtk3-demo&lt;/main-binary&gt;

+-  &lt;!-- Copy in GTK+ modules. Note the ${gtkdir} macro, which expands
+-       to the correct library subdirectory for the specified gtk
+-       version. 
+-  --&gt;
++  &lt;!-- Copy in the input methods. Dunno if they actually work with
++       OSX. Note the ${gtkdir} macro, which expands to the correct
++       library subdirectory for the specified gtk version. --&gt;
+   &lt;binary&gt;
+-     ${prefix}/lib/${gtkdir}/modules/*.so
++    ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/immodules/*.so
+   &lt;/binary&gt;

+-  &lt;!-- Copy in GTK+ theme engines and print backends. Note the use of the
+-       &quot;${pkg:module:variable}&quot; macro, which evaluates to a pkg-config
+-       variable in the specified module. Note that any libraries that
+-       binaries link to are also copied in automatically.  Note also
+-       the included ${gtk} macro, which gets the correct package name
+-       to get. --&gt;
+-  &lt;binary&gt;
+-    ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/theming-engines/*.so
+-  &lt;/binary&gt;
++&lt;!-- And the print backends --&gt;
+   &lt;binary&gt;
+     ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so
+   &lt;/binary&gt;
+@@ -78,6 +69,14 @@
+     ${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so
+   &lt;/binary&gt;

++  &lt;binary&gt;
++    ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
++  &lt;/binary&gt;
++
++  &lt;data&gt;
++    ${prefix}/etc/pango/
++  &lt;/data&gt;
++
+   &lt;!-- Translation filenames, one for each program or library that you
+        want to copy in to the bundle. The &quot;dest&quot; attribute is
+        optional, as usual. Bundler will find all translations of that
+diff --git examples/gtk3-launcher.sh examples/gtk3-launcher.sh
+new file mode 100755
+index 0000000..4aed833
+--- /dev/null
++++ examples/gtk3-launcher.sh
+@@ -0,0 +1,170 @@
++#!/bin/sh
++
++if test &quot;x$GTK_DEBUG_LAUNCHER&quot; != x; then
++    set -x
++fi
++
++if test &quot;x$GTK_DEBUG_GDB&quot; != x; then
++    EXEC=&quot;gdb --args&quot;
++else
++    EXEC=exec
++fi
++
++name=`basename &quot;$0&quot;`
++tmp=&quot;$0&quot;
++tmp=`dirname &quot;$tmp&quot;`
++tmp=`dirname &quot;$tmp&quot;`
++bundle=`dirname &quot;$tmp&quot;`
++bundle_contents=&quot;$bundle&quot;/Contents
++bundle_res=&quot;$bundle_contents&quot;/Resources
++bundle_lib=&quot;$bundle_res&quot;/lib
++bundle_bin=&quot;$bundle_res&quot;/bin
++bundle_data=&quot;$bundle_res&quot;/share
++bundle_etc=&quot;$bundle_res&quot;/etc
++
++export DYLD_LIBRARY_PATH=&quot;$bundle_lib&quot;
++export XDG_CONFIG_DIRS=&quot;$bundle_etc&quot;/xdg
++export XDG_DATA_DIRS=&quot;$bundle_data&quot;
++export GTK_DATA_PREFIX=&quot;$bundle_res&quot;
++export GTK_EXE_PREFIX=&quot;$bundle_res&quot;
++export GTK_PATH=&quot;$bundle_res&quot;
++
++export GTK2_RC_FILES=&quot;$bundle_etc/gtk-3.0/gtkrc&quot;
++export GTK_IM_MODULE_FILE=&quot;$bundle_etc/gtk-3.0/gtk.immodules&quot;
++export GDK_PIXBUF_MODULE_FILE=&quot;$bundle_etc/gtk-3.0/gdk-pixbuf.loaders&quot;
++export PANGO_LIBDIR=&quot;$bundle_lib&quot;
++export PANGO_SYSCONFDIR=&quot;$bundle_etc&quot;
++
++
++APP=name
++I18NDIR=&quot;$bundle_data/locale&quot;
++# Set the locale-related variables appropriately:
++unset LANG LC_MESSAGES LC_MONETARY LC_COLLATE
++
++# Has a language ordering been set?
++# If so, set LC_MESSAGES and LANG accordingly; otherwise skip it.
++# First step uses sed to clean off the quotes and commas, to change - to _, and change the names for the chinese scripts from &quot;Hans&quot; to CN and &quot;Hant&quot; to TW.
++APPLELANGUAGES=`defaults read .GlobalPreferences AppleLanguages | sed -En   -e 's/\-/_/' -e 's/Hant/TW/' -e 's/Hans/CN/' -e 's/[[:space:]]*\&quot;?([[:alnum:]_]+)\&quot;?,?/\1/p' `
++if test &quot;$APPLELANGUAGES&quot;; then
++    # A language ordering exists.
++    # Test, item per item, to see whether there is an corresponding locale.
++    for L in $APPLELANGUAGES; do
++        #test for exact matches:
++       if test -f &quot;$I18NDIR/${L}/LC_MESSAGES/$APP.mo&quot;; then
++            export LANG=$L
++            break
++        fi
++        #This is a special case, because often the original strings are in US
++        #English and there is no translation file.
++        if test &quot;x$L&quot; == &quot;xen_US&quot;; then
++            export LANG=$L
++            break
++        fi
++        #OK, now test for just the first two letters:
++        if test -f &quot;$I18NDIR/${L:0:2}/LC_MESSAGES/$APP.mo&quot;; then
++            export LANG=${L:0:2}
++            break
++        fi
++        #Same thing, but checking for any english variant.
++        if test &quot;x${L:0:2}&quot; == &quot;xen&quot;; then
++            export LANG=$L
++            break
++        fi;
++    done  
++fi
++unset APPLELANGUAGES L
++
++# If we didn't get a language from the language list, try the Collation preference, in case it's the only setting that exists.
++APPLECOLLATION=`defaults read .GlobalPreferences AppleCollationOrder`
++if test -z ${LANG} -a -n $APPLECOLLATION; then
++    if test -f &quot;$I18NDIR/${APPLECOLLATION:0:2}/LC_MESSAGES/$APP.mo&quot;; then
++        export LANG=${APPLECOLLATION:0:2}
++    fi
++fi
++if test ! -z $APPLECOLLATION; then
++    export LC_COLLATE=$APPLECOLLATION
++fi
++unset APPLECOLLATION
++
++# Continue by attempting to find the Locale preference.
++APPLELOCALE=`defaults read .GlobalPreferences AppleLocale`
++
++if test -f &quot;$I18NDIR/${APPLELOCALE:0:5}/LC_MESSAGES/$APP.mo&quot;; then
++    if test -z $LANG; then 
++        export LANG=&quot;${APPLELOCALE:0:5}&quot;
++    fi
++
++elif test -z $LANG -a -f &quot;$I18NDIR/${APPLELOCALE:0:2}/LC_MESSAGES/$APP.mo&quot;; then
++    export LANG=&quot;${APPLELOCALE:0:2}&quot;
++fi
++
++#Next we need to set LC_MESSAGES. If at all possilbe, we want a full
++#5-character locale to avoid the &quot;Locale not supported by C library&quot;
++#warning from Gtk -- even though Gtk will translate with a
++#two-character code.
++if test -n $LANG; then 
++#If the language code matches the applelocale, then that's the message
++#locale; otherwise, if it's longer than two characters, then it's
++#probably a good message locale and we'll go with it.
++    if test $LANG == ${APPLELOCALE:0:5} -o $LANG != ${LANG:0:2}; then
++        export LC_MESSAGES=$LANG
++#Next try if the Applelocale is longer than 2 chars and the language
++#bit matches $LANG
++    elif test $LANG == ${APPLELOCALE:0:2} -a $APPLELOCALE &gt; ${APPLELOCALE:0:2}; then
++        export LC_MESSAGES=${APPLELOCALE:0:5}
++#Fail. Get a list of the locales in $PREFIX/share/locale that match
++#our two letter language code and pick the first one, special casing
++#english to set en_US
++    elif test $LANG == &quot;en&quot;; then
++        export LC_MESSAGES=&quot;en_US&quot;
++    else
++        LOC=`find $PREFIX/share/locale -name $LANG???`
++        for L in $LOC; do 
++            export LC_MESSAGES=$L
++        done
++    fi
++else
++#All efforts have failed, so default to US english
++    export LANG=&quot;en_US&quot;
++    export LC_MESSAGES=&quot;en_US&quot;
++fi
++CURRENCY=`echo $APPLELOCALE |  sed -En 's/.*currency=([[:alpha:]]+).*/\1/p'`
++if test &quot;x$CURRENCY&quot; != &quot;x&quot;; then 
++#The user has set a special currency. Gtk doesn't install LC_MONETARY files, but Apple does in /usr/share/locale, so we're going to look there for a locale to set LC_CURRENCY to.
++    if test -f /usr/local/share/$LC_MESSAGES/LC_MONETARY; then
++        if test -a `cat /usr/local/share/$LC_MESSAGES/LC_MONETARY` == $CURRENCY; then
++            export LC_MONETARY=$LC_MESSAGES
++        fi
++    fi
++    if test -z &quot;$LC_MONETARY&quot;; then 
++        FILES=`find /usr/share/locale -name LC_MONETARY -exec grep -H $CURRENCY {} \;`
++        if test -n &quot;$FILES&quot;; then 
++            export LC_MONETARY=`echo $FILES | sed -En 's%/usr/share/locale/([[:alpha:]_]+)/LC_MONETARY.*%\1%p'`
++        fi
++    fi
++fi
++#No currency value means that the AppleLocale governs:
++if test -z &quot;$LC_MONETARY&quot;; then
++    LC_MONETARY=${APPLELOCALE:0:5}
++fi
++#For Gtk, which only looks at LC_ALL:
++export LC_ALL=$LC_MESSAGES
++
++unset APPLELOCALE FILES LOC
++
++if test -f &quot;$bundle_lib/charset.alias&quot;; then
++    export CHARSETALIASDIR=&quot;$bundle_lib&quot;
++fi
++
++# Extra arguments can be added in environment.sh.
++EXTRA_ARGS=
++if test -f &quot;$bundle_res/environment.sh&quot;; then
++  source &quot;$bundle_res/environment.sh&quot;
++fi
++
++# Strip out the argument added by the OS.
++if /bin/expr &quot;x$1&quot; : '^x-psn_' &gt; /dev/null; then
++    shift 1
++fi
++
++$EXEC &quot;$bundle_contents/MacOS/$name-bin&quot; &quot;$@&quot; $EXTRA_ARGS
+diff --git examples/launcher.sh examples/launcher.sh
+index d92f9e5..a1dfd1b 100755
+--- examples/launcher.sh
++++ examples/launcher.sh
+@@ -32,7 +32,8 @@ export GTK_PATH=&quot;$bundle_res&quot;
+ export GTK2_RC_FILES=&quot;$bundle_etc/gtk-2.0/gtkrc&quot;
+ export GTK_IM_MODULE_FILE=&quot;$bundle_etc/gtk-2.0/gtk.immodules&quot;
+ export GDK_PIXBUF_MODULE_FILE=&quot;$bundle_etc/gtk-2.0/gdk-pixbuf.loaders&quot;
+-export PANGO_RC_FILE=&quot;$bundle_etc/pango/pangorc&quot;
++export PANGO_LIBDIR=&quot;$bundle_lib&quot;
++export PANGO_SYSCONFDIR=&quot;$bundle_etc&quot;

+ APP=name
+ I18NDIR=&quot;$bundle_data/locale&quot;
+diff --git examples/pygtk-demo.bundle examples/pygtk-demo.bundle
+index 699ff43..2025312 100644
+--- examples/pygtk-demo.bundle
++++ examples/pygtk-demo.bundle
+@@ -96,10 +96,14 @@

+ &lt;!-- Starting with 2.24, gdk-pixbuf installs into its own directory. --&gt;
+   &lt;binary&gt;
+-    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/*.so
++    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so
+   &lt;/binary&gt;

+-  &lt;!-- Translation filenames, one for each program or library that you
++  &lt;binary&gt;
++    ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/*.so
++  &lt;/binary&gt;
++
++ &lt;!-- Translation filenames, one for each program or library that you
+        want to copy in to the bundle. The &quot;dest&quot; attribute is
+        optional, as usual. Bundler will find all translations of that
+        library/program under the indicated directory and copy them.--&gt;
+diff --git examples/pygtk-demo.sh examples/pygtk-demo.sh
+index 9c8ec33..ecbf1c0 100755
+--- examples/pygtk-demo.sh
++++ examples/pygtk-demo.sh
+@@ -22,7 +22,8 @@ export GTK_PATH=&quot;$bundle_res&quot;
+ export GTK2_RC_FILES=&quot;$bundle_etc/gtk-2.0/gtkrc&quot;
+ export GTK_IM_MODULE_FILE=&quot;$bundle_etc/gtk-2.0/gtk.immodules&quot;
+ export GDK_PIXBUF_MODULE_FILE=&quot;$bundle_etc/gtk-2.0/gdk-pixbuf.loaders&quot;
+-export PANGO_RC_FILE=&quot;$bundle_etc/pango/pangorc&quot;
++export PANGO_LIBDIR=&quot;$bundle_lib&quot;
++export PANGO_SYSCONFDIR=&quot;$bundle_etc&quot;

+ #Set $PYTHON to point inside the bundle
+ export PYTHON=&quot;$bundle_contents/MacOS/python&quot;
</ins></span></pre>
</div>
</div>

</body>
</html>