[MacPorts] #24318: assign variable value in variant
#24318: assign variable value in variant -------------------------------------------+-------------------------------- Reporter: mattiafrancescomoro@… | Owner: markd@… Type: request | Status: new Priority: Normal | Milestone: Component: guide | Version: 1.8.2 Keywords: | Port: -------------------------------------------+-------------------------------- Please add a guide wich explain how i can add in a variant box a code execution ie: {{{ variant python description {Builds port with python support} { pythonincdir=`python-config --includes | sed -e 's/-I//' | awk '{print \$1}'` configure.args-delete --disable-python` configure.args-append --enable-python \ --with-python-incdir=pythonincdir \ --with-python- libdir="${prefix}/lib" } }}} Thank you! -- Ticket URL: <http://trac.macports.org/ticket/24318> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24318: assign variable value in variant -------------------------------------------+-------------------------------- Reporter: mattiafrancescomoro@… | Owner: markd@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: guide | Version: Keywords: | Port: -------------------------------------------+-------------------------------- Changes (by jmr@…): * version: 1.8.2 => * type: request => enhancement -- Ticket URL: <http://trac.macports.org/ticket/24318#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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
#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: -------------------------------------------+-------------------------------- Comment(by ryandesign@…): Oh, I forgot the pre-configure bit. I'll try again: {{{ variant python26 description {Include Python 2.6 support} { depends_lib-append port:python26 pre-configure { 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:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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: -------------------------------------------+-------------------------------- Comment(by mattiafrancescomoro@…): Thank you -- Ticket URL: <http://trac.macports.org/ticket/24318#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24318: Document how to get the result of a program from within a Portfile ------------------------------------+-------------------------------- Reporter: mattiafrancescomoro@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: guide | Version: Resolution: | Keywords: Port: | ------------------------------------+-------------------------------- Changes (by mf2k@…): * owner: markd@… => macports-tickets@… Comment: markd has retired. See #44782. -- Ticket URL: <https://trac.macports.org/ticket/24318#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts