Permalink
Browse files

imlib2: make X11 dependency optional.

References #15325.
Closes #15390.
  • Loading branch information...
1 parent a1439e0 commit 9366fcd16f3e1b30d7913bf7d713286a4f690614 @MikeMcQuaid MikeMcQuaid committed Oct 13, 2012
Showing with 13 additions and 5 deletions.
  1. +13 −5 Library/Formula/imlib2.rb
View
18 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

0 comments on commit 9366fcd

Please sign in to comment.