Disable and add more deprecations.

These have all been deprecated/compat for a while.
This commit is contained in:
Mike McQuaid 2018-01-18 09:47:33 +00:00
parent 892e1b5b4f
commit 77f1768108
7 changed files with 50 additions and 27 deletions

View File

@ -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

View File

@ -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

View File

@ -1,5 +1,6 @@
class String
def undent
odeprecated "<<-EOS.undent", "<<~EOS"
gsub(/^[ \t]{#{(slice(/^[ \t]+/) || '').length}}/, "")
end
alias unindent undent

View 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

View File

@ -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

View File

@ -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

View File

@ -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