From ebf63a6a5c3128f88497c69001560bc189fd1041 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 11 Mar 2023 17:44:57 -0500 Subject: [PATCH] libpinyin 2.8.1 Signed-off-by: Rui Chen libpinyin: add upstream bug report Signed-off-by: Rui Chen --- Formula/libpinyin.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Formula/libpinyin.rb b/Formula/libpinyin.rb index bfd55826cdf47..1ed1cd262174b 100644 --- a/Formula/libpinyin.rb +++ b/Formula/libpinyin.rb @@ -1,8 +1,8 @@ class Libpinyin < Formula desc "Library to deal with pinyin" homepage "https://github.com/libpinyin/libpinyin" - url "https://github.com/libpinyin/libpinyin/archive/2.6.2.tar.gz" - sha256 "73f428a1c76a44a9ff666ae3c71b9ce4d96d07bc5b5af8081a85ef66a0383777" + url "https://github.com/libpinyin/libpinyin/archive/2.8.1.tar.gz" + sha256 "42c4f899f71fc26bcc57bb1e2a9309c2733212bb241a0008ba3c9b5ebd951443" license "GPL-3.0-or-later" bottle do @@ -17,6 +17,9 @@ class Libpinyin < Formula depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build + # macOS `ld64` does not like the `.la` files created during the build. + # upstream issue report, https://github.com/libpinyin/libpinyin/issues/158 + depends_on "llvm" => :build if DevelopmentTools.clang_build_version >= 1400 depends_on "pkg-config" => :build depends_on "berkeley-db" depends_on "glib" @@ -29,6 +32,9 @@ class Libpinyin < Formula end def install + # Workaround for Xcode 14 ld. + ENV.append_to_cflags "-fuse-ld=lld" if DevelopmentTools.clang_build_version >= 1400 + resource("model").stage buildpath/"data" system "./autogen.sh", "--enable-libzhuyin=yes", "--prefix=#{prefix}"