aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorKaran Lyons2013-08-23 01:40:11 -0700
committerAdam Vandenberg2013-08-23 07:29:00 -0700
commit2fba8f1ac719a1484a87f533ebe18327aa83c9b5 (patch)
tree255d3198d9052a32c8c1033f0a0e89f248797f08 /Library
parent9e6fcfb4b398aec28e719edd45782b781d832983 (diff)
downloadhomebrew-2fba8f1ac719a1484a87f533ebe18327aa83c9b5.tar.bz2
xmto: fix missing DTD/entities errors
`xmlto` forces the `--nonet` flag on `xsltproc`, which means it throws up an I/O error whenever it needs to hit the network to pull down any files. So we patch out the forced flag, and additionally add `docbook-xsl` as a dependency, which'll reduce the odds of having to hit the network in the first place. Fixes #21040. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/xmlto.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/Library/Formula/xmlto.rb b/Library/Formula/xmlto.rb
index 2ac432379..1f8f863bd 100644
--- a/Library/Formula/xmlto.rb
+++ b/Library/Formula/xmlto.rb
@@ -6,8 +6,15 @@ class Xmlto < Formula
sha1 '5d1aecd59d519066f94b4591722767c4e41bdc0f'
depends_on 'docbook'
+ depends_on 'docbook-xsl'
depends_on 'gnu-getopt'
+ def patches
+ # xmlto forces --no-net on xsltproc, which causes it to fail when
+ # DTDs/entities aren't available locally.
+ DATA
+ end
+
def install
# GNU getopt is keg-only, so point configure to it
ENV['GETOPT'] = Formula.factory('gnu-getopt').bin+"getopt"
@@ -19,3 +26,17 @@ class Xmlto < Formula
system "make install"
end
end
+
+
+__END__
+--- xmlto-0.0.25/xmlto.in.orig
++++ xmlto-0.0.25/xmlto.in
+@@ -209,7 +209,7 @@
+ export VERBOSE
+
+ # Disable network entities
+-XSLTOPTS="$XSLTOPTS --nonet"
++#XSLTOPTS="$XSLTOPTS --nonet"
+
+ # The names parameter for the XSLT stylesheet
+ XSLTPARAMS=""