This repository was archived by the owner on Dec 2, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -13,17 +13,27 @@ def self.file(formula)
1313 "#{ formula . name } -#{ formula . pkg_version } .tar.bz2"
1414 end
1515
16+ # Keep in sync with same-named function in:
17+ # https://github.com/boxen/our-boxen/blob/master/script/sync
18+ def self . s3_cellar
19+ case HOMEBREW_CELLAR . to_s
20+ when "/opt/boxen/homebrew/Cellar" then ""
21+ when "/usr/local/Cellar" then "default/"
22+ else "#{ Base64 . strict_encode64 ( HOMEBREW_CELLAR . to_s ) } /"
23+ end
24+ end
25+
1626 def self . url ( formula )
1727 os = MacOS . version
1828 file = self . file ( formula )
19- path = "/#{ Base64 . strict_encode64 ( HOMEBREW_CELLAR ) } / #{ os } /#{ file } "
29+ path = "/#{ s3_cellar } #{ os } /#{ file } "
2030
2131 if ENV [ 'BOXEN_HOMEBREW_BOTTLE_URL' ]
2232 ENV [ 'BOXEN_HOMEBREW_BOTTLE_URL' ] + path
2333 else
2434 host = ENV [ 'BOXEN_S3_HOST' ] || 's3.amazonaws.com'
2535 bucket = ENV [ 'BOXEN_S3_BUCKET' ] || 'boxen-downloads'
26- "http ://#{ bucket } . #{ host } /homebrew" + path
36+ "https ://#{ host } / #{ bucket } /homebrew" + path
2737 end
2838 end
2939
Original file line number Diff line number Diff line change @@ -83,9 +83,6 @@ def command_opts
8383 :custom_environment => {
8484 "HOME" => "/#{ homedir_prefix } /#{ default_user } " ,
8585 "PATH" => "#{ self . class . home } /bin:/usr/bin:/usr/sbin:/bin:/sbin" ,
86- "CFLAGS" => "-O2" ,
87- "CPPFLAGS" => "-O2" ,
88- "CXXFLAGS" => "-O2" ,
8986 "HOMEBREW_ROOT" => "#{ self . class . home } " ,
9087 } ,
9188 :failonfail => true ,
Original file line number Diff line number Diff line change @@ -187,12 +187,8 @@ def command_opts
187187 :custom_environment => {
188188 "HOME" => "/#{ homedir_prefix } /#{ default_user } " ,
189189 "PATH" => "#{ self . class . home } /bin:/usr/bin:/usr/sbin:/bin:/sbin" ,
190- "CFLAGS" => "-O2" ,
191- "CPPFLAGS" => "-O2" ,
192- "CXXFLAGS" => "-O2" ,
193190 "BOXEN_HOMEBREW_BOTTLE_URL" => bottle_url ,
194191 "HOMEBREW_CACHE" => self . class . cache ,
195- "HOMEBREW_BUILD_BOTTLE" => "1"
196192 } ,
197193 :failonfail => true ,
198194 :uid => default_user
You can’t perform that action at this time.
0 commit comments