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
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
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...
On 25.01.2008, at 06:35, Ryan Schmidt wrote:
platform darwin 6 7 { configure.cflags-append "-O1" }
I wonder whether this section actually gets used on Panther or Jaguar...
Me too! [1] This bit was in the Portfile when I took maintainership, I do not have any of the relevant systems, and nobody ever complained about problems... Greetings, Jochen [1] I am the gsl port maintainer;) -- Fritz-Haber-Institut der MPG -- Department of Molecular Physics Faradayweg 4-6 (C1.03) D-14195 Berlin, Germany phone: +49-30-84135686 fax: +49-30-84135892 http://www.fhi-berlin.mpg.de/mp/jochen
On Jan 24, 2008, at 9:35 PM, Ryan Schmidt wrote:
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...
Looking at the code, I don't think it can be. The current code treats the arguments as "platform-name [arch] [version]", so the above statement is only matching for darwin version 7, architecture "6". Unfortunately, fixing this is a bit more complicated than simply hacking some regex matches. The platform procedure just recasts its arguments in terms of a variant, so you'd have to walk the set notation and register multiple variants for each element. I may still find time to do this, but it's more complicated than a 10 minute change. - Jordan
participants (4)
-
Eric Hall
-
Jochen Küpper
-
Jordan K. Hubbard
-
Ryan Schmidt