s-lang: don't use X11 paths if X11 isn't installed

Fixes Homebrew/homebrew#14083.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-08-10 00:30:26 -05:00
parent a1946672ad
commit 2190e94107

View file

@ -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"