Can we create proc{} Portfile?

Darren Weber dweber at macports.org
Tue May 12 15:52:05 PDT 2009


Can we create a proc within a Portfile?

I'm currently using this in several places for the vtk-devel port (to set
different python version variables):

    set pyver        2.6
    set python       python${pyver}
    set pyport       [join [lrange [split ${python} .] 0 1] ""]
    set pyframe
${prefix}/Library/Frameworks/Python.framework/Versions/${pyver}


Can we create a global proc in a Portfile?  Something like this:

proc setPython { major minor } {
    global pyver python pyport pyframe
    set pyver        ${major}.${minor}
    set python       python${pyver}
    set pyport       python${major}${minor}
    set pyframe
${prefix}/Library/Frameworks/Python.framework/Versions/${pyver}
}


Regards,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090512/7373daa0/attachment.html>


More information about the macports-dev mailing list