From 4fbc2c43a619128794c890ec0e2cc5c96f37c698 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Sun, 10 Nov 2024 18:37:34 -0500 Subject: [PATCH 1/2] percona-toolkit: use macOS DBI, remove unneeded files --- Formula/p/percona-toolkit.rb | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/Formula/p/percona-toolkit.rb b/Formula/p/percona-toolkit.rb index ed4bd1eff0aef..cb94797f18cf1 100644 --- a/Formula/p/percona-toolkit.rb +++ b/Formula/p/percona-toolkit.rb @@ -33,18 +33,22 @@ class PerconaToolkit < Formula end resource "DBI" do - url "https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.643.tar.gz" - sha256 "8a2b993db560a2c373c174ee976a51027dd780ec766ae17620c20393d2e836fa" + on_linux do + url "https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/DBI-1.645.tgz" + sha256 "e38b7a5efee129decda12383cf894963da971ffac303f54cc1b93e40e3cf9921" + end end resource "DBD::mysql" do - url "https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-5.008.tar.gz" - sha256 "a2324566883b6538823c263ec8d7849b326414482a108e7650edc0bed55bcd89" + url "https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-5.009.tar.gz" + sha256 "8552d90dfddee9ef36e7a696da126ee1b42a1a00fbf2c6f3ce43ca2c63a5b952" end resource "JSON" do - url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.10.tar.gz" - sha256 "df8b5143d9a7de99c47b55f1a170bd1f69f711935c186a6dc0ab56dd05758e35" + on_linux do + url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-4.10.tar.gz" + sha256 "df8b5143d9a7de99c47b55f1a170bd1f69f711935c186a6dc0ab56dd05758e35" + end end def install @@ -60,10 +64,24 @@ def install libexec end + # Skip installing man pages for libexec perl modules to reduce disk usage + system "perl", "Makefile.PL", "INSTALL_BASE=#{install_base}", + "INSTALLMAN1DIR=none", "INSTALLMAN3DIR=none", + "NO_PERLLOCAL=1", "NO_PACKLIST=1" + make_args = [] - make_args << "OTHERLDFLAGS=-Wl,-dead_strip_dylibs" if r.name == "DBD::mysql" && OS.mac? + if OS.mac? && r.name == "DBD::mysql" + # Reduce overlinking on macOS + make_args << "OTHERLDFLAGS=-Wl,-dead_strip_dylibs" + # Work around macOS DBI generating broken Makefile + inreplace "Makefile" do |s| + old_dbi_instarch_dir = s.get_make_var("DBI_INSTARCH_DIR") + new_dbi_instarch_dir = "#{MacOS.sdk_path_if_needed}#{old_dbi_instarch_dir}" + s.change_make_var! "DBI_INSTARCH_DIR", new_dbi_instarch_dir + s.gsub! " #{old_dbi_instarch_dir}/Driver_xst.h", " #{new_dbi_instarch_dir}/Driver_xst.h" + end + end - system "perl", "Makefile.PL", "INSTALL_BASE=#{install_base}", "NO_PERLLOCAL=1", "NO_PACKLIST=1" system "make", "install", *make_args end end From e347b7e1d3c4e2ec5a11d359536f34dad7c2cea0 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 11 Nov 2024 00:26:32 +0000 Subject: [PATCH 2/2] percona-toolkit: update 3.6.0_2 bottle. --- Formula/p/percona-toolkit.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Formula/p/percona-toolkit.rb b/Formula/p/percona-toolkit.rb index cb94797f18cf1..e3d68248f1a52 100644 --- a/Formula/p/percona-toolkit.rb +++ b/Formula/p/percona-toolkit.rb @@ -13,12 +13,13 @@ class PerconaToolkit < Formula end bottle do - sha256 cellar: :any, arm64_sequoia: "a1134b153a117ab438762c198f47170b24eb8b09aa4bc5eecfd0c5511dc6e8e4" - sha256 cellar: :any, arm64_sonoma: "5f0de6236a3b694a6d6789fd33546ccbbf7fafd3926f6c428693c67bfba1c6de" - sha256 cellar: :any, arm64_ventura: "b2946e3784bab092642da4a5031e9ca0607accd6952584d026c5b00b46e2bee6" - sha256 cellar: :any, sonoma: "6d42bf7568d502d97272e1ebbf7a3cf5c7b996b46d028310acdcf38ad0cb601a" - sha256 cellar: :any, ventura: "7f01e906b9474648465bb533e93ed918b27f295e6ad00b056e0ce03b1687c829" - sha256 cellar: :any_skip_relocation, x86_64_linux: "7ebe3d5dc418029eb174269d47e4b2d7f74bff8581f11653b5de8b48a6514a00" + rebuild 1 + sha256 cellar: :any, arm64_sequoia: "3980109fd839e015ba0374ce6ab91d38b1e3dbf19adbd0dbd9419ff22c6d7c6b" + sha256 cellar: :any, arm64_sonoma: "132b777b091235c5cfb076fcb1e598779b9c85b5474ab4bd835a41505bf90913" + sha256 cellar: :any, arm64_ventura: "8d602577ed2a44397000a5f7c6681fedd6d877ae216397832ca56845e1605db3" + sha256 cellar: :any, sonoma: "dc1b543213e20d1c89fa03feed8db8c1d4389d9af301bd09f53ab7ec8b7465df" + sha256 cellar: :any, ventura: "e02f9d93dc0f420f69948e2ec983cf448b6e4ab65b32f111e1b7ba99d124f70c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "7b3d4c95c44bb34b52568ea62819f57a19988ba50622c5c87b82a7a236606407" end depends_on "go" => :build