From 2190e941078620fc029513b27a985ac63d351186 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 10 Aug 2012 00:30:26 -0500 Subject: [PATCH] s-lang: don't use X11 paths if X11 isn't installed Fixes Homebrew/homebrew#14083. Signed-off-by: Jack Nagel --- Formula/s-lang.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Formula/s-lang.rb b/Formula/s-lang.rb index 73e8c688fe..81cbe3c98f 100644 --- a/Formula/s-lang.rb +++ b/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"