[72401] trunk/dports/lang/perl5/Portfile
Eric Hall
opendarwin.org at darkart.com
Wed Oct 13 12:11:21 PDT 2010
On Wed, Oct 13, 2010 at 02:58:13PM -0400, Daniel J. Luke wrote:
> On Oct 13, 2010, at 2:37 PM, Eric Hall wrote:
> >
> > On Wed, Oct 13, 2010 at 12:45:52PM -0400, Daniel J. Luke wrote:
> >> On Oct 13, 2010, at 12:27 PM, Eric Hall wrote:
> >>>
> >>> Doh! Yes, I'll add reminders for that. If anyone has
> >>> ideas on how to get the version from the perl5.* portfiles that
> >>> would (seem to) be a better way to go about it - remove us stupid
> >>> humans from the chain.
> >>
> >> You could probably glob for ${prefix}/bin/perl${partial_version}
> >>
> >> where ${partial_version} is 5.12 or 5.10 (or whatever new variant gets added).=
> >
> > It seems like reading the "port contents" output would be
> > better, is there a good way to get that w/o shelling out to something
> > like:
> >
> > env VERSION="5.12" PREFIX="/opt/local" sh -c 'port contents perl${VERSION} | egrep "${PREFIX}/bin/perl5" | sed -E "s%${PREFIX}/bin/%%" | egrep -v "perl${VERSION}$"'
>
> I don't think it's supported to run port from within port (and I don't think using internal port api for this is supported either).
That'll kill that idea then.
>
> > where setting of the PREFIX variable would use port's idea
> > of $prefix, and VERSION based on the version we're trying to make the link for.
>
> At the time you're making the link, you already know that the appropriate perl5.X port has been installed, and so I don't think it's unreasonable to glob for perl5.X.* (or just remember to bump the version in the perl5 port when you update the perl5.X port).
>
Yup, and a little sanity checking should cover it.
Thanks for the idea.
-eric
More information about the macports-dev
mailing list