<commit_before>require 'formula'

class Global < Formula
  homepage 'http://www.gnu.org/software/global/'
  url 'http://ftpmirror.gnu.org/global/global-6.2.5.tar.gz'
  mirror 'http://ftp.gnu.org/gnu/global/global-6.2.5.tar.gz'
  sha1 'f3095e5c2427b0af1715e2696bdf32bacb50b989'

  option "without-rebuilding-php-parser", "Don't rebuild PHP parser; use provied parser"

  def install
    # Rebuilding the PHP parser, see:
    # http://comments.gmane.org/gmane.comp.gnu.global.bugs/1439
    unless build.include? "without-rebuilding-php-parser"
      system "flex -o libparser/php.c libparser/php.l"
    end

    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"

    # we copy these in already
    cd share/'gtags' do
      rm %w[README COPYING LICENSE INSTALL ChangeLog AUTHORS]
    end
  end

  def caveats; <<-EOS.undent<commit_msg>global 6.2.6<commit_after>require 'formula'

class Global < Formula
  homepage 'http://www.gnu.org/software/global/'
  url 'http://ftpmirror.gnu.org/global/global-6.2.6.tar.gz'
  mirror 'http://ftp.gnu.org/gnu/global/global-6.2.6.tar.gz'
  sha1 '9c802a8fdc2d50e2a0780eb7033d5bad258c3f42'

  option "without-rebuilding-php-parser", "Don't rebuild PHP parser; use provied parser"

  def install
    # Rebuilding the PHP parser, see:
    # http://comments.gmane.org/gmane.comp.gnu.global.bugs/1439
    unless build.include? "without-rebuilding-php-parser"
      system "flex -o libparser/php.c libparser/php.l"
    end

    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"

    # we copy these in already
    cd share/'gtags' do
      rm %w[README COPYING LICENSE INSTALL ChangeLog AUTHORS]
    end
  end

  def caveats; <<-EOS.undent
{'fraction_non_alphanumeric': 0.13289401427786932, 'fraction_numerical': 0.040637012630422846, 'mean_word_length': 2.9608695652173913, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1153178', 'n_tokens_mistral': 690, 'n_tokens_neox': 636, 'n_words': 132}