diff options
| author | Jack Nagel | 2012-02-14 23:57:56 -0600 | 
|---|---|---|
| committer | Jack Nagel | 2012-02-15 09:22:59 -0600 | 
| commit | fba3d905eecbebabf1740824bb9d556b00b33c13 (patch) | |
| tree | 293c622bf0da52fea3a59da672cec25dd7295236 /Library/Formula/xmlto.rb | |
| parent | bc82010bf1fdd6bf854f8cde926a769c59c13815 (diff) | |
| download | homebrew-fba3d905eecbebabf1740824bb9d556b00b33c13.tar.bz2 | |
docbook: keep XML catalog inside HOMEBREW_PREFIX
Rather than download a shell script and tell users to run it with
`sudo`, it is better to keep everything under Homebrew's control.
Luckily, the XML toolchain provides the environment variable
XML_CATALOG_FILES to allow files otehr than /etc/xml/catalog to be used.
So remove the shell script, and do all the work inside the formula
itself. When we're done, we just tell the user to add
HOMEBREW_PREFIX/etc/xml/catalog to their shell configuration, rather
than tell them to `sudo docbook-register`.
Rather than download the shell script, just download docbook 5.0, which
we need anyway.
This also simplifies the logic in a handful of docbook-using formula.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/xmlto.rb')
| -rw-r--r-- | Library/Formula/xmlto.rb | 28 | 
1 files changed, 5 insertions, 23 deletions
diff --git a/Library/Formula/xmlto.rb b/Library/Formula/xmlto.rb index 2c58e31ac..0292ff0c3 100644 --- a/Library/Formula/xmlto.rb +++ b/Library/Formula/xmlto.rb @@ -1,39 +1,21 @@  require 'formula'  class Xmlto < Formula +  homepage 'http://cyberelk.net/tim/software/xmlto/'    url 'http://fedorahosted.org/releases/x/m/xmlto/xmlto-0.0.23.tar.bz2'    md5 '3001d6bb2bbc2c8f6c2301f05120f074' -  homepage 'http://cyberelk.net/tim/software/xmlto/'    depends_on 'docbook'    depends_on 'gnu-getopt'    def install -    docbook = Formula.factory "docbook" -    getopt = Formula.factory "gnu-getopt" - -    unless File.exist? "/private/etc/xml/catalog" -      opoo "You must to register docbook" -      puts docbook.caveats -      exit 99 -    end -      # GNU getopt is keg-only, so point configure to it -    ENV['GETOPT']=getopt.bin+"getopt" +    ENV['GETOPT'] = Formula.factory('gnu-getopt').bin+"getopt" +    # Find our docbook catalog +    ENV['XML_CATALOG_FILES'] = "#{etc}/xml/catalog" -    ENV.j1 +    ENV.deparallelize      system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" -      system "make install"    end - -  def caveats -    docbook = Formula.factory "docbook" -    <<-EOS.undent -      xmlto requires that docbook be installed and registered. - -      See: -        brew info docbook -    EOS -  end  end  | 
