petsc: use Superenv.shims_path

Added in https://github.com/Homebrew/brew/pull/11987.
master
Mike McQuaid 2021-09-08 13:56:43 +01:00
parent 6ddf867d7f
commit 9381b2990d
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829
1 changed files with 3 additions and 3 deletions

View File

@ -45,9 +45,9 @@ class Petsc < Formula
rm_f lib/"petsc/conf/configure-hash"
if OS.mac?
inreplace lib/"petsc/conf/petscvariables", "#{HOMEBREW_SHIMS_PATH}/mac/super/", ""
elsif File.readlines("#{lib}/petsc/conf/petscvariables").grep(/#{HOMEBREW_SHIMS_PATH}/o).any?
inreplace lib/"petsc/conf/petscvariables", "#{HOMEBREW_SHIMS_PATH}/linux/super/", ""
inreplace lib/"petsc/conf/petscvariables", Superenv.shims_path, ""
elsif File.readlines("#{lib}/petsc/conf/petscvariables").grep(Superenv.shims_path.to_s).any?
inreplace lib/"petsc/conf/petscvariables", Superenv.shims_path, ""
end
end