platform range and set arguments?
Ryan Schmidt
ryandesign at macports.org
Thu Jan 24 21:35:00 PST 2008
On Jan 24, 2008, at 15:52, Eric Hall wrote:
> On Sat, Jan 19, 2008 at 04:17:53PM -0800, Jordan K. Hubbard wrote:
>
>> I was just looking at the ghc port a few days ago, mostly in an
>> attempt to figure out why it a-splode! on my 10.5 PPC system, and I
>> noticed a lot of this:
>>
>> platform darwin 7 powerpc { ... }
>> platform darwin 8 powerpc { ... }
>> platform darwin 8 i386 { ... }
>>
>> And so on. It occurred to me that if "platform darwin 9
>> powerpc" (that's me) was going to duplicate a lot of the existing
>> rules, maybe it would make more sense to introduce ranges and sets to
>> the existing logic (I checked, and there's currently no support
>> for it
>> that a cursory glance indicated, anyway).
>>
>> Then we could do stuff like this:
>>
>> platform darwin [7-8] powerpc { ... }
>>
>> platform darwin 9 {powerpc, i386} { .. }
>>
>> And have far more concise portfiles. We might also have a
>> platform_isset procedure so that you could do:
>>
>> platform darwin [7-9] {
>> if {[platform_isset darwin 8]} { .. do some special tiger-only
>> magic .. }
>> ... more darwin generic foo here ...
>> }
>>
>> Thoughts? If folks like the idea and nobody immediately jumps to do
>> it, I might give the appropriate hacks a whack (eee! managers
>> coding!).
>>
>
> That makes good sense to me, especially after looking at the
> ghc Portfile.
The gsl port seems to think this functionality already exists:
platform darwin 6 7 {
configure.cflags-append "-O1"
}
I wonder whether this section actually gets used on Panther or Jaguar...
More information about the macports-dev
mailing list