[75495] trunk/dports/graphics/vigra
Jeremy Huddleston
jeremyhu at macports.org
Fri Feb 4 20:06:45 PST 2011
On Feb 4, 2011, at 16:41, Michael Dickens wrote:
> If you do "otool -L /opt/local/lib/libboost_mpi_python-mt.dylib | grep Python", does it return anything?
No, you miss the point. You can't do that in the global context in the Portfile. It doesn't matter what it returns on my system, you can't do it there because it needs to work even if /opt/local/lib/libboost_mpi_python-mt.dylib isn't present (such as when you want to install it fresh, or you are generating the PortIndex, ...
> Or, are you saying that you don't want this sort of hackery in a Portfile?
Right. It doesn't work unless someone actually has that file in place.
> I can always revert to +pythonXY variants, but then the user -must- make sure to use the same XY as that used by Boost.
Yep. Some won't. You can put in a verification to check that, but it needs to be done during an appropriate build phase, not in the global context.
> I still think I'd want to do the check to figure out which version of Python is used & warn the user or something.
>
> Anyway, I'm open to suggestions from the greater MacPorts community here. - MLD
>
> On Feb 4, 2011, at 12:54 PM, Jeremy Huddleston wrote:
>> You can't do that boost_python_lib hackery.
>>
>> Failed to parse file graphics/vigra/Portfile: otool: can't open file: /opt/local/lib/libboost_mpi_python-mt.dylib
>> /opt/local/lib/libboost_python-mt.dylib (No such file or directory)
>>
>> On Jan 26, 2011, at 16:45, michaelld at macports.org wrote:
>>
>>> Revision: 75495
>>> +set python_version ""
>>> +# figure out if Boost::Python exists,
>>> +# and if so what Python version
>>> +set boost_python_lib [exec find /opt/local/lib \
>>> + -name "lib*boost*python*mt*dylib" \
>>> + -type f -maxdepth 1 | \
>>> + awk "{ print \$1 }"]
>>> +if {${boost_python_lib} != ""} {
>>> + set python_version [exec otool -L ${boost_python_lib} | \
>>> + grep Python | awk "{ print \$1 }" | \
>>> + sed -e "s at .*Versions/\\(.*\\)/Python@\\1@"]
>>> +}
>
More information about the macports-dev
mailing list