diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/compat/ENV/std.rb | 14 | ||||
| -rw-r--r-- | Library/Homebrew/compat/ENV/super.rb | 24 | ||||
| -rw-r--r-- | Library/Homebrew/compat/extend/string.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/compat/formula_support.rb | 18 | ||||
| -rw-r--r-- | Library/Homebrew/compat/language/haskell.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/compat/utils/shell.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/formula_support.rb | 14 | 
7 files changed, 50 insertions, 27 deletions
| diff --git a/Library/Homebrew/compat/ENV/std.rb b/Library/Homebrew/compat/ENV/std.rb index 26dabe440..beca4ed6f 100644 --- a/Library/Homebrew/compat/ENV/std.rb +++ b/Library/Homebrew/compat/ENV/std.rb @@ -1,27 +1,25 @@  module Stdenv    def fast -    odeprecated "ENV.fast" +    odisabled "ENV.fast"    end    def O4 -    odeprecated "ENV.O4" +    odisabled "ENV.O4"    end    def Og -    odeprecated "ENV.Og" +    odisabled "ENV.Og"    end    def gcc_4_0_1 -    odeprecated "ENV.gcc_4_0_1", "ENV.gcc_4_0" -    gcc_4_0 +    odisabled "ENV.gcc_4_0_1", "ENV.gcc_4_0"    end    def gcc -    odeprecated "ENV.gcc", "ENV.gcc_4_2" -    gcc_4_2 +    odisabled "ENV.gcc", "ENV.gcc_4_2"    end    def libpng -    odeprecated "ENV.libpng", "ENV.x11" +    odisabled "ENV.libpng", "ENV.x11"    end  end diff --git a/Library/Homebrew/compat/ENV/super.rb b/Library/Homebrew/compat/ENV/super.rb index 2020ad752..53a6bdc4d 100644 --- a/Library/Homebrew/compat/ENV/super.rb +++ b/Library/Homebrew/compat/ENV/super.rb @@ -1,47 +1,45 @@  module Superenv    def fast -    odeprecated "ENV.fast" +    odisabled "ENV.fast"    end    def O4 -    odeprecated "ENV.O4" +    odisabled "ENV.O4"    end    def Og -    odeprecated "ENV.Og" +    odisabled "ENV.Og"    end    def gcc_4_0_1 -    odeprecated "ENV.gcc_4_0_1", "ENV.gcc_4_0" -    gcc_4_0 +    odisabled "ENV.gcc_4_0_1", "ENV.gcc_4_0"    end    def gcc -    odeprecated "ENV.gcc", "ENV.gcc_4_2" -    gcc_4_2 +    odisabled "ENV.gcc", "ENV.gcc_4_2"    end    def libxml2 -    odeprecated "ENV.libxml2" +    odisabled "ENV.libxml2"    end    def minimal_optimization -    odeprecated "ENV.minimal_optimization" +    odisabled "ENV.minimal_optimization"    end    def no_optimization -    odeprecated "ENV.no_optimization" +    odisabled "ENV.no_optimization"    end    def enable_warnings -    odeprecated "ENV.enable_warnings" +    odisabled "ENV.enable_warnings"    end    def macosxsdk -    odeprecated "ENV.macosxsdk" +    odisabled "ENV.macosxsdk"    end    def remove_macosxsdk -    odeprecated "ENV.remove_macosxsdk" +    odisabled "ENV.remove_macosxsdk"    end  end diff --git a/Library/Homebrew/compat/extend/string.rb b/Library/Homebrew/compat/extend/string.rb index 6069a6bec..9d1f66557 100644 --- a/Library/Homebrew/compat/extend/string.rb +++ b/Library/Homebrew/compat/extend/string.rb @@ -1,5 +1,6 @@  class String    def undent +    odeprecated "<<-EOS.undent", "<<~EOS"      gsub(/^[ \t]{#{(slice(/^[ \t]+/) || '').length}}/, "")    end    alias unindent undent diff --git a/Library/Homebrew/compat/formula_support.rb b/Library/Homebrew/compat/formula_support.rb new file mode 100644 index 000000000..f56a4909b --- /dev/null +++ b/Library/Homebrew/compat/formula_support.rb @@ -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 diff --git a/Library/Homebrew/compat/language/haskell.rb b/Library/Homebrew/compat/language/haskell.rb index cef97d818..8e5059874 100644 --- a/Library/Homebrew/compat/language/haskell.rb +++ b/Library/Homebrew/compat/language/haskell.rb @@ -2,8 +2,7 @@ module Language    module Haskell      module Cabal        def cabal_clean_lib -        odeprecated "Language::Haskell::Cabal#cabal_clean_lib" -        rm_rf lib +        odisabled "Language::Haskell::Cabal#cabal_clean_lib"        end      end    end diff --git a/Library/Homebrew/compat/utils/shell.rb b/Library/Homebrew/compat/utils/shell.rb index 161f10ebb..2f387d967 100644 --- a/Library/Homebrew/compat/utils/shell.rb +++ b/Library/Homebrew/compat/utils/shell.rb @@ -1,8 +1,7 @@  module Utils    module Shell      def self.shell_profile -      odeprecated "Utils::Shell.shell_profile", "Utils::Shell.profile" -      Utils::Shell.profile +      odisabled "Utils::Shell.shell_profile", "Utils::Shell.profile"      end    end  end diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index 53fd61db8..011d8a4b7 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -32,15 +32,25 @@ class KegOnlyReason    def to_s      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      when :versioned_formula then <<~EOS        this is an alternate version of another formula      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        parallel can cause all kinds of trouble      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        parallel can cause all kinds of trouble      EOS | 
