diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/wine.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Library/Formula/wine.rb b/Library/Formula/wine.rb index 4bc04c3e1..a213be9db 100644 --- a/Library/Formula/wine.rb +++ b/Library/Formula/wine.rb @@ -86,7 +86,7 @@ class Wine < Formula def wine_wrapper; <<-EOS.undent #!/bin/sh - DYLD_FALLBACK_LIBRARY_PATH="#{MacOS::X11.lib}:#{HOMEBREW_PREFIX}/lib:/usr/lib" "#{bin}/wine.bin" "$@" + DYLD_FALLBACK_LIBRARY_PATH="#{library_path}" "#{bin}/wine.bin" "$@" EOS end @@ -171,4 +171,13 @@ class Wine < Formula end return s end + + private + + def library_path + paths = ["#{HOMEBREW_PREFIX}/lib", '/usr/lib'] + paths.unshift(MacOS::X11.lib) unless build.without? 'x11' + + paths.join(':') + end end |
