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/'
|
2012-11-10 16:18:35 +00:00
|
|
|
url 'http://download.linuxaudio.org/lilypond/sources/v2.16/lilypond-2.16.1.tar.gz'
|
|
|
|
sha1 'ce923f27091ec5501df7bcd0596f1ffd7ab9b8b9'
|
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
|
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'
|
|
|
|
depends_on 'fontforge'
|
|
|
|
depends_on 'texinfo'
|
2012-08-27 17:26:08 +00:00
|
|
|
depends_on :x11
|
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
|
|
|
|
|
2010-04-07 05:58:35 +00:00
|
|
|
skip_clean :all
|
2010-01-22 05:13:42 +00:00
|
|
|
|
2012-08-27 17:26:08 +00:00
|
|
|
fails_with :clang do
|
2012-09-05 17:32:58 +00:00
|
|
|
build 421
|
2012-08-27 17:26:08 +00:00
|
|
|
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')
|
2012-08-27 17:26:08 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--enable-rpath",
|
2011-03-06 00:20:53 +00:00
|
|
|
"--with-ncsb-dir=#{gs.share}/ghostscript/fonts/"
|
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
|
|
|
|
|
|
|
def test
|
|
|
|
mktemp do
|
|
|
|
(Pathname.pwd+'test.ly').write <<-EOS.undent
|
|
|
|
\\version "2.16.0"
|
|
|
|
\\header { title = "Do-Re-Mi" }
|
|
|
|
{ c' d' e' }
|
|
|
|
EOS
|
|
|
|
lilykeg = Formula.factory('lilypond').linked_keg
|
2012-09-02 07:52:38 +00:00
|
|
|
system "#{lilykeg}/bin/lilypond test.ly"
|
2012-08-27 17:26:08 +00:00
|
|
|
end
|
|
|
|
end
|
2010-01-22 05:13:42 +00:00
|
|
|
end
|