homebrew-core/Formula/s-lang.rb
Jack Nagel 2190e94107 s-lang: don't use X11 paths if X11 isn't installed
Fixes Homebrew/homebrew#14083.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-10 00:32:10 -05:00

23 lines
710 B
Ruby

require 'formula'
class SLang < Formula
homepage 'http://www.jedsoft.org/slang/'
url 'ftp://space.mit.edu/pub/davis/slang/v2.2/slang-2.2.4.tar.bz2'
sha1 '34e68a993888d0ae2ebc7bc31b40bc894813a7e2'
depends_on :libpng # For png-module.so
depends_on 'pcre' => :optional
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=#{pnglib}",
"--with-pnginc=#{pnginc}"
ENV.j1
system "make"
system "make install"
end
end