/Library/Formula/pango.rb

https://bitbucket.org/zozo123/homebrew · Ruby · 46 lines · 36 code · 6 blank · 4 comment · 1 complexity · 56a708f0649aa5cb013490933dc92a73 MD5 · raw file

  1. require 'formula'
  2. class Pango < Formula
  3. homepage 'http://www.pango.org/'
  4. url 'http://ftp.gnome.org/pub/GNOME/sources/pango/1.30/pango-1.30.0.tar.xz'
  5. sha256 '7c6d2ab024affaed0e942f9279b818235f9c6a36d9fc50688f48d387f4102dff'
  6. depends_on 'pkg-config' => :build
  7. depends_on 'glib'
  8. if MacOS.leopard?
  9. depends_on 'fontconfig' # Leopard's fontconfig is too old.
  10. depends_on 'cairo' # Leopard doesn't come with Cairo.
  11. elsif MacOS.lion?
  12. # The Cairo library shipped with Lion contains a flaw that causes Graphviz
  13. # to segfault. See the following ticket for information:
  14. #
  15. # https://trac.macports.org/ticket/30370
  16. depends_on 'cairo'
  17. end
  18. fails_with :llvm do
  19. build 2326
  20. cause "Undefined symbols when linking"
  21. end
  22. def install
  23. ENV.x11
  24. system "./configure", "--disable-dependency-tracking",
  25. "--disable-debug",
  26. "--prefix=#{prefix}",
  27. "--enable-man",
  28. "--with-x",
  29. "--with-html-dir=#{share}/doc",
  30. "--disable-introspection"
  31. system "make"
  32. system "make install"
  33. end
  34. def test
  35. mktemp do
  36. system "#{bin}/pango-view -t 'test-image' --waterfall --rotate=10 --annotate=1 --header -q -o output.png"
  37. system "/usr/bin/qlmanage -p output.png"
  38. end
  39. end
  40. end