homebrew-core/Formula/libiconv.rb

63 lines
2.1 KiB
Ruby

class Libiconv < Formula
desc "Conversion library"
homepage "https://www.gnu.org/software/libiconv/"
url "https://ftp.gnu.org/gnu/libiconv/libiconv-1.16.tar.gz"
mirror "https://ftpmirror.gnu.org/libiconv/libiconv-1.16.tar.gz"
sha256 "e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04"
license "GPL-3.0"
livecheck do
url :stable
end
bottle do
cellar :any
sha256 "9253ae6551eb63499fb292b4a65d054c918b93dab8beff0bc12f3290f77bd15c" => :big_sur
sha256 "24d81638fcd7416a56c3dbdac7e2265d7b0476b17a71b631045425380122e6b1" => :catalina
sha256 "7638dd8e2d511a2ce14c6c420762ce7fdbae6a34158e25015c3ffd88de2dd19b" => :mojave
sha256 "0f7f5728be3b7fc082a62df5e38cf1f1f9dc540e95f0c3479788cc2e2dee7294" => :high_sierra
sha256 "2c40a7b0486b9394f5f4cb6304179527421b68c965c49d961cf2703205da93e1" => :sierra
end
keg_only :provided_by_macos
patch do
url "https://raw.githubusercontent.com/Homebrew/patches/9be2793af/libiconv/patch-utf8mac.diff"
sha256 "e8128732f22f63b5c656659786d2cf76f1450008f36bcf541285268c66cabeab"
end
patch :DATA
def install
ENV.deparallelize
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--enable-extra-encodings",
"--enable-static",
"--docdir=#{doc}"
system "make", "-f", "Makefile.devel", "CFLAGS=#{ENV.cflags}", "CC=#{ENV.cc}"
system "make", "install"
end
test do
system bin/"iconv", "--help"
end
end
__END__
diff --git a/lib/flags.h b/lib/flags.h
index d7cda21..4cabcac 100644
--- a/lib/flags.h
+++ b/lib/flags.h
@@ -14,6 +14,7 @@
#define ei_ascii_oflags (0)
#define ei_utf8_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO)
+#define ei_utf8mac_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO)
#define ei_ucs2_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO)
#define ei_ucs2be_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO)
#define ei_ucs2le_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO)