From 2679cb70d66a7e6b9dff870c4473fb71260681cd Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 20 Nov 2013 10:54:04 -0600 Subject: wine: move method closer to point of use --- Library/Formula/wine.rb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'Library') diff --git a/Library/Formula/wine.rb b/Library/Formula/wine.rb index f7c69f129..375418fc3 100644 --- a/Library/Formula/wine.rb +++ b/Library/Formula/wine.rb @@ -85,6 +85,12 @@ class Wine < Formula # Including /usr/lib because wine, as of 1.3.15, tries to dlopen # libncurses.5.4.dylib, and fails to find it without the fallback path. + def library_path + path = %W[#{HOMEBREW_PREFIX}/lib /usr/lib] + paths.unshift(MacOS::X11.lib) unless build.without? 'x11' + paths.join(':') + end + def wine_wrapper; <<-EOS.undent #!/bin/sh DYLD_FALLBACK_LIBRARY_PATH="#{library_path}" "#{bin}/wine.bin" "$@" @@ -173,13 +179,4 @@ 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 -- cgit v1.2.3