[72401] trunk/dports/lang/perl5/Portfile

Eric Hall opendarwin.org at darkart.com
Wed Oct 13 11:37:37 PDT 2010


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}$"'

	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.


		-eric



More information about the macports-dev mailing list