homebrew-core/Formula/asciidoc.rb
Andrew Janke 952d4fa7b3 asciidoc: update homepage/head links
AsciiDoc has a new "official" website along with a change in development
organization, and they have also recently migrated from Google Code to
GitHub. This change points `home` and `head` at the new locations.

Reference: https://groups.google.com/forum/#!topic/asciidoc/6p7KcFRabp4

Closes Homebrew/homebrew#40061.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-05-25 22:42:36 +01:00

52 lines
1.5 KiB
Ruby

class Asciidoc < Formula
homepage "http://asciidoc.org/"
url "https://downloads.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz"
sha1 "82e574dd061640561fa0560644bc74df71fb7305"
bottle do
cellar :any
revision 1
sha1 "14ff65fa337658acf5011b24a728a2f6f413fd3c" => :yosemite
sha1 "84793575a498025283f81295feeee74103386b70" => :mavericks
sha1 "7c932bea7c4d3e56072a7adb5cd4914cd5972414" => :mountain_lion
end
head do
url "https://github.com/asciidoc/asciidoc.git"
depends_on "autoconf" => :build
end
depends_on "docbook"
option "with-docbook-xsl", "Install DTDs to generate manpages"
depends_on "docbook-xsl" => :optional
def install
system "autoconf" if build.head?
system "./configure", "--prefix=#{prefix}"
# otherwise OS X's xmllint bails out
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:
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 /\<h2 id="_hello_world"\>Hello World!\<\/h2\>/, File.read("test.html")
end
end