[142852] users/devans/GNOME-3/unstable/dports/gnome/gtk3

devans at macports.org devans at macports.org
Sat Dec 12 07:30:33 PST 2015


Revision: 142852
          https://trac.macports.org/changeset/142852
Author:   devans at macports.org
Date:     2015-11-24 15:17:57 -0800 (Tue, 24 Nov 2015)
Log Message:
-----------
GNOME-3/unstable: gtk3, when building +quartz blacklist compilers that don't support instancetype, when selecting cursors check that cursor type exists, fixes +quartz builds where Xcode < 4.6 (possibly some 10.7, 10.6 and earlier) (#49391).

Modified Paths:
--------------
    users/devans/GNOME-3/unstable/dports/gnome/gtk3/Portfile

Added Paths:
-----------
    users/devans/GNOME-3/unstable/dports/gnome/gtk3/files/patch-gdk_quartz_gdkcursor-quartz-10_6_compat.diff

Property Changed:
----------------
    users/devans/GNOME-3/unstable/dports/gnome/gtk3/


Property changes on: users/devans/GNOME-3/unstable/dports/gnome/gtk3
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/mld-qt-481/dports/gnome/gtk3:92720,92813,92891,92963,93522,93556,93699,93743,93771-93773,93806,93817-93818,93856
/trunk/dports/gnome/gtk3:119527-142788
/users/devans/GNOME-3/stable/dports/gnome/gtk3:141777-142789
/users/devans/GNOME-3/unstable/dports/gnome/gtk3:119539-125620,128305-134375
/users/rmstonecipher/gnome/gtk3:102363-103172
   + /branches/mld-qt-481/dports/gnome/gtk3:92720,92813,92891,92963,93522,93556,93699,93743,93771-93773,93806,93817-93818,93856
/trunk/dports/gnome/gtk3:119527-142788
/users/devans/GNOME-3/stable/dports/gnome/gtk3:141777-142851
/users/devans/GNOME-3/unstable/dports/gnome/gtk3:119539-125620,128305-134375
/users/rmstonecipher/gnome/gtk3:102363-103172

Modified: users/devans/GNOME-3/unstable/dports/gnome/gtk3/Portfile
===================================================================
--- users/devans/GNOME-3/unstable/dports/gnome/gtk3/Portfile	2015-11-24 23:02:37 UTC (rev 142851)
+++ users/devans/GNOME-3/unstable/dports/gnome/gtk3/Portfile	2015-11-24 23:17:57 UTC (rev 142852)
@@ -6,6 +6,7 @@
 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+
@@ -19,11 +20,10 @@
 
 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}
@@ -35,12 +35,9 @@
                     sha256  b995c03d52f40580a04e0d5299214fb0d1d3c423124dc85d9608c73723c7d9f0
 
 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,25 +48,23 @@
 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
 
 patchfiles          nawk.patch
 
-configure.args      --enable-static \
-                    --disable-glibtest \
-                    --enable-introspection \
-                    --disable-cloudprint \
-                    --disable-mir-backend \
-                    --disable-wayland-backend \
-                    --disable-schemas-compile \
-                    gio_can_sniff=yes
+# 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}'
@@ -84,19 +79,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
 
@@ -118,33 +130,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]} {
@@ -231,20 +237,31 @@
     require_active_variants path:lib/pkgconfig/cairo.pc:cairo x11
     require_active_variants path:lib/pkgconfig/pango.pc:pango 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
 
-    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-with-unstable
 livecheck.name      gtk+

Copied: users/devans/GNOME-3/unstable/dports/gnome/gtk3/files/patch-gdk_quartz_gdkcursor-quartz-10_6_compat.diff (from rev 142851, users/devans/GNOME-3/stable/dports/gnome/gtk3/files/patch-gdk_quartz_gdkcursor-quartz-10_6_compat.diff)
===================================================================
--- users/devans/GNOME-3/unstable/dports/gnome/gtk3/files/patch-gdk_quartz_gdkcursor-quartz-10_6_compat.diff	                        (rev 0)
+++ users/devans/GNOME-3/unstable/dports/gnome/gtk3/files/patch-gdk_quartz_gdkcursor-quartz-10_6_compat.diff	2015-11-24 23:17:57 UTC (rev 142852)
@@ -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/20151212/8d3e89cc/attachment-0001.html>


More information about the macports-changes mailing list