2009-10-30 10:47:33 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Sip < Formula
|
2009-10-30 10:47:33 +00:00
|
|
|
homepage 'http://www.riverbankcomputing.co.uk/software/sip'
|
2013-10-16 09:39:10 +00:00
|
|
|
url 'http://download.sf.net/project/pyqt/sip/sip-4.15.3/sip-4.15.3.tar.gz'
|
|
|
|
sha1 'ef9916d36fedfd3cfa7161b5fd402f274ea0c99e'
|
2012-06-23 07:38:07 +00:00
|
|
|
|
|
|
|
head 'http://www.riverbankcomputing.co.uk/hg/sip', :using => :hg
|
2009-10-30 10:47:33 +00:00
|
|
|
|
2013-01-21 09:33:56 +00:00
|
|
|
depends_on :python => :recommended
|
|
|
|
depends_on :python3 => :optional
|
2010-10-10 17:04:30 +00:00
|
|
|
|
2009-10-30 10:47:33 +00:00
|
|
|
def install
|
2012-08-23 04:29:50 +00:00
|
|
|
if build.head?
|
2013-01-21 09:33:56 +00:00
|
|
|
# Link the Mercurial repository into the download directory so
|
2011-05-05 19:54:57 +00:00
|
|
|
# buid.py can use it to figure out a version number.
|
|
|
|
ln_s downloader.cached_location + '.hg', '.hg'
|
2013-01-21 09:33:56 +00:00
|
|
|
system python, "build.py", "prepare"
|
2011-05-05 19:54:57 +00:00
|
|
|
end
|
|
|
|
|
2013-01-21 09:33:56 +00:00
|
|
|
# The python block is run once for each python (2.x and 3.x if requested)
|
|
|
|
python do
|
2013-08-08 09:58:37 +00:00
|
|
|
# Note the binary `sip` is the same for python 2.x and 3.x
|
2013-01-21 09:33:56 +00:00
|
|
|
# Set --destdir such that the python modules will be in the HOMEBREWPREFIX/lib/pythonX.Y/site-packages
|
|
|
|
system python, "configure.py",
|
2013-11-02 12:33:26 +00:00
|
|
|
"--deployment-target=#{MacOS.version}",
|
2013-01-21 09:33:56 +00:00
|
|
|
"--destdir=#{lib}/#{python.xy}/site-packages",
|
|
|
|
"--bindir=#{bin}",
|
|
|
|
"--incdir=#{include}",
|
|
|
|
"--sipdir=#{HOMEBREW_PREFIX}/share/sip#{python.if3then3}"
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
system "make clean"
|
|
|
|
end
|
2009-11-05 18:13:00 +00:00
|
|
|
|
|
|
|
end
|
2012-02-08 18:42:19 +00:00
|
|
|
|
2013-01-21 09:33:56 +00:00
|
|
|
def caveats
|
|
|
|
s = ''
|
|
|
|
s += python.standard_caveats if python
|
2013-08-08 15:25:35 +00:00
|
|
|
s += "The sip-dir for Python 2.x is #{HOMEBREW_PREFIX}/share/sip.\n"
|
|
|
|
s += "The sip-dir for Python 3.x is #{HOMEBREW_PREFIX}/share/sip3."
|
2013-01-21 09:33:56 +00:00
|
|
|
s
|
2012-02-08 18:42:19 +00:00
|
|
|
end
|
2013-01-21 09:33:56 +00:00
|
|
|
end
|