[Rubygems-developers] Recognizing Platforms
drbrain at segment7.net
Tue Aug 21 22:45:28 EDT 2007
On Aug 21, 2007, at 16:22, Steven Lumos wrote:
> Eric Hodel <drbrain at segment7.net> writes:
>> On Aug 19, 2007, at 16:17, Jeremy Hinegardner wrote:
>>> We need to make a change for openbsd.
>>> On Sun, Aug 19, 2007 at 03:11:06PM -0700, Eric Hodel wrote:
>>>> def match(cpu, os)
>>>> os = case os
>>>> when /cygwin/ then [ 'cygwin', nil ]
>>>> when /darwin(\d+)?/ then [ 'darwin', $1 ]
>>>> when /freebsd(\d+)/ then [ 'freebsd', $1 ]
>>>> when /^java([\d.]*)/ then [ 'java', $1 ]
>>>> when /linux/ then [ 'linux', $1 ]
>>>> when /mingw32/ then [ 'mingw32', nil ]
>>>> when /mswin32/ then [ 'mswin32', nil ]
>>>> when /openbsd(\d+)/ then [ 'openbsd', $1 ]
>>> when /openbsd(\d+\.\d+) then [ 'openbsd', $1 ]
>>>> when /solaris(\d+\.\d+)/ then [ 'solaris', $1 ]
>>>> else [ 'unknown', nil ]
>>>> [cpu, os].flatten.compact.join("-")
>>> openbsd increments versions by .1 every 6 mos when it cuts a
>> All X.Y releases are compatible with each other, correct? If I have
>> 4.0 and upgrade to 4.1, do you need to reinstall anything to keep it
>> If they're all compatible then using only the major number is the way
>> to go.
> If that's the case then maybe it should be [ 'solaris', nil ].
I think Solaris 8 has the platform solaris2.8 and so-forth. AFAIK, 8
and 9 aren't necessarily compatible the same way OpenBSD 4.0 and 4.1
aren't necessarily compatible.
> Where is the $1 in linux coming from?
Typo. Linux doesn't seem to have any version numbers that autoconf
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars
More information about the Rubygems-developers