2009-12-28 00:11:47 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2013-01-21 09:33:56 +00:00
|
|
|
class PyEnchant < Formula
|
|
|
|
homepage 'http://pythonhosted.org/pyenchant/'
|
|
|
|
url 'https://pypi.python.org/packages/source/p/pyenchant/pyenchant-1.6.5.tar.gz'
|
|
|
|
sha1 '6f01b8657b64e970a11945c2a9b4d6d8023997bc'
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Enchant < Formula
|
2009-12-28 00:11:47 +00:00
|
|
|
homepage 'http://www.abisource.com/projects/enchant/'
|
2012-08-18 02:37:33 +00:00
|
|
|
url 'http://www.abisource.com/downloads/enchant/1.6.0/enchant-1.6.0.tar.gz'
|
|
|
|
sha1 '321f9cf0abfa1937401676ce60976d8779c39536'
|
2009-12-28 00:11:47 +00:00
|
|
|
|
2013-02-10 06:28:09 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2013-01-21 09:33:56 +00:00
|
|
|
depends_on :python => :recommended
|
2010-03-12 11:29:06 +00:00
|
|
|
depends_on 'glib'
|
2012-08-18 02:37:33 +00:00
|
|
|
depends_on 'aspell'
|
2009-12-28 00:11:47 +00:00
|
|
|
|
|
|
|
def install
|
2012-08-18 02:37:33 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--disable-ispell",
|
|
|
|
"--disable-myspell"
|
2009-12-28 00:11:47 +00:00
|
|
|
system "make install"
|
2013-01-21 09:33:56 +00:00
|
|
|
|
|
|
|
if build.with? 'python'
|
|
|
|
# Now we handle the python bindings from the subformulae PyEnchant
|
|
|
|
PyEnchant.new.brew do
|
|
|
|
python do
|
|
|
|
ENV['PYENCHANT_LIBRARY_PATH'] = lib/'libenchant.dylib'
|
|
|
|
system python, 'setup.py', 'install', "--prefix=#{prefix}",
|
|
|
|
'--single-version-externally-managed',
|
|
|
|
'--record=installed.txt'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
|
|
|
python do
|
|
|
|
system python, "-c", "import enchant; d=enchant.Dict('en_US'); print(d.suggest('homebrew'))"
|
|
|
|
end
|
2009-12-28 00:11:47 +00:00
|
|
|
end
|
|
|
|
end
|