Merge pull request #3694 from MikeMcQuaid/more-odisabled
Disable and add more deprecations.
This commit is contained in:
commit
9201fbde82
@ -1,27 +1,25 @@
|
|||||||
module Stdenv
|
module Stdenv
|
||||||
def fast
|
def fast
|
||||||
odeprecated "ENV.fast"
|
odisabled "ENV.fast"
|
||||||
end
|
end
|
||||||
|
|
||||||
def O4
|
def O4
|
||||||
odeprecated "ENV.O4"
|
odisabled "ENV.O4"
|
||||||
end
|
end
|
||||||
|
|
||||||
def Og
|
def Og
|
||||||
odeprecated "ENV.Og"
|
odisabled "ENV.Og"
|
||||||
end
|
end
|
||||||
|
|
||||||
def gcc_4_0_1
|
def gcc_4_0_1
|
||||||
odeprecated "ENV.gcc_4_0_1", "ENV.gcc_4_0"
|
odisabled "ENV.gcc_4_0_1", "ENV.gcc_4_0"
|
||||||
gcc_4_0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def gcc
|
def gcc
|
||||||
odeprecated "ENV.gcc", "ENV.gcc_4_2"
|
odisabled "ENV.gcc", "ENV.gcc_4_2"
|
||||||
gcc_4_2
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def libpng
|
def libpng
|
||||||
odeprecated "ENV.libpng", "ENV.x11"
|
odisabled "ENV.libpng", "ENV.x11"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,47 +1,45 @@
|
|||||||
module Superenv
|
module Superenv
|
||||||
def fast
|
def fast
|
||||||
odeprecated "ENV.fast"
|
odisabled "ENV.fast"
|
||||||
end
|
end
|
||||||
|
|
||||||
def O4
|
def O4
|
||||||
odeprecated "ENV.O4"
|
odisabled "ENV.O4"
|
||||||
end
|
end
|
||||||
|
|
||||||
def Og
|
def Og
|
||||||
odeprecated "ENV.Og"
|
odisabled "ENV.Og"
|
||||||
end
|
end
|
||||||
|
|
||||||
def gcc_4_0_1
|
def gcc_4_0_1
|
||||||
odeprecated "ENV.gcc_4_0_1", "ENV.gcc_4_0"
|
odisabled "ENV.gcc_4_0_1", "ENV.gcc_4_0"
|
||||||
gcc_4_0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def gcc
|
def gcc
|
||||||
odeprecated "ENV.gcc", "ENV.gcc_4_2"
|
odisabled "ENV.gcc", "ENV.gcc_4_2"
|
||||||
gcc_4_2
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def libxml2
|
def libxml2
|
||||||
odeprecated "ENV.libxml2"
|
odisabled "ENV.libxml2"
|
||||||
end
|
end
|
||||||
|
|
||||||
def minimal_optimization
|
def minimal_optimization
|
||||||
odeprecated "ENV.minimal_optimization"
|
odisabled "ENV.minimal_optimization"
|
||||||
end
|
end
|
||||||
|
|
||||||
def no_optimization
|
def no_optimization
|
||||||
odeprecated "ENV.no_optimization"
|
odisabled "ENV.no_optimization"
|
||||||
end
|
end
|
||||||
|
|
||||||
def enable_warnings
|
def enable_warnings
|
||||||
odeprecated "ENV.enable_warnings"
|
odisabled "ENV.enable_warnings"
|
||||||
end
|
end
|
||||||
|
|
||||||
def macosxsdk
|
def macosxsdk
|
||||||
odeprecated "ENV.macosxsdk"
|
odisabled "ENV.macosxsdk"
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_macosxsdk
|
def remove_macosxsdk
|
||||||
odeprecated "ENV.remove_macosxsdk"
|
odisabled "ENV.remove_macosxsdk"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
class String
|
class String
|
||||||
def undent
|
def undent
|
||||||
|
odeprecated "<<-EOS.undent", "<<~EOS"
|
||||||
gsub(/^[ \t]{#{(slice(/^[ \t]+/) || '').length}}/, "")
|
gsub(/^[ \t]{#{(slice(/^[ \t]+/) || '').length}}/, "")
|
||||||
end
|
end
|
||||||
alias unindent undent
|
alias unindent undent
|
||||||
|
|||||||
18
Library/Homebrew/compat/formula_support.rb
Normal file
18
Library/Homebrew/compat/formula_support.rb
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
require "formula_support"
|
||||||
|
|
||||||
|
class KegOnlyReason
|
||||||
|
alias _to_s to_s
|
||||||
|
|
||||||
|
def to_s
|
||||||
|
case @reason
|
||||||
|
when :provided_by_osx
|
||||||
|
odeprecated "keg_only :provided_by_osx", "keg_only :provided_by_macos"
|
||||||
|
@reason = :provided_by_macos
|
||||||
|
when :shadowed_by_osx
|
||||||
|
odeprecated "keg_only :shadowed_by_osx", "keg_only :shadowed_by_macos"
|
||||||
|
@reason = :shadowed_by_macos
|
||||||
|
end
|
||||||
|
|
||||||
|
_to_s
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -2,8 +2,7 @@ module Language
|
|||||||
module Haskell
|
module Haskell
|
||||||
module Cabal
|
module Cabal
|
||||||
def cabal_clean_lib
|
def cabal_clean_lib
|
||||||
odeprecated "Language::Haskell::Cabal#cabal_clean_lib"
|
odisabled "Language::Haskell::Cabal#cabal_clean_lib"
|
||||||
rm_rf lib
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
module Utils
|
module Utils
|
||||||
module Shell
|
module Shell
|
||||||
def self.shell_profile
|
def self.shell_profile
|
||||||
odeprecated "Utils::Shell.shell_profile", "Utils::Shell.profile"
|
odisabled "Utils::Shell.shell_profile", "Utils::Shell.profile"
|
||||||
Utils::Shell.profile
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -32,15 +32,25 @@ class KegOnlyReason
|
|||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
return @explanation unless @explanation.empty?
|
return @explanation unless @explanation.empty?
|
||||||
|
|
||||||
|
case @reason
|
||||||
|
when :provided_by_osx
|
||||||
|
odeprecated "keg_only :provided_by_osx", "keg_only :provided_by_macos"
|
||||||
|
@reason = :provided_by_macos
|
||||||
|
when :shadowed_by_osx
|
||||||
|
odeprecated "keg_only :shadowed_by_osx", "keg_only :shadowed_by_macos"
|
||||||
|
@reason = :shadowed_by_macos
|
||||||
|
end
|
||||||
|
|
||||||
case @reason
|
case @reason
|
||||||
when :versioned_formula then <<~EOS
|
when :versioned_formula then <<~EOS
|
||||||
this is an alternate version of another formula
|
this is an alternate version of another formula
|
||||||
EOS
|
EOS
|
||||||
when :provided_by_macos, :provided_by_osx then <<~EOS
|
when :provided_by_macos then <<~EOS
|
||||||
macOS already provides this software and installing another version in
|
macOS already provides this software and installing another version in
|
||||||
parallel can cause all kinds of trouble
|
parallel can cause all kinds of trouble
|
||||||
EOS
|
EOS
|
||||||
when :shadowed_by_macos, :shadowed_by_osx then <<~EOS
|
when :shadowed_by_macos then <<~EOS
|
||||||
macOS provides similar software and installing this software in
|
macOS provides similar software and installing this software in
|
||||||
parallel can cause all kinds of trouble
|
parallel can cause all kinds of trouble
|
||||||
EOS
|
EOS
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user