[151703] users/devans/dports/gnome

devans at macports.org devans at macports.org
Sat Aug 20 03:43:38 PDT 2016


Revision: 151703
          https://trac.macports.org/changeset/151703
Author:   devans at macports.org
Date:     2016-08-20 03:43:38 -0700 (Sat, 20 Aug 2016)
Log Message:
-----------
devans/dports: gtk3, replace with latest stable version.

Modified Paths:
--------------
    users/devans/dports/gnome/gtk3/Portfile

Added Paths:
-----------
    users/devans/dports/gnome/gtk3/
    users/devans/dports/gnome/gtk3/files/
    users/devans/dports/gnome/gtk3/files/0001-iconhelper-check-if-surface-was-invalidated.patch
    users/devans/dports/gnome/gtk3/files/nawk.patch
    users/devans/dports/gnome/gtk3/files/patch-gdk_quartz_gdkcursor-quartz-10_6_compat.diff

Modified: users/devans/dports/gnome/gtk3/Portfile
===================================================================
--- trunk/dports/gnome/gtk3/Portfile	2015-05-19 16:35:28 UTC (rev 136501)
+++ users/devans/dports/gnome/gtk3/Portfile	2016-08-20 10:43:38 UTC (rev 151703)
@@ -6,27 +6,24 @@
 PortGroup           muniversal 1.0
 PortGroup           xcodeversion 1.0
 PortGroup           active_variants 1.1
+PortGroup           compiler_blacklist_versions 1.0
 
 name                gtk3
 set real_name       gtk+
 epoch               1
-version             3.16.3
+version             3.20.9
 set branch          [join [lrange [split ${version} .] 0 1] .]
 categories          gnome x11
 license             LGPL-2.1+
-maintainers         cal devans openmaintainer
+maintainers         devans openmaintainer
 platforms           darwin
 
-checksums           rmd160  025e83565beca62713eb2f529eb35e3f0bfd540c \
-                    sha256  2943fd4a6b02c2a9b2edd231c1d8f7a1d2f8d36996f14310d34f503dca9ebea4
-
 description         GTK+ widget toolkit
 
-long_description    \
-    GTK+ is a highly usable, feature-rich toolkit for creating graphical user \
-    interfaces, which boasts cross-platform compatibility and an easy-to-use \
-    API. GTK+ is written in C, but has bindings to many other popular \
-    programming languages, such as C++, Python and C#, among others.
+long_description    GTK+ is a highly usable, feature-rich toolkit for creating graphical user \
+                    interfaces, which boasts cross-platform compatibility and an easy-to-use \
+                    API. GTK+ is written in C, but has bindings to many other popular \
+                    programming languages, such as C++, Python and C#, among others.
 
 homepage            http://www.gtk.org/
 distname            ${real_name}-${version}
@@ -34,13 +31,13 @@
 
 master_sites        gnome:sources/gtk+/${branch}/
 
+checksums           rmd160  18b94aee023518068f7837895b711b63fdf1eb13 \
+                    sha256  83a609ba2f3424b5509e73967c49c67833af466d6f91081b24ee5c64fce6ac17
+
 minimum_xcodeversions {9 3.1}
+
 depends_build       port:pkgconfig
 
-# cloudprint backend requires rest, json-glib
-# but this causes a circular dependency on libsoup
-# explicitly disable cloudprint for now
-
 depends_lib         port:atk \
                     path:lib/pkgconfig/pango.pc:pango \
                     port:gdk-pixbuf2 \
@@ -51,24 +48,24 @@
 depends_run         port:shared-mime-info \
                     port:hicolor-icon-theme
 
-archcheck.files \
-    lib/libatk-1.0.dylib \
-    lib/libintl.dylib \
-    lib/libjasper.dylib \
-    lib/libpango-1.0.dylib \
-    lib/libtiff.dylib
+archcheck.files     lib/libatk-1.0.dylib \
+                    lib/libintl.dylib \
+                    lib/libjasper.dylib \
+                    lib/libpango-1.0.dylib \
+                    lib/libtiff.dylib
 
-configure.args      --enable-static \
-                    --disable-glibtest \
-                    --disable-libcanberra \
-                    --enable-introspection \
-                    --disable-cloudprint \
-                    --disable-mir-backend \
-                    --disable-wayland-backend \
-                    --disable-schemas-compile \
-                    gio_can_sniff=yes
+patchfiles          nawk.patch \
+                    0001-iconhelper-check-if-surface-was-invalidated.patch
 
+# gtk3 +quartz uses instancetype which is not available
+# before approximately Xcode 4.6 (#49391)
+
+if {[variant_isset quartz]} {
+    compiler.blacklist  *gcc* {clang < 425}
+}
+
 # gobject-introspection uses g-ir-scanner, which uses $CC from env
