[PATCH] system_x11 variant

Jeremy Huddleston jeremyhu at macports.org
Sat Jan 3 10:28:48 PST 2009


Last week, I mentioned the idea of a system_x11 variant which would  
allow users to continue using their ${x11prefix} X11SDK.  Below is a  
patch that I'd like to get reviewed.  I've tested it, and it works  
here on Leopard.  I suspect xorg-libXcomposite (and others that aren't  
installed on Tiger) probably need some additional pkgconfig-foo to  
find X11 (see the bottom of xinit/Portfile if you're curious what I  
mean).

This is essentially step 1 towards transitioning all ports to using  
dependencies like "port:xorg-libXext port:xorg-libXaw" instead of  
"lib:libX11:XFree86" or "lib:libXext.6:xorg-libXext lib:libXaw:xorg- 
libXaw"

This has the benefit of allowing us to develop against an identical  
X11 setup on all platforms while allowing expert users to set a  
variant if they really don't want to use our X11 libraries.   
Additionally, with this variant set, we are better off that our  
current situation because we won't install an X11 library into $ 
{prefix} after a macports binary was already linking against the one  
in ${x11prefix} (this is the main problem behind http://trac.macports.org/ticket/17558 
  ).

Step 2 will be converting the existing lib:...:xorg-libXXXX  
dependencies to port:xorg-libXXXX dependencies and lib:libX11:XFree86  
deps to port:xorg-libs (simple sedage).  This will require a revision  
bump on the affected Portfiles and should be done simultaneously!

Step 3 will be changing the port:xorg-libs dependencies to pull in  
only the ports needed rather than all the X11 libs.


