[76478] trunk/dports/devel/redo/Portfile
David Baumgold
singingwolfboy at macports.org
Fri Feb 25 06:43:10 PST 2011
On Fri, Feb 25, 2011 at 12:03 AM, Ryan Schmidt <ryandesign at macports.org>wrote:
> On Feb 24, 2011, at 15:58, singingwolfboy at macports.org wrote:
>
> > Revision: 76478
> > http://trac.macports.org/changeset/76478
> > Author: singingwolfboy at macports.org
> > Date: 2011-02-24 13:58:33 -0800 (Thu, 24 Feb 2011)
> > Log Message:
> > -----------
> > Updated redo to 0.06. Docs can no longer be pulled from git, so added
> python dependencies to doc variant.
>
>
> > depends_lib bin:python:python_select
> > variant doc description {Build and install man pages} {
> > - # The documentation requires pandoc to build...
> > - #depends_build bin:pandoc:pandoc
> > - # ... but if we don't have pandoc already installed, we can just
> grab
> > - # the pregenerated documentation.
> > - post-fetch {
> > - if {[file isfile "${prefix}/bin/pandoc"] == 0} {
> > - system "cd ${worksrcpath} && ${build.cmd}
> Documentation/git-import"
> > - }
> > + # The documentation requires some python modules to build
> > + depends_build port:py27-beautifulsoup port:py27-markdown
> > + # make sure we use macports python, since that's required to build
> docs
> > + configure {
> > + eval reinplace "s|#!/usr/|#!${prefix}/|" [glob ${worksrcpath}/*]
>
> So, for one thing, the configure phase you've added here in the doc variant
> is the same configure phase you already have in the python_select variant.
> What happens if the user selects both of these? Instead, why not make the
> doc variant depend on the python_select variant and remove the duplicate
> code from the doc variant?
>
I didn't realize you could make variants depend on other variants! I'll look
into that.
> Second, the a problem with this strategy in the first place is that you're
> declaring a dependency on the binary "python", and telling MacPorts to
> install python_select if it can't find one, and then making the scripts run
> "/opt/local/bin/python". But /usr/bin/python will satisfy the dependency;
> MacPorts would never install python_select in response to this dependency
> declaration.
>
> Third, just installing "python_select" doesn't create
> /opt/local/bin/python; the user would have to run python_select and select a
> particular python to make that work. The python selected by python_select is
> supposed to be for the user's use only; ports installed by MacPorts should
> not be trying to make use of that. Instead, ports should depend on a
> specific version of python, and use that python binary.
>
Alright, I can fix that, as well. Thanks for the tips!
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20110225/3c29a45d/attachment.html>
More information about the macports-dev
mailing list