[MacPorts] #24318: Document how to get the result of a program from within a Portfile (was: assign variable value in variant)
MacPorts
noreply at macports.org
Fri Jul 9 22:55:58 PDT 2010
#24318: Document how to get the result of a program from within a Portfile
-------------------------------------------+--------------------------------
Reporter: mattiafrancescomoro@… | Owner: markd@…
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: guide | Version:
Keywords: | Port:
-------------------------------------------+--------------------------------
Changes (by ryandesign@…):
* cc: ryandesign@… (added)
Comment:
You're looking for the `exec` procedure. Also, you have to wait to call it
until pre-configure time; any time before that, python is not guaranteed
to have been installed yet.
Also, you must revise this to call a specific python-config that was
provided by a specific MacPorts python port (e.g. python26, python25,
etc.), and declare a dependency on it. It's not ok to just call "python-
config" and have it be "whatever" version of python the user has. So, the
following would be acceptable:
{{{
variant python26 description {Include Python 2.6 support} {
depends_lib-append port:python26
configure.args-delete --disable-python
configure.args-append --enable-python \
--with-python-incdir=[exec
${prefix}/bin/python2.6-config --includes | sed -e 's/-I//' | awk '{print
\$1}'] \
--with-python-libdir=${prefix}/lib
}
}}}
--
Ticket URL: <http://trac.macports.org/ticket/24318#comment:2>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list