mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-12-02 05:29:47 -05:00
wine: fix library path in wrapper when building without x11
This was caused by `MacOS::X11.lib` raising an exception because of the `MacOS::X11#prefix` method: the `@prefix` instance variable stays nil when neither `/opt/X11/lib/libpng.dylib` nor `/usr/X11/lib/libpng.dylib` exist. Closes #23640. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
1 parent
78190af27b
commit
e2bb1be791
1 file changed
+10
-1
+10
-1
@@ -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
|
||||
Reference in new issue
Block a user