Index: xorg-libXext/Portfile
===================================================================
--- xorg-libXext/Portfile	(revision 44790)
+++ xorg-libXext/Portfile	(working copy)
@@ -29,3 +29,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXext-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXext.dylib] && ! [string equal  
${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libs/Portfile
===================================================================
--- xorg-libs/Portfile	(revision 44790)
+++ xorg-libs/Portfile	(working copy)
@@ -65,3 +65,18 @@

  use_configure no
  universal_variant no
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libs.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXevie/Portfile
===================================================================
--- xorg-libXevie/Portfile	(revision 44790)
+++ xorg-libXevie/Portfile	(working copy)
@@ -28,3 +28,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXevie-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXevie.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: mesa/Portfile
===================================================================
--- mesa/Portfile	(revision 44790)
+++ mesa/Portfile	(working copy)
@@ -50,3 +50,18 @@
  	}
  	build.args-append RC_ARCHS="${universal_archs}"
  }
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libGLU.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libpthread-stubs/Portfile
===================================================================
--- xorg-libpthread-stubs/Portfile	(revision 44790)
+++ xorg-libpthread-stubs/Portfile	(working copy)
@@ -21,3 +21,18 @@
  livecheck.check regex
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libpthread-stubs-(\\d+(?:\\.\\d+)*)
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libpthread-stubs.dylib] && !  
[string equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libxcb/Portfile
===================================================================
--- xorg-libxcb/Portfile	(revision 44790)
+++ xorg-libxcb/Portfile	(working copy)
@@ -37,3 +37,18 @@
  livecheck.check regex
  livecheck.url   ${master_sites}?C=M&O=D
  livecheck.regex libxcb-(\\d+(?:\\.\\d+)*)
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libxcb.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXdamage/Portfile
===================================================================
--- xorg-libXdamage/Portfile	(revision 44790)
+++ xorg-libXdamage/Portfile	(working copy)
@@ -30,3 +30,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXdamage-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXdamage.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: Xft2/Portfile
===================================================================
--- Xft2/Portfile	(revision 44790)
+++ Xft2/Portfile	(working copy)
@@ -47,3 +47,18 @@
  livecheck.check     regex
  livecheck.url       ${master_sites}?C=M&O=D
  livecheck.regex     libXft-(\[0-9.\]+)\\.tar\\.bz2
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXft.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXxf86vm/Portfile
===================================================================
--- xorg-libXxf86vm/Portfile	(revision 44790)
+++ xorg-libXxf86vm/Portfile	(working copy)
@@ -30,3 +30,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXxf86vm-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXxf86vm.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libice/Portfile
===================================================================
--- xorg-libice/Portfile	(revision 44790)
+++ xorg-libice/Portfile	(working copy)
@@ -28,3 +28,18 @@
  livecheck.check regex
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libICE-(\\d+(?:\\.\\d+)*)
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libICE.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libdmx/Portfile
===================================================================
--- xorg-libdmx/Portfile	(revision 44790)
+++ xorg-libdmx/Portfile	(working copy)
@@ -32,3 +32,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libdmx-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libdmx.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXcomposite/Portfile
===================================================================
--- xorg-libXcomposite/Portfile	(revision 44790)
+++ xorg-libXcomposite/Portfile	(working copy)
@@ -31,3 +31,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXcomposite-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXcomposite.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libAppleWM/Portfile
===================================================================
--- xorg-libAppleWM/Portfile	(revision 44790)
+++ xorg-libAppleWM/Portfile	(working copy)
@@ -40,3 +40,18 @@
  livecheck.check regex
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libAppleWM-(\\d+(?:\\.\\d+)*)
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libAppleWM.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXfixes/Portfile
===================================================================
--- xorg-libXfixes/Portfile	(revision 44790)
+++ xorg-libXfixes/Portfile	(working copy)
@@ -30,3 +30,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXfixes-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXfixes.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXvMC/Portfile
===================================================================
--- xorg-libXvMC/Portfile	(revision 44790)
+++ xorg-libXvMC/Portfile	(working copy)
@@ -29,3 +29,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXvMC-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXvMC.dylib] && ! [string equal  
${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXdmcp/Portfile
===================================================================
--- xorg-libXdmcp/Portfile	(revision 44790)
+++ xorg-libXdmcp/Portfile	(working copy)
@@ -24,3 +24,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXdmcp-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXdmcp.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXxf86dga/Portfile
===================================================================
--- xorg-libXxf86dga/Portfile	(revision 44790)
+++ xorg-libXxf86dga/Portfile	(working copy)
@@ -30,3 +30,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXxf86dga-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXxf86dga.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXres/Portfile
===================================================================
--- xorg-libXres/Portfile	(revision 44790)
+++ xorg-libXres/Portfile	(working copy)
@@ -28,3 +28,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXres-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXres.dylib] && ! [string equal  
${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXfontcache/Portfile
===================================================================
--- xorg-libXfontcache/Portfile	(revision 44790)
+++ xorg-libXfontcache/Portfile	(working copy)
@@ -32,3 +32,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXfontcache-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXfontcache.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libfontenc/Portfile
===================================================================
--- xorg-libfontenc/Portfile	(revision 44790)
+++ xorg-libfontenc/Portfile	(working copy)
@@ -27,3 +27,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libfontenc-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libfontenc.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXScrnSaver/Portfile
===================================================================
--- xorg-libXScrnSaver/Portfile	(revision 44790)
+++ xorg-libXScrnSaver/Portfile	(working copy)
@@ -29,3 +29,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXScrnSaver-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXss.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXrandr/Portfile
===================================================================
--- xorg-libXrandr/Portfile	(revision 44790)
+++ xorg-libXrandr/Portfile	(working copy)
@@ -33,3 +33,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXrandr-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXrandr.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libxkbui/Portfile
===================================================================
--- xorg-libxkbui/Portfile	(revision 44790)
+++ xorg-libxkbui/Portfile	(working copy)
@@ -30,3 +30,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libxkbui-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libxkbui.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXtst/Portfile
===================================================================
--- xorg-libXtst/Portfile	(revision 44790)
+++ xorg-libXtst/Portfile	(working copy)
@@ -31,3 +31,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXtst-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXtst.dylib] && ! [string equal  
${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xpm/Portfile
===================================================================
--- xpm/Portfile	(revision 44790)
+++ xpm/Portfile	(working copy)
@@ -27,3 +27,18 @@
  livecheck.check regex
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXpm-(\\d+(?:\\.\\d+)*)
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXpm.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXcursor/Portfile
===================================================================
--- xorg-libXcursor/Portfile	(revision 44790)
+++ xorg-libXcursor/Portfile	(working copy)
@@ -32,3 +32,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXcursor-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXcursor.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libsm/Portfile
===================================================================
--- xorg-libsm/Portfile	(revision 44790)
+++ xorg-libsm/Portfile	(working copy)
@@ -35,3 +35,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libSM-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libSM.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libxkbfile/Portfile
===================================================================
--- xorg-libxkbfile/Portfile	(revision 44790)
+++ xorg-libxkbfile/Portfile	(working copy)
@@ -30,3 +30,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libxkbfile-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libxkbfile.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXfont/Portfile
===================================================================
--- xorg-libXfont/Portfile	(revision 44790)
+++ xorg-libXfont/Portfile	(working copy)
@@ -40,3 +40,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXfont-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXfont.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libFS/Portfile
===================================================================
--- xorg-libFS/Portfile	(revision 44790)
+++ xorg-libFS/Portfile	(working copy)
@@ -27,3 +27,18 @@
  livecheck.check regex
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libFS-(\\d+(?:\\.\\d+)*)
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libFS.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXmu/Portfile
===================================================================
--- xorg-libXmu/Portfile	(revision 44790)
+++ xorg-libXmu/Portfile	(working copy)
@@ -32,3 +32,18 @@
  livecheck.regex libXmu-(\\d+(?:\\.\\d+)*)


+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXmu.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libX11/Portfile
===================================================================
--- xorg-libX11/Portfile	(revision 44790)
+++ xorg-libX11/Portfile	(working copy)
@@ -41,3 +41,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libX11-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libX11.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xrender/Portfile
===================================================================
--- xrender/Portfile	(revision 44790)
+++ xrender/Portfile	(working copy)
@@ -69,3 +69,18 @@
  livecheck.check regex
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXrender.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXTrap/Portfile
===================================================================
--- xorg-libXTrap/Portfile	(revision 44790)
+++ xorg-libXTrap/Portfile	(working copy)
@@ -23,3 +23,18 @@

  depends_lib         lib:libXext.6:xorg-libXext lib:libXt.6:xorg-libXt

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXTrap.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-liboldX/Portfile
===================================================================
--- xorg-liboldX/Portfile	(revision 44790)
+++ xorg-liboldX/Portfile	(working copy)
@@ -27,3 +27,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex liboldX-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/liboldX.dylib] && ! [string equal  
${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXi/Portfile
===================================================================
--- xorg-libXi/Portfile	(revision 44790)
+++ xorg-libXi/Portfile	(working copy)
@@ -29,3 +29,18 @@
  livecheck.check regex
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXi-(\\d+(?:\\.\\d+)*)
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXi.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-liblbxutil/Portfile
===================================================================
--- xorg-liblbxutil/Portfile	(revision 44790)
+++ xorg-liblbxutil/Portfile	(working copy)
@@ -31,3 +31,18 @@
  livecheck.check regex
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex liblbxutil-(\\d+(?:\\.\\d+)*)
+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/liblbxutil.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXp/Portfile
===================================================================
--- xorg-libXp/Portfile	(revision 44790)
+++ xorg-libXp/Portfile	(working copy)
@@ -30,3 +30,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXp-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXp.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXt/Portfile
===================================================================
--- xorg-libXt/Portfile	(revision 44790)
+++ xorg-libXt/Portfile	(working copy)
@@ -33,3 +33,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXt-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXt.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXv/Portfile
===================================================================
--- xorg-libXv/Portfile	(revision 44790)
+++ xorg-libXv/Portfile	(working copy)
@@ -29,3 +29,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXv-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXv.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXau/Portfile
===================================================================
--- xorg-libXau/Portfile	(revision 44790)
+++ xorg-libXau/Portfile	(working copy)
@@ -26,3 +26,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXau-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXau.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXxf86misc/Portfile
===================================================================
--- xorg-libXxf86misc/Portfile	(revision 44790)
+++ xorg-libXxf86misc/Portfile	(working copy)
@@ -33,3 +33,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXxf86misc-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXxf86misc.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXaw/Portfile
===================================================================
--- xorg-libXaw/Portfile	(revision 44790)
+++ xorg-libXaw/Portfile	(working copy)
@@ -36,3 +36,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXaw-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXaw.dylib] && ! [string equal $ 
{prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}
Index: xorg-libXinerama/Portfile
===================================================================
--- xorg-libXinerama/Portfile	(revision 44790)
+++ xorg-libXinerama/Portfile	(working copy)
@@ -30,3 +30,18 @@
  livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
  livecheck.regex libXinerama-(\\d+(?:\\.\\d+)*)

+
+variant system_x11 description {Install a stub package to use the  
system X11 libraries rather than Macports} {
+	if { [file exists ${x11prefix}/lib/libXinerama.dylib] && ! [string  
equal ${prefix} ${x11prefix}] } {
+		fetch           { }
+		checksum        { }
+		build           { }
+		destroot        {
+			xinstall -d ${destroot}${prefix}/share/doc/${name}
+			system "echo ${long_description} > ${destroot}${prefix}/share/doc/$ 
{name}/README.txt"
+		}
+		archive		{ }
+		activate	{ }
+		use_configure no
+	}
+}



More information about the macports-dev mailing list