<!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>[148965] 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/148965">148965</a></dd>
<dt>Author</dt> <dd>snc@macports.org</dd>
<dt>Date</dt> <dd>2016-05-23 13:44:13 -0700 (Mon, 23 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>gtk-mac-bundler: update to 0.7.4, maintainer timeout, #51449</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsdevelgtkmacbundlerPortfile">trunk/dports/devel/gtk-mac-bundler/Portfile</a></li>
<li><a href="#trunkdportsdevelgtkmacbundlerfilespatchbundler_pydiff">trunk/dports/devel/gtk-mac-bundler/files/patch-bundler_py.diff</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsdevelgtkmacbundlerfilespatch074to24Feb2016diff">trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.4-to-24Feb2016.diff</a></li>
<li><a href="#trunkdportsdevelgtkmacbundlerfilespatchgtk3demobundlediff">trunk/dports/devel/gtk-mac-bundler/files/patch-gtk3-demo-bundle.diff</a></li>
<li><a href="#trunkdportsdevelgtkmacbundlerfilespatchgtk3launcherdiff">trunk/dports/devel/gtk-mac-bundler/files/patch-gtk3-launcher.diff</a></li>
</ul>

<h3>Removed 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>
<li><a href="#trunkdportsdevelgtkmacbundlerfilespatchlauncher_shdiff">trunk/dports/devel/gtk-mac-bundler/files/patch-launcher_sh.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 (148964 => 148965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/gtk-mac-bundler/Portfile        2016-05-23 20:34:36 UTC (rev 148964)
+++ trunk/dports/devel/gtk-mac-bundler/Portfile        2016-05-23 20:44:13 UTC (rev 148965)
</span><span class="lines">@@ -4,8 +4,7 @@
</span><span class="cx"> PortSystem          1.0
</span><span class="cx"> PortGroup           github 1.0
</span><span class="cx"> 
</span><del>-github.setup        jralls gtk-mac-bundler 0.7.3 bundler-
-revision            2
</del><ins>+github.setup        jralls gtk-mac-bundler 0.7.4 bundler-
</ins><span class="cx"> categories          devel
</span><span class="cx"> license             GPL-2
</span><span class="cx"> platforms           darwin
</span><span class="lines">@@ -15,21 +14,26 @@
</span><span class="cx"> 
</span><span class="cx"> description         Mac OS X application bundle utility
</span><span class="cx"> long_description    A utility that aids in the creation of Mac OS X \
</span><del>-                    application bundles
</del><ins>+                    application bundles. The gtk3-demo example is \
+                    patched in macports to produce a gtk3-demo \
+                    without jhbuild environment. To test the demo run \
+                    gtk-mac-bundler &lt;prefix&gt;/share/gtk-mac-bundler/examples/gtk3-demo.bundle \
+                    This will create the GtkDemo bundle in ~/Desktop
</ins><span class="cx"> 
</span><span class="cx"> #---------
</span><span class="cx"> # CHECKSUM
</span><span class="cx"> #---------
</span><del>-checksums           rmd160  d7773e2394ea46c70510e7481a390db19fca937e \
-                    sha256  f35828c539879bab3d00d53f9c05bbad739756ba733afcfd61ee7e8e3b49d339
</del><ins>+checksums           rmd160  aeff015024a918ffa4e190d14a65e711ab331014 \
+                    sha256  6b67916e48e4e75e677732333060581996ed8759fa9e506a4684db2752d63eb7
</ins><span class="cx"> 
</span><span class="cx"> #---------
</span><span class="cx"> # PATCHING
</span><span class="cx"> #---------
</span><del>-# 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 \
</del><ins>+#Note: patch-0.7.4-to-24Feb2016.diff brings 0.7.4 to the commit dated 2016/02/24 - Remove after update
+patchfiles          patch-0.7.4-to-24Feb2016.diff \
</ins><span class="cx">                     patch-bundler_py.diff \
</span><del>-                    patch-launcher_sh.diff
</del><ins>+                    patch-gtk3-demo-bundle.diff \
+                    patch-gtk3-launcher.diff
</ins><span class="cx"> 
</span><span class="cx"> #---------------------------
</span><span class="cx"> # CONFIGURATION AND BUILDING
</span><span class="lines">@@ -44,7 +48,10 @@
</span><span class="cx"> pre-destroot {
</span><span class="cx">     reinplace &quot;s|/usr/bin/env python|${prefix}/bin/python2.7|g&quot; ${worksrcpath}/gtk-mac-bundler.in
</span><span class="cx">     reinplace &quot;s|@PATH@|${frameworks_dir}/Python.framework/Version/2.7/lib/site-packages|g&quot; ${worksrcpath}/gtk-mac-bundler.in
</span><ins>+    reinplace &quot;s|\${env:JHBUILD_PREFIX}|${prefix}|g&quot; ${worksrcpath}/examples/gtk3-demo.bundle
</ins><span class="cx">     xinstall -m 755 -d ${destroot}${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7
</span><span class="cx">     copy ${worksrcpath}/bundler ${destroot}${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/
</span><ins>+    file mkdir ${destroot}${prefix}/share/${name}
+    copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}
</ins><span class="cx"> }
</span><span class="cx"> destroot.args       bindir=${destroot}${prefix}/bin
</span></span></pre></div>
<a id="trunkdportsdevelgtkmacbundlerfilespatch073_20140224diff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.3_2014.02.24.diff (148964 => 148965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.3_2014.02.24.diff        2016-05-23 20:34:36 UTC (rev 148964)
+++ trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.3_2014.02.24.diff        2016-05-23 20:44:13 UTC (rev 148965)
</span><span class="lines">@@ -1,414 +0,0 @@
</span><del>-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;
</del></span></pre></div>
<a id="trunkdportsdevelgtkmacbundlerfilespatch074to24Feb2016diff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.4-to-24Feb2016.diff (0 => 148965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.4-to-24Feb2016.diff                                (rev 0)
+++ trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.4-to-24Feb2016.diff        2016-05-23 20:44:13 UTC (rev 148965)
</span><span class="lines">@@ -0,0 +1,707 @@
</span><ins>+diff --git Changelog Changelog
+index 07dfe16..47bbfef 100644
+--- Changelog
++++ Changelog
+@@ -1,5 +1,21 @@
+ Changes in version 0.7.4:

++ - Release gtk-mac-bundler 0.7.4 (John Ralls)
++ - Make sure to check for .symbolic icon extension (Jesse van den Kieboom)
++ - Fix pixbuf loader cache path (Jesse van den Kieboom)
++ - Make sure that libraries are writeable before using otool. (Julien Woillez)
++ - Update doap to reflect correct bug tracker. (John Ralls)
++ - Bug 698196: Fix typo (John Ralls)
++ - Bug #698916: Update versions, fix pixbuf (John Ralls)
++ - Update all launchers to reflect new pango environment variables (John Ralls)
++ - launcher: Update for pango changes (Dave Vasilevsky)
++ - Correct gdk-pixbuf path in the pygtk example (John Ralls)
++ - Bring example bundle files and launchers up to date (John Ralls)
++ - The *correct* fix for pango modules. (John Ralls)
++ - Fix another typo in pango module path (John Ralls)
++
++Changes in version 0.7.4:
++
+  - Make sure to check for .symbolic icon extension (Jesse van den Kieboom)
+  - Fix pixbuf loader cache path (Jesse van den Kieboom)
+  - Make sure that libraries are writeable before using otool. (Julien Woillez)
+diff --git bundler/bundler.py bundler/bundler.py
+index 8061ac1..65b8cc0 100644
+--- bundler/bundler.py
++++ bundler/bundler.py
+@@ -1,12 +1,12 @@
+ import sys
+ import os, errno, glob
+-import dircache, shutil
++import shutil
+ import re
+ from plistlib import Plist
+ from distutils import dir_util, file_util

+-from project import *
+-import utils
++from .project import *
++from . import utils

+ class Bundler:
+     def __init__(self, project):
+@@ -32,13 +32,13 @@ class Bundler:
+     def recursive_rm(self, dirname):
+         # Extra safety ;)
+         if dirname in [ &quot;/&quot;, os.getenv(&quot;HOME&quot;), os.path.join(os.getenv(&quot;HOME&quot;), &quot;Desktop&quot;), self.meta.dest ]:
+-            print &quot;Eek, trying to remove a bit much, eh? (%s)&quot; % (dirname)
++            print(&quot;Eek, trying to remove a bit much, eh? (%s)&quot; % (dirname))
+             sys.exit(1)

+         if not os.path.exists(dirname):
+             return
+         
+-        files = dircache.listdir(dirname)
++        files = os.listdir(dirname)
+         for file in files:
+             path = os.path.join (dirname, file)
+             if os.path.isdir(path):
+@@ -68,6 +68,12 @@ class Bundler:
+         self.copy_path(path)

+     def create_pango_setup(self):
++        if utils.has_pkgconfig_module(&quot;pango&quot;) and \
++                not utils.has_pkgconfig_variable(&quot;pango&quot;, &quot;pango_module_version&quot;):
++            # Newer pango (&gt;= 1.38) no longer has modules, skip this
++            # step in that case.
++            return
++
+         # Create a temporary pangorc file just for creating the
+         # modules file with the right modules.
+         module_version = utils.evaluate_pkgconfig_variables(&quot;${pkg:pango:pango_module_version}&quot;)
+@@ -227,7 +233,7 @@ class Bundler:
+             # Clean out any libtool (*.la) files and static libraries
+             if os.path.isdir(dest):
+                 for root, dirs, files in os.walk(dest):
+-                    for name in filter(lambda l: l.endswith(&quot;.la&quot;) or l.endswith(&quot;.a&quot;), files):
++                    for name in [l for l in files if l.endswith(&quot;.la&quot;) or l.endswith(&quot;.a&quot;)]:
+                         os.remove(os.path.join(root, name))

+     # Copies from Path.source to Path.dest, evaluating any variables
+@@ -247,7 +253,7 @@ class Bundler:
+                 relative_dest = self.project.evaluate_path(Path.source[m.end():])
+                 dest = self.project.get_bundle_path(&quot;Contents/Resources&quot;, relative_dest)
+             else:
+-                print &quot;Invalid bundle file, missing or invalid 'dest' property: &quot; + Path.dest
++                print(&quot;Invalid bundle file, missing or invalid 'dest' property: &quot; + Path.dest)
+                 sys.exit(1)

+         (dest_parent, dest_tail) = os.path.split(dest)
+@@ -257,7 +263,7 @@ class Bundler:
+         p = re.compile(&quot;[\*\?]&quot;)
+         (source_parent, source_tail) = os.path.split(source)
+         if p.search(source_parent):
+-            print &quot;Can't have wildcards except in the last path component: &quot; + source
++            print(&quot;Can't have wildcards except in the last path component: &quot; + source)
+             sys.exit(1)

+         if p.search(source_tail):
+@@ -267,7 +273,7 @@ class Bundler:
+         else:
+             source_check = source
+         if not os.path.exists(source_check):
+-            print &quot;Cannot find source to copy: &quot; + source
++            print(&quot;Cannot find source to copy: &quot; + source)
+             sys.exit(1)

+         # If the destination has a wildcard as last component (copied
+@@ -285,13 +291,13 @@ class Bundler:
+                     try:
+ #                        print &quot;Copying %s to %s&quot; % (globbed_source, destdir)
+                         shutil.copy(globbed_source, destdir)
+-                    except EnvironmentError, e:
++                    except EnvironmentError as e:
+                         if e.errno == errno.ENOENT:
+-                            print &quot;Warning, source file missing: &quot; + globbed_source
++                            print(&quot;Warning, source file missing: &quot; + globbed_source)
+                         elif e.errno == errno.EEXIST:
+-                            print &quot;Warning, path already exits: &quot; + dest
++                            print(&quot;Warning, path already exits: &quot; + dest)
+                         else:
+-                            print &quot;Error %s when copying file: %s&quot; % ( str(e), globbed_source )
++                            print(&quot;Error %s when copying file: %s&quot; % ( str(e), globbed_source ))
+                             sys.exit(1)

+         else:
+@@ -315,13 +321,13 @@ class Bundler:
+                                             link=None,
+                                             verbose=1,
+                                             dry_run=0)
+-                except EnvironmentError, e:
++                except EnvironmentError as e:
+                     if e.errno == errno.ENOENT:
+-                        print &quot;Warning, source file missing: &quot; + globbed_source
++                        print(&quot;Warning, source file missing: &quot; + globbed_source)
+                     elif e.errno == errno.EEXIST:
+-                        print &quot;Warning, path already exits: &quot; + dest
++                        print(&quot;Warning, path already exits: &quot; + dest)
+                     else:
+-                        print &quot;Error %s when copying file: %s&quot; %( str(e), globbed_source )
++                        print(&quot;Error %s when copying file: %s&quot; %( str(e), globbed_source ))
+                         sys.exit(1)
+         return dest

+@@ -338,11 +344,11 @@ class Bundler:
+         for path in self.binary_paths:
+             if os.path.isdir(path):
+                 for root, dirs, files in os.walk(path):
+-                    paths.extend(map(lambda l: os.path.join(root, l), files))
++                    paths.extend([os.path.join(root, l) for l in files])
+             else:
+                 paths.append(path)

+-        paths = filter(filter_path, paths)
++        paths = list(filter(filter_path, paths))
+         return list(set(paths))

+     def resolve_library_dependencies(self):
+@@ -366,11 +372,11 @@ class Bundler:

+             def relative_path_map(line):
+                 if not os.path.isabs(line):
+-                    for prefix in prefixes.values():
++                    for prefix in list(prefixes.values()):
+                         path = os.path.join(prefix, &quot;lib&quot;, line)
+                         if os.path.exists(path):
+                             return path
+-                    print &quot;Cannot find a matching prefix for %s&quot; % (line)
++                    print(&quot;Cannot find a matching prefix for %s&quot; % (line))
+                 return line

+             def prefix_filter(line):
+@@ -378,24 +384,24 @@ class Bundler:
+                     return False

+                 if line.startswith(&quot;/usr/X11&quot;):
+-                    print &quot;Warning, found X11 library dependency, you most likely don't want that:&quot;, line.strip().split()[0]
++                    print(&quot;Warning, found X11 library dependency, you most likely don't want that:&quot;, line.strip().split()[0])

+                 if os.path.isabs(line):
+-                    for prefix in prefixes.values():
++                    for prefix in list(prefixes.values()):
+                         if prefix in line:
+                             return True
+                     
+                     if not line.startswith(&quot;/usr/lib&quot;) and not line.startswith(&quot;/System/Library&quot;):
+-                        print &quot;Warning, library not available in any prefix:&quot;, line.strip().split()[0]
++                        print(&quot;Warning, library not available in any prefix:&quot;, line.strip().split()[0])

+                     return False

+                 return True

+-            lines = filter(prefix_filter, [line.strip() for line in f])
++            lines = list(filter(prefix_filter, [line.strip() for line in f]))
+             p = re.compile(&quot;(.*\.dylib\.?.*)\s\(compatibility.*$&quot;)
+             lines = utils.filterlines(p, lines)
+-            lines = map(relative_path_map, lines)
++            lines = list(map(relative_path_map, lines))
+ #When you need to track down errors, uncomment this blocK
+ #            for path in paths:
+ #                cmd = &quot;otool -L %s&quot; % path
+@@ -407,7 +413,7 @@ class Bundler:
+             for library in set(lines):
+                 # Replace the real path with the right prefix so we can
+                 # create a Path object.
+-                for (key, value) in prefixes.items():
++                for (key, value) in list(prefixes.items()):
+                     if library.startswith(value):
+                         path = Path(&quot;${prefix:&quot; + key + &quot;}&quot; + library[len(value):])
+                         new_libraries.append(path)
+@@ -415,14 +421,14 @@ class Bundler:
+             n_paths = len(paths)
+             n_iterations += 1
+             if n_iterations &gt; 10:
+-                print &quot;Too many tries to resolve library dependencies&quot;
++                print(&quot;Too many tries to resolve library dependencies&quot;)
+                 sys.exit(1)
+             
+             self.copy_binaries(new_libraries)
+             paths = self.list_copied_binaries()

+     def run_install_name_tool(self):
+-        print &quot;Running install name tool&quot;
++        print(&quot;Running install name tool&quot;)

+         paths = self.list_copied_binaries()
+         prefixes = self.meta.prefixes
+@@ -430,12 +436,12 @@ class Bundler:
+         # First change all references in libraries.
+         for prefix in prefixes:
+             prefix_path = self.project.get_prefix(prefix)
+-            print &quot;Going through prefix: &quot; + prefix_path
++            print(&quot;Going through prefix: &quot; + prefix_path)
+             for path in paths:
+                 cmd = os.path.join(os.path.dirname(__file__), &quot;run-install-name-tool-change.sh&quot;) + &quot; &quot; + path + &quot; &quot; + prefix_path + &quot; Resources&quot; + &quot; change&quot;
+                 f = os.popen(cmd)
+                 for line in f:
+-                    print line
++                    print(line)

+         # Then change the id of all libraries. Skipping this part for now
+         #for path in paths:
+@@ -448,18 +454,18 @@ class Bundler:
+         for framework in self.frameworks:
+             fw_name, ext = os.path.splitext(os.path.basename(framework))
+             fwl = os.path.join(framework, fw_name)
+-            print &quot;Importing Framework: &quot; + fwl
++            print(&quot;Importing Framework: &quot; + fwl)
+ # Fix the framework IDs
+             cmd = os.path.join(os.path.dirname(__file__), &quot;run-install-name-tool-change.sh&quot;) + &quot; &quot; + fwl + &quot; &quot; + fw_name + &quot; Frameworks&quot; + &quot; id&quot;
+             f = os.popen(cmd)
+             for line in f:
+-                print line
++                print(line)
+ # Fix the dependencies in other libraries
+             for path in paths:
+                 cmd = os.path.join(os.path.dirname(__file__), &quot;run-install-name-tool-change.sh&quot;) + &quot; &quot; + path + &quot; &quot; + fw_name + &quot; Frameworks/&quot; + fw_name + &quot; change&quot;
+                 f = os.popen(cmd)
+                 for line in f:
+-                    print line
++                    print(line)
+ #fix the dependencies in frameworks
+             for ufw in self.frameworks:
+                 ufw_name, ext = os.path.splitext(os.path.basename(ufw))
+@@ -469,20 +475,20 @@ class Bundler:
+                 cmd = os.path.join(os.path.dirname(__file__), &quot;run-install-name-tool-change.sh&quot;) + &quot; &quot; + ufwl + &quot; &quot; + fw_name + &quot; Frameworks/&quot; + fw_name + &quot; change&quot;
+                 f = os.popen(cmd)
+                 for line in f:
+-                    print line
++                    print(line)


+     def strip_debugging(self):
+         paths = self.list_copied_binaries()
+         for path in paths:
+             if path.endswith(&quot;.dylib&quot;) or path.endswith(&quot;.so&quot;):
+-                os.chmod(path, 0644)
++                os.chmod(path, 0o644)
+                 os.system(&quot;strip -x &quot; + path + &quot; 2&gt;/dev/null&quot;)
+-                os.chmod(path, 0444)
++                os.chmod(path, 0o444)
+             else:
+-                os.chmod(path, 0755)
++                os.chmod(path, 0o755)
+                 os.system(&quot;strip -ur &quot; + path + &quot; 2&gt;/dev/null&quot;)
+-                os.chmod(path, 0555)
++                os.chmod(path, 0o555)

+ #
+ # If you want to sign your application, set $APPLICATION_CERT with the
+@@ -491,7 +497,7 @@ class Bundler:
+ # bundle's id string.
+ #
+     def sign_binaries(self):
+-        if not os.environ.has_key(&quot;APPLICATION_CERT&quot;):
++        if &quot;APPLICATION_CERT&quot; not in os.environ:
+             return
+         cert = os.getenv(&quot;APPLICATION_CERT&quot;)
+         paths = self.list_copied_binaries()
+@@ -501,7 +507,7 @@ class Bundler:
+             result = os.spawnvp(os.P_WAIT, 'codesign', cmdargs)

+             if result:
+-                raise OSError, '&quot;' + &quot; &quot;.join(cmdargs) + '&quot; failed %d' % result
++                raise OSError('&quot;' + &quot; &quot;.join(cmdargs) + '&quot; failed %d' % result)

+     def copy_icon_themes(self):
+         all_icons = set()
+@@ -604,7 +610,7 @@ class Bundler:
+         final_path = self.project.evaluate_path(final_path)

+         if not self.meta.overwrite and os.path.exists(final_path):
+-            print &quot;Bundle already exists: &quot; + final_path
++            print(&quot;Bundle already exists: &quot; + final_path)
+             sys.exit(1)

+         self.create_skeleton()
+@@ -618,7 +624,7 @@ class Bundler:
+         path = self.project.get_main_binary()
+         source = self.project.evaluate_path(path.source)
+         if not os.path.exists(source):
+-            print &quot;Cannot find main binary: &quot; + source
++            print(&quot;Cannot find main binary: &quot; + source)
+             sys.exit(1)

+         dest = self.copy_path(path)
+@@ -658,24 +664,24 @@ class Bundler:
+         launcher_script = self.project.get_launcher_script()
+         if launcher_script:
+             path = self.copy_path(launcher_script)
+-            if os.environ.has_key(&quot;APPLICATION_CERT&quot;):
++            if &quot;APPLICATION_CERT&quot; in os.environ:
+                 cert = os.environ[&quot;APPLICATION_CERT&quot;]
+                 ident = self.project.get_bundle_id()
+                 cmdargs = ['codesign', '-s', cert, '-i', ident, &quot;-f&quot;, path]
+                 result = os.spawnvp(os.P_WAIT, 'codesign', cmdargs)
+                 if result:
+-                    raise OSError, '&quot;'+ &quot; &quot;.join(cmdargs) + '&quot; failed %d' % result
++                    raise OSError('&quot;'+ &quot; &quot;.join(cmdargs) + '&quot; failed %d' % result)
+         if self.meta.overwrite:
+             self.recursive_rm(final_path)
+         shutil.move(self.project.get_bundle_path(), final_path)

+ if __name__ == '__main__':
+     if len(sys.argv) != 2:
+-        print &quot;Usage: %s &lt;bundle descriptopn file&gt;&quot; % (sys.argv[0])
++        print(&quot;Usage: %s &lt;bundle descriptopn file&gt;&quot; % (sys.argv[0]))
+         sys.exit(2)

+     if not os.path.exists(sys.argv[1]):
+-        print &quot;File %s does not exist&quot; % (sys.argv[1])
++        print(&quot;File %s does not exist&quot; % (sys.argv[1]))
+         sys.exit(2)

+     project = Project(sys.argv[1])
+diff --git bundler/main.py bundler/main.py
+index bcd7dda..b9b2fc5 100644
+--- bundler/main.py
++++ bundler/main.py
+@@ -1,18 +1,20 @@
+ import sys, os

+-from project import *
+-from bundler import *
++from .project import *
++from .bundler import *

+ def main(argv):
+     if len(argv) != 1:
+-        print &quot;Usage: %s &lt;bundle descriptopn file&gt;&quot; % (sys.argv[0])
++        print(&quot;Usage: %s &lt;bundle descriptopn file&gt;&quot; % (sys.argv[0]))
+         sys.exit(2)

+     if not os.path.exists(argv[0]):
+-        print &quot;File %s does not exist&quot; % (argv[0])
++        print(&quot;File %s does not exist&quot; % (argv[0]))
+         sys.exit(2)

+     project = Project(argv[0])
+     bundler = Bundler(project)
+-
+-    bundler.run()
++    try:
++        bundler.run()
++    except Exception as err:
++        print(&quot;Bundler encountered an error %s&quot; % str(err))
+diff --git bundler/project.py bundler/project.py
+index c98b65a..60f0541 100644
+--- bundler/project.py
++++ bundler/project.py
+@@ -5,7 +5,7 @@ import os
+ import xml.dom.minidom
+ from xml.dom.minidom import Node
+ from plistlib import Plist
+-import utils
++from . import utils

+ # Base class for anything that can be copied into a bundle with a
+ # source and dest.
+@@ -184,7 +184,7 @@ class Data(Path):
+     pass

+ class IconTheme:
+-    ICONS_NONE, ICONS_ALL, ICONS_AUTO = range(3)
++    ICONS_NONE, ICONS_ALL, ICONS_AUTO = list(range(3))
+     
+     def __init__(self, name, icons=ICONS_AUTO):
+         self.name = name
+@@ -221,7 +221,7 @@ class Project:
+                 # Get the first app-bundle tag and ignore any others.
+                 self.root = utils.node_get_element_by_tag_name(doc, &quot;app-bundle&quot;)
+             except:
+-                print &quot;Could not load project %s:&quot; % (project_path)
++                print(&quot;Could not load project %s:&quot; % (project_path))
+                 raise

+         # The directory the project file is in (as opposed to
+@@ -232,14 +232,14 @@ class Project:
+         plist_path = self.get_plist_path()
+         try:
+             plist = Plist.fromFile(plist_path)
+-        except EnvironmentError, e:
++        except EnvironmentError as e:
+             if e.errno == errno.ENOENT:
+-                print &quot;Info.plist file not found: &quot; + plist_path
++                print(&quot;Info.plist file not found: &quot; + plist_path)
+                 sys.exit(1)
+             else:
+                 raise
+         self.name = plist.CFBundleExecutable
+-        if plist.has_key(&quot;CFBundleName&quot;):
++        if &quot;CFBundleName&quot; in plist:
+             self.bundle_name = plist.CFBundleName
+         else:
+             self.bundle_name = plist.CFBundleExecutable
+@@ -340,7 +340,7 @@ class Project:
+             themes.append(IconTheme.from_node(node))

+         # The hicolor theme is mandatory.
+-        if not filter(lambda l: l.name == &quot;hicolor&quot;, themes):
++        if not [l for l in themes if l.name == &quot;hicolor&quot;]:
+             themes.append(IconTheme(&quot;hicolor&quot;))

+         return themes
+@@ -412,33 +412,33 @@ class Project:
+ if __name__ == '__main__':
+     project = Project(os.path.join(os.getcwd(), 'giggle.bundle'))

+-    print &quot;General:&quot;
+-    print &quot;  Project path: %s&quot; % (project.get_project_path())
+-    print &quot;  Plist path: %s&quot; % (project.get_plist_path())
+-    print &quot;  App name: %s&quot; % (project.name)
+-    print &quot;  Destination: %s&quot; % (project.get_meta().dest)
+-    print &quot;  Overwrite: %s&quot; % (str(project.get_meta().overwrite))
++    print(&quot;General:&quot;)
++    print(&quot;  Project path: %s&quot; % (project.get_project_path()))
++    print(&quot;  Plist path: %s&quot; % (project.get_plist_path()))
++    print(&quot;  App name: %s&quot; % (project.name))
++    print(&quot;  Destination: %s&quot; % (project.get_meta().dest))
++    print(&quot;  Overwrite: %s&quot; % (str(project.get_meta().overwrite)))

+     environment = project.get_environment()
+-    print &quot;Environment:&quot;
++    print(&quot;Environment:&quot;)
+     for variable in environment.runtime_variables:
+-        print &quot;  %s=%s&quot; % (variable.name, variable.value)
++        print(&quot;  %s=%s&quot; % (variable.name, variable.value))
+     for script in environment.scripts:
+-        print &quot;  %s =&gt; %s&quot; % (script.source, script.dest)
++        print(&quot;  %s =&gt; %s&quot; % (script.source, script.dest))

+-    print &quot;Frameworks:&quot;
++    print(&quot;Frameworks:&quot;)
+     for framework in project.get_frameworks():
+-        print &quot; &quot;, framework
++        print(&quot; &quot;, framework)

+-    print &quot;Main binary:&quot;
++    print(&quot;Main binary:&quot;)
+     binary = project.get_main_binary()
+-    print &quot;  %s =&gt; %s&quot; % (binary.source, binary.dest)
++    print(&quot;  %s =&gt; %s&quot; % (binary.source, binary.dest))

+-    print &quot;Launcher:&quot;
++    print(&quot;Launcher:&quot;)
+     launcher_script = project.get_launcher_script()
+-    print &quot;  %s =&gt; %s&quot; % (launcher_script.source, launcher_script.dest)
++    print(&quot;  %s =&gt; %s&quot; % (launcher_script.source, launcher_script.dest))

+-    print &quot;Binaries:&quot;
++    print(&quot;Binaries:&quot;)
+     for binary in project.get_binaries():
+-        print &quot;  %s =&gt; %s&quot; % (binary.source, binary.dest)
++        print(&quot;  %s =&gt; %s&quot; % (binary.source, binary.dest))

+diff --git bundler/project_test.py bundler/project_test.py
+index 4c3d583..0ff9179 100644
+--- bundler/project_test.py
++++ bundler/project_test.py
+@@ -5,8 +5,8 @@ import unittest
+ import xml.dom.minidom
+ from xml.dom.minidom import Node
+ from plistlib import Plist
+-from project import Project
+-import utils
++from .project import Project
++from . import utils

+ class Mock_Project(Project):

+@@ -20,9 +20,9 @@ class Mock_Project(Project):
+         try:
+             plist_path = os.path.join(self.project_dir, &quot;test.plist&quot;)
+             plist = Plist.fromFile(plist_path)
+-        except EnvironmentError, e:
++        except EnvironmentError as e:
+             if e.errno == errno.ENOENT:
+-                print &quot;Info.plist file not found: &quot; + plist_path
++                print(&quot;Info.plist file not found: &quot; + plist_path)
+                 sys.exit(1)
+             else:
+                 raise
+diff --git bundler/runtest.py bundler/runtest.py
+index 309643a..2450f2d 100755
+--- bundler/runtest.py
++++ bundler/runtest.py
+@@ -1,7 +1,7 @@
+ #!/usr/bin/python
+ import unittest
+ import os
+-from project_test import Project_Test
++from .project_test import Project_Test

+ def setProjects( goodpath, badpath):
+     if not os.path.isabs(goodpath):
+diff --git bundler/utils.py bundler/utils.py
+index 78d4c47..76c83d1 100644
+--- bundler/utils.py
++++ bundler/utils.py
+@@ -15,6 +15,21 @@ def evaluate_environment_variables(string):

+     return string

++def has_pkgconfig_module(module):
++    &quot;&quot;&quot;Returns True if the pkg-config module exists&quot;&quot;&quot;
++    f = os.popen(&quot;pkg-config --exists &quot; + module)
++    f.read().strip()
++    return f.close() is None
++
++def has_pkgconfig_variable(module, key):
++    &quot;&quot;&quot;Returns True if the pkg-config variable exists for the given
++    module
++    &quot;&quot;&quot;
++    f = os.popen(&quot;pkg-config --variable=&quot; + key + &quot; &quot; + module)
++    status = bool(f.read().strip())
++    f.close()
++    return status
++
+ def evaluate_pkgconfig_variables(string):
+     p = re.compile(&quot;\${pkg:(.*?):(.*?)}&quot;)
+     m = p.search(string)
+@@ -24,6 +39,17 @@ def evaluate_pkgconfig_variables(string):
+         f = os.popen(&quot;pkg-config --variable=&quot; + key + &quot; &quot; + module)
+         value = f.read().strip()
+         if not value:
++            # pango 1.38 removed modules, try to give a helpful
++            # message in case something tries to reference the no
++            # longer existing variable (most likely from old bundle
++            # xml files) when using a newer pango build.
++            if module == &quot;pango&quot; and key == &quot;pango_module_version&quot;:
++                if has_pkgconfig_module(&quot;pango&quot;):
++                    raise Exception(
++                        &quot;'%s' got removed in '%s' &quot;
++                        &quot;1.38. Remove any reference to pango &quot;
++                        &quot;modules in your bundle xml.&quot; % (
++                            key, module))
+             raise Exception(&quot;pkg-config variable '%s %s' is undefined&quot; % (key, module))
+         string = p.sub(value, string, 1)
+         m = p.search(string)
+@@ -33,7 +59,7 @@ def evaluate_pkgconfig_variables(string):
+ def makedirs(path):
+     try:
+         os.makedirs(path)
+-    except EnvironmentError, e:
++    except EnvironmentError as e:
+         if e.errno != errno.EEXIST:
+             raise

+diff --git examples/gtk-demo.bundle examples/gtk-demo.bundle
+index 4b32d6b..422126e 100644
+--- examples/gtk-demo.bundle
++++ examples/gtk-demo.bundle
+@@ -79,9 +79,11 @@
+     ${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/loaders/*.so
+   &lt;/binary&gt;

++&lt;!-- No longer needed for pango &gt;= 1.38
+    &lt;binary&gt;
+     ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
+   &lt;/binary&gt;
++--&gt;

+   &lt;data&gt;
+     ${prefix}/etc/pango/
+diff --git examples/gtk3-demo.bundle examples/gtk3-demo.bundle
+index ba15cd3..ec0eb4c 100644
+--- examples/gtk3-demo.bundle
++++ examples/gtk3-demo.bundle
+@@ -69,13 +69,11 @@
+     ${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so
+   &lt;/binary&gt;

++&lt;!-- No longer needed for pango &gt;= 1.38
+   &lt;binary&gt;
+     ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
+   &lt;/binary&gt;
+-
+-  &lt;data&gt;
+-    ${prefix}/etc/pango/
+-  &lt;/data&gt;
++--&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
+@@ -102,6 +100,10 @@
+     ${prefix}/share/themes
+   &lt;/data&gt;

++  &lt;data&gt;
++    ${prefix}/share/icons
++  &lt;/data&gt;
++
+   &lt;!-- Copy icons. Note that the .icns file is an Apple format which
+        contains up to 4 sizes of icon. You can use
+        /Developer/Applications/Utilities/Icon Composer.app to import
+@@ -110,25 +112,4 @@
+     ${project}/Giggle.icns
+   &lt;/data --&gt;

+-  &lt;!-- This is where theme commands go. You can copy them in from your
+-       theme of choice if they provide and example, or you can just
+-       change the source path. --&gt;
+-
+-  &lt;data dest=&quot;${bundle}/Contents/Resources/etc/${gtk}/gtkrc&quot;&gt;
+-    ${project}/gtkrc
+-  &lt;/data&gt;
+-
+-  &lt;!-- Icon themes to copy. The &quot;icons&quot; property can be either of
+-       &quot;auto&quot;, &quot;all&quot;, or &quot;none&quot;. All or none should be
+-       self-explanatory, while auto means that the script will try to
+-       figure out which icons are needed. This is done by getting all
+-       the strings from all copied binaries, and matching them against
+-       icon names. To be safe, you should use &quot;all&quot;. &quot;none&quot; is useful
+-       if you want just the index.theme file but no icons, mostly
+-       needed for the &quot;hicolor&quot; base theme.
+-  &gt;
+-  &lt;icon-theme icons=&quot;auto&quot;&gt;
+-    Tango
+-  &lt;/icon-theme --&gt;
+-
+-&lt;/app-bundle&gt;
++  &lt;/app-bundle&gt;
+diff --git examples/gtk3-launcher.sh examples/gtk3-launcher.sh
+index 4aed833..9137ccb 100755
+--- examples/gtk3-launcher.sh
++++ examples/gtk3-launcher.sh
+@@ -29,11 +29,15 @@ 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;
++# PANGO_* is no longer needed for pango &gt;= 1.38
++export PANGO_RC_FILE=&quot;$bundle_etc/pango/pangorc&quot;
+ export PANGO_SYSCONFDIR=&quot;$bundle_etc&quot;
++export PANGO_LIBDIR=&quot;$bundle_lib&quot;
++
++export GDK_PIXBUF_MODULE_FILE=&quot;$bundle_lib/gdk-pixbuf-2.0/2.10.0/loaders.cache&quot;
++if [ `uname -r | cut -d . -f 1` -ge 10 ]; then
++    export GTK_IM_MODULE_FILE=&quot;$bundle_etc/gtk-3.0/gtk.immodules&quot;
++fi


+ APP=name
+diff --git examples/launcher.sh examples/launcher.sh
+index a1dfd1b..11cd019 100755
+--- examples/launcher.sh
++++ examples/launcher.sh
+@@ -31,7 +31,11 @@ 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;
++#N.B. When gdk-pixbuf was separated from Gtk+ the location of the
++#loaders cache changed as well. Depending on the version of Gtk+ that
++#you built with you may still need to use the old location:
++#export GDK_PIXBUF_MODULE_FILE=&quot;$bundle_etc/gtk-2.0/gdk-pixbuf.loaders&quot;
++export GDK_PIXBUF_MODULE_FILE=&quot;$bundle_lib/gdk-pixbuf-2.0/2.10.0/loaders.cache&quot;
+ export PANGO_LIBDIR=&quot;$bundle_lib&quot;
+ export PANGO_SYSCONFDIR=&quot;$bundle_etc&quot;

</ins></span></pre></div>
<a id="trunkdportsdevelgtkmacbundlerfilespatchbundler_pydiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/devel/gtk-mac-bundler/files/patch-bundler_py.diff (148964 => 148965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/gtk-mac-bundler/files/patch-bundler_py.diff        2016-05-23 20:34:36 UTC (rev 148964)
+++ trunk/dports/devel/gtk-mac-bundler/files/patch-bundler_py.diff        2016-05-23 20:44:13 UTC (rev 148965)
</span><span class="lines">@@ -1,11 +1,13 @@
</span><del>---- bundler/bundler.py.orig        2011-03-18 20:38:27.000000000 -1000
-+++ bundler/bundler.py        2011-03-20 11:17:59.000000000 -1000
-@@ -595,7 +595,7 @@
</del><ins>+diff --git bundler/bundler.py bundler/bundler.py
+index 65b8cc0..3ca931f 100644
+--- bundler/bundler.py
++++ bundler/bundler.py
+@@ -618,7 +618,7 @@ class Bundler:
</ins><span class="cx">          self.copy_plist()
</span><span class="cx">  
</span><span class="cx">          # Note: could move this to xml file...
</span><span class="cx"> -        self.copy_path(Path(&quot;${prefix}/lib/charset.alias&quot;))
</span><span class="cx"> +        self.copy_path(Path(&quot;/usr/lib/charset.alias&quot;, dest=&quot;${bundle}/Contents/Resources&quot;))
</span><span class="cx">  
</span><del>-         # Launcher script, if necessary.
-         launcher_script = self.project.get_launcher_script()
</del><ins>+         # Main binary
+         path = self.project.get_main_binary()
</ins></span></pre></div>
<a id="trunkdportsdevelgtkmacbundlerfilespatchgtk3demobundlediff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/gtk-mac-bundler/files/patch-gtk3-demo-bundle.diff (0 => 148965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/gtk-mac-bundler/files/patch-gtk3-demo-bundle.diff                                (rev 0)
+++ trunk/dports/devel/gtk-mac-bundler/files/patch-gtk3-demo-bundle.diff        2016-05-23 20:44:13 UTC (rev 148965)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+diff --git examples/gtk3-demo.bundle examples/gtk3-demo.bundle
+index ec0eb4c..87cbc18 100644
+--- examples/gtk3-demo.bundle
++++ examples/gtk3-demo.bundle
+@@ -104,6 +104,10 @@
+     ${prefix}/share/icons
+   &lt;/data&gt;

++  &lt;data&gt;
++    ${prefix}/share/mime
++  &lt;/data&gt;
++
+   &lt;!-- Copy icons. Note that the .icns file is an Apple format which
+        contains up to 4 sizes of icon. You can use
+        /Developer/Applications/Utilities/Icon Composer.app to import
</ins></span></pre></div>
<a id="trunkdportsdevelgtkmacbundlerfilespatchgtk3launcherdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/gtk-mac-bundler/files/patch-gtk3-launcher.diff (0 => 148965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/gtk-mac-bundler/files/patch-gtk3-launcher.diff                                (rev 0)
+++ trunk/dports/devel/gtk-mac-bundler/files/patch-gtk3-launcher.diff        2016-05-23 20:44:13 UTC (rev 148965)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+diff --git examples/gtk3-launcher.sh examples/gtk3-launcher.sh
+index 9137ccb..635ca8d 100755
+--- examples/gtk3-launcher.sh
++++ examples/gtk3-launcher.sh
+@@ -22,7 +22,6 @@ 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;
+@@ -40,7 +39,7 @@ if [ `uname -r | cut -d . -f 1` -ge 10 ]; then
+ fi


+-APP=name
++APP=$name
+ I18NDIR=&quot;$bundle_data/locale&quot;
+ # Set the locale-related variables appropriately:
+ unset LANG LC_MESSAGES LC_MONETARY LC_COLLATE
</ins></span></pre></div>
<a id="trunkdportsdevelgtkmacbundlerfilespatchlauncher_shdiff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/devel/gtk-mac-bundler/files/patch-launcher_sh.diff (148964 => 148965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/gtk-mac-bundler/files/patch-launcher_sh.diff        2016-05-23 20:34:36 UTC (rev 148964)
+++ trunk/dports/devel/gtk-mac-bundler/files/patch-launcher_sh.diff        2016-05-23 20:44:13 UTC (rev 148965)
</span><span class="lines">@@ -1,10 +0,0 @@
</span><del>---- bundler/launcher.sh.orig        2011-03-20 11:12:26.000000000 -1000
-+++ bundler/launcher.sh        2011-03-20 11:12:42.000000000 -1000
-@@ -15,6 +15,7 @@
- tmp=`dirname &quot;$tmp&quot;`
- tmp=`dirname &quot;$tmp&quot;`
- bundle=`dirname &quot;$tmp&quot;`
-+cd $bundle
- bundle_contents=&quot;$bundle&quot;/Contents
- bundle_res=&quot;$bundle_contents&quot;/Resources
- bundle_lib=&quot;$bundle_res&quot;/lib
</del></span></pre>
</div>
</div>

</body>
</html>