From 6d0c16e6338e6604c6fd2d362f32b3d68703cc15 Mon Sep 17 00:00:00 2001 From: samueljohn Date: Thu, 26 Jan 2012 14:11:29 +0100 Subject: vtk: Fix for vtk with --python (collect2: ld returned 1 exit status) - Work-a-round: Add a temp symlink from Cellar/vtk to the cwd such that building the wrappers can find the libs. Then remove the symlink and let `make install` move everything into place. Closes #9796. Signed-off-by: Charlie Sharpsteen --- Library/Formula/vtk.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Library/Formula') diff --git a/Library/Formula/vtk.rb b/Library/Formula/vtk.rb index 39fa2a823..9a2105fd0 100644 --- a/Library/Formula/vtk.rb +++ b/Library/Formula/vtk.rb @@ -68,7 +68,17 @@ class Vtk < Formula args << ".." Dir.chdir 'build' do system "cmake", *args - system "make install" + # Work-a-round to avoid: + # ld: file not found: /usr/local/Cellar/vtk/5.8.0/lib/vtk-5.8/libvtkDICOMParser.5.8.dylib for architecture x86_64" + # collect2: ld returned 1 exit status + # make[2]: *** [bin/vtkpython] Error 1 + # We symlink such that the DCMAKE_INSTALL_NAME_DIR is available and points to the current build/bin + mkpath "#{lib}" # create empty directories, because we need it here + system "ln -s " + ENV['DYLD_LIBRARY_PATH'] + " '#{lib}/vtk-5.8'" + system "make" + system "rm '#{lib}/vtk-5.8'" # Remove our symlink, was only needed to make make succeed. + # end work-a-round + system "make install" # Finally move libs in their places. end end end -- cgit v1.2.3