Skip to content

Commit

Permalink
aspell: add English dictionary by default
Browse files Browse the repository at this point in the history
Fixes Homebrew#16031.
Closes Homebrew#16972.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information
yourabi authored and dholm committed Jan 14, 2013
1 parent 830532a commit 46fb5de
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Library/Formula/aspell.rb
Expand Up @@ -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
Expand Down

0 comments on commit 46fb5de

Please sign in to comment.