<commit_before>require 'formula'

class Ggobi < Formula
  url 'http://www.ggobi.org/downloads/ggobi-2.1.9.tar.bz2'
  homepage 'http://www.ggobi.org'
  md5 'b579861f157dfc6c5669604859352eb4'

  depends_on 'gtk+'
  depends_on 'glib'
  depends_on 'atk'
  depends_on 'cairo'
  depends_on 'fontconfig'
  depends_on 'pango'
  depends_on 'gettext'
  depends_on :x11

  # Several files reference "line 0", which gcc accepts but clang doesn't
  # See https://github.com/mxcl/homebrew/pull/13423
  def patches; DATA; end

  def install
    # Necessary for ggobi to build - based on patch from MacPorts
    # See: https://trac.macports.org/export/64669/trunk/dports/science/ggobi/files/patch-src-texture.diff
    inreplace 'src/texture.c', 'psort', 'p_sort'<commit_msg>ggobi: Note upstream bug report for patch<commit_after>require 'formula'

class Ggobi < Formula
  url 'http://www.ggobi.org/downloads/ggobi-2.1.9.tar.bz2'
  homepage 'http://www.ggobi.org'
  md5 'b579861f157dfc6c5669604859352eb4'

  depends_on 'gtk+'
  depends_on 'glib'
  depends_on 'atk'
  depends_on 'cairo'
  depends_on 'fontconfig'
  depends_on 'pango'
  depends_on 'gettext'
  depends_on :x11

  # Several files reference "line 0", which gcc accepts but clang doesn't
  # See https://github.com/mxcl/homebrew/pull/13423
  def patches; DATA; end

  def install
    # Necessary for ggobi to build - based on patch from MacPorts
    # See: https://trac.macports.org/export/64669/trunk/dports/science/ggobi/files/patch-src-texture.diff
    # Reported at https://groups.google.com/d/msg/ggobi/0yiepEUgjiM/nXTVoMaAzj8J
    inreplace 'src/texture.c', 'psort', 'p_sort'
{'fraction_non_alphanumeric': 0.11938461538461538, 'fraction_numerical': 0.05292307692307692, 'mean_word_length': 3.9272727272727272, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 4, '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': '3777126', 'n_tokens_mistral': 684, 'n_tokens_neox': 639, 'n_words': 132}