homebrew-core/Formula/lilypond.rb

65 lines
1.7 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Lilypond < Formula
homepage 'http://lilypond.org/'
url 'http://download.linuxaudio.org/lilypond/sources/v2.16/lilypond-2.16.1.tar.gz'
sha1 'ce923f27091ec5501df7bcd0596f1ffd7ab9b8b9'
option 'with-doc', "Build documentation in addition to binaries (may require several hours)."
depends_on :tex
depends_on 'pkg-config' => :build
depends_on 'gettext'
depends_on 'pango'
2011-03-06 00:20:53 +00:00
depends_on 'guile'
depends_on 'ghostscript'
depends_on 'mftrace'
depends_on 'fontforge'
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'
2013-01-27 22:46:24 +00:00
depends_on LanguageModuleDependency.new(:python, 'dblatex', 'dbtexmf.dblatex')
depends_on 'texi2html'
end
skip_clean :all
fails_with :clang do
build 421
cause 'Strict C99 compliance error in a pointer conversion.'
end
def install
2011-03-06 00:20:53 +00:00
gs = Formula.factory('ghostscript')
system "./configure", "--prefix=#{prefix}", "--enable-rpath",
2011-03-06 00:20:53 +00:00
"--with-ncsb-dir=#{gs.share}/ghostscript/fonts/"
# 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
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"
end
end
end