homebrew-core/Formula/reposurgeon.rb
Mike McQuaid 7a4dabfc1a Use hash rockets again. (#5177)
This restores 1.8 hash rockets because they look nicer with e.g. `depends_on :foo => :bar`
2016-09-24 16:45:48 +01:00

56 lines
2 KiB
Ruby

class Reposurgeon < Formula
desc "Edit version-control repository history"
homepage "http://www.catb.org/esr/reposurgeon/"
url "https://gitlab.com/esr/reposurgeon.git",
:tag => "3.40",
:revision => "4e0e56e0773e5d00e000f12196642b83081ceb0d"
head "https://gitlab.com/esr/reposurgeon.git"
bottle do
cellar :any_skip_relocation
sha256 "7aa83bc38b108e896e2a9695b5855ada001679837151bf836c42297df419de4b" => :sierra
sha256 "b086a0dd9b192a9fd2d28b365f7e50e03ff5e26dd3d8e71e679ad2f2e569e97f" => :el_capitan
sha256 "78d370ef4e6b76b0fc02506f1c10253fa33caeeb01176bf7d2c444f6ec0bea12" => :yosemite
end
option "without-cython", "Build without cython (faster compile)"
depends_on :python if MacOS.version <= :snow_leopard
depends_on "asciidoc" => :build
depends_on "xmlto" => :build
resource "Cython" do
url "https://files.pythonhosted.org/packages/c6/fe/97319581905de40f1be7015a0ea1bd336a756f6249914b148a17eefa75dc/Cython-0.24.1.tar.gz"
sha256 "84808fda00508757928e1feadcf41c9f78e9a9b7167b6649ab0933b76f75e7b9"
end
def install
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
system "make", "install", "prefix=#{prefix}"
elisp.install "reposurgeon-mode.el"
if build.with? "cython"
resource("Cython").stage do
system "python", *Language::Python.setup_install_args(buildpath/"vendor")
end
ENV.prepend_path "PYTHONPATH", buildpath/"vendor/lib/python2.7/site-packages"
system "make", "install-cyreposurgeon", "prefix=#{prefix}",
"CYTHON=#{buildpath}/vendor/bin/cython",
"pyinclude=" + `python-config --cflags`.chomp,
"pylib=" + `python-config --ldflags`.chomp
end
end
test do
(testpath/".gitconfig").write <<-EOS.undent
[user]
name = Real Person
email = notacat@hotmail.cat
EOS
system "git", "init"
system "git", "commit", "--allow-empty", "--message", "brewing"
assert_match "brewing",
shell_output("script -q /dev/null #{bin}/reposurgeon read list")
end
end