Permalink
Browse files

lilypond: add option to build docs

Closes #14946.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information...
1 parent dd721cc commit e00ecd7c501c8d49fa746130d35adc3e2f04c4b6 @yrammos yrammos committed with thaxter Sep 16, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 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 @@ def install
# 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

0 comments on commit e00ecd7

Please sign in to comment.