From 4f45077fdee34243f2506ce6328a6d16f8330019 Mon Sep 17 00:00:00 2001 From: Simon Sigurdhsson Date: Sun, 21 Apr 2013 10:44:24 +0200 Subject: [PATCH] Remove global methods from formulae Removes any global methods from formulae, and moves #kext_prefix (which seems to be at least somewhat abstractable) into the Formula class. The only formula with global methods is now aspell; it (and its generating script in contrib) has been changed to prefix that method with `aspell_`, to minimize the risk of name collisions. Closes Homebrew/homebrew#19331. Closes Homebrew/homebrew#19343. Signed-off-by: Jack Nagel --- Library/Contributions/cmd/brew-aspell-dictionaries | 2 +- Library/Homebrew/formula.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Contributions/cmd/brew-aspell-dictionaries b/Library/Contributions/cmd/brew-aspell-dictionaries index a5cdb1ac35..61a5e085e5 100755 --- a/Library/Contributions/cmd/brew-aspell-dictionaries +++ b/Library/Contributions/cmd/brew-aspell-dictionaries @@ -40,7 +40,7 @@ EOF done cat <> $brew_formulae_tmp_file -def available_languages +def aspell_available_languages %w(${langs}) end # END generated with `basename $0` diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 778a9a6884..1eb95c2737 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -165,6 +165,8 @@ class Formula def sbin; prefix+'sbin' end def share; prefix+'share' end + def kext_prefix; prefix+'Library/Extensions' end + # configuration needs to be preserved past upgrades def etc; HOMEBREW_PREFIX+'etc' end # generally we don't want var stuff inside the keg