Opened 10 years ago

Closed 10 years ago

#45137 closed update (fixed)

pure-gen @0.16: update to 0.18

Reported by: agraef (Albert Graef) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc:
Port: pure-gen

Description

I have attached the suggested changes to the Portfile. Please note that the patch patch-pure-gen.pure.diff shouldn't be needed anymore, since the Makefile now properly detects the installed gcc on OS X and edits pure-gen.pure accordingly.

The added PUREC_FLAGS=-mcpu=generic in the build flags makes sure that the created pure-gen binary uses a generic instruction set which should work on any x86/x86_64 machine. I don't know whether this is actually needed on the Mac, but I do it this way on all the other Windows and Linux systems I build binary packages for, and in any case it shouldn't do any harm.

However, note that the -mcpu=generic needs Pure 0.62, so it shouldn't be used for platforms where this isn't available. If it causes too much trouble, simply leave out that option in the build flags.

I've tested this on my MB Pro running 10.9.5. The Portfile works fine there and the installed pure-gen can regenerate the entire pure-gl wrapper without a hitch. So it should be all right.

Attachments (1)

pure-gen-Portfile.diff (1.4 KB) - added by agraef (Albert Graef) 10 years ago.
Suggested changes to Portfile

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by agraef (Albert Graef)

Attachment: pure-gen-Portfile.diff added

Suggested changes to Portfile

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

Thanks. It'll take me awhile to build the dependencies on my second machine; ghc does not build on my primary machine (#42091).

We should keep the patch to tell pure-gen where to find gcc. In your Makefile you now do this on Darwin:

gcc = $(lastword gcc $(sort $(wildcard /opt/local/bin/gcc-mp-*)))

However, this assumes the MacPorts prefix is /opt/local (it could be elsewhere), and it assumes the user would like to use the most recent installed gcc. Instead, we want to use the specific gcc which the user has requested via the corresponding gccNN variant.

This Makefile line will also not be helpful for users of manually-installed gcc, nor those using package managers other than MacPorts (there are two other popular OS X package management systems).

comment:2 Changed 10 years ago by agraef (Albert Graef)

Ok, I see. Well, that was an attempt to make it at least work transparently with standard MacPorts installations.

But at least you won't need the patch anymore, since in pure-gen 0.18 there's already a @gcc@ substitution in the pure-gen.pure script anyway. So you just need to replace the @CC@ in the reinplace rule with @gcc@ and you should be set.

comment:3 in reply to:  2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Replying to aggraef@…:

But at least you won't need the patch anymore, since in pure-gen 0.18 there's already a @gcc@ substitution in the pure-gen.pure script anyway. So you just need to replace the @CC@ in the reinplace rule with @gcc@ and you should be set.

Good point! Committed in r125713 and r125717.

Note: See TracTickets for help on using tickets.