2011-12-10 19:53:10 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class GnomeDocUtils < Formula
|
|
|
|
homepage 'https://live.gnome.org/GnomeDocUtils'
|
2012-09-05 20:56:30 +00:00
|
|
|
url 'http://ftp.gnome.org/pub/gnome/sources/gnome-doc-utils/0.20/gnome-doc-utils-0.20.10.tar.xz'
|
2012-06-12 02:25:18 +00:00
|
|
|
sha256 'cb0639ffa9550b6ddf3b62f3b1add92fb92ab4690d351f2353cffe668be8c4a6'
|
2011-12-10 19:53:10 +00:00
|
|
|
|
|
|
|
depends_on 'pkg-config' => :build
|
2012-06-12 02:25:18 +00:00
|
|
|
depends_on 'xz' => :build
|
2011-12-10 19:53:10 +00:00
|
|
|
depends_on 'intltool'
|
|
|
|
depends_on 'docbook'
|
|
|
|
depends_on 'gettext'
|
|
|
|
|
2012-03-22 04:12:54 +00:00
|
|
|
# libxml2 must be installed --with-python, and since it is keg-only, the
|
|
|
|
# Python module must also be symlinked into site-packages or put on the
|
|
|
|
# PYTHONPATH.
|
|
|
|
depends_on 'libxml2'
|
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2326
|
|
|
|
cause "Undefined symbols when linking"
|
|
|
|
end
|
2011-12-10 19:53:10 +00:00
|
|
|
|
|
|
|
def install
|
2012-03-29 22:33:07 +00:00
|
|
|
# TODO this should possibly be moved up into build.rb
|
|
|
|
pydir = 'python' + `python -c 'import sys;print(sys.version[:3])'`.strip
|
|
|
|
libxml2 = Formula.factory('libxml2')
|
|
|
|
ENV.prepend 'PYTHONPATH', libxml2.lib/pydir/'site-packages', ':'
|
|
|
|
|
2012-06-07 04:05:19 +00:00
|
|
|
# Find our docbook catalog
|
|
|
|
ENV['XML_CATALOG_FILES'] = "#{etc}/xml/catalog"
|
|
|
|
|
2012-03-29 22:33:07 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--disable-scrollkeeper",
|
|
|
|
"--enable-build-utils=yes"
|
2011-12-10 19:53:10 +00:00
|
|
|
|
|
|
|
# Compilation doesn't work right if we jump straight to make install
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Gnome-doc-utils requires libxml2 to be compiled
|
|
|
|
with the python modules enabled, to do so:
|
|
|
|
$ brew install libxml2 --with-python
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|