platform range and set arguments?

Eric Hall opendarwin.org at darkart.com
Thu Jan 24 13:52:21 PST 2008


On Sat, Jan 19, 2008 at 04:17:53PM -0800, Jordan K. Hubbard wrote:
> 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!).
> 

	That makes good sense to me, especially after looking at the
ghc Portfile.


		-eric




More information about the macports-dev mailing list