path depends with wildcard?

Michael Dickens michaelld at
Fri Jan 23 09:49:26 PST 2015

On Tue, Jan 20, 2015, at 02:17 PM, Lawrence Velázquez wrote:
> The depspec is interpreted as a regular expression (with some caveats),
> not a glob. For instance, my HandBrake WIP portfile contains this:
>     depends_build       port:autoconf \
>                         port:automake \
>                         port:libtool \
>                        {bin:python(2(\.(4|5|6|7))?)?:python27} \
>                         port:yasm
> You'll probably have to experiment a bit to find something that works.

After -much- ado/testing/hacking around, I don't think I can use the
"path:" notation for what I need to do. Repeating from my original post,
I need something like "path:share/swig/*/python:swig-python", where "*"
is a version string. Since there's only 1 SWIG installed at any time,
there is just one entry in share/swig, so I could use something like
"[0-9\.]+" instead of "*" since the regex in "path:" does not allow "*".

BUT: The "path:" style assumes it is the -final- entry that's the regex;
it does not allow for a regex other than the final entry. Thus, for
example, LV's entry above works (even though a little awkwardly) because
the file in question is in the final entry directory. I determined this
by reading through the code ... which does the splitting in

There is likely a more generic way to do a "path:" test to allow for the
regex to be anywhere. But, I don't have time to deal with it right now.
So, I'll just wait until SWIG is updated to 3.0.5 before committing the
port (without the swig*devel ports); in the meantime, maybe someone can
think of a more robust way to do "path:" searching?

Or, am I misunderstanding what's going on with the "path:" regex stuff?

More information about the macports-dev mailing list