platform range and set arguments?

Jordan K. Hubbard jkh at apple.com
Sat Jan 19 16:17:53 PST 2008


Hey all,

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!).

- Jordan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-dev/attachments/20080119/cdbe28fd/attachment.html


More information about the macports-dev mailing list