2010-01-22 05:13:42 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Lilypond < Formula
|
2010-01-22 05:13:42 +00:00
|
|
|
homepage 'http://lilypond.org/'
|
2013-02-04 11:16:42 +00:00
|
|
|
url 'http://download.linuxaudio.org/lilypond/sources/v2.16/lilypond-2.16.2.tar.gz'
|
|
|
|
sha1 '1eb3b0e5c117a8669dba19ab28f933351e51e39a'
|
|
|
|
|
|
|
|
devel do
|
2013-05-30 18:50:42 +00:00
|
|
|
url 'http://download.linuxaudio.org/lilypond/source/v2.17/lilypond-2.17.19.tar.gz'
|
|
|
|
sha1 'b96b5f692785c2ee3e204cf15520327792efacb6'
|
2013-02-04 11:16:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
env :std
|
2010-01-22 05:13:42 +00:00
|
|
|
|
2012-09-16 19:27:59 +00:00
|
|
|
option 'with-doc', "Build documentation in addition to binaries (may require several hours)."
|
|
|
|
|
2012-12-29 02:39:09 +00:00
|
|
|
depends_on :tex
|
2013-02-03 21:42:18 +00:00
|
|
|
depends_on :x11
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-01-22 05:13:42 +00:00
|
|
|
depends_on 'gettext'
|
|
|
|
depends_on 'pango'
|
2011-03-06 00:20:53 +00:00
|
|
|
depends_on 'guile'
|
|
|
|
depends_on 'ghostscript'
|
2010-01-22 05:13:42 +00:00
|
|
|
depends_on 'mftrace'
|
2013-02-03 21:42:18 +00:00
|
|
|
depends_on 'fontforge' => ["with-x", "with-cairo"]
|
2010-01-22 05:13:42 +00:00
|
|
|
depends_on 'texinfo'
|
2013-02-04 11:16:42 +00:00
|
|
|
depends_on 'fondu'
|
|
|
|
# Add dependency on keg-only Homebrew 'flex' because Apple bundles an older and incompatible
|
|
|
|
# version of the library with 10.7 at least, seems slow keeping up with updates,
|
|
|
|
# and the extra brew is tiny anyway.
|
|
|
|
depends_on 'flex' => :build
|
2010-01-22 05:13:42 +00:00
|
|
|
|
2012-09-16 19:27:59 +00:00
|
|
|
# Assert documentation dependencies if requested.
|
|
|
|
if build.include? 'with-doc'
|
|
|
|
depends_on 'netpbm'
|
|
|
|
depends_on 'imagemagick'
|
|
|
|
depends_on 'docbook'
|
2013-01-27 22:46:24 +00:00
|
|
|
depends_on LanguageModuleDependency.new(:python, 'dblatex', 'dbtexmf.dblatex')
|
2012-09-16 19:27:59 +00:00
|
|
|
depends_on 'texi2html'
|
|
|
|
end
|
|
|
|
|
2012-08-27 17:26:08 +00:00
|
|
|
fails_with :clang do
|
|
|
|
cause 'Strict C99 compliance error in a pointer conversion.'
|
|
|
|
end
|
|
|
|
|
2010-01-22 05:13:42 +00:00
|
|
|
def install
|
2011-03-06 00:20:53 +00:00
|
|
|
gs = Formula.factory('ghostscript')
|
2013-02-04 11:16:42 +00:00
|
|
|
|
|
|
|
args = ["--prefix=#{prefix}",
|
|
|
|
"--enable-rpath",
|
|
|
|
"--with-ncsb-dir=#{gs.share}/ghostscript/fonts/"]
|
|
|
|
|
|
|
|
args << "--disable-documentation" unless build.include? 'with-doc'
|
|
|
|
system "./configure", *args
|
2010-01-22 05:13:42 +00:00
|
|
|
|
|
|
|
# Separate steps to ensure that lilypond's custom fonts are created.
|
2012-08-27 17:26:08 +00:00
|
|
|
system 'make all'
|
2010-01-22 05:13:42 +00:00
|
|
|
system "make install"
|
2012-09-16 19:27:59 +00:00
|
|
|
|
|
|
|
# Build documentation if requested.
|
|
|
|
if build.include? 'with-doc'
|
|
|
|
system "make doc"
|
|
|
|
system "make install-doc"
|
|
|
|
end
|
2010-01-22 05:13:42 +00:00
|
|
|
end
|
2012-08-27 17:26:08 +00:00
|
|
|
|
2013-02-02 05:13:30 +00:00
|
|
|
test do
|
|
|
|
(testpath/'test.ly').write <<-EOS.undent
|
|
|
|
\\header { title = "Do-Re-Mi" }
|
|
|
|
{ c' d' e' }
|
|
|
|
EOS
|
2013-04-30 05:28:17 +00:00
|
|
|
system "#{bin}/lilypond", "test.ly"
|
2012-08-27 17:26:08 +00:00
|
|
|
end
|
2010-01-22 05:13:42 +00:00
|
|
|
end
|