Use formula_optionally_versioned_regex

Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
This commit is contained in:
Shaun Jackman 2022-01-02 17:30:34 -08:00 committed by GitHub
parent 2ad3f0a089
commit 06bf91fe0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ require "compilers"
class Keg
def relocate_dynamic_linkage(relocation)
# Patching the dynamic linker of glibc breaks it.
return if name == "glibc" || name.start_with?("glibc@")
return if name.match? Version.formula_optionally_versioned_regex(:glibc)
# Patching patchelf fails with "Text file busy" or SIGBUS.
return if name == "patchelf"