<commit_before>require 'formula'

def use_luajit?; ARGV.include? '--with-luajit'; end

class Luarocks < Formula
  homepage 'http://luarocks.org'
  url 'http://luarocks.org/releases/luarocks-2.0.9.tar.gz'
  sha1 '84656ef2c1261a21a7e8aaf347743f8e542d2f49'

  depends_on use_luajit? ? 'luajit' : 'lua'

  fails_with :llvm do
    cause "Lua itself compiles with llvm, but may fail when other software tries to link."
  end

  # See comments at __END__
  def patches
    DATA if HOMEBREW_PREFIX.to_s == '/usr/local'
  end

  def options
    [['--with-luajit', 'Use LuaJIT instead of the stock Lua.']]
  end

  def install
    # Install to the Cellar, but direct modules to HOMEBREW_PREFIX
    args = ["--prefix=#{prefix}",
            "--rocks-tree=#{HOMEBREW_PREFIX}",
            "--sysconfdir=#{etc}/luarocks"]

    if use_luajit?<commit_msg>luarocks 2.0.10<commit_after>require 'formula'

def use_luajit?; ARGV.include? '--with-luajit'; end

class Luarocks < Formula
  homepage 'http://luarocks.org'
  url 'http://luarocks.org/releases/luarocks-2.0.10.tar.gz'
  sha1 '90db1c46940816ae82a8037e585769e3e8845f66'

  depends_on use_luajit? ? 'luajit' : 'lua'

  fails_with :llvm do
    cause "Lua itself compiles with llvm, but may fail when other software tries to link."
  end

  # See comments at __END__
  def patches
    DATA if HOMEBREW_PREFIX.to_s == '/usr/local'
  end

  def options
    [['--with-luajit', 'Use LuaJIT instead of the stock Lua.']]
  end

  def install
    # Install to the Cellar, but direct modules to HOMEBREW_PREFIX
    args = ["--prefix=#{prefix}",
            "--rocks-tree=#{HOMEBREW_PREFIX}",
            "--sysconfdir=#{etc}/luarocks"]

    if use_luajit?
{'fraction_non_alphanumeric': 0.12477718360071301, 'fraction_numerical': 0.041592394533571005, 'mean_word_length': 3.2311557788944723, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '7177440', 'n_tokens_mistral': 683, 'n_tokens_neox': 628, 'n_words': 156}