Skip to content

Commit

Permalink
Merge pull request #201244 from paperchalice/tzdb
Browse files Browse the repository at this point in the history
tzdb: 2024b (new formula)
  • Loading branch information
BrewTestBot authored Dec 16, 2024
2 parents a81a502 + 4c390b2 commit d4cde34
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Formula/t/tzdb.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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]

bottle do
sha256 arm64_sequoia: "05a58b175a4b15be423b08a4dfe786f19e2e67cb7d0319d414ab1938da5a024a"
sha256 arm64_sonoma: "a6e15f3501cde82cc7643afa516b86904f42ac6e113f6fe84a58869dd9ce377a"
sha256 arm64_ventura: "30e3b2e8f323d95b61aabe2236d553c4e998194a351451059f573bddbf5ff85b"
sha256 sonoma: "ec6139aeae59037853aff9e649cfaca5109276f4707f860ca4438edc15a84091"
sha256 ventura: "2d3686206357190fde0786187e04076b5cff11112152e37ff32cbd10548f1b89"
sha256 x86_64_linux: "c1c661ca728147560f889847f3c48728de29b7948cc4638ff1301289cdb204ad"
end

on_macos do
depends_on "gettext"
end

def localtime
etc/"localtime"
end

def install
make_args = %W[
CFLAGS=#{ENV.cflags}
USRDIR=#{prefix}
TZDEFAULT=#{localtime}
]
if OS.mac?
gettext = Formula["gettext"]
make_args[0] += " -DHAVE_GETTEXT -I#{gettext.include} -L#{gettext.lib}"
make_args << "LDLIBS=-lintl"
end

system "make", *make_args, "install"
end

def post_install
# Generate default localtime, from Makefile.
system sbin/"zic", "-l", "Factory", "-p", "-", "-t", localtime
end

test do
assert_match "UTC", shell_output("#{bin}/zdump UTC")
end
end

0 comments on commit d4cde34

Please sign in to comment.