On 2016-5-30 04:19 , Chris Gorman wrote:
Hello,

I was wondering how to inspect variables in a port file.  Specifically, I want 
to apply a patch conditionally if perl is version 5.10.0.

I'm trying something like

if { ${configure.perl} eq "/usr/bin/perl" && [vercmp ${perl5.version} 5.10.0] < 
0 } {
    patchfiles-append patch-man_Makefile.in.diff
}

in the Portfile. This doesn't work and I would like to inspect configure.perl 
and perl5.version to see what they are.  Is there any way to do this?  I'm 
looking for a solution like using printf in c, or echo in a shell script.

The Tcl command you're looking for is 'puts', e.g.

puts "configure.perl = ${configure.perl}"

- Josh
_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to