path depends with wildcard?

Michael Dickens michaelld at
Tue Jan 20 09:25:32 PST 2015

I've been working on getting a "swig-devel" port up and running, and it
works locally for me. But in order to use it (e.g.,
"swig-python-devel"), I need to specify dependencies using a wildcard
because we don't know the SWIG version. For example, something like:
depends-build-append path:share/swig/*/python:swig-python
where the "*" is actually the SWIG version string (e.g., "3.0.4"). I
could just have SWIG install into "${prefix}/share/swig/" without a
version, but that would take work on my end. I tried using "*" and doing
a "glob" but that didn't work. I can hack around it using:
    set swig_python_dir [glob ${prefix}/share/swig/*/python]
    if {${swig_python_dir} ne ""} {
        set swig_python_depends [strsed ${swig_python_dir}
        depends_build-append path:${swig_python_depends}:swig-python
    } else {
        depends_build-append port:swig-python
but that's ugly & cumbersome. There has got to be a better way. Any
advice on a robust yet concise way to do this? Thanks! - MLD

More information about the macports-dev mailing list