Ticket #54981: Attempt-at-patching-py-gobject.patch

File Attempt-at-patching-py-gobject.patch, 2.4 KB (added by michaellass (Michael Lass), 7 years ago)
  • python/py-gobject/Portfile

    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  
    22
    33PortSystem      1.0
    44PortGroup       python 1.0
     5PortGroup       active_variants 1.1
    56
    67name            py-gobject
    78set my_name     pygobject
    89version         2.28.6
    9 revision        3
     10revision        4
    1011epoch           20110613
    1112set branch      [join [lrange [split ${version} .] 0 1] .]
    1213categories-append   gnome
    if {$subport ne $name} { 
    4142
    4243    patchfiles  patch-pygi-info.c.diff
    4344
     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
    4460    use_configure                       yes
    4561    configure.python        ${python.bin}
    4662    configure.env-append    PKG_CONFIG_PATH='${python.prefix}/lib/pkgconfig'
  • new file python/py-gobject/files/patch-quartz-newer-glib2.diff

    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>