From 677cfeca88e0a53bfb45f7bcebf8e696f765736a Mon Sep 17 00:00:00 2001 From: James Willcox Date: Wed, 1 Aug 2012 02:12:00 -0400 Subject: distcc 3.2rc1 Closes #13842. Signed-off-by: Adam Vandenberg --- Library/Formula/distcc.rb | 67 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Library/Formula/distcc.rb (limited to 'Library') diff --git a/Library/Formula/distcc.rb b/Library/Formula/distcc.rb new file mode 100644 index 000000000..cdc99dd10 --- /dev/null +++ b/Library/Formula/distcc.rb @@ -0,0 +1,67 @@ +require 'formula' + +class PythonWithoutPPC < Requirement + fatal true + satisfy { not archs_for_command("python").ppc? } + + def message + "This software will not compile if your default Python is built with PPC support." + end +end + +class Distcc < Formula + homepage 'http://code.google.com/p/distcc/' + url 'http://distcc.googlecode.com/files/distcc-3.2rc1.tar.gz' + sha1 '7cd46fe0926a3a859a516274e6ae59fa8ba0262d' + + depends_on PythonWithoutPPC + + def install + # Prevent distcc from finding the System Python 2.6 + ENV['PYTHON'] = which('python') + # Make sure python stuff is put into the Cellar. + # --root triggers a bug and installs into HOMEBREW_PREFIX/lib/python2.7/site-packages instead of the Cellar. + inreplace 'Makefile.in', '--root="$$DESTDIR"', "" + + system "./configure", "--prefix=#{prefix}" + system "make install" + + plist_path.write startup_plist + plist_path.chmod 0644 + end + + def startup_plist; <<-EOPLIST.undent + + + + + Label + #{plist_name} + RunAtLoad + + KeepAlive + + ProgramArguments + + #{HOMEBREW_PREFIX}/bin/distccd + --daemon + --no-detach + --allow=192.168.0.1/24 + + WorkingDirectory + #{HOMEBREW_PREFIX} + + + EOPLIST + end + + def caveats; <<-EOS.undent + Use 'brew services start distcc' to start distccd automatically on login. + By default, it will allow access to all clients on 192.168.0.1/24. + EOS + end + + def test + system "#{bin}/distcc" + end +end -- cgit v1.2.3