From 79da8205280a37b7bab6079c3d51e808f4d662a9 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Thu, 16 Oct 2014 21:39:58 +0100 Subject: [PATCH] links: additional dependencies So, yeah, Links has been using the system OpenSSL for secure connections. Additional optional dependencies based on what the configure script recommends, and a mirror, and a test, and style changes. Closes Homebrew/homebrew#33233. Signed-off-by: Jack Nagel --- Formula/links.rb | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/Formula/links.rb b/Formula/links.rb index f2522162a7..d5788b9c54 100644 --- a/Formula/links.rb +++ b/Formula/links.rb @@ -1,11 +1,17 @@ -require 'formula' +require "formula" class Links < Formula - homepage 'http://links.twibright.com/' - url 'http://links.twibright.com/download/links-2.8.tar.gz' - sha1 'a92cf0c203fc765ef46974f15b2f738f2aec6b00' + homepage "http://links.twibright.com/" + url "http://links.twibright.com/download/links-2.8.tar.bz2" + mirror "https://mirrors.kernel.org/debian/pool/main/l/links2/links2_2.8.orig.tar.bz2" + sha1 "a808d80d910b7d3ad86f4c5089e64f35113b69f2" + revision 1 + depends_on "pkg-config" => :build + depends_on "openssl" depends_on :x11 => :optional + depends_on "libtiff" => :optional + depends_on "jpeg" => :optional def install args = %W[ @@ -13,11 +19,18 @@ class Links < Formula --disable-dependency-tracking --prefix=#{prefix} --mandir=#{man} + --with-ssl=#{Formula["openssl"].opt_prefix} ] - args << "--enable-graphics" if build.with? 'x11' + args << "--enable-graphics" if build.with? "x11" + args << "--without-libtiff" if build.without? "libtiff" + args << "--without-libjpeg" if build.without? "jpeg" system "./configure", *args - system "make install" + system "make", "install" + end + + test do + system "#{bin}/links", "https://duckduckgo.com" end end