/
dwdiff.rb
38 lines (32 loc) 路 1.19 KB
/
dwdiff.rb
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
30
31
32
33
34
35
36
37
38
class Dwdiff < Formula
desc "Diff that operates at the word level"
homepage "https://os.ghalkes.nl/dwdiff.html"
url "https://os.ghalkes.nl/dist/dwdiff-2.1.1.tar.bz2"
sha256 "9745860faad6cb58744c7c45d16c0c7e222896c80d0cd7208dd36126d1a98c8b"
revision 2
bottle do
sha256 "a09170f4714ce1c3f2868c0fece7977e149fdcd91bc903bbf1ce955af170a624" => :high_sierra
sha256 "6f80557137e7ba18be5adf10502b551c8de16c5345f12977fc800fb38fd44db8" => :sierra
sha256 "7a31e9ecc76b25499d046c480a1d8240aaec7c096d87a8b6f705723aba1b6345" => :el_capitan
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