[41518] trunk/dports/graphics/gimp2/Portfile

devans at macports.org devans at macports.org
Wed Nov 5 03:08:29 PST 2008


Revision: 41518
          http://trac.macports.org/changeset/41518
Author:   devans at macports.org
Date:     2008-11-05 03:08:28 -0800 (Wed, 05 Nov 2008)
Log Message:
-----------
 gimp2: fix to build properly when using +no_x11 or +quartz variants. See #17062. Thanks to kallisys.net:pguyot for the solution.

Modified Paths:
--------------
    trunk/dports/graphics/gimp2/Portfile

Modified: trunk/dports/graphics/gimp2/Portfile
===================================================================
--- trunk/dports/graphics/gimp2/Portfile	2008-11-05 10:55:31 UTC (rev 41517)
+++ trunk/dports/graphics/gimp2/Portfile	2008-11-05 11:08:28 UTC (rev 41518)
@@ -94,6 +94,7 @@
 configure.python    ${prefix}/bin/python2.5
 configure.args  --enable-mp \
                 --with-pdbgen \
+                --with-x \
                 --without-dbus \
                 --without-hal \
                 --without-alsa \
@@ -120,6 +121,46 @@
     configure.args-delete   --without-webkit
 }
 
+if {[variant_isset no_x11]} {
+    default_variants    +quartz
+}
+
+if {![variant_isset quartz]} {
+    default_variants    +x11
+}
+
+pre-fetch {
+    if {![variant_isset quartz] && ![variant_isset x11]} {
+        error "Either +x11 or +quartz is required"
+    }
+}
+
+pre-configure {
+    if {[file exists ${prefix}/lib/gtk-2.0/include/gdkconfig.h]} {
+        set gtk_not_quartz [catch {exec grep -q GDK_WINDOWING_QUARTZ ${prefix}/lib/gtk-2.0/include/gdkconfig.h}]
+        set gtk_not_x11 [catch {exec grep -q GDK_WINDOWING_X11 ${prefix}/lib/gtk-2.0/include/gdkconfig.h}] 
+ 	if {[variant_isset quartz] && ${gtk_not_quartz}} { 
+            error "+quartz variant selected, but gtk2+x11 is installed"
+        } elseif {[variant_isset x11] && ${gtk_not_x11}} {
+                error "+x11 variant selected, but gtk2+quartz is installed"
+        }
+    } else {
+            error "Cannot find gdkconfig.h"
+    }
+}
+
+variant quartz requires no_x11 conflicts x11 description {Enable Quartz rendering} {
+    configure.env-append   LDFLAGS="-framework Carbon"
+}
+
+variant x11 conflicts quartz description {Enable rendering in X11 (default)} {
+}
+
+variant no_x11 description {Build without X Windows support} {
+    configure.args-delete --with-x
+    configure.args-append --without-x
+}
+
 livecheck.check regex
 livecheck.url   http://www.gimp.org/downloads/
 livecheck.regex "gimp-(${branch}(?:\\.\\d+)*)${extract.suffix}"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081105/45d430ca/attachment.html>


More information about the macports-changes mailing list