Skip to content

Instantly share code, notes, and snippets.

@x100ex
Created September 20, 2020 15:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x100ex/8363127b0124f58077e8f4b6cdb8fc3d to your computer and use it in GitHub Desktop.
Save x100ex/8363127b0124f58077e8f4b6cdb8fc3d to your computer and use it in GitHub Desktop.
patched homebrew formula to install icu4c on macos 10.12.6
class Icu4c < Formula
desc "C/C++ and Java libraries for Unicode and globalization"
homepage "http://site.icu-project.org/home"
url "https://github.com/unicode-org/icu/releases/download/release-67-1/icu4c-67_1-src.tgz"
version "67.1"
sha256 "94a80cd6f251a53bd2a997f6f1b5ac6653fe791dfab66e1eb0227740fb86d5dc"
license "ICU"
livecheck do
url "https://github.com/unicode-org/icu/releases/latest"
regex(%r{href=.*?/tag/release[._-]v?(\d+(?:[.-]\d+)+)["' >]}i)
end
bottle do
cellar :any
sha256 "2d1e91b5127f66e7941790c004817c94c892725c88f84f1e4c37297fcbc0c72f" => :catalina
sha256 "b6069459c78f18045ee922ce5cb5b235d4b479597d79c3c298d09e0de3d70794" => :mojave
sha256 "0720bd47f020d5ca895ae79eb61623ed3c7de0d4c4f221613105f47147aec01f" => :high_sierra
end
keg_only :provided_by_macos, "macOS provides libicucore.dylib (but nothing else)"
patch :p2 do
url "https://github.com/unicode-org/icu/commit/715d254a02b0b22681cb6f861b0921ae668fa7d6.patch?full_index=1"
sha256 "a87e1b9626ec5803b1220489c0d6cc544a5f293f1c5280e3b27871780c4ecde8"
end
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
system "#{bin}/gendict", "--uchars", "/usr/share/dict/words", "dict"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment