<commit_before>require 'formula'

class Yaws < Formula
  homepage 'http://yaws.hyber.org'
  url 'http://yaws.hyber.org/download/yaws-1.94.tar.gz'
  sha1 '36295e40bb4db1812901c31d41152f942a63b5cc'

  option "without-yapp", "Omit yaws applications"
  option '32-bit'

  depends_on 'erlang'

  def install
    if build.build_32_bit?
      %w{ CFLAGS LDFLAGS }.each do |compiler_flag|
        ENV.remove compiler_flag, "-arch x86_64"
        ENV.append compiler_flag, "-arch i386"
      end
    end

    cd 'yaws' do
      system "./configure", "--prefix=#{prefix}"
      system "make install"

      unless build.include? 'without-yapp'
        cd 'applications/yapp' do
          system "make"
          system "make install"
        end
      end
    end<commit_msg>yaws: create default directories<commit_after>require 'formula'

class Yaws < Formula
  homepage 'http://yaws.hyber.org'
  url 'http://yaws.hyber.org/download/yaws-1.94.tar.gz'
  sha1 '36295e40bb4db1812901c31d41152f942a63b5cc'

  option "without-yapp", "Omit yaws applications"
  option '32-bit'

  depends_on 'erlang'

  # the default config expects these folders to exist
  skip_clean 'var/log/yaws'
  skip_clean 'lib/yaws/examples/ebin'
  skip_clean 'lib/yaws/examples/include'

  def install
    if build.build_32_bit?
      %w{ CFLAGS LDFLAGS }.each do |compiler_flag|
        ENV.remove compiler_flag, "-arch x86_64"
        ENV.append compiler_flag, "-arch i386"
      end
    end

    cd 'yaws' do
      system "./configure", "--prefix=#{prefix}"
      system "make install"

      unless build.include? 'without-yapp'
        cd 'applications/yapp' do
          system "make"
          system "make install"
        end
      end
    end

    # the default config expects these folders to exist
    (var/'log/yaws').mkpath
    (lib/'yaws/examples/ebin').mkpath
    (lib/'yaws/examples/include').mkpath
{'fraction_non_alphanumeric': 0.11306666666666666, 'fraction_numerical': 0.04586666666666667, 'mean_word_length': 2.6929133858267718, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4974941', 'n_tokens_mistral': 712, 'n_tokens_neox': 644, 'n_words': 153}