diff options
| author | Nicolas Pinto | 2011-05-28 05:01:44 -0400 |
|---|---|---|
| committer | Adam Vandenberg | 2011-06-08 21:54:21 -0700 |
| commit | 351654e880935a2abffbffed90c9e3f0f2209514 (patch) | |
| tree | 86eb945ebd50ace8100c942a93d2a23f2fdb1044 /Library/Formula | |
| parent | c7139db24746b3589f3ec65727f198fb4ff01434 (diff) | |
| download | homebrew-351654e880935a2abffbffed90c9e3f0f2209514.tar.bz2 | |
vtk: update python
support non-Framework and non-shared versions of Python
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/vtk.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Library/Formula/vtk.rb b/Library/Formula/vtk.rb index 23a7c8724..dc20ac1a3 100644 --- a/Library/Formula/vtk.rb +++ b/Library/Formula/vtk.rb @@ -33,7 +33,18 @@ class Vtk < Formula # Install to global python site-packages args << "-DVTK_PYTHON_SETUP_ARGS:STRING='--prefix=#{python_prefix}'" # Python is actually a library. The libpythonX.Y.dylib points to this lib, too. - args << "-DPYTHON_LIBRARY='#{python_prefix}/Python'" + if File.exist? "#{python_prefix}/Python" + # Python was compiled with --framework: + args << "-DPYTHON_LIBRARY='#{python_prefix}/Python'" + else + python_version = `python-config --libs`.match('-lpython(\d+\.\d+)').captures.at(0) + python_lib = "#{python_prefix}/lib/libpython#{python_version}" + if File.exists? "#{python_lib}.a" + args << "-DPYTHON_LIBRARY='#{python_lib}.a'" + else + args << "-DPYTHON_LIBRARY='#{python_lib}.dylib'" + end + end args << "-DVTK_WRAP_PYTHON:BOOL=ON" end |
