Documentation section 4.4.2 question/variant_isset

Daniel J. Luke dluke at geeklair.net
Tue Dec 18 10:43:47 PST 2007


I don't think we should strongly recommend variant_isset usage in  
portfiles (in fact, I think we should recommend against it unless the  
alternative is extremely messy).

In the section 4.4.2 example, it seems much cleaner to do the following:

post-destroot {
	xinstall -m 755 -d ${destroot}${prefix}/etc/
	xinstall ${worksrcpath}/examples/foo.conf ${destroot}${prefix}/etc/
}
variant carbon {
	post-destroot {
		delete ${destroot}${prefix}/bin/emacs
		delete ${destroot}${prefix}/bin/emacs-${version}
	}
}
Since macports will run both post-destroot procs, the variant's code  
is then all contained within the variant.
--
Daniel J. Luke
+========================================================+
| *---------------- dluke at geeklair.net ----------------* |
| *-------------- http://www.geeklair.net -------------* |
+========================================================+
|   Opinions expressed are mine and do not necessarily   |
|          reflect the opinions of my employer.          |
+========================================================+



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.macosforge.org/pipermail/macports-dev/attachments/20071218/92d629f3/PGP.bin


More information about the macports-dev mailing list