On Jan 23, 2010, at 00:54, Jim Busser wrote:

> Within a portfile, and among its first several lines is a variable 
> "platforms" (note plural) in which one or more "major" platforms like darwin, 
> X11 are definable. I imagine these define the most basic of potential 
> compatibilities.

Valid values for the "platforms" line are "darwin", "freebsd", "linux", 
"macosx", "netbsd", "openbsd", "puredarwin", "solaris", "sunos". "X11" is not a 
valid MacPorts platform. Note that MacPorts does absolutely nothing with the 
value specified in the "platforms" line, other than show it to you in "port 
info". But port authors are encouraged to indicate what platforms a port works 
with. Then again, MacPorts really targets Mac OS X, and specifically, I believe 
MacPorts 1.8 no longer compiles on Linux, and maybe other OSes that aren't 
based on *BSD UNIX.


> Much lower down within a portfile resides a provision for "variants" (generic 
> sense) of three kinds:

Note that the position within the portfile is irrelevant, though by convention 
you're right that variants are typically defined later in the portfile.


> - keyword "platform" (implicit variant) -- note the singular "platform", as 
> opposed to the required variable above -- makes possible automatic 
> alterations and customizations subject automatically when the host platform 
> matches a *specific* platform e.g. "darwin_10" (Snow Leopard) within the 
> "darwin" of the required variable "platforms" irrespective of user action

The port author can also just have "platform darwin {... some code for darwin 
...}". He don't need to specify an OS version, unless that's his intent. The 
purpose of "platform" blocks are to allow the port author to make changes for a 
particular operating system.

_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to