aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2013-08-11 21:48:02 -0700
committerAdam Vandenberg2013-09-11 22:05:28 -0700
commit5e54e90e95438e4c26aa6f4e71d5d08b4cfa88ec (patch)
tree0b4a0af2deb4e061d2ad46413a611baeb3fa15de /Library
parent7f022d5a01ca666a3748fd7979671aa42fa0ff5b (diff)
downloadhomebrew-5e54e90e95438e4c26aa6f4e71d5d08b4cfa88ec.tar.bz2
enchant: use resource
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/enchant.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/Library/Formula/enchant.rb b/Library/Formula/enchant.rb
index 2a99f0571..97987643a 100644
--- a/Library/Formula/enchant.rb
+++ b/Library/Formula/enchant.rb
@@ -1,11 +1,5 @@
require 'formula'
-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
-
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'
@@ -16,6 +10,12 @@ class Enchant < Formula
depends_on 'glib'
depends_on 'aspell'
+ # 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}",
@@ -23,11 +23,11 @@ class Enchant < Formula
"--disable-myspell"
system "make", "install"
- python do
- # Now we handle the python bindings from the subformulae PyEnchant
- PyEnchant.new.brew do
- # Don't download and install distribute now
- inreplace 'setup.py', "distribute_setup.use_setuptools()", ""
+ 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',