[49371] trunk/dports/devel/gtk2hs/Portfile

gwright at macports.org gwright at macports.org
Wed Apr 8 08:59:35 PDT 2009


Revision: 49371
          http://trac.macports.org/changeset/49371
Author:   gwright at macports.org
Date:     2009-04-08 08:59:23 -0700 (Wed, 08 Apr 2009)
Log Message:
-----------
Activate the correct packages when the no_x11 variant is selected.
Thanks to Hamish Mackenzie.

Modified Paths:
--------------
    trunk/dports/devel/gtk2hs/Portfile

Modified: trunk/dports/devel/gtk2hs/Portfile
===================================================================
--- trunk/dports/devel/gtk2hs/Portfile	2009-04-08 12:53:06 UTC (rev 49370)
+++ trunk/dports/devel/gtk2hs/Portfile	2009-04-08 15:59:23 UTC (rev 49371)
@@ -4,6 +4,7 @@
 
 name	        gtk2hs
 version		0.10.0
+revision	1
 categories	devel graphics
 platforms	darwin
 maintainers	gwright
@@ -16,6 +17,15 @@
 homepage	http://www.haskell.org/gtk2hs
 master_sites	sourceforge
 
+# Use the same rules as GTK Portfile for setting the default variants
+if {[variant_isset no_x11]} {
+    default_variants    +quartz
+}
+
+if {![variant_isset quartz]} {
+    default_variants    +x11
+}
+
 extract.suffix	.tar.gz
 checksums	md5     08df47256cbcd5668e82b9f8beb621ab		\
 		sha1    de502c153d571b662c3a296baec659f129a8964d	\
@@ -53,16 +63,28 @@
 # ghc. (MacPorts' ghc adds ${prefix}/lib to the linker path
 # automatically.)
 
-post-destroot	{ reinplace "s|library-dirs: |library-dirs: \"${prefix}/lib\",|" \
-			${destroot}${prefix}/lib/${name}/gtk.package.conf
+post-destroot	{
+	          set pkgs {glib gio cairo svgcairo gtk gconf glade gtkglext gtksourceview2 soegtk}
+                  if {[variant_isset no_x11]} {
+			set pkgs {glib gio cairo svgcairo gtk gconf glade gtksourceview2 soegtk}
+		  }
+		  foreach pkg ${pkgs} {
+			reinplace "s|library-dirs: |library-dirs: \"${prefix}/lib\",|" \
+				${destroot}${prefix}/lib/${name}/${pkg}.package.conf
+		  }
 		}
 
 # Note that the order of package registration is important: certain
 # packages must be registered before the packages that depend on them.
 
-post-activate	{ set pkgs {glib gio cairo svgcairo gtk gconf glade gtkglext gtksourceview2 soegtk}
+post-activate	{ 
+	          set pkgs {glib gio cairo svgcairo gtk gconf glade gtkglext gtksourceview2 soegtk}
+                  if {[variant_isset no_x11]} {
+			set pkgs {glib gio cairo svgcairo gtk gconf glade gtksourceview2 soegtk}
+		  }
 		  foreach pkg ${pkgs} {
 			system "ghc-pkg update ${destroot}${prefix}/lib/${name}/${pkg}.package.conf"
 		  }
 		}
 
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090408/c03c9f79/attachment.html>


More information about the macports-changes mailing list