Skip to content

Commit

Permalink
Merge pull request #191709 from Homebrew/cpanminus-all
Browse files Browse the repository at this point in the history
cpanminus: regenerate attestations, build `:all` bottle
  • Loading branch information
BrewTestBot authored Sep 24, 2024
2 parents fbaf972 + 9a9c752 commit dc8abb1
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions Formula/c/cpanminus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,11 @@ class Cpanminus < Formula
head "https://github.com/miyagawa/cpanminus.git", branch: "devel"

bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "652d0bd77ea57db4b55e836ccd5e095a2b0073b42406bd775fa5b1fec23004d2"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "79c1c6d873f3ea1f5582da2544a9fcbaab6d1303d328b3877a70d63b9a355ca7"
sha256 cellar: :any_skip_relocation, arm64_ventura: "79c1c6d873f3ea1f5582da2544a9fcbaab6d1303d328b3877a70d63b9a355ca7"
sha256 cellar: :any_skip_relocation, arm64_monterey: "79c1c6d873f3ea1f5582da2544a9fcbaab6d1303d328b3877a70d63b9a355ca7"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "c89d41c3b87de4c87a36355ded72110aab1e13b18ab33e2ac50590906e0aac21"
sha256 cellar: :any_skip_relocation, sonoma: "f20737479b4b5d7d2945aa09b8b25e91d09205725b2a0a3858a37c1eeb282f92"
sha256 cellar: :any_skip_relocation, ventura: "f20737479b4b5d7d2945aa09b8b25e91d09205725b2a0a3858a37c1eeb282f92"
sha256 cellar: :any_skip_relocation, monterey: "f20737479b4b5d7d2945aa09b8b25e91d09205725b2a0a3858a37c1eeb282f92"
sha256 cellar: :any_skip_relocation, big_sur: "76af4606a249844bc3f2cc521c3948b4e4e78e022f8d5d676ada9bcc91f4307d"
sha256 cellar: :any_skip_relocation, x86_64_linux: "7901d4e2cf8cf79ccd841ec638bfd5450c14efc2abd07ef90ee024e954b93f6d"
rebuild 1
sha256 cellar: :any_skip_relocation, all: "37fb79c294b47339574f139986229bc14bf812b7b59a010ed139b13ab2390010"
end

uses_from_macos "perl"
depends_on "perl" => :build

def install
cd "App-cpanminus" if build.head?
Expand All @@ -31,15 +23,18 @@ def install
"INSTALLSITEMAN1DIR=#{man1}",
"INSTALLSITEMAN3DIR=#{man3}"
system "make", "install"
end

def post_install
cpanm_lines = (bin/"cpanm").read.lines
return if cpanm_lines.first.match?(%r{^#!/usr/bin/env perl})

ohai "Adding `/usr/bin/env perl` shebang to `cpanm`..."
cpanm_lines.unshift "#!/usr/bin/env perl\n"
(bin/"cpanm").atomic_write cpanm_lines.join
inreplace_files = [
buildpath/"README",
bin/"cpanm",
lib/"perl5/App/cpanminus/fatscript.pm",
lib/"perl5/App/cpanminus.pm",
man3/"App::cpanminus.3",
]
inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX, audit_result: build.stable?

# Needed for dependents that might use Homebrew perl or system perl.
inreplace bin/"cpanm", %r{^#!#{Regexp.escape(Formula["perl"].opt_bin)}/perl$}, "#!/usr/bin/env perl"
end

test do
Expand Down

0 comments on commit dc8abb1

Please sign in to comment.