homebrew-core/Formula/scons.rb
2014-03-18 16:05:16 +00:00

34 lines
1.3 KiB
Ruby

require 'formula'
class Scons < Formula
homepage 'http://www.scons.org'
url 'https://downloads.sourceforge.net/scons/scons-2.3.1.tar.gz'
sha1 '775e715e49fe5fd8e1d29551a296fdc9267509e7'
bottle do
sha1 "f6a31c7fc99c208819e1fc252e575a18ae610344" => :mavericks
sha1 "22695889878b8ea52080a993a83f4629456c160c" => :mountain_lion
sha1 "d908b069967695504f40f0d89323657e64dc7ef7" => :lion
end
def install
bin.mkpath # Script won't create this if it doesn't already exist
man1.install gzip('scons-time.1', 'scons.1', 'sconsign.1')
system "/usr/bin/python", "setup.py", "install",
"--prefix=#{prefix}",
"--standalone-lib",
# SCons gets handsy with sys.path---`scons-local` is one place it
# will look when all is said and done.
"--install-lib=#{libexec}/scons-local",
"--install-scripts=#{bin}",
"--install-data=#{libexec}",
"--no-version-script", "--no-install-man"
# 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
end
end
end