2009-10-13 01:50:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Scons < Formula
|
2009-10-13 01:50:41 +00:00
|
|
|
homepage 'http://www.scons.org'
|
2014-07-08 15:56:03 +00:00
|
|
|
url 'https://downloads.sourceforge.net/scons/scons-2.3.2.tar.gz'
|
|
|
|
sha1 '2937f20b86d0c5f86cf31e1fa378307ed34fc20a'
|
2014-08-11 00:46:13 +00:00
|
|
|
revision 1
|
2009-10-13 01:50:41 +00:00
|
|
|
|
2014-02-22 19:10:32 +00:00
|
|
|
bottle do
|
2014-03-19 00:09:41 +00:00
|
|
|
cellar :any
|
2014-08-11 00:55:07 +00:00
|
|
|
sha1 "59050aba17abff544a0653a2f12ae41b3ea255a0" => :mavericks
|
|
|
|
sha1 "6702ca156e864375ef01518fee9723d4d1110c66" => :mountain_lion
|
|
|
|
sha1 "08e0c669f54b07f58d10aa160f0dc9fe75e9bf77" => :lion
|
2014-02-22 19:10:32 +00:00
|
|
|
end
|
|
|
|
|
2014-08-11 00:46:13 +00:00
|
|
|
# Upstream patch to fix compatibility with Python pre-2.7
|
|
|
|
# https://bitbucket.org/scons/scons/commits/1444ad9af1d3b6148451af3f0596cba0ad352c50
|
|
|
|
patch :p2 do
|
|
|
|
url "https://bitbucket.org/scons/scons/commits/1444ad9af1d3b6148451af3f0596cba0ad352c50/raw/"
|
|
|
|
sha1 "022a40b4226d85d82a8145d08443495f31a9ed34"
|
|
|
|
end
|
|
|
|
|
2009-10-13 01:50:41 +00:00
|
|
|
def install
|
2014-02-12 04:29:42 +00:00
|
|
|
bin.mkpath # Script won't create this if it doesn't already exist
|
2010-09-19 18:15:10 +00:00
|
|
|
man1.install gzip('scons-time.1', 'scons.1', 'sconsign.1')
|
2013-11-01 16:31:33 +00:00
|
|
|
system "/usr/bin/python", "setup.py", "install",
|
2011-09-01 04:25:42 +00:00
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--standalone-lib",
|
2012-07-06 23:19:40 +00:00
|
|
|
# SCons gets handsy with sys.path---`scons-local` is one place it
|
|
|
|
# will look when all is said and done.
|
2013-11-01 16:31:33 +00:00
|
|
|
"--install-lib=#{libexec}/scons-local",
|
|
|
|
"--install-scripts=#{bin}",
|
2012-07-06 23:19:40 +00:00
|
|
|
"--install-data=#{libexec}",
|
2011-09-01 04:25:42 +00:00
|
|
|
"--no-version-script", "--no-install-man"
|
2013-11-01 16:31:33 +00:00
|
|
|
|
|
|
|
# Re-root scripts to libexec so they can import SCons and symlink back into
|
|
|
|
# bin. Similar tactics are used in the duplicity formula.
|
|
|
|
bin.children.each do |p|
|
|
|
|
mv p, "#{libexec}/#{p.basename}.py"
|
|
|
|
bin.install_symlink "#{libexec}/#{p.basename}.py" => p.basename
|
2012-07-06 23:19:40 +00:00
|
|
|
end
|
2009-10-13 01:50:41 +00:00
|
|
|
end
|
|
|
|
end
|