distcc: use GitHub tag.

Also generally cleanup the formula.

Closes #4953.

Closes #6799.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Mike McQuaid 2016-11-10 21:17:43 +00:00
parent da92c2e244
commit b8a0bad333

View file

@ -1,17 +1,12 @@
class PythonWithoutPPCRequirement < Requirement
fatal true
satisfy(:build_env => false) { !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 class Distcc < Formula
desc "Distributed compiler client and server" desc "Distributed compiler client and server"
homepage "https://code.google.com/p/distcc/" homepage "https://github.com/distcc/distcc/"
url "https://distcc.googlecode.com/files/distcc-3.2rc1.tar.gz" url "https://github.com/distcc/distcc/archive/v3.2rc1.tar.gz"
sha256 "8cf474b9e20f5f3608888c6bff1b5f804a9dfc69ae9704e3d5bdc92f0487760a" version "3.2rc1"
sha256 "33e85981ff6afd94efc38b23b2d8b9036b3dff2dc6eac6982b9ff0ae1de64caa"
depends_on "autoconf" => :build
depends_on "automake" => :build
bottle do bottle do
sha256 "67cace8962a3046e66c71726e0800b93635e2b51d5ae95d1a4465ec6c93e3a93" => :el_capitan sha256 "67cace8962a3046e66c71726e0800b93635e2b51d5ae95d1a4465ec6c93e3a93" => :el_capitan
@ -19,20 +14,18 @@ class Distcc < Formula
sha256 "bf0e1b9468861414802356814229c8c1256abf22fb00bc2819644f4f6e336485" => :mavericks sha256 "bf0e1b9468861414802356814229c8c1256abf22fb00bc2819644f4f6e336485" => :mavericks
end end
depends_on PythonWithoutPPCRequirement
def install def install
# Make sure python stuff is put into the Cellar. # 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. # --root triggers a bug and installs into HOMEBREW_PREFIX/lib/python2.7/site-packages instead of the Cellar.
inreplace "Makefile.in", '--root="$$DESTDIR"', "" inreplace "Makefile.in", '--root="$$DESTDIR"', ""
system "./autogen.sh"
system "./configure", "--prefix=#{prefix}" system "./configure", "--prefix=#{prefix}"
system "make", "install" system "make", "install"
plist_path.write startup_plist
plist_path.chmod 0644
end end
def startup_plist; <<-EOPLIST.undent plist_options :manual => "distccd"
def plist; <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
@ -45,21 +38,15 @@ class Distcc < Formula
<true/> <true/>
<key>ProgramArguments</key> <key>ProgramArguments</key>
<array> <array>
<string>#{HOMEBREW_PREFIX}/bin/distccd</string> <string>#{opt_prefix}/bin/distccd</string>
<string>--daemon</string> <string>--daemon</string>
<string>--no-detach</string> <string>--no-detach</string>
<string>--allow=192.168.0.1/24</string> <string>--allow=192.168.0.1/24</string>
</array> </array>
<key>WorkingDirectory</key> <key>WorkingDirectory</key>
<string>#{HOMEBREW_PREFIX}</string> <string>#{opt_prefix}</string>
</dict> </dict>
</plist> </plist>
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 EOS
end end