open-sp: install man pages and docs
Remove the `--disable-doc-build` option and set the XML_CATALOG env variable so that http:// sysids get resolved to local catalog files and we don't have disallowed-network-access-in-xsltproc problems (hat tip: ilovezfs) This gives us manpages, which were previously not being generated, and the rest of the docs Also, add simple open-sp test by writing out an SGML file, then reading and assert its validity with onsgmls. `onsgmls` non-zero return status is a test failure. Closes #16544. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
1b98748c9d
commit
9033ab7971
1 changed files with 24 additions and 3 deletions
|
@ -12,14 +12,35 @@ class OpenSp < Formula
|
|||
sha256 "d7b79be390f3c2b2a823e1156d896200db397dffb6cb6e6712d27539e05ca18b" => :yosemite
|
||||
end
|
||||
|
||||
depends_on "docbook" => :build
|
||||
depends_on "ghostscript" => :build
|
||||
depends_on "xmlto" => :build
|
||||
|
||||
def install
|
||||
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
|
||||
|
||||
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
||||
"--prefix=#{prefix}",
|
||||
"--mandir=#{man}",
|
||||
"--disable-doc-build",
|
||||
"--enable-http",
|
||||
"--enable-default-catalog=#{etc}/sgml/catalog",
|
||||
"--enable-default-search-path=#{HOMEBREW_PREFIX}/share/sgml"
|
||||
"--enable-default-catalog=#{etc}/sgml/catalog"
|
||||
|
||||
system "make", "pkgdatadir=#{share}/sgml/opensp", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"eg.sgml").write <<-EOS.undent
|
||||
<!DOCTYPE TESTDOC [
|
||||
|
||||
<!ELEMENT TESTDOC - - (TESTELEMENT)+>
|
||||
<!ELEMENT TESTELEMENT - - (#PCDATA)>
|
||||
|
||||
]>
|
||||
<TESTDOC>
|
||||
<TESTELEMENT>Hello</TESTELEMENT>
|
||||
</TESTDOC>
|
||||
EOS
|
||||
|
||||
system "#{bin}/onsgmls", "--warning=type-valid", "eg.sgml"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue