57 lines
1.9 KiB
Ruby
57 lines
1.9 KiB
Ruby
class Expect < Formula
|
|
desc "Program that can automate interactive applications"
|
|
homepage "https://expect.sourceforge.io/"
|
|
url "https://downloads.sourceforge.net/project/expect/Expect/5.45.4/expect5.45.4.tar.gz"
|
|
sha256 "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
|
|
|
|
bottle do
|
|
rebuild 1
|
|
sha256 "a0c6ffe797dc0bbe512b628819acee67a7a9b00573b6433fe0672285d41a9df1" => :high_sierra
|
|
sha256 "fc9ad781caaf8d45f47a87d4303645faa2e600852c73fd5432f0be2e588e95f2" => :sierra
|
|
sha256 "4fcb163b1b1e7e209b632c43ba03106ca1c4e4d6a745260b813d28a803581e58" => :el_capitan
|
|
end
|
|
|
|
option "with-threads", "Build with multithreading support"
|
|
option "with-brewed-tk", "Use Homebrew's Tk (has Cocoa and threads support)"
|
|
|
|
deprecated_option "enable-threads" => "with-threads"
|
|
|
|
depends_on "tcl-tk" if build.with? "brewed-tk"
|
|
|
|
# Autotools are introduced here to regenerate configure script. Remove
|
|
# if the patch has been applied in newer releases.
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
|
|
def install
|
|
args = %W[
|
|
--prefix=#{prefix}
|
|
--exec-prefix=#{prefix}
|
|
--mandir=#{man}
|
|
--enable-shared
|
|
]
|
|
args << "--enable-threads" if build.with? "threads"
|
|
args << "--enable-64bit" if MacOS.prefer_64_bit?
|
|
|
|
if build.with? "brewed-tk"
|
|
args << "--with-tcl=#{Formula["tcl-tk"].opt_prefix}/lib"
|
|
else
|
|
ENV.prepend "CFLAGS", "-I#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers/tcl-private"
|
|
args << "--with-tcl=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework"
|
|
end
|
|
|
|
# Regenerate configure script. Remove after patch applied in newer
|
|
# releases.
|
|
system "autoreconf", "--force", "--install", "--verbose"
|
|
|
|
system "./configure", *args
|
|
system "make"
|
|
system "make", "install"
|
|
lib.install_symlink Dir[lib/"expect*/libexpect*"]
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/mkpasswd"
|
|
end
|
|
end
|