aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorYousef Ourabi2013-01-09 10:04:19 -0800
committerAdam Vandenberg2013-01-12 11:30:08 -0800
commite2ebb043b37f8b4fe5362fb8201c5e107725abe5 (patch)
treed710eb2cebf8481c7ae5d41f02bb55a7187cf725 /Library/Formula
parenta20fb1b0fdab7d202b0f0e10a06e5391f597bc6a (diff)
downloadhomebrew-e2ebb043b37f8b4fe5362fb8201c5e107725abe5.tar.bz2
aspell: add English dictionary by default
Fixes #16031. Closes #16972. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/aspell.rb19
1 files changed, 9 insertions, 10 deletions
diff --git a/Library/Formula/aspell.rb b/Library/Formula/aspell.rb
index 1e09fabf2..56258d72d 100644
--- a/Library/Formula/aspell.rb
+++ b/Library/Formula/aspell.rb
@@ -20,24 +20,23 @@ class Aspell < Formula
cause "Segmentation fault during linking."
end
- def options
- [
- ['--lang=XX,...', "Install dictionary for language XX where XX is the country code, e.g.: --lang=en,es\n\tAvailable country codes: #{available_languages.join(', ')}"],
- ['--all', "Install all available dictionaries"]
- ]
- end
+ option "with-lang", "Install dictionary for language XX where XX is the country code, e.g.: --with-lang=en,es\n"
+ option "all", "Install all available dictionaries"
def install
system "./configure", "--prefix=#{prefix}"
system "make install"
languages = []
- if ARGV.include?('--all')
+
+ ARGV.select { |v| v =~ /with-lang/ }.uniq.each do |opt|
+ languages << opt.split('=')[1].split(',')
+ end
+
+ if build.include? 'all'
languages << available_languages.to_a
else
- ARGV.options_only.select { |v| v =~ /--lang=/ }.uniq.each do |opt|
- languages << opt.split('=')[1].split(',')
- end
+ languages << "en" if languages.empty?
end
languages.flatten.each do |lang|
begin