homebrew-core/Formula/enchant.rb

46 lines
1.4 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Enchant < Formula
homepage 'http://www.abisource.com/projects/enchant/'
url 'http://www.abisource.com/downloads/enchant/1.6.0/enchant-1.6.0.tar.gz'
sha1 '321f9cf0abfa1937401676ce60976d8779c39536'
2013-02-10 06:28:09 +00:00
depends_on 'pkg-config' => :build
depends_on :python => :recommended
depends_on 'glib'
depends_on 'aspell'
2013-08-12 04:48:02 +00:00
# http://pythonhosted.org/pyenchant/
resource 'pyenchant' do
url 'https://pypi.python.org/packages/source/p/pyenchant/pyenchant-1.6.5.tar.gz'
sha1 '6f01b8657b64e970a11945c2a9b4d6d8023997bc'
end
def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--disable-ispell",
"--disable-myspell"
system "make", "install"
2013-08-12 04:48:02 +00:00
if build.with? 'python'
python do
resource('pyenchant').stage do
# Don't download and install distribute now
inreplace 'setup.py', "distribute_setup.use_setuptools()", ""
ENV['PYENCHANT_LIBRARY_PATH'] = lib/'libenchant.dylib'
system python, 'setup.py', 'install', "--prefix=#{prefix}",
'--single-version-externally-managed',
'--record=installed.txt'
2013-09-12 07:58:33 +00:00
end
end
end
end
test do
python do
system python, "-c", "import enchant; d=enchant.Dict('en_US'); print(d.suggest('homebrew'))"
end
end
end