<commit_before>require 'formula'

class Lilypond < Formula
  url 'http://download.linuxaudio.org/lilypond/sources/v2.14/lilypond-2.14.0.tar.gz'
  homepage 'http://lilypond.org/'
  md5 '6c08f7246ce79934ec8a41ae7bea05d9'

  depends_on 'pkg-config' => :build
  depends_on 'gettext'
  depends_on 'pango'
  depends_on 'guile'
  depends_on 'ghostscript'
  depends_on 'mftrace'
  depends_on 'fontforge'
  depends_on 'texinfo'

  skip_clean :all

  def install
    abort caveats unless quiet_system "/usr/bin/which -s mpost"

    gs = Formula.factory('ghostscript')
    system "./configure", "--prefix=#{prefix}",
                          "--with-ncsb-dir=#{gs.share}/ghostscript/fonts/"

    # Separate steps to ensure that lilypond's custom fonts are created.
    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.<commit_msg>Lilypond 2.14.2<commit_after>require 'formula'

class Lilypond < Formula
  url 'http://download.linuxaudio.org/lilypond/sources/v2.14/lilypond-2.14.2.tar.gz'
  homepage 'http://lilypond.org/'
  md5 '4053a19e03181021893981280feb9aaa'

  depends_on 'pkg-config' => :build
  depends_on 'gettext'
  depends_on 'pango'
  depends_on 'guile'
  depends_on 'ghostscript'
  depends_on 'mftrace'
  depends_on 'fontforge'
  depends_on 'texinfo'

  skip_clean :all

  def install
    abort caveats unless quiet_system "/usr/bin/which -s mpost"

    gs = Formula.factory('ghostscript')
    system "./configure", "--prefix=#{prefix}",
                          "--with-ncsb-dir=#{gs.share}/ghostscript/fonts/"

    # Separate steps to ensure that lilypond's custom fonts are created.
    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.
{'fraction_non_alphanumeric': 0.11645299145299146, 'fraction_numerical': 0.03365384615384615, 'mean_word_length': 3.355813953488372, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5587849', 'n_tokens_mistral': 705, 'n_tokens_neox': 681, 'n_words': 158}