38 lines
1.2 KiB
Ruby
38 lines
1.2 KiB
Ruby
class Dwdiff < Formula
|
|
desc "Diff that operates at the word level"
|
|
homepage "http://os.ghalkes.nl/dwdiff.html"
|
|
url "http://os.ghalkes.nl/dist/dwdiff-2.1.0.tar.bz2"
|
|
sha256 "45308f2f07c08c75c6ebd1eae3e3dcf7f836e5af1467cefc1b4829777c07743a"
|
|
revision 5
|
|
|
|
bottle do
|
|
sha256 "4f0019dbcb3529db407b65fc3d488a819881f762a57ffcec98954239f053312a" => :sierra
|
|
sha256 "77385ce3996afa7fede8b95fced4ca5b700e4582e72dfdf99ae8b269f2a12ecd" => :el_capitan
|
|
sha256 "e3c5677394cd6763abded0f2f54069b685f934440f6e8c1c81d8e1cd1fa5c0b1" => :yosemite
|
|
end
|
|
|
|
depends_on "gettext"
|
|
depends_on "icu4c"
|
|
|
|
def install
|
|
gettext = Formula["gettext"]
|
|
icu4c = Formula["icu4c"]
|
|
ENV.append "CFLAGS", "-I#{gettext.include} -I#{icu4c.include}"
|
|
ENV.append "LDFLAGS", "-L#{gettext.lib} -L#{icu4c.lib} -lintl"
|
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
system "make", "install"
|
|
|
|
# Remove non-English man pages
|
|
(man/"nl").rmtree
|
|
(man/"nl.UTF-8").rmtree
|
|
(share/"locale/nl").rmtree
|
|
end
|
|
|
|
test do
|
|
(testpath/"a").write "I like beers"
|
|
(testpath/"b").write "I like formulae"
|
|
diff = shell_output("#{bin}/dwdiff a b", 1)
|
|
assert_equal "I like [-beers-] {+formulae+}", diff
|
|
end
|
|
end
|