/Library/Formula/gnome-doc-utils.rb

https://bitbucket.org/zozo123/homebrew · Ruby · 45 lines · 31 code · 9 blank · 5 comment · 0 complexity · 9d17217a69379512c78bcaf0525d68ba MD5 · raw file

  1. require 'formula'
  2. class GnomeDocUtils < Formula
  3. homepage 'https://live.gnome.org/GnomeDocUtils'
  4. url 'ftp://ftp.gnome.org/pub/gnome/sources/gnome-doc-utils/0.20/gnome-doc-utils-0.20.6.tar.bz2'
  5. sha256 '091486e370480bf45349ad09dac799211092a02938b26a0d68206172cb6cebbf'
  6. depends_on 'pkg-config' => :build
  7. depends_on 'intltool'
  8. depends_on 'docbook'
  9. depends_on 'gettext'
  10. # libxml2 must be installed --with-python, and since it is keg-only, the
  11. # Python module must also be symlinked into site-packages or put on the
  12. # PYTHONPATH.
  13. depends_on 'libxml2'
  14. fails_with :llvm do
  15. build 2326
  16. cause "Undefined symbols when linking"
  17. end
  18. def install
  19. # TODO this should possibly be moved up into build.rb
  20. pydir = 'python' + `python -c 'import sys;print(sys.version[:3])'`.strip
  21. libxml2 = Formula.factory('libxml2')
  22. ENV.prepend 'PYTHONPATH', libxml2.lib/pydir/'site-packages', ':'
  23. system "./configure", "--prefix=#{prefix}",
  24. "--disable-scrollkeeper",
  25. "--enable-build-utils=yes"
  26. # Compilation doesn't work right if we jump straight to make install
  27. system "make"
  28. system "make install"
  29. end
  30. def caveats; <<-EOS.undent
  31. Gnome-doc-utils requires libxml2 to be compiled
  32. with the python modules enabled, to do so:
  33. $ brew install libxml2 --with-python
  34. EOS
  35. end
  36. end