+
 if {[variant_isset universal]} {
     foreach arch ${configure.universal_archs} {
         lappend merger_build_args(${arch})  CC='${configure.cc} -arch ${arch}'
@@ -83,19 +80,36 @@
                             CC_FOR_BUILD="${configure.cc} ${configure.cc_archflags}"
 }
 
-build.args-append   V=1 \
-                    CPP_FOR_BUILD="${configure.cpp}"
-
-configure.ccache    no
-configure.cppflags-append   -DX_LOCALE
-configure.cflags-append     -fstrict-aliasing
-
 pre-configure {
     if {![variant_isset quartz] && ![variant_isset x11]} {
         error "Either +x11 or +quartz is required"
     }
 }
 
+configure.ccache    no
+
+configure.cppflags-append \
+                    -DX_LOCALE
+
+configure.cflags-append \
+                    -fstrict-aliasing
+
+# cloudprint backend requires rest, json-glib
+# but this causes a circular dependency on libsoup
+# explicitly disable cloudprint for now
+
+configure.args      --enable-static \
+                    --disable-glibtest \
+                    --enable-introspection \
+                    --disable-cloudprint \
+                    --disable-mir-backend \
+                    --disable-wayland-backend \
+                    --disable-schemas-compile \
+                    gio_can_sniff=yes
+
+build.args-append   V=1 \
+                    CPP_FOR_BUILD="${configure.cpp}"
+
 test.run            yes
 test.target         check
 
@@ -117,33 +131,27 @@
     reinplace "s|${destroot}||" ${destroot}${prefix}/etc/gtk-3.0/gtk.immodules
 }
 
-post-activate {
-    ui_debug "Updating gdk-pixbuf.loaders..."
-    system "${prefix}/bin/gdk-pixbuf-query-loaders \
-        >${prefix}/etc/gtk-3.0/gdk-pixbuf.loaders"
-    ui_debug "Updating GLib schemas..."
-    system "${prefix}/bin/glib-compile-schemas \
-        ${prefix}/share/glib-2.0/schemas"
-}
+platform darwin {
+    if {${os.major} <= 8} {
+        # The rules enabled by gobject-introspection require GNU make 3.81+
+        depends_build-append    port:gmake
+        build.cmd               ${prefix}/bin/gmake
 
-platform darwin 8 {
-    # The rules enabled by gobject-introspection require GNU make 3.81+
-    depends_build-append    port:gmake
-    build.cmd               ${prefix}/bin/gmake
+        if {[variant_isset quartz] || ![variant_isset x11]} {
+            configure.ldflags-append  -framework Cocoa -framework Carbon
+        }
+    
+        configure.args-append --disable-cups
+    }
 
-    if {[variant_isset quartz] || ![variant_isset x11]} {
-        configure.ldflags-append  -framework Cocoa -framework Carbon
+    if {${os.major} <= 10} {
+        # OS X 10.6 and earlier do not supply all cursors specified by gtk3 +quartz (#49391)
+        if {[variant_isset quartz]} {
+            patchfiles-append   patch-gdk_quartz_gdkcursor-quartz-10_6_compat.diff
+        }
     }
 }
 
-if {${os.major} <= 8} {
-    configure.args-append --disable-cups
-}
-
-if {![variant_isset quartz]} {
-    default_variants +x11
-}
-
 if {[variant_isset universal]} {
     set cups /usr/bin/cups-config
     if {[info exists universal_sysroot]} {
@@ -222,6 +230,7 @@
 variant quartz conflicts x11 {
     require_active_variants path:lib/pkgconfig/cairo.pc:cairo quartz
     require_active_variants path:lib/pkgconfig/pango.pc:pango quartz
+    require_active_variants port:gdk-pixbuf2 "" x11
 
     configure.args-append   --enable-quartz-backend
 }
@@ -229,21 +238,34 @@
 variant x11 conflicts quartz {
     require_active_variants path:lib/pkgconfig/cairo.pc:cairo x11
     require_active_variants path:lib/pkgconfig/pango.pc:pango x11
+    require_active_variants port:gdk-pixbuf2 x11
 
-    depends_lib-append \
-        port:xorg-libXi \
-        port:xorg-libXrandr \
-        port:xorg-libXcursor \
-        port:xorg-libXinerama \
-        port:xorg-libXdamage \
-        port:xorg-libXcomposite \
-        port:xorg-libXfixes \
-        port:at-spi2-atk
+    depends_lib-append      port:xorg-libXi \
+                            port:xorg-libXrandr \
+                            port:xorg-libXcursor \
+                            port:xorg-libXinerama \
+                            port:xorg-libXdamage \
+                            port:xorg-libXcomposite \
+                            port:xorg-libXfixes \
+                            port:at-spi2-atk \
+                            port:mesa
 
-    configure.args-append      --enable-xinerama \
-                               --x-include=${prefix}/include --x-lib=${prefix}/lib \
-                               --enable-x11-backend
+    configure.args-append   --enable-xinerama \
+                            --x-include=${prefix}/include \
+                            --x-lib=${prefix}/lib \
+                            --enable-x11-backend
 }
 
+if {![variant_isset quartz]} {
+    default_variants +x11
+}
+
+post-activate {
+    ui_debug "Updating gdk-pixbuf.loaders..."
+    system "${prefix}/bin/gdk-pixbuf-query-loaders >${prefix}/etc/gtk-3.0/gdk-pixbuf.loaders"
+    ui_debug "Updating GLib schemas..."
+    system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
+}
+
 livecheck.type      gnome
 livecheck.name      gtk+

Added: users/devans/dports/gnome/gtk3/files/0001-iconhelper-check-if-surface-was-invalidated.patch
===================================================================
--- users/devans/dports/gnome/gtk3/files/0001-iconhelper-check-if-surface-was-invalidated.patch	                        (rev 0)
+++ users/devans/dports/gnome/gtk3/files/0001-iconhelper-check-if-surface-was-invalidated.patch	2016-08-20 10:43:38 UTC (rev 151703)
@@ -0,0 +1,41 @@
+From a4037730e68cfc37288badc64f4ddaf6c1fa51e8 Mon Sep 17 00:00:00 2001
+From: Christian Hergert <chergert at redhat.com>
+Date: Wed, 27 Apr 2016 16:51:25 -0700
+Subject: [PATCH] iconhelper: check if surface was invalidated
+
+Fetching the style may cause the surface to be invalidated.
+
+We don't want to fetch the style unless we already have a surface,
+so just do a second surface check after fetching the style.
+---
+ gtk/gtkiconhelper.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c
+index b8737e7..a80418d 100644
+--- gtk/gtkiconhelper.c
++++ gtk/gtkiconhelper.c
+@@ -896,10 +896,16 @@ _gtk_icon_helper_draw (GtkIconHelper *self,
+ 
+   if (self->priv->rendered_surface != NULL)
+     {
+-      gtk_css_style_render_icon_surface (gtk_css_node_get_style (gtk_css_gadget_get_node (GTK_CSS_GADGET (self))),
+-                                         cr,
+-                                         self->priv->rendered_surface,
+-                                         x, y);
++      GtkCssStyle *style;
++
++      style = gtk_css_node_get_style (gtk_css_gadget_get_node (GTK_CSS_GADGET (self)));
++
++      /* Fetching the style might cause rendered_surface to be invalidated */
++      if (self->priv->rendered_surface != NULL)
++        gtk_css_style_render_icon_surface (style,
++                                           cr,
++                                           self->priv->rendered_surface,
++                                           x, y);
+     }
+ }
+ 
+-- 
+2.3.2 (Apple Git-55)
+

Added: users/devans/dports/gnome/gtk3/files/nawk.patch
===================================================================
--- users/devans/dports/gnome/gtk3/files/nawk.patch	                        (rev 0)
+++ users/devans/dports/gnome/gtk3/files/nawk.patch	2016-08-20 10:43:38 UTC (rev 151703)
@@ -0,0 +1,11 @@
+--- configure.orig	2015-11-16 12:32:00.000000000 -0600
++++ configure	2015-11-18 00:20:49.000000000 -0600
+@@ -3432,7 +3432,7 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+ $as_echo "$MKDIR_P" >&6; }
+ 
+-for ac_prog in gawk mawk nawk awk
++for ac_prog in gawk mawk awk
+ do
+   # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2

Added: users/devans/dports/gnome/gtk3/files/patch-gdk_quartz_gdkcursor-quartz-10_6_compat.diff
===================================================================
--- users/devans/dports/gnome/gtk3/files/patch-gdk_quartz_gdkcursor-quartz-10_6_compat.diff	                        (rev 0)
+++ users/devans/dports/gnome/gtk3/files/patch-gdk_quartz_gdkcursor-quartz-10_6_compat.diff	2016-08-20 10:43:38 UTC (rev 151703)
@@ -0,0 +1,15 @@
+--- gdk/quartz/gdkcursor-quartz.c.old	2015-11-23 21:43:17.000000000 +0100
++++ gdk/quartz/gdkcursor-quartz.c	2015-11-23 21:43:52.000000000 +0100
+@@ -402,6 +402,12 @@
+         selector = NSSelectorFromString(test->selector);
+         break;
+       }
++
++  if (! [[gdkCoreCursor class] respondsToSelector:selector])
++  {
++  	  selector = @selector(arrowCursor);
++  }
++
+   nscursor = [[gdkCoreCursor class] performSelector:selector];
+ 
+   [nscursor retain];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160820/4664dd7e/attachment-0001.html>


More information about the macports-changes mailing list