Skip to content

Commit

Permalink
tcl-tk: fix for Homebrew#12114 and Homebrew#12808. Reenabled the `--w…
Browse files Browse the repository at this point in the history
…ith-x11` option. Without --with-x11 `brew test python` and `brew test python3` fail, and some formulae (eg pymol) break
  • Loading branch information
telamonian committed Jul 22, 2017
1 parent f2961de commit 85e8395
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Formula/tcl-tk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ class TclTk < Formula
option "with-threads", "Build with multithreading support"
option "without-tcllib", "Don't build tcllib (utility modules)"
option "without-tk", "Don't build the Tk (window toolkit)"
option "with-x11", "Build X11-based Tk instead of Aqua-based Tk"

depends_on :x11 => :optional
depends_on "pkg-config" => :build if build.with? "x11"

resource "tk" do
url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.6/tk8.6.6-src.tar.gz"
Expand Down Expand Up @@ -54,7 +58,13 @@ def install
args = ["--prefix=#{prefix}", "--mandir=#{man}", "--with-tcl=#{lib}"]
args << "--enable-threads" if build.with? "threads"
args << "--enable-64bit" if MacOS.prefer_64_bit?
args << "--enable-aqua=yes" << "--without-x"

if build.with? "x11"
args << "--with-x"
else
args << "--enable-aqua=yes"
args << "--without-x"
end

cd "unix" do
system "./configure", *args
Expand Down

0 comments on commit 85e8395

Please sign in to comment.