aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/wdiff.rb
blob: 040531be297c6cec79d4b44c22863acfc3162a7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'formula'

class Wdiff < Formula
  homepage 'http://www.gnu.org/software/wdiff/'
  url 'http://ftpmirror.gnu.org/wdiff/wdiff-1.2.2.tar.gz'
  mirror 'http://ftp.gnu.org/gnu/wdiff/wdiff-1.2.2.tar.gz'
  sha1 'c93b5cb593257d814212e15fc371ff6c6b952c3d'

  depends_on 'gettext' => :optional

  def install
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--enable-experimental"
    system "make install"
  end

  test do
    a = testpath/"a.txt"
    a.write "The missing package manager for OS X"

    b = testpath/"b.txt"
    b.write "The package manager for OS X"

    output = shell_output("#{bin}/wdiff #{a} #{b}", 1)
    assert_equal "The [-missing-] package manager for OS X", output
  end
end