aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/lilypond.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/lilypond.rb')
-rw-r--r--Library/Formula/lilypond.rb26
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