Merge pull request #13838 from Bo98/global-postinstall

Create GCC and glibc symlinks after install is complete
This commit is contained in:
Bo Anderson 2022-09-10 16:37:56 +01:00 committed by GitHub
commit 5cd8533fe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -40,6 +40,12 @@ module Homebrew
symlink_gcc_libs symlink_gcc_libs
end end
def global_post_install
generic_global_post_install
symlink_ld_so
symlink_gcc_libs
end
def check_cpu def check_cpu
return if Hardware::CPU.intel? && Hardware::CPU.is_64_bit? return if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
return if Hardware::CPU.arm? return if Hardware::CPU.arm?

View File

@ -775,6 +775,8 @@ class FormulaInstaller
fix_dynamic_linkage(keg) if !@poured_bottle || !formula.bottle_specification.skip_relocation? fix_dynamic_linkage(keg) if !@poured_bottle || !formula.bottle_specification.skip_relocation?
Homebrew::Install.global_post_install
if build_bottle? if build_bottle?
ohai "Not running 'post_install' as we're building a bottle" ohai "Not running 'post_install' as we're building a bottle"
puts "You can run it manually using:" puts "You can run it manually using:"

View File

@ -30,6 +30,10 @@ module Homebrew
Diagnostic.checks(:build_from_source_checks, fatal: all_fatal) Diagnostic.checks(:build_from_source_checks, fatal: all_fatal)
end end
def global_post_install; end
alias generic_global_post_install global_post_install
module_function :generic_global_post_install
def check_prefix def check_prefix
if (Hardware::CPU.intel? || Hardware::CPU.in_rosetta2?) && if (Hardware::CPU.intel? || Hardware::CPU.in_rosetta2?) &&
HOMEBREW_PREFIX.to_s == HOMEBREW_MACOS_ARM_DEFAULT_PREFIX HOMEBREW_PREFIX.to_s == HOMEBREW_MACOS_ARM_DEFAULT_PREFIX