aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/wdiff.rb
blob: 413a836da63582bade3c8156a5465c46c061653c (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
29
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"

    out = `#{bin}/wdiff #{a} #{b}`
    assert_equal "The [-missing-] package manager for OS X", out
    assert_equal 1, $?.exitstatus
  end
end