homebrew-core/Formula/scons.rb

36 lines
1.3 KiB
Ruby

require 'formula'
class Scons < Formula
homepage 'http://www.scons.org'
url 'https://downloads.sourceforge.net/scons/scons-2.3.2.tar.gz'
sha1 '2937f20b86d0c5f86cf31e1fa378307ed34fc20a'
bottle do
cellar :any
sha1 "65c501c87d7e206741771557a15acf70f46ce1d9" => :mavericks
sha1 "f3b905adce064f5d11b3cca45e613eb20cbce4f6" => :mountain_lion
sha1 "50344e59e5f99675239891ba92aaed4a70323b5e" => :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