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
co-authored by Carlo Cabrera
parent 2ad3f0a089
commit 06bf91fe0b
@@ -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"