<commit_before>require 'formula'

class GobjectIntrospection < Formula
  homepage 'http://live.gnome.org/GObjectIntrospection'
  url 'http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.38/gobject-introspection-1.38.0.tar.xz'
  sha256 '3575e5d353c17a567fdf7ffaaa7aebe9347b5b0eee8e69d612ba56a9def67d73'

  bottle do
    sha1 "08dcb543c8b7f2c8fc112278db752159edb420ba" => :mavericks
    sha1 "a65b28dde0014e5cf622657ac913e6ad5fd29709" => :mountain_lion
    sha1 "2adfc7d361663cd40780b19cccebfb275a180791" => :lion
  end

  option :universal
  option 'with-tests', 'Run tests in addition to the build (requires cairo)'

  depends_on 'pkg-config' => :build
  depends_on 'glib'
  depends_on 'libffi'
  # To avoid: ImportError: dlopen(./.libs/_giscanner.so, 2): Symbol not found: _PyList_Check
  depends_on :python
  depends_on 'cairo' => :build if build.with? 'tests'

  # Allow tests to execute on OS X (.so => .dylib)
  patch do
    url "https://gist.github.com/krrk/6958869/raw/de8d83009d58eefa680a590f5839e61a6e76ff76/gobject-introspection-tests.patch"
    sha1 "1f57849db76cd2ca26ddb35dc36c373606414dfc"
  end if build.with? "tests"

  def install
    ENV['GI_SCANNER_DISABLE_CACHE'] = 'true'
    ENV.universal_binary if build.universal?
    inreplace 'giscanner/transformer.py', '/usr/share', HOMEBREW_PREFIX/'share'
    inreplace 'configure' do |s|
      s.change_make_var! 'GOBJECT_INTROSPECTION_LIBDIR', HOMEBREW_PREFIX/'lib'
    end

    args = %W[--disable-dependency-tracking --prefix=#{prefix}]
    args << "--with-cairo" if build.with? "tests"

    system "./configure", *args
    system "make"
    system "make", "check" if build.with? "tests"
    system "make", "install"
  end
end
<commit_msg>gobject-introspection 1.40.0<commit_after>require 'formula'

class GobjectIntrospection < Formula
  homepage 'http://live.gnome.org/GObjectIntrospection'
  url 'http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.40/gobject-introspection-1.40.0.tar.xz'
  sha256 '96ea75e9679083e7fe39a105e810e2ead2d708abf189a5ba420bfccfffa24e98'

  bottle do
    sha1 "08dcb543c8b7f2c8fc112278db752159edb420ba" => :mavericks
    sha1 "a65b28dde0014e5cf622657ac913e6ad5fd29709" => :mountain_lion
    sha1 "2adfc7d361663cd40780b19cccebfb275a180791" => :lion
  end

  option :universal
  option 'with-tests', 'Run tests in addition to the build (requires cairo)'

  depends_on 'pkg-config' => :build
  depends_on 'glib'
  depends_on 'libffi'
  # To avoid: ImportError: dlopen(./.libs/_giscanner.so, 2): Symbol not found: _PyList_Check
  depends_on :python
  depends_on 'cairo' => :build if build.with? 'tests'

  # Allow tests to execute on OS X (.so => .dylib)
  patch do
    url "https://gist.github.com/krrk/6958869/raw/de8d83009d58eefa680a590f5839e61a6e76ff76/gobject-introspection-tests.patch"
    sha1 "1f57849db76cd2ca26ddb35dc36c373606414dfc"
  end if build.with? "tests"

  def install
    ENV['GI_SCANNER_DISABLE_CACHE'] = 'true'
    ENV.universal_binary if build.universal?
    inreplace 'giscanner/transformer.py', '/usr/share', HOMEBREW_PREFIX/'share'
    inreplace 'configure' do |s|
      s.change_make_var! 'GOBJECT_INTROSPECTION_LIBDIR', HOMEBREW_PREFIX/'lib'
    end

    args = %W[--disable-dependency-tracking --prefix=#{prefix}]
    args << "--with-cairo" if build.with? "tests"

    system "./configure", *args
    system "make"
    system "make", "check" if build.with? "tests"
    system "make", "install"
  end
end

{'fraction_non_alphanumeric': 0.11923411662315056, 'fraction_numerical': 0.10501885697708152, 'mean_word_length': 4.41287284144427, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '7566375', 'n_tokens_mistral': 1572, 'n_tokens_neox': 1348, 'n_words': 245}