/
icu4c@65.rb
43 lines (38 loc) · 1.07 KB
/
icu4c@65.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
39
40
41
42
43
class Icu4cAT65 < Formula
desc "C/C++ and Java libraries for Unicode and globalization"
homepage "https://icu.unicode.org/home"
url "https://github.com/unicode-org/icu/releases/download/release-65-1/icu4c-65_1-src.tgz"
version "65.1"
sha256 "53e37466b3d6d6d01ead029e3567d873a43a5d1c668ed2278e253b683136d948"
license "ICU"
livecheck do
url :stable
regex(/^release[._-]v?(65(?:[.-]\d+)+)$/i)
strategy :git do |tags, regex|
tags.map { |tag| tag[regex, 1]&.gsub("-", ".") }.compact
end
end
keg_only :versioned_formula
def install
args = %W[
--prefix=#{prefix}
--disable-samples
--disable-tests
--enable-static
--with-library-bits=64
]
cd "source" do
system "./configure", *args
system "make"
system "make", "install"
end
end
test do
if File.exist? "/usr/share/dict/words"
system "#{bin}/gendict", "--uchars", "/usr/share/dict/words", "dict"
else
(testpath/"hello").write "hello\nworld\n"
system "#{bin}/gendict", "--uchars", "hello", "dict"
end
end
end