aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDocumentRoot2013-02-02 19:58:47 +0400
committerJack Nagel2013-02-02 20:34:56 -0600
commitfd87ba96f40f04eb34cb6f6fe7055b978733aeb9 (patch)
treeaffe4359f36a84869d61cfb4a42ff254befab15a /Library
parentd09b3f0a11c4358300526c6378b5781612542c30 (diff)
downloadhomebrew-fd87ba96f40f04eb34cb6f6fe7055b978733aeb9.tar.bz2
putty: add optional dep on gtk+
Closes #17533. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/putty.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/Library/Formula/putty.rb b/Library/Formula/putty.rb
index 6b2adb8b2..3bdb9cfbb 100644
--- a/Library/Formula/putty.rb
+++ b/Library/Formula/putty.rb
@@ -5,18 +5,20 @@ class Putty < Formula
url 'http://the.earth.li/~sgtatham/putty/0.62/putty-0.62.tar.gz'
sha1 '5898438614117ee7e3704fc3f30a3c4bf2041380'
+ depends_on 'gtk+' => :optional
+
def install
- # use the unix build to make all PuTTY command line tools
cd "unix" do
- # disable GTK upon configure
- system "./configure", "--prefix=#{prefix}",
- "--disable-gtktest",
- "--with-gtk-prefix=/dev/null"
- system "make", "VER=-DRELEASE=#{version}", "all-cli"
- # install manually
+ system "./configure", "--prefix=#{prefix}", "--disable-gtktest"
+ system "make", "VER=-DRELEASE=#{version}",
+ (build.with?('gtk+') ? "all" : "all-cli")
+
+ bin.install %w{ putty puttytel pterm } if build.with? 'gtk+'
bin.install %w{ plink pscp psftp puttygen }
end
+
cd "doc" do
+ man1.install %w{ putty.1 puttytel.1 pterm.1 } if build.with? 'gtk+'
man1.install %w{ plink.1 pscp.1 psftp.1 puttygen.1 }
end
end