aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-08-10 00:30:26 -0500
committerJack Nagel2012-08-10 00:32:10 -0500
commitf2cf1276c30706b78cf9a0fe6bd878bc3837afc6 (patch)
treecf9cbc7a34764736f664c99fb2da5eddc9dccd48 /Library
parent9b4723b21f343bcf2446691f0c22753643a0461e (diff)
downloadhomebrew-f2cf1276c30706b78cf9a0fe6bd878bc3837afc6.tar.bz2
s-lang: don't use X11 paths if X11 isn't installed
Fixes #14083. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/s-lang.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Formula/s-lang.rb b/Library/Formula/s-lang.rb
index 73e8c688f..81cbe3c98 100644
--- a/Library/Formula/s-lang.rb
+++ b/Library/Formula/s-lang.rb
@@ -10,9 +10,12 @@ class SLang < Formula
depends_on 'oniguruma' => :optional
def install
+ pnglib = MacOS::X11.installed? ? MacOS::X11.lib : HOMEBREW_PREFIX/'lib'
+ pnginc = MacOS::X11.installed? ? MacOS::X11.include : HOMEBREW_PREFIX/'include'
+
system "./configure", "--prefix=#{prefix}",
- "--with-pnglib=#{MacOS::X11.lib}",
- "--with-pnginc=#{MacOS::X11.include}"
+ "--with-pnglib=#{pnglib}",
+ "--with-pnginc=#{pnginc}"
ENV.j1
system "make"
system "make install"