From 759b6b1e143c611f287042aae27664a6b7f1391e Mon Sep 17 00:00:00 2001 From: PaperChalice Date: Sun, 15 Dec 2024 13:29:13 +0800 Subject: [PATCH 1/2] tz Closes #631. Signed-off-by: paperchalice <29250197+paperchalice@users.noreply.github.com> --- Formula/tzdb.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Formula/tzdb.rb diff --git a/Formula/tzdb.rb b/Formula/tzdb.rb new file mode 100644 index 00000000..0d1c86b4 --- /dev/null +++ b/Formula/tzdb.rb @@ -0,0 +1,24 @@ +class Tzdb < Formula + desc "Time Zone Database" + homepage "https://www.iana.org/time-zones" + url "https://data.iana.org/time-zones/releases/tzdb-2024b.tar.lz" + sha256 "22674a67786d3ec1b0547305904011cb2b9126166e72abbbea39425de5595233" + license all_of: ["BSD-3-Clause", :public_domain] + + depends_on "gettext" + + def install + gettext = Formula["gettext"] + make_args = %W[ + CFLAGS=-Oz\ -DHAVE_GETTEXT\ -I#{gettext.include}\ -L#{gettext.lib} + LDLIBS=-lintl + USRDIR=#{prefix} + TZDEFAULT=#{prefix}/etc/localtime + ] + system "make", *make_args, "install" + end + + test do + assert_match "UTC", shell_output("#{bin}/zdump UTC") + end +end From 50fd6369df8474c191224b687f9b92e5489f217f Mon Sep 17 00:00:00 2001 From: paperchalice <29250197+paperchalice@users.noreply.github.com> Date: Sun, 15 Dec 2024 05:57:50 +0000 Subject: [PATCH 2/2] tzdb: add 2024b bottle. --- Formula/tzdb.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Formula/tzdb.rb b/Formula/tzdb.rb index 0d1c86b4..f47010b6 100644 --- a/Formula/tzdb.rb +++ b/Formula/tzdb.rb @@ -5,6 +5,11 @@ class Tzdb < Formula sha256 "22674a67786d3ec1b0547305904011cb2b9126166e72abbbea39425de5595233" license all_of: ["BSD-3-Clause", :public_domain] + bottle do + root_url "https://github.com/paperchalice/homebrew-private/releases/download/tzdb-2024b" + sha256 ventura: "3d54a1fb4bf592008c765ffb6ad8b86e0915744de79f620588fdc4ab8c0a2073" + end + depends_on "gettext" def install