From c9e58ec29ff98ee8ea2f24d3612066bae8ac3a79 Mon Sep 17 00:00:00 2001
From: Michael Lass <michael.lass@uni-paderborn.de>
Date: Tue, 3 Oct 2017 15:51:38 +0200
Subject: [PATCH] Attempt at patching py-gobject
---
python/py-gobject/Portfile | 18 +++++++++++++++++-
python/py-gobject/files/patch-quartz-newer-glib2.diff | 15 +++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
create mode 100644 python/py-gobject/files/patch-quartz-newer-glib2.diff
diff --git a/python/py-gobject/Portfile b/python/py-gobject/Portfile
index 3bc0bcbdd3..11fa64b745 100644
a
|
b
|
|
2 | 2 | |
3 | 3 | PortSystem 1.0 |
4 | 4 | PortGroup python 1.0 |
| 5 | PortGroup active_variants 1.1 |
5 | 6 | |
6 | 7 | name py-gobject |
7 | 8 | set my_name pygobject |
8 | 9 | version 2.28.6 |
9 | | revision 3 |
| 10 | revision 4 |
10 | 11 | epoch 20110613 |
11 | 12 | set branch [join [lrange [split ${version} .] 0 1] .] |
12 | 13 | categories-append gnome |
… |
… |
if {$subport ne $name} { |
41 | 42 | |
42 | 43 | patchfiles patch-pygi-info.c.diff |
43 | 44 | |
| 45 | variant quartz conflicts x11 { |
| 46 | require_active_variants path:lib/pkgconfig/glib-2.0.pc:glib2 quartz |
| 47 | |
| 48 | # Patch unix.override to include correct header file for use of quartz |
| 49 | patchfiles-append patch-quartz-newer-glib2.diff |
| 50 | } |
| 51 | |
| 52 | variant x11 conflicts quartz { |
| 53 | require_active_variants path:lib/pkgconfig/glib-2.0.pc:glib2 x11 |
| 54 | } |
| 55 | |
| 56 | if {![variant_isset quartz]} { |
| 57 | default_variants +x11 |
| 58 | } |
| 59 | |
44 | 60 | use_configure yes |
45 | 61 | configure.python ${python.bin} |
46 | 62 | configure.env-append PKG_CONFIG_PATH='${python.prefix}/lib/pkgconfig' |
diff --git a/python/py-gobject/files/patch-quartz-newer-glib2.diff b/python/py-gobject/files/patch-quartz-newer-glib2.diff
new file mode 100644
index 0000000000..7a6ca7c697
-
|
+
|
|
| 1 | --- gio/unix.override.orig 2017-10-03 15:29:33.000000000 +0200 |
| 2 | +++ gio/unix.override 2017-10-03 15:30:38.000000000 +0200 |
| 3 | @@ -24,7 +24,12 @@ |
| 4 | #define NO_IMPORT_PYGOBJECT |
| 5 | #include <pygobject.h> |
| 6 | #include <gio/gio.h> |
| 7 | +#include <glib.h> |
| 8 | +#if defined(__APPLE__) && GLIB_CHECK_VERSION(2,52,0) |
| 9 | +#include <gio/gosxappinfo.h> |
| 10 | +#else |
| 11 | #include <gio/gdesktopappinfo.h> |
| 12 | +#endif |
| 13 | #include <gio/gunixinputstream.h> |
| 14 | #include <gio/gunixmounts.h> |
| 15 | #include <gio/gunixoutputstream.h> |