Suggestions on how to deal with architecture detection for pam authentication in pure-ftpd
Ryan Schmidt
ryandesign at macports.org
Sat May 1 11:44:29 PDT 2010
On May 1, 2010, at 13:40, Scott Haneda wrote:
> On May 1, 2010, at 10:35 AM, Ryan Schmidt wrote:
>
>> You can use the ${os.version} variable and the rpm-vercomp procedure. See the xinit port for an example; it has special step it only runs on 10.6.3 and later.
>>
>> http://guide.macports.org/chunked/reference.variables.html
>
> Where can I find return values for "os.version" and "os.platform"?
The Guide gives examples, but on Mac OS X, os.version is the version of Darwin, which you can see with "uname -r". On Macs, os.platform is always "i386" or "powerpc".
> Are you aware of a port that does basic conditional testing for 10.5 and 10.6 that I can look at as an example?
>
> I am essentially looking for
> if os.version <= 10.5
> ...
> else
> ...
> end if
That can be more simply handled with os.major. See the graphviz-gui port for an example which displays an error message on Mac OS X < 10.5 (that is, Darwin < 9).
More information about the macports-dev
mailing list