homebrew-core/Formula/asciidoc.rb

55 lines
1.8 KiB
Ruby
Raw Normal View History

2011-03-10 05:11:03 +00:00
class Asciidoc < Formula
desc "Formatter/translator for text files to numerous formats"
homepage "http://asciidoc.org/"
2014-12-29 07:09:57 +00:00
url "https://downloads.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz"
sha256 "78db9d0567c8ab6570a6eff7ffdf84eadd91f2dfc0a92a2d0105d323cab4e1f0"
2012-07-07 18:08:22 +00:00
2014-03-13 20:14:00 +00:00
bottle do
2015-09-23 13:36:21 +00:00
cellar :any_skip_relocation
2014-10-21 20:14:10 +00:00
revision 1
2015-09-23 13:36:21 +00:00
sha256 "345affbf8e5c86ecb679580c5a0e5f8e97fc732557cb75e7b2ba94d8ecfc2a70" => :el_capitan
2015-11-19 15:45:31 +00:00
sha256 "6d868af1ee68431d2f17e86cb30839efed396a963c5b7be5df435c0db4ca48c3" => :yosemite
sha256 "631dd27e65bb68697bda0b6641b753c0a8b6544c32c061ff15a2026b831eddbb" => :mavericks
sha256 "57187b6cdece57060271040ba69ec08cc772a97287ffccbbff3ea089afd4110a" => :mountain_lion
2014-03-13 20:14:00 +00:00
end
2013-09-22 00:27:25 +00:00
head do
url "https://github.com/asciidoc/asciidoc.git"
2014-06-02 02:38:17 +00:00
depends_on "autoconf" => :build
2013-09-22 00:27:25 +00:00
end
option "with-docbook-xsl", "Install DTDs to generate manpages"
depends_on "docbook"
depends_on "docbook-xsl" => :optional
def install
2012-08-09 23:21:05 +00:00
system "autoconf" if build.head?
system "./configure", "--prefix=#{prefix}"
# otherwise OS X's xmllint bails out
2014-12-29 07:09:57 +00:00
inreplace "Makefile", "-f manpage", "-f manpage -L"
system "make", "install"
end
def caveats; <<-EOS.undent
If you intend to process AsciiDoc files through an XML stage
(such as a2x for manpage generation) you need to add something
like:
2015-05-11 00:54:34 +00:00
export XML_CATALOG_FILES=#{etc}/xml/catalog
to your shell rc file so that xmllint can find AsciiDoc's
catalog files.
See `man 1 xmllint' for more.
EOS
end
test do
(testpath/"test.txt").write("== Hello World!")
system "#{bin}/asciidoc", "-b", "html5", "-o", "test.html", "test.txt"
assert_match %r{\<h2 id="_hello_world"\>Hello World!\</h2\>}, File.read("test.html")
end
2009-11-21 06:38:52 +00:00
end