<commit_before>require 'formula'

class TexInstalled < Requirement
  def message; <<-EOS.undent
    A TeX/LaTeX installation is required to install.
    You can obtain the TeX distribution for Mac OS X from:
        http://www.tug.org/mactex/
    EOS
  end
  def satisfied?
    which 'latex'
  end
  def fatal?
    true
  end
end

class Asymptote < Formula
  homepage 'http://asymptote.sourceforge.net/'
  url 'http://downloads.sourceforge.net/asymptote/asymptote-2.15.src.tgz'
  sha1 'e0fb336c195fb21a39e3d0f3acd4881ce5e170a7'

  depends_on TexInstalled.new

  depends_on 'readline'
  depends_on 'bdw-gc'

  def install
    texmfhome = share+'texmf'

    # see: https://sourceforge.net/tracker/?func=detail&aid=3486838&group_id=120000&atid=685683
    inreplace 'configure', '--no-var-tracking', '' if ENV.compiler == :clang
<commit_msg>asymptote: use userpaths<commit_after>require 'formula'

class TexInstalled < Requirement
  def message; <<-EOS.undent
    A TeX/LaTeX installation is required to install.
    You can obtain the TeX distribution for Mac OS X from:
        http://www.tug.org/mactex/
    EOS
  end
  def satisfied?
    which 'latex'
  end
  def fatal?
    true
  end
end

class Asymptote < Formula
  homepage 'http://asymptote.sourceforge.net/'
  url 'http://downloads.sourceforge.net/asymptote/asymptote-2.15.src.tgz'
  sha1 'e0fb336c195fb21a39e3d0f3acd4881ce5e170a7'

  depends_on TexInstalled.new
  env :userpaths # To find TeX

  depends_on 'readline'
  depends_on 'bdw-gc'

  def install
    texmfhome = share+'texmf'

    # see: https://sourceforge.net/tracker/?func=detail&aid=3486838&group_id=120000&atid=685683
    inreplace 'configure', '--no-var-tracking', '' if ENV.compiler == :clang

{'fraction_non_alphanumeric': 0.10780885780885781, 'fraction_numerical': 0.053613053613053616, 'mean_word_length': 3.603217158176944, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '2929599', 'n_tokens_mistral': 709, 'n_tokens_neox': 637, 'n_words': 139}