From 8cea93ffd9a6b478c889e9bcf3cdf4d65a2fe149 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 13 Oct 2012 09:08:49 +0100 Subject: imlib2: make X11 dependency optional. References #15325. Closes #15390. --- Library/Formula/imlib2.rb | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/imlib2.rb b/Library/Formula/imlib2.rb index 2b47f78ce..3941f06c0 100644 --- a/Library/Formula/imlib2.rb +++ b/Library/Formula/imlib2.rb @@ -5,15 +5,23 @@ class Imlib2 < Formula url 'http://downloads.sourceforge.net/project/enlightenment/imlib2-src/1.4.5/imlib2-1.4.5.tar.bz2' sha1 'af86a2c38f4bc3806db57e64e74dc9814ad474a0' + option "with-x", "Build with X support" + + depends_on :freetype + depends_on :libpng => :recommended + depends_on :x11 if MacOS::X11.installed? or build.include? "with-x" depends_on 'pkg-config' => :build depends_on 'jpeg' => :recommended - depends_on :x11 def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-amd64=no", - "--with-x" + args = %W[ + --disable-dependency-tracking + --prefix=#{prefix} + --enable-amd64=no + ] + args << "--without-x" unless build.include? "with-x" + + system "./configure", *args system "make install" end -- cgit v1.2.3