2009-11-19 03:49:34 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Bazaar < Formula
|
2012-02-12 18:54:28 +00:00
|
|
|
homepage 'http://bazaar-vcs.org/'
|
2012-05-31 17:25:26 +00:00
|
|
|
url 'https://launchpad.net/bzr/2.5/2.5.1/+download/bzr-2.5.1.tar.gz'
|
|
|
|
md5 'ac5079858364a046071000d5cdccb67b'
|
2010-08-02 00:43:47 +00:00
|
|
|
|
2012-08-09 05:10:00 +00:00
|
|
|
option "system", "Install using the OS X system Python."
|
2010-08-01 22:16:52 +00:00
|
|
|
|
2009-11-19 03:49:34 +00:00
|
|
|
def install
|
2011-01-21 04:38:53 +00:00
|
|
|
ENV.j1 # Builds aren't parallel-safe
|
|
|
|
|
|
|
|
# Make and install man page first
|
|
|
|
system "make man1/bzr.1"
|
|
|
|
man1.install "man1/bzr.1"
|
|
|
|
|
2012-08-09 15:51:54 +00:00
|
|
|
if build.include? "system"
|
2010-08-02 00:43:47 +00:00
|
|
|
ENV.prepend "PATH", "/System/Library/Frameworks/Python.framework/Versions/Current/bin", ":"
|
|
|
|
end
|
|
|
|
|
2011-03-19 16:49:39 +00:00
|
|
|
# Find the arch for the Python we are building against.
|
|
|
|
# We remove 'ppc' support, so we can pass Intel-optimized CFLAGS.
|
2012-08-09 15:51:54 +00:00
|
|
|
if build.include? "system"
|
2011-03-19 16:49:39 +00:00
|
|
|
python_cmd = "/usr/bin/python"
|
|
|
|
else
|
|
|
|
python_cmd = "python"
|
|
|
|
end
|
|
|
|
|
2011-08-31 00:34:19 +00:00
|
|
|
archs = archs_for_command(python_cmd)
|
2011-03-19 16:49:39 +00:00
|
|
|
archs.remove_ppc!
|
|
|
|
ENV['ARCHFLAGS'] = archs.as_arch_flags
|
2010-04-16 16:41:25 +00:00
|
|
|
|
2010-04-02 00:57:38 +00:00
|
|
|
system "make"
|
2012-08-09 15:51:54 +00:00
|
|
|
inreplace "bzr", "#! /usr/bin/env python", "#!/usr/bin/python" if build.include? "system"
|
2012-02-12 18:54:28 +00:00
|
|
|
libexec.install 'bzr', 'bzrlib'
|
2010-01-19 14:41:25 +00:00
|
|
|
|
2012-02-12 18:54:28 +00:00
|
|
|
bin.install_symlink libexec+'bzr'
|
2010-04-02 00:57:38 +00:00
|
|
|
end
|
2010-01-19 14:41:25 +00:00
|
|
|
|
2012-08-09 05:10:00 +00:00
|
|
|
def caveats; <<-EOS.undent
|
2010-04-02 00:57:38 +00:00
|
|
|
We've built a "standalone" version of bazaar and installed its libraries to:
|
|
|
|
#{libexec}
|
2010-01-19 14:41:25 +00:00
|
|
|
|
2010-04-02 00:57:38 +00:00
|
|
|
We've specifically kept it out of your Python's "site-packages" folder.
|
2010-01-19 14:41:25 +00:00
|
|
|
EOS
|
|
|
|
end
|
2009-11-19 03:49:34 +00:00
|
|
|
end
|