Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
giflib: disable default X11 sniffing
Browse files Browse the repository at this point in the history
Giflib automatically sniffs for X11 on the system during compile, and can throw
linking errors if it detects its availability but can't link to it.

Closes #42050.

Closes #42921.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
  • Loading branch information
DomT4 committed Aug 14, 2015
1 parent bea049a commit 3abb1de
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions Library/Formula/giflib.rb
@@ -1,8 +1,6 @@
class Giflib < Formula
desc "GIF library using patented LZW algorithm"
homepage "http://giflib.sourceforge.net/"
# 4.2.0 has breaking API changes; don't update until
# things in $(brew uses giflib) are compatible
url "https://downloads.sourceforge.net/project/giflib/giflib-4.x/giflib-4.2.3.tar.bz2"
sha256 "0ac8d56726f77c8bc9648c93bbb4d6185d32b15ba7bdb702415990f96f3cb766"

Expand All @@ -15,9 +13,27 @@ class Giflib < Formula

option :universal

depends_on :x11 => :optional

def install
ENV.universal_binary if build.universal?
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"

args = %W[
--prefix=#{prefix}
--disable-dependency-tracking
]

if build.without? "x11"
args << "--disable-x11" << "--without-x"
else
args << "--with-x" << "--enable-x11"
end

system "./configure", *args
system "make", "install"
end

test do
assert_match /Size: 1x1/, shell_output("#{bin}/gifinfo #{test_fixtures("test.gif")}")
end
end

0 comments on commit 3abb1de

Please sign in to comment.