From 8edb2f90efec85c1e4a3519ad107f8fd2ed22104 Mon Sep 17 00:00:00 2001 From: yrammos Date: Sun, 16 Sep 2012 22:27:59 +0300 Subject: lilypond: add option to build docs Closes #14946. Signed-off-by: Jack Nagel --- Library/Formula/lilypond.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/lilypond.rb b/Library/Formula/lilypond.rb index 6d12185d7..e006e44d8 100644 --- a/Library/Formula/lilypond.rb +++ b/Library/Formula/lilypond.rb @@ -26,6 +26,8 @@ class Lilypond < Formula env :userpaths + option 'with-doc', "Build documentation in addition to binaries (may require several hours)." + depends_on TexInstalled.new depends_on 'pkg-config' => :build depends_on 'gettext' @@ -37,6 +39,15 @@ class Lilypond < Formula depends_on 'texinfo' depends_on :x11 + # Assert documentation dependencies if requested. + if build.include? 'with-doc' + depends_on 'netpbm' + depends_on 'imagemagick' + depends_on 'docbook' + depends_on 'dblatex' => :python + depends_on 'texi2html' + end + skip_clean :all fails_with :clang do @@ -52,6 +63,12 @@ class Lilypond < Formula # Separate steps to ensure that lilypond's custom fonts are created. system 'make all' system "make install" + + # Build documentation if requested. + if build.include? 'with-doc' + system "make doc" + system "make install-doc" + end end def test -- cgit v1.2.3