Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libarchive 3.7.6 #191588

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions Formula/l/lanraragi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ class Lanraragi < Formula
url "https://github.com/Difegue/LANraragi/archive/refs/tags/v.0.9.21.tar.gz"
sha256 "ed2d704d058389eb4c97d62080c64fa96fcc230be663ec8958f35764d229c463"
license "MIT"
revision 1
revision 2
head "https://github.com/Difegue/LANraragi.git", branch: "dev"

bottle do
sha256 cellar: :any, arm64_sequoia: "46e9aa410d112c875d72aa56baf02b97f46d9796c75b417972c3859774314da1"
sha256 cellar: :any, arm64_sonoma: "703fb53e9661129e560d1e98e66a225a99f1fc9dc0c1235add8e5396a1830e41"
sha256 cellar: :any, arm64_ventura: "3b465015d1bf91080ff26eedfe3781aa2d15b1307895491a35b79989e719da1c"
sha256 cellar: :any, sonoma: "03ba3bdaf084a6366412bb6b4834316e8bc76cab648241e065b855861eaebe53"
sha256 cellar: :any, ventura: "e5aef0d44c01143352cbaf61f74b55e497e7b786f222a2e9fd76db829acaa75e"
sha256 cellar: :any_skip_relocation, x86_64_linux: "f77b07b914a4282f3ec55cbf198be970d6ce81777f718b088e2bfd7fffc54792"
sha256 cellar: :any, arm64_sequoia: "32b94989e04f1bc1643bf9ac3fd53798e660f0e3988d9482782648e29a9a144d"
sha256 cellar: :any, arm64_sonoma: "007d0eb316f50682547e931268e501db9c9f70bead21f98901e3f67a7e90c271"
sha256 cellar: :any, arm64_ventura: "f1b0826609df1a9aa730ee2ba788432855112786b0b897d002c85d9b1a3991e6"
sha256 cellar: :any, sonoma: "e3e9780e0a10edd57708c134759e6760ad42868ec0bca0f2e563bf2b1986a55c"
sha256 cellar: :any, ventura: "162dd99fdbae029248a39482b69c83afede408fa7d5058557c1cd03b1012fd02"
sha256 cellar: :any_skip_relocation, x86_64_linux: "6dbae601b895428500313e9c4851fafb8e5edd3c94278b2b7d37639a141bb5a6"
end

depends_on "nettle" => :build
Expand Down Expand Up @@ -72,6 +72,14 @@ def install
bin.install "lanraragi"
libexec.install "redis.conf"
end

return if OS.linux? || Hardware::CPU.intel?

# FIXME: This installs its own `libarchive`, but we should use our own to begin with.
# As a workaround, install symlinks to our `libarchive` instead of the downloaded ones.
libarchive_install_dir = libexec/"lib/perl5/darwin-thread-multi-2level/auto/share/dist/Alien-Libarchive3/dynamic"
libarchive_install_dir.children.map(&:unlink)
ln_sf Formula["libarchive"].opt_lib.children, libarchive_install_dir
end

test do
Expand Down
29 changes: 16 additions & 13 deletions Formula/lib/libarchive.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Libarchive < Formula
desc "Multi-format archive and compression library"
homepage "https://www.libarchive.org"
url "https://www.libarchive.org/downloads/libarchive-3.7.5.tar.xz"
sha256 "ca74ff8f99dd40ab8a8274424d10a12a7ec3f4428dd35aee9fdda8bdb861b570"
url "https://www.libarchive.org/downloads/libarchive-3.7.6.tar.xz"
sha256 "0a2efdcb185da2eb1e7cd8421434cb9a6119f72417a13335cca378d476fd3ba0"
license "BSD-2-Clause"

livecheck do
Expand All @@ -11,12 +11,12 @@ class Libarchive < Formula
end

bottle do
sha256 cellar: :any, arm64_sequoia: "9cb5ec8dab474f5f3c9806d2cd825973844dc94886b8d15f7599dc68c8b9afb4"
sha256 cellar: :any, arm64_sonoma: "e2d6daab00b8510a66936facd997fdedf5b2ff618b24462e9e106af1f4a11251"
sha256 cellar: :any, arm64_ventura: "222418a2a772611e7a5fe37a4fe90a949290011b43b8c1eaf1b44a5a7c29f854"
sha256 cellar: :any, sonoma: "57374766f23272fce9ed96e90d9e0e0b5a41e90950835d2b137e1cdc84b086e8"
sha256 cellar: :any, ventura: "29c490cbe4dc1622b9ef1152316682a87721f26c0559be7f3f022af6e3bef44c"
sha256 cellar: :any_skip_relocation, x86_64_linux: "6fb8fc9bc98277fdad224acae0d1bda1a3eca00c9a03ef846549f768bbe81af7"
sha256 cellar: :any, arm64_sequoia: "b9da40802a9cc37b5a3a911c9092cf54761713ab47b31e5426235875783cfe54"
sha256 cellar: :any, arm64_sonoma: "6c846b324fa5b65f17e9c418b796465b4554eec304be753d9f5c7baf6d75dd8e"
sha256 cellar: :any, arm64_ventura: "093f8b3668558e8158e6e4d05f606479ede1a852976dfbe88f8ffbb6da767c8a"
sha256 cellar: :any, sonoma: "22fd78b4a26ef9d81efa756ced732982ee0c8d4fd9f3c9e8a0164923198e4836"
sha256 cellar: :any, ventura: "0035c5b5a78ce22643b76b0499107a845f753754cdaa9ea15646aef0941f83f7"
sha256 cellar: :any_skip_relocation, x86_64_linux: "b961068fd3e3f897e3332a2e97ebe3deafef4cb295fdd369d821106ba3e9ce98"
end

keg_only :provided_by_macos
Expand All @@ -40,14 +40,17 @@ def install

system "make", "install"

# fixes https://github.com/libarchive/libarchive/issues/1819
if OS.mac?
inreplace lib/"pkgconfig/libarchive.pc", "Libs.private: ", "Libs.private: -liconv "
inreplace lib/"pkgconfig/libarchive.pc", "Requires.private: iconv", ""
end
# Avoid hardcoding Cellar paths in dependents.
inreplace lib/"pkgconfig/libarchive.pc", prefix.to_s, opt_prefix.to_s

return unless OS.mac?

# fixes https://github.com/libarchive/libarchive/issues/1819
inreplace lib/"pkgconfig/libarchive.pc" do |s|
s.gsub! "Libs.private: ", "Libs.private: -liconv "
s.gsub! "Requires.private: iconv", ""
end

# Just as apple does it.
ln_s bin/"bsdtar", bin/"tar"
ln_s bin/"bsdcpio", bin/"cpio"
Expand Down
Loading