summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBuildTools2015-12-23 03:10:27 -0800
committerBuildTools2015-12-23 03:10:27 -0800
commit40b1e0dd3d8d91621c92837636c16ad358fba667 (patch)
tree4ff09ccde056e93c86acc7a9c6b4e4e0ecee3edf
parent52df005ecb48c9d4e3ee2e23275f949d62a19acc (diff)
downloadaur-40b1e0dd3d8d91621c92837636c16ad358fba667.tar.gz
windows bindings patch
-rw-r--r--.SRCINFO6
-rw-r--r--0035-glib-fix-on-windows-when-using-bindings.patch64
-rw-r--r--PKGBUILD8
3 files changed, 76 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5d3336a78e47..e5ef86ca91b3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Wed Dec 23 11:10:01 UTC 2015
pkgbase = mingw-w64-glib2
pkgdesc = Common C routines used by GTK+ and other libs (mingw-w64)
pkgver = 2.46.2
- pkgrel = 2
+ pkgrel = 3
url = http://www.gtk.org/
arch = any
license = LGPL
@@ -25,6 +27,7 @@ pkgbase = mingw-w64-glib2
source = 0027-no_sys_if_nametoindex.patch
source = 0028-inode_directory.patch
source = 0029-grand.all.patch
+ source = 0035-glib-fix-on-windows-when-using-bindings.patch
source = revert-warn-glib-compile-schemas.patch
source = memleak.patch
sha256sums = 5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db
@@ -36,6 +39,7 @@ pkgbase = mingw-w64-glib2
sha256sums = 5cb481295ff86c2802030984d8b2bf6a3b1dcd5e5fe7b0be68b22d9116305837
sha256sums = f7f06a90156fe0a308412512c359072922f7f0d19dd4bed30d863db18e48940b
sha256sums = dd26a015cdd65ee270251a11ef4c646000b26bb435992e6c997a615c1c14602e
+ sha256sums = af30ae85dc86647562f7585dc3960b1cb46a33eb11172949c3e69b86de019db4
sha256sums = 049240975cd2f1c88fbe7deb28af14d4ec7d2640495f7ca8980d873bb710cc97
sha256sums = 8337eeba4a32133d41575c8338fca32ac6a867e6e4a4e021355fcdeb606420a6
diff --git a/0035-glib-fix-on-windows-when-using-bindings.patch b/0035-glib-fix-on-windows-when-using-bindings.patch
new file mode 100644
index 000000000000..c2055c6af9b7
--- /dev/null
+++ b/0035-glib-fix-on-windows-when-using-bindings.patch
@@ -0,0 +1,64 @@
+From cfac878d4e7aff96c89e997ea4132043bb5a24e0 Mon Sep 17 00:00:00 2001
+From: Chun-wei Fan <fanchunwei@src.gnome.org>
+Date: Mon, 21 Dec 2015 14:54:42 +0800
+Subject: [PATCH] g_application_run(): Fix on Windows When Using Bindings
+
+As g_win32_get_command_line() calls CommandLineToArgvW() to acquire the
+arguments passed into a GApplication program, it actually returns the
+whole command line which is used to invoke the program, including the
+script interpreter and its flags when a script using GNOME bindings
+(e.g. PyGObject and so on) is being invoked.
+
+The issue here is that g_application_run() would most probably have
+trouble in the scripts scenario on Windows as it is likely unable to
+"recognize" the script interpreter, causing such scripts to fail to run.
+
+Largely based on the patch by Ray Donnelly <mingw.android@gmail.com>.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=734095
+---
+ gio/gapplication.c | 29 ++++++++++++++++++++++++++++-
+ 1 file changed, 28 insertions(+), 1 deletion(-)
+
+diff --git a/gio/gapplication.c b/gio/gapplication.c
+index e24ab69..5c4b2fb 100644
+--- a/gio/gapplication.c
++++ b/gio/gapplication.c
+@@ -2277,7 +2277,34 @@ g_application_run (GApplication *application,
+ g_return_val_if_fail (!application->priv->must_quit_now, 1);
+
+ #ifdef G_OS_WIN32
+- arguments = g_win32_get_command_line ();
++ {
++ gint new_argc = 0;
++
++ arguments = g_win32_get_command_line ();
++
++ /*
++ * CommandLineToArgvW(), which is called by g_win32_get_command_line(),
++ * pulls in the whole command line that is used to call the program. This is
++ * fine in cases where the program is a .exe program, but in the cases where the
++ * program is a called via a script, such as PyGObject's gtk-demo.py, which is normally
++ * called using 'python gtk-demo.py' on Windows, the program name (argv[0])
++ * returned by g_win32_get_command_line() will not be the argv[0] that ->local_command_line()
++ * would expect, causing the program to fail with "This application can not open files."
++ */
++ new_argc = g_strv_length (arguments);
++
++ if (new_argc > argc)
++ {
++ gint i;
++
++ for (i = 0; i < new_argc - argc; i++)
++ g_free (arguments[i]);
++
++ memmove (&arguments[0],
++ &arguments[new_argc - argc],
++ sizeof (arguments[0]) * (argc + 1));
++ }
++ }
+ #else
+ {
+ gint i;
+--
+2.3.5.windows.8
diff --git a/PKGBUILD b/PKGBUILD
index f8f63a6fbb4e..80fb4161c48c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Contributor: Renato Silva <br.renatosilva@gmail.com>
pkgname=mingw-w64-glib2
pkgver=2.46.2
-pkgrel=2
+pkgrel=3
arch=(any)
pkgdesc="Common C routines used by GTK+ and other libs (mingw-w64)"
depends=(mingw-w64-gettext mingw-w64-zlib mingw-w64-libffi mingw-w64-pcre mingw-w64-freetype2)
@@ -20,6 +20,7 @@ source=("http://ftp.gnome.org/pub/GNOME/sources/glib/${pkgver%.*}/glib-$pkgver.t
"0027-no_sys_if_nametoindex.patch"
"0028-inode_directory.patch"
"0029-grand.all.patch"
+"0035-glib-fix-on-windows-when-using-bindings.patch"
"revert-warn-glib-compile-schemas.patch"
"memleak.patch")
sha256sums=('5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db'
@@ -31,6 +32,7 @@ sha256sums=('5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db'
'5cb481295ff86c2802030984d8b2bf6a3b1dcd5e5fe7b0be68b22d9116305837'
'f7f06a90156fe0a308412512c359072922f7f0d19dd4bed30d863db18e48940b'
'dd26a015cdd65ee270251a11ef4c646000b26bb435992e6c997a615c1c14602e'
+ 'af30ae85dc86647562f7585dc3960b1cb46a33eb11172949c3e69b86de019db4'
'049240975cd2f1c88fbe7deb28af14d4ec7d2640495f7ca8980d873bb710cc97'
'8337eeba4a32133d41575c8338fca32ac6a867e6e4a4e021355fcdeb606420a6')
@@ -46,6 +48,10 @@ prepare() {
patch -Np1 -i "$srcdir/0027-no_sys_if_nametoindex.patch"
patch -Np1 -i "$srcdir/0028-inode_directory.patch"
patch -Np1 -i "${srcdir}/0029-grand.all.patch"
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=734095
+ patch -Np1 -i "${srcdir}/0035-glib-fix-on-windows-when-using-bindings.patch"
+
patch -Rp1 -i ../revert-warn-glib-compile-schemas.patch
patch -Np1 -i ../memleak.patch
NOCONFIGURE=1 ./autogen.sh