Ticket #42766: patch-0.7.3_2014.02.24.diff

File patch-0.7.3_2014.02.24.diff, 15.1 KB (added by gellule.xg@…, 10 years ago)
  • bundler/bundler.py

    diff --git bundler/bundler.py bundler/bundler.py
    index abca042..8db5e13 100644
    class Bundler: 
    7373        module_version = utils.evaluate_pkgconfig_variables("${pkg:pango:pango_module_version}")
    7474        modulespath = self.project.get_bundle_path("Contents/Resources/lib/pango/" +
    7575                                                   module_version +
    76                                                    "modules/")
     76                                                   "/modules/")
    7777
    7878        from distutils.version import StrictVersion as V
    7979        import tempfile
  • bundler/launcher.sh

    diff --git bundler/launcher.sh bundler/launcher.sh
    index 7b15121..069fbda 100755
    export GTK_PATH="$bundle_res" 
    3333export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
    3434export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
    3535export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
    36 export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
     36export PANGO_LIBDIR="$bundle_lib"
     37export PANGO_SYSCONFDIR="$bundle_etc"
    3738
    3839# Localization settings. It's better to do this inside your program
    3940# using NSLocale if possible.
  • bundler/run-install-name-tool-change.sh

    diff --git bundler/run-install-name-tool-change.sh bundler/run-install-name-tool-change.sh
    index 3a3b6a8..a69796a 100755
    WRONG_PREFIX=$2 
    1010RIGHT_PREFIX="@executable_path/../$3"
    1111ACTION=$4
    1212
     13chmod u+w $LIBRARY
     14
    1315if [ "x$ACTION" == "xchange" ]; then
    1416    libs="`otool -L $LIBRARY 2>/dev/null | fgrep compatibility | cut -d\( -f1 | grep $WRONG_PREFIX | sort | uniq`"
    1517    for lib in $libs; do
  • examples/Info-gtk-demo.plist

    diff --git examples/Info-gtk-demo.plist examples/Info-gtk-demo.plist
    index a47c60d..80b04f4 100644
     
    77    <key>CFBundleExecutable</key>
    88    <string>GtkDemo</string>
    99    <key>CFBundleGetInfoString</key>
    10     <string>2.16.2, (C) 1997-2009 The GTK+ Team http://www.gtk.org</string>
     10    <string>2.24.18, (C) 1997-2013 The GTK+ Team http://www.gtk.org</string>
    1111    <key>CFBundleIconFile</key>
    1212    <string>Giggle.icns</string>
    1313    <key>CFBundleIdentifier</key>
     
    1717    <key>CFBundlePackageType</key>
    1818    <string>APPL</string>
    1919    <key>CFBundleShortVersionString</key>
    20     <string>2.16.2</string>
     20    <string>2.24.18</string>
    2121    <key>CFBundleSignature</key>
    2222    <string>????</string>
    2323    <key>CFBundleVersion</key>
    24     <string>2.16.2</string>
     24    <string>2.24.18</string>
    2525    <key>NSHumanReadableCopyright</key>
    26     <string>Copyright 1997 - 2009 The GTK+ Tean, GNU General Public License.</string>
     26    <string>Copyright 1997 - 2013 The GTK+ Team, GNU General Public License.</string>
    2727    <key>LSMinimumSystemVersion</key>
    2828    <string>10.4</string>
    2929</dict>
  • examples/Info-pygtk-demo.plist

    diff --git examples/Info-pygtk-demo.plist examples/Info-pygtk-demo.plist
    index 37876b4..55b6807 100644
     
    77    <key>CFBundleExecutable</key>
    88    <string>PyGtkDemo</string>
    99    <key>CFBundleGetInfoString</key>
    10     <string>2.16.0, (C) 1997-2009 The GTK+ Team http://www.gtk.org</string>
     10    <string>2.24.0, (C) 1997-2012 The GTK+ Team http://www.gtk.org</string>
    1111    <key>CFBundleIconFile</key>
    1212    <string>Giggle.icns</string>
    1313    <key>CFBundleIdentifier</key>
     
    1717    <key>CFBundlePackageType</key>
    1818    <string>APPL</string>
    1919    <key>CFBundleShortVersionString</key>
    20     <string>2.16.0</string>
     20    <string>2.24.0</string>
    2121    <key>CFBundleSignature</key>
    2222    <string>????</string>
    2323    <key>CFBundleVersion</key>
    24     <string>2.16.0</string>
     24    <string>2.24.0</string>
    2525    <key>NSHumanReadableCopyright</key>
    26     <string>Copyright 1997 - 2009 The GTK+ Tean, GNU General Public License.</string>
     26    <string>Copyright 1997 - 2012 The GTK+ Team GNU General Public License.</string>
    2727    <key>LSMinimumSystemVersion</key>
    2828    <string>10.5</string>
    2929</dict>
  • examples/gtk-demo.bundle

    diff --git examples/gtk-demo.bundle examples/gtk-demo.bundle
    index 32173b9..4b32d6b 100644
     
    6969  <binary>
    7070    ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/engines/*.so
    7171  </binary>
     72
    7273  <binary>
    7374    ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so
    7475  </binary>
    7576
    7677<!-- Starting with 2.24, gdk-pixbuf installs into its own directory. -->
    7778  <binary>
    78     ${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/*.so
     79    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/loaders/*.so
     80  </binary>
     81
     82   <binary>
     83    ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
    7984  </binary>
    8085
    81   <!-- Translation filenames, one for each program or library that you
     86  <data>
     87    ${prefix}/etc/pango/
     88  </data>
     89
     90 <!-- Translation filenames, one for each program or library that you
    8291       want to copy in to the bundle. The "dest" attribute is
    8392       optional, as usual. Bundler will find all translations of that
    8493       library/program under the indicated directory and copy them.-->
  • examples/gtk3-demo.bundle

    diff --git examples/gtk3-demo.bundle examples/gtk3-demo.bundle
    index b74f2ca..ba15cd3 100644
     
    3333         not needed. If the source path is left out, the default
    3434         script will be used.
    3535    -->
    36     <launcher-script>${project}/launcher.sh</launcher-script >
     36    <launcher-script>${project}/gtk3-launcher.sh</launcher-script >
    3737
    3838    <!-- Not implemented: Optional runtime, could be python or mono
    3939         for example.
     
    5252
    5353  <main-binary>${prefix}/bin/gtk3-demo</main-binary>
    5454
    55   <!-- Copy in GTK+ modules. Note the ${gtkdir} macro, which expands
    56        to the correct library subdirectory for the specified gtk
    57        version.
    58   -->
     55  <!-- Copy in the input methods. Dunno if they actually work with
     56       OSX. Note the ${gtkdir} macro, which expands to the correct
     57       library subdirectory for the specified gtk version. -->
    5958  <binary>
    60      ${prefix}/lib/${gtkdir}/modules/*.so
     59    ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/immodules/*.so
    6160  </binary>
    6261
    63   <!-- Copy in GTK+ theme engines and print backends. Note the use of the
    64        "${pkg:module:variable}" macro, which evaluates to a pkg-config
    65        variable in the specified module. Note that any libraries that
    66        binaries link to are also copied in automatically.  Note also
    67        the included ${gtk} macro, which gets the correct package name
    68        to get. -->
    69   <binary>
    70     ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/theming-engines/*.so
    71   </binary>
     62<!-- And the print backends -->
    7263  <binary>
    7364    ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so
    7465  </binary>
     
    7869    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so
    7970  </binary>
    8071
     72  <binary>
     73    ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
     74  </binary>
     75
     76  <data>
     77    ${prefix}/etc/pango/
     78  </data>
     79
    8180  <!-- Translation filenames, one for each program or library that you
    8281       want to copy in to the bundle. The "dest" attribute is
    8382       optional, as usual. Bundler will find all translations of that
  • new file examples/gtk3-launcher.sh

    diff --git examples/gtk3-launcher.sh examples/gtk3-launcher.sh
    new file mode 100755
    index 0000000..4aed833
    - +  
     1#!/bin/sh
     2
     3if test "x$GTK_DEBUG_LAUNCHER" != x; then
     4    set -x
     5fi
     6
     7if test "x$GTK_DEBUG_GDB" != x; then
     8    EXEC="gdb --args"
     9else
     10    EXEC=exec
     11fi
     12
     13name=`basename "$0"`
     14tmp="$0"
     15tmp=`dirname "$tmp"`
     16tmp=`dirname "$tmp"`
     17bundle=`dirname "$tmp"`
     18bundle_contents="$bundle"/Contents
     19bundle_res="$bundle_contents"/Resources
     20bundle_lib="$bundle_res"/lib
     21bundle_bin="$bundle_res"/bin
     22bundle_data="$bundle_res"/share
     23bundle_etc="$bundle_res"/etc
     24
     25export DYLD_LIBRARY_PATH="$bundle_lib"
     26export XDG_CONFIG_DIRS="$bundle_etc"/xdg
     27export XDG_DATA_DIRS="$bundle_data"
     28export GTK_DATA_PREFIX="$bundle_res"
     29export GTK_EXE_PREFIX="$bundle_res"
     30export GTK_PATH="$bundle_res"
     31
     32export GTK2_RC_FILES="$bundle_etc/gtk-3.0/gtkrc"
     33export GTK_IM_MODULE_FILE="$bundle_etc/gtk-3.0/gtk.immodules"
     34export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-3.0/gdk-pixbuf.loaders"
     35export PANGO_LIBDIR="$bundle_lib"
     36export PANGO_SYSCONFDIR="$bundle_etc"
     37
     38
     39APP=name
     40I18NDIR="$bundle_data/locale"
     41# Set the locale-related variables appropriately:
     42unset LANG LC_MESSAGES LC_MONETARY LC_COLLATE
     43
     44# Has a language ordering been set?
     45# If so, set LC_MESSAGES and LANG accordingly; otherwise skip it.
     46# 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.
     47APPLELANGUAGES=`defaults read .GlobalPreferences AppleLanguages | sed -En   -e 's/\-/_/' -e 's/Hant/TW/' -e 's/Hans/CN/' -e 's/[[:space:]]*\"?([[:alnum:]_]+)\"?,?/\1/p' `
     48if test "$APPLELANGUAGES"; then
     49    # A language ordering exists.
     50    # Test, item per item, to see whether there is an corresponding locale.
     51    for L in $APPLELANGUAGES; do
     52        #test for exact matches:
     53       if test -f "$I18NDIR/${L}/LC_MESSAGES/$APP.mo"; then
     54            export LANG=$L
     55            break
     56        fi
     57        #This is a special case, because often the original strings are in US
     58        #English and there is no translation file.
     59        if test "x$L" == "xen_US"; then
     60            export LANG=$L
     61            break
     62        fi
     63        #OK, now test for just the first two letters:
     64        if test -f "$I18NDIR/${L:0:2}/LC_MESSAGES/$APP.mo"; then
     65            export LANG=${L:0:2}
     66            break
     67        fi
     68        #Same thing, but checking for any english variant.
     69        if test "x${L:0:2}" == "xen"; then
     70            export LANG=$L
     71            break
     72        fi;
     73    done 
     74fi
     75unset APPLELANGUAGES L
     76
     77# If we didn't get a language from the language list, try the Collation preference, in case it's the only setting that exists.
     78APPLECOLLATION=`defaults read .GlobalPreferences AppleCollationOrder`
     79if test -z ${LANG} -a -n $APPLECOLLATION; then
     80    if test -f "$I18NDIR/${APPLECOLLATION:0:2}/LC_MESSAGES/$APP.mo"; then
     81        export LANG=${APPLECOLLATION:0:2}
     82    fi
     83fi
     84if test ! -z $APPLECOLLATION; then
     85    export LC_COLLATE=$APPLECOLLATION
     86fi
     87unset APPLECOLLATION
     88
     89# Continue by attempting to find the Locale preference.
     90APPLELOCALE=`defaults read .GlobalPreferences AppleLocale`
     91
     92if test -f "$I18NDIR/${APPLELOCALE:0:5}/LC_MESSAGES/$APP.mo"; then
     93    if test -z $LANG; then
     94        export LANG="${APPLELOCALE:0:5}"
     95    fi
     96
     97elif test -z $LANG -a -f "$I18NDIR/${APPLELOCALE:0:2}/LC_MESSAGES/$APP.mo"; then
     98    export LANG="${APPLELOCALE:0:2}"
     99fi
     100
     101#Next we need to set LC_MESSAGES. If at all possilbe, we want a full
     102#5-character locale to avoid the "Locale not supported by C library"
     103#warning from Gtk -- even though Gtk will translate with a
     104#two-character code.
     105if test -n $LANG; then
     106#If the language code matches the applelocale, then that's the message
     107#locale; otherwise, if it's longer than two characters, then it's
     108#probably a good message locale and we'll go with it.
     109    if test $LANG == ${APPLELOCALE:0:5} -o $LANG != ${LANG:0:2}; then
     110        export LC_MESSAGES=$LANG
     111#Next try if the Applelocale is longer than 2 chars and the language
     112#bit matches $LANG
     113    elif test $LANG == ${APPLELOCALE:0:2} -a $APPLELOCALE > ${APPLELOCALE:0:2}; then
     114        export LC_MESSAGES=${APPLELOCALE:0:5}
     115#Fail. Get a list of the locales in $PREFIX/share/locale that match
     116#our two letter language code and pick the first one, special casing
     117#english to set en_US
     118    elif test $LANG == "en"; then
     119        export LC_MESSAGES="en_US"
     120    else
     121        LOC=`find $PREFIX/share/locale -name $LANG???`
     122        for L in $LOC; do
     123            export LC_MESSAGES=$L
     124        done
     125    fi
     126else
     127#All efforts have failed, so default to US english
     128    export LANG="en_US"
     129    export LC_MESSAGES="en_US"
     130fi
     131CURRENCY=`echo $APPLELOCALE |  sed -En 's/.*currency=([[:alpha:]]+).*/\1/p'`
     132if test "x$CURRENCY" != "x"; then
     133#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.
     134    if test -f /usr/local/share/$LC_MESSAGES/LC_MONETARY; then
     135        if test -a `cat /usr/local/share/$LC_MESSAGES/LC_MONETARY` == $CURRENCY; then
     136            export LC_MONETARY=$LC_MESSAGES
     137        fi
     138    fi
     139    if test -z "$LC_MONETARY"; then
     140        FILES=`find /usr/share/locale -name LC_MONETARY -exec grep -H $CURRENCY {} \;`
     141        if test -n "$FILES"; then
     142            export LC_MONETARY=`echo $FILES | sed -En 's%/usr/share/locale/([[:alpha:]_]+)/LC_MONETARY.*%\1%p'`
     143        fi
     144    fi
     145fi
     146#No currency value means that the AppleLocale governs:
     147if test -z "$LC_MONETARY"; then
     148    LC_MONETARY=${APPLELOCALE:0:5}
     149fi
     150#For Gtk, which only looks at LC_ALL:
     151export LC_ALL=$LC_MESSAGES
     152
     153unset APPLELOCALE FILES LOC
     154
     155if test -f "$bundle_lib/charset.alias"; then
     156    export CHARSETALIASDIR="$bundle_lib"
     157fi
     158
     159# Extra arguments can be added in environment.sh.
     160EXTRA_ARGS=
     161if test -f "$bundle_res/environment.sh"; then
     162  source "$bundle_res/environment.sh"
     163fi
     164
     165# Strip out the argument added by the OS.
     166if /bin/expr "x$1" : '^x-psn_' > /dev/null; then
     167    shift 1
     168fi
     169
     170$EXEC "$bundle_contents/MacOS/$name-bin" "$@" $EXTRA_ARGS
  • examples/launcher.sh

    diff --git examples/launcher.sh examples/launcher.sh
    index d92f9e5..a1dfd1b 100755
    export GTK_PATH="$bundle_res" 
    3232export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
    3333export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
    3434export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
    35 export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
     35export PANGO_LIBDIR="$bundle_lib"
     36export PANGO_SYSCONFDIR="$bundle_etc"
    3637
    3738APP=name
    3839I18NDIR="$bundle_data/locale"
  • examples/pygtk-demo.bundle

    diff --git examples/pygtk-demo.bundle examples/pygtk-demo.bundle
    index 699ff43..2025312 100644
     
    9696
    9797<!-- Starting with 2.24, gdk-pixbuf installs into its own directory. -->
    9898  <binary>
    99     ${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/*.so
     99    ${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so
    100100  </binary>
    101101
    102   <!-- Translation filenames, one for each program or library that you
     102  <binary>
     103    ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/*.so
     104  </binary>
     105
     106 <!-- Translation filenames, one for each program or library that you
    103107       want to copy in to the bundle. The "dest" attribute is
    104108       optional, as usual. Bundler will find all translations of that
    105109       library/program under the indicated directory and copy them.-->
  • examples/pygtk-demo.sh

    diff --git examples/pygtk-demo.sh examples/pygtk-demo.sh
    index 9c8ec33..ecbf1c0 100755
    export GTK_PATH="$bundle_res" 
    2222export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
    2323export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
    2424export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
    25 export PANGO_RC_FILE="$bundle_etc/pango/pangorc"
     25export PANGO_LIBDIR="$bundle_lib"
     26export PANGO_SYSCONFDIR="$bundle_etc"
    2627
    2728#Set $PYTHON to point inside the bundle
    2829export PYTHON="$bundle_contents/MacOS/python"