<commit_before>require 'formula'

class Fceux < Formula
  homepage 'http://fceux.com'
  url 'https://downloads.sourceforge.net/project/fceultra/Source%20Code/2.2.2%20src/fceux-2.2.2.src.tar.gz'
  sha1 'ec50d8eae04794ba10f441a26cdb410c1cf6832b'

  option 'no-gtk', "Build without Gtk+ support"

  depends_on 'pkg-config' => :build
  depends_on 'scons' => :build
  depends_on 'sdl'
  depends_on 'libzip'
  depends_on 'gtk+' unless build.include? "no-gtk"
  depends_on 'lua'
  depends_on :x11

  # Make scons honor PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR
  # Reported upstream: https://sourceforge.net/p/fceultra/bugs/625
  def patches; DATA; end

  def install
    args = []
    args << "GTK=0" if build.include? "no-gtk"
    scons *args<commit_msg>fceux: use patch DSL<commit_after>require 'formula'

class Fceux < Formula
  homepage 'http://fceux.com'
  url 'https://downloads.sourceforge.net/project/fceultra/Source%20Code/2.2.2%20src/fceux-2.2.2.src.tar.gz'
  sha1 'ec50d8eae04794ba10f441a26cdb410c1cf6832b'

  option 'no-gtk', "Build without Gtk+ support"

  depends_on 'pkg-config' => :build
  depends_on 'scons' => :build
  depends_on 'sdl'
  depends_on 'libzip'
  depends_on 'gtk+' unless build.include? "no-gtk"
  depends_on 'lua'
  depends_on :x11

  # Make scons honor PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR
  # Reported upstream: https://sourceforge.net/p/fceultra/bugs/625
  patch :DATA

  def install
    args = []
    args << "GTK=0" if build.include? "no-gtk"
    scons *args
{'fraction_non_alphanumeric': 0.12920592193808883, 'fraction_numerical': 0.05383580080753701, 'mean_word_length': 4.057823129251701, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '204059', 'n_tokens_mistral': 653, 'n_tokens_neox': 605, 'n_words': 118}