[31362] trunk/dports/x11/gtk2/Portfile

rhwood at macports.org rhwood at macports.org
Wed Nov 21 03:16:39 PST 2007


Revision: 31362
          http://trac.macosforge.org/projects/macports/changeset/31362
Author:   rhwood at macports.org
Date:     2007-11-21 03:16:38 -0800 (Wed, 21 Nov 2007)

Log Message:
-----------
 * Add variants with[out]_quartz and with[out]_x11
 * Move x11-specific dependencies and configure/build settings to variant with_x11
 * Make +with_x11 +without_quartz the default variants
 * Include variants quartz and no_x11 as calls to with_quartz and without_x11 until such a time as they are no longer required

Modified Paths:
--------------
    trunk/dports/x11/gtk2/Portfile

Modified: trunk/dports/x11/gtk2/Portfile
===================================================================
--- trunk/dports/x11/gtk2/Portfile	2007-11-21 08:42:40 UTC (rev 31361)
+++ trunk/dports/x11/gtk2/Portfile	2007-11-21 11:16:38 UTC (rev 31362)
@@ -46,12 +46,10 @@
     port:pango \
     port:gettext \
     port:render \
-    port:xrender \
-    port:zlib \
-    lib:libX11.6:xorg
+    port:zlib
 
 pre-configure {
-    if {[variant_isset quartz]} {
+    if {[variant_isset with_quartz]} {
         if { ![file exists ${prefix}/include/cairo/cairo-quartz.h] } {
             return -code 1 "\nYou must first build cairo with the quartz variant enabled.  Please\nuninstall (or deactivate) the cairo port and reinstall by running:\n\n\"port install cairo +quartz\"\n"
         }
@@ -61,9 +59,6 @@
     }
 }
 
-# older CFLAGS declaration - if the default optimization still causes problems
-# we will revert to this
-#	CFLAGS="-O3 -funroll-loops -fstrict-aliasing"
 configure.ldflags-append    -lpango-1.0
 configure.cppflags-append   -no-cpp-precomp -DX_LOCALE
 configure.cflags-append     -funroll-loops -fstrict-aliasing
@@ -74,8 +69,6 @@
     --with-included-loaders \
     --mandir=${prefix}/share/man
 
-build.args	CFLAGS+="-I${x11prefix}/include"
-
 platform darwin 6 {
     patchfiles-append patch-gtk-xdgmime-xdgmimemagic.c
 }
@@ -85,10 +78,34 @@
         port:cups-headers
 }
 
-variant quartz description {Enable Quartz rendering} {
+default_variants    +with_x11   +without_quartz
+
+variant with_quartz conflicts without_quartz \
+    description { Enable Quartz rendering } {
     configure.args-append --with-gdktarget=quartz
 }
 
+variant without_quartz requires with_x11 conflicts with_quartz \
+    description { Disable Quartz rendering } {
+}
+
+variant with_x11 conflicts without_x11 \
+    description { Enable rendering in X11 } {
+    lib_depends-append  \
+        port:xrender \
+        lib:libX11.6:xorg
+    build.args  CFLAGS+="-I{x11prefix}/include"
+}
+
+variant without_x11 requires with_quartz conflicts with_x11 \
+    description { Disable rendering in X11 } {
+}
+
+# these variants are included for naming consistency with other similar ports
+# IMHO all ports should use with[out]_x or [en|dis]able_x as variant names 
+variant quartz requires with_quartz {}
+variant no_x11 requires without_x11 {}
+
 post-patch	{
     reinplace "s|xdg_data_dirs = \"/usr|xdg_data_dirs = \"${prefix}/share:/usr|g" ${worksrcpath}/gtk/xdgmime/xdgmime.c
     reinplace "s|g_strdup (\"/usr|g_strdup (\"${prefix}|g" ${worksrcpath}/gtk/gtkicontheme.c }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071121/b8b90dbb/attachment.html


More information about the macports-changes mailing list