File tree Expand file tree Collapse file tree 3 files changed +33
-20
lines changed
Library/Homebrew/extend/os Expand file tree Collapse file tree 3 files changed +33
-20
lines changed Original file line number Diff line number Diff line change 1
1
# typed: strict
2
2
# frozen_string_literal: true
3
3
4
+ require "extend/os/linux/dev-cmd/bottle" if OS . linux?
4
5
require "extend/os/mac/dev-cmd/bottle" if OS . mac?
Original file line number Diff line number Diff line change
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ module OS
5
+ module Linux
6
+ module DevCmd
7
+ module Bottle
8
+ sig { params ( formula : Formula ) . returns ( T ::Array [ Regexp ] ) }
9
+ def formula_ignores ( formula )
10
+ ignores = super
11
+
12
+ cellar_regex = Regexp . escape ( HOMEBREW_CELLAR )
13
+ prefix_regex = Regexp . escape ( HOMEBREW_PREFIX )
14
+
15
+ ignores << case formula . name
16
+ # On Linux, GCC installation can be moved so long as the whole directory tree is moved together:
17
+ # https://gcc-help.gcc.gnu.narkive.com/GnwuCA7l/moving-gcc-from-the-installation-path-is-it-allowed.
18
+ when Version . formula_optionally_versioned_regex ( :gcc )
19
+ Regexp . union ( %r{#{ cellar_regex } /gcc} , %r{#{ prefix_regex } /opt/gcc} )
20
+ # binutils is relocatable for the same reason: https://github.com/Homebrew/brew/pull/11899#issuecomment-906804451.
21
+ when Version . formula_optionally_versioned_regex ( :binutils )
22
+ %r{#{ cellar_regex } /binutils}
23
+ end
24
+
25
+ ignores . compact
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+
32
+ Homebrew ::DevCmd ::Bottle . prepend ( OS ::Linux ::DevCmd ::Bottle )
Original file line number Diff line number Diff line change @@ -18,26 +18,6 @@ def tar_args
18
18
def gnu_tar ( gnu_tar_formula )
19
19
"#{ gnu_tar_formula . opt_bin } /gtar"
20
20
end
21
-
22
- sig { params ( formula : Formula ) . returns ( T ::Array [ Regexp ] ) }
23
- def formula_ignores ( formula )
24
- ignores = super
25
-
26
- cellar_regex = Regexp . escape ( HOMEBREW_CELLAR )
27
- prefix_regex = Regexp . escape ( HOMEBREW_PREFIX )
28
-
29
- ignores << case formula . name
30
- # On Linux, GCC installation can be moved so long as the whole directory tree is moved together:
31
- # https://gcc-help.gcc.gnu.narkive.com/GnwuCA7l/moving-gcc-from-the-installation-path-is-it-allowed.
32
- when Version . formula_optionally_versioned_regex ( :gcc )
33
- Regexp . union ( %r{#{ cellar_regex } /gcc} , %r{#{ prefix_regex } /opt/gcc} ) if OS . linux?
34
- # binutils is relocatable for the same reason: https://github.com/Homebrew/brew/pull/11899#issuecomment-906804451.
35
- when Version . formula_optionally_versioned_regex ( :binutils )
36
- %r{#{ cellar_regex } /binutils} if OS . linux?
37
- end
38
-
39
- ignores . compact
40
- end
41
21
end
42
22
end
43
23
end
You can’t perform that action at this time.
0 commit comments