Skip to content

Commit

Permalink
st: install correctly on Big Sur
Browse files Browse the repository at this point in the history
As discussed with Homebrew#66370 (comment)
Big Sur's system perl changed how "PREFIX=" is treated as an install
destination.  The more explicit way to control MakeMaker is to set
INSTALL_BASE instead, which should result in consistent behavior
between different OS/X versions.
  • Loading branch information
mitchblank committed Dec 27, 2020
1 parent ab7f8bf commit dd3113f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Formula/st.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ class St < Formula
url "https://github.com/nferraz/st/archive/v1.1.4.tar.gz"
sha256 "c02a16f67e4c357690a5438319843149fd700c223128f9ffebecab2849c58bb8"
license "MIT"
revision 1
head "https://github.com/nferraz/st.git"

livecheck do
url :head
strategy :github_latest
end

bottle do
cellar :any_skip_relocation
Expand All @@ -16,15 +23,12 @@ class St < Formula
end

def install
ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5/site_perl/"
ENV.prepend_create_path "PERL5LIB", lib/"perl5/"

system "perl", "Makefile.PL", "PREFIX=#{libexec}"
system "perl", "Makefile.PL", "INSTALL_BASE=#{prefix}", "INSTALLSITEMAN1DIR=#{man1}", "INSTALLSITEMAN3DIR=#{man3}"
system "make", "install"

bin.install Dir[libexec/"bin/*"]
bin.env_script_all_files libexec/"bin", PERL5LIB: ENV["PERL5LIB"]

man1.install_symlink Dir[libexec/"share/man/man1/*.1"]
end

test do
Expand Down

0 comments on commit dd3113f

Please sign in to comment.