[118051] trunk/dports/devel/gtk-mac-bundler
macsforever2000 at macports.org
macsforever2000 at macports.org
Thu Mar 20 08:00:17 PDT 2014
Revision: 118051
https://trac.macports.org/changeset/118051
Author: macsforever2000 at macports.org
Date: 2014-03-20 08:00:17 -0700 (Thu, 20 Mar 2014)
Log Message:
-----------
gtk-mac-bundler: Fixes for pango and pixbuf. Add openmaintainer. (#42766)
Modified Paths:
--------------
trunk/dports/devel/gtk-mac-bundler/Portfile
Added Paths:
-----------
trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.3_2014.02.24.diff
Modified: trunk/dports/devel/gtk-mac-bundler/Portfile
===================================================================
--- 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)
@@ -2,42 +2,35 @@
# $Id$
PortSystem 1.0
+PortGroup github 1.0
-name gtk-mac-bundler
+github.setup jralls gtk-mac-bundler bundler-0.7.3
+
version 0.7.3
-set branch 0.7
+revision 1
categories devel
license GPL-2
platforms darwin
-maintainers gmail.com:gellule.xg
+maintainers gmail.com:gellule.xg \
+ openmaintainer
supported_archs noarch
description Mac OS X application bundle utility
-
long_description A utility that aids in the creation of Mac OS X \
application bundles
-homepage http://sourceforge.net/projects/gtk-osx
-
#---------
-# FETCHING
+# CHECKSUM
#---------
-master_sites ftp://ftp.gnome.org/pub/GNOME/sources/${name}/${branch}
+checksums rmd160 d7773e2394ea46c70510e7481a390db19fca937e \
+ sha256 f35828c539879bab3d00d53f9c05bbad739756ba733afcfd61ee7e8e3b49d339
-distfiles ${name}-${version}.tar.xz
-
-#----------------------------
-# EXTRACTION AND CHECKSUMMING
-#----------------------------
-use_xz yes
-
-checksums rmd160 05837f17ce94fe6822c0896007419b9b5ae4bc2c \
- sha256 799d8d2bbd747ddddba55d32b7c9f08116e5f2b349358175b05544a4baa91365
-
#---------
# PATCHING
#---------
-patchfiles patch-bundler_py.diff \
+# 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 \
patch-launcher_sh.diff
#---------------------------
@@ -57,8 +50,3 @@
copy ${worksrcpath}/bundler ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
}
destroot.args bindir=${destroot}${prefix}/bin
-
-#-----------
-# LIVECHECK
-#-----------
-livecheck.type gnome-with-unstable
Added: trunk/dports/devel/gtk-mac-bundler/files/patch-0.7.3_2014.02.24.diff
===================================================================
--- 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)
@@ -0,0 +1,414 @@
+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("${pkg:pango:pango_module_version}")
+ modulespath = self.project.get_bundle_path("Contents/Resources/lib/pango/" +
+ module_version +
+- "modules/")
++ "/modules/")
+
+ 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="$bundle_res"
+ export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
+ export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
+ export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
+-export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
++export PANGO_LIBDIR="$bundle_lib"
++export PANGO_SYSCONFDIR="$bundle_etc"
+
+ # 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="@executable_path/../$3"
+ ACTION=$4
+
++chmod u+w $LIBRARY
++
+ if [ "x$ACTION" == "xchange" ]; then
+ libs="`otool -L $LIBRARY 2>/dev/null | fgrep compatibility | cut -d\( -f1 | grep $WRONG_PREFIX | sort | uniq`"
+ 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 @@
+ <key>CFBundleExecutable</key>
+ <string>GtkDemo</string>
+ <key>CFBundleGetInfoString</key>
+- <string>2.16.2, (C) 1997-2009 The GTK+ Team http://www.gtk.org</string>
++ <string>2.24.18, (C) 1997-2013 The GTK+ Team http://www.gtk.org</string>
+ <key>CFBundleIconFile</key>
+ <string>Giggle.icns</string>
+ <key>CFBundleIdentifier</key>
+@@ -17,13 +17,13 @@
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+- <string>2.16.2</string>
++ <string>2.24.18</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+- <string>2.16.2</string>
++ <string>2.24.18</string>
+ <key>NSHumanReadableCopyright</key>
+- <string>Copyright 1997 - 2009 The GTK+ Tean, GNU General Public License.</string>
++ <string>Copyright 1997 - 2013 The GTK+ Team, GNU General Public License.</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>10.4</string>
+ </dict>
+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 @@
+ <key>CFBundleExecutable</key>
+ <string>PyGtkDemo</string>
+ <key>CFBundleGetInfoString</key>
+- <string>2.16.0, (C) 1997-2009 The GTK+ Team http://www.gtk.org</string>
++ <string>2.24.0, (C) 1997-2012 The GTK+ Team http://www.gtk.org</string>
+ <key>CFBundleIconFile</key>
+ <string>Giggle.icns</string>
+ <key>CFBundleIdentifier</key>
+@@ -17,13 +17,13 @@
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+- <string>2.16.0</string>
++ <string>2.24.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+- <string>2.16.0</string>
++ <string>2.24.0</string>
+ <key>NSHumanReadableCopyright</key>
+- <string>Copyright 1997 - 2009 The GTK+ Tean, GNU General Public License.</string>
++ <string>Copyright 1997 - 2012 The GTK+ Team GNU General Public License.</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>10.5</string>
+ </dict>
+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 @@
+ <binary>
+ ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/engines/*.so
+ </binary>
++
+ <binary>
+ ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so
+ </binary>
+
+ <!-- Starting with 2.24, gdk-pixbuf installs into its own directory. -->
+ <binary>
+- ${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
++ </binary>
++
++ <binary>
++ ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
+ </binary>
+
+- <!-- Translation filenames, one for each program or library that you
++ <data>
++ ${prefix}/etc/pango/
++ </data>
++
++ <!-- Translation filenames, one for each program or library that you
+ want to copy in to the bundle. The "dest" attribute is
+ optional, as usual. Bundler will find all translations of that
+ library/program under the indicated directory and copy them.-->
+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.
+ -->
+- <launcher-script>${project}/launcher.sh</launcher-script >
++ <launcher-script>${project}/gtk3-launcher.sh</launcher-script >
+
+ <!-- Not implemented: Optional runtime, could be python or mono
+ for example.
+@@ -52,23 +52,14 @@
+
+ <main-binary>${prefix}/bin/gtk3-demo</main-binary>
+
+- <!-- Copy in GTK+ modules. Note the ${gtkdir} macro, which expands
+- to the correct library subdirectory for the specified gtk
+- version.
+- -->
++ <!-- 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. -->
+ <binary>
+- ${prefix}/lib/${gtkdir}/modules/*.so
++ ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/immodules/*.so
+ </binary>
+
+- <!-- Copy in GTK+ theme engines and print backends. Note the use of the
+- "${pkg:module:variable}" 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. -->
+- <binary>
+- ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/theming-engines/*.so
+- </binary>
++<!-- And the print backends -->
+ <binary>
+ ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so
+ </binary>
+@@ -78,6 +69,14 @@
+ ${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so
+ </binary>
+
++ <binary>
++ ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
++ </binary>
++
++ <data>
++ ${prefix}/etc/pango/
++ </data>
++
+ <!-- Translation filenames, one for each program or library that you
+ want to copy in to the bundle. The "dest" 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 "x$GTK_DEBUG_LAUNCHER" != x; then
++ set -x
++fi
++
++if test "x$GTK_DEBUG_GDB" != x; then
++ EXEC="gdb --args"
++else
++ EXEC=exec
++fi
++
++name=`basename "$0"`
++tmp="$0"
++tmp=`dirname "$tmp"`
++tmp=`dirname "$tmp"`
++bundle=`dirname "$tmp"`
++bundle_contents="$bundle"/Contents
++bundle_res="$bundle_contents"/Resources
++bundle_lib="$bundle_res"/lib
++bundle_bin="$bundle_res"/bin
++bundle_data="$bundle_res"/share
++bundle_etc="$bundle_res"/etc
++
++export DYLD_LIBRARY_PATH="$bundle_lib"
++export XDG_CONFIG_DIRS="$bundle_etc"/xdg
++export XDG_DATA_DIRS="$bundle_data"
++export GTK_DATA_PREFIX="$bundle_res"
++export GTK_EXE_PREFIX="$bundle_res"
++export GTK_PATH="$bundle_res"
++
++export GTK2_RC_FILES="$bundle_etc/gtk-3.0/gtkrc"
++export GTK_IM_MODULE_FILE="$bundle_etc/gtk-3.0/gtk.immodules"
++export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-3.0/gdk-pixbuf.loaders"
++export PANGO_LIBDIR="$bundle_lib"
++export PANGO_SYSCONFDIR="$bundle_etc"
++
++
++APP=name
++I18NDIR="$bundle_data/locale"
++# 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 "Hans" to CN and "Hant" to TW.
++APPLELANGUAGES=`defaults read .GlobalPreferences AppleLanguages | sed -En -e 's/\-/_/' -e 's/Hant/TW/' -e 's/Hans/CN/' -e 's/[[:space:]]*\"?([[:alnum:]_]+)\"?,?/\1/p' `
++if test "$APPLELANGUAGES"; 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 "$I18NDIR/${L}/LC_MESSAGES/$APP.mo"; 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 "x$L" == "xen_US"; then
++ export LANG=$L
++ break
++ fi
++ #OK, now test for just the first two letters:
++ if test -f "$I18NDIR/${L:0:2}/LC_MESSAGES/$APP.mo"; then
++ export LANG=${L:0:2}
++ break
++ fi
++ #Same thing, but checking for any english variant.
++ if test "x${L:0:2}" == "xen"; 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 "$I18NDIR/${APPLECOLLATION:0:2}/LC_MESSAGES/$APP.mo"; 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 "$I18NDIR/${APPLELOCALE:0:5}/LC_MESSAGES/$APP.mo"; then
++ if test -z $LANG; then
++ export LANG="${APPLELOCALE:0:5}"
++ fi
++
++elif test -z $LANG -a -f "$I18NDIR/${APPLELOCALE:0:2}/LC_MESSAGES/$APP.mo"; then
++ export LANG="${APPLELOCALE:0:2}"
++fi
++
++#Next we need to set LC_MESSAGES. If at all possilbe, we want a full
++#5-character locale to avoid the "Locale not supported by C library"
++#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 > ${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 == "en"; then
++ export LC_MESSAGES="en_US"
++ 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="en_US"
++ export LC_MESSAGES="en_US"
++fi
++CURRENCY=`echo $APPLELOCALE | sed -En 's/.*currency=([[:alpha:]]+).*/\1/p'`
++if test "x$CURRENCY" != "x"; 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 "$LC_MONETARY"; then
++ FILES=`find /usr/share/locale -name LC_MONETARY -exec grep -H $CURRENCY {} \;`
++ if test -n "$FILES"; 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 "$LC_MONETARY"; 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 "$bundle_lib/charset.alias"; then
++ export CHARSETALIASDIR="$bundle_lib"
++fi
++
++# Extra arguments can be added in environment.sh.
++EXTRA_ARGS=
++if test -f "$bundle_res/environment.sh"; then
++ source "$bundle_res/environment.sh"
++fi
++
++# Strip out the argument added by the OS.
++if /bin/expr "x$1" : '^x-psn_' > /dev/null; then
++ shift 1
++fi
++
++$EXEC "$bundle_contents/MacOS/$name-bin" "$@" $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="$bundle_res"
+ export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
+ export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
+ export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
+-export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
++export PANGO_LIBDIR="$bundle_lib"
++export PANGO_SYSCONFDIR="$bundle_etc"
+
+ APP=name
+ I18NDIR="$bundle_data/locale"
+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 @@
+
+ <!-- Starting with 2.24, gdk-pixbuf installs into its own directory. -->
+ <binary>
+- ${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
+ </binary>
+
+- <!-- Translation filenames, one for each program or library that you
++ <binary>
++ ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/*.so
++ </binary>
++
++ <!-- Translation filenames, one for each program or library that you
+ want to copy in to the bundle. The "dest" attribute is
+ optional, as usual. Bundler will find all translations of that
+ library/program under the indicated directory and copy them.-->
+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="$bundle_res"
+ export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
+ export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
+ export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
+-export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
++export PANGO_LIBDIR="$bundle_lib"
++export PANGO_SYSCONFDIR="$bundle_etc"
+
+ #Set $PYTHON to point inside the bundle
+ export PYTHON="$bundle_contents/MacOS/python"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140320/b6f6c861/attachment-0001.html>
More information about the macports-changes
mailing list