diff options
| author | Adam Vandenberg | 2012-02-29 20:36:21 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2012-03-10 09:24:10 -0800 |
| commit | 939a1bb1cb742361ae8793f81fcfa54f849ee41a (patch) | |
| tree | 39cc8995bb0f9a74072f87364f969a04153a2848 /Library/Formula/lilypond.rb | |
| parent | d5f0cb3c0782d0893ca8397d4f7d8b5781dee9cd (diff) | |
| download | homebrew-939a1bb1cb742361ae8793f81fcfa54f849ee41a.tar.bz2 | |
Use new Requirements in formulae
Diffstat (limited to 'Library/Formula/lilypond.rb')
| -rw-r--r-- | Library/Formula/lilypond.rb | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/Library/Formula/lilypond.rb b/Library/Formula/lilypond.rb index bbc78b119..22f466c81 100644 --- a/Library/Formula/lilypond.rb +++ b/Library/Formula/lilypond.rb @@ -1,10 +1,26 @@ require 'formula' +class TexInstalled < Requirement + def message; <<-EOS.undent + A TeX/LaTeX installation is required to install. + You can obtain the TeX distribution for Mac OS X from: + http://www.tug.org/mactex/ + EOS + end + def satisfied? + which 'mpost' + end + def fatal? + true + end +end + class Lilypond < Formula - url 'http://download.linuxaudio.org/lilypond/sources/v2.14/lilypond-2.14.2.tar.gz' homepage 'http://lilypond.org/' + url 'http://download.linuxaudio.org/lilypond/sources/v2.14/lilypond-2.14.2.tar.gz' md5 '4053a19e03181021893981280feb9aaa' + depends_on TexInstalled.new depends_on 'pkg-config' => :build depends_on 'gettext' depends_on 'pango' @@ -17,8 +33,6 @@ class Lilypond < Formula skip_clean :all def install - abort caveats unless which "mpost" - gs = Formula.factory('ghostscript') system "./configure", "--prefix=#{prefix}", "--with-ncsb-dir=#{gs.share}/ghostscript/fonts/" @@ -27,10 +41,4 @@ class Lilypond < Formula system "make" system "make install" end - - def caveats; <<-EOS.undent - Lilypond requires a version of TeX, such as TeX Live or MacTeX, prior to installing. - Available at: http://www.tug.org/mactex/ - EOS - end end |
