<commit_before>require 'formula'

class Dvdrtools < Formula
  homepage 'http://www.nongnu.org/dvdrtools/'
  url 'http://savannah.nongnu.org/download/dvdrtools/dvdrtools-0.2.1.tar.gz'
  md5 'e82d359137e716e8c0b04d5c73bd3e79'

  def patches
    macports_patches %w(
      patch-scsi-mac-iokit.c
      patch-cdda2wav-cdda2wav.c
      patch-cdrecord-cdrecord.c
    )
  end

  def install
    ENV['LIBS'] = '-lIOKit -framework CoreFoundation'

    system "./configure",
      "--prefix=#{prefix}",
      "--mandir=#{prefix}/share/man",
      '--disable-debug',
      '--disable-dependency-tracking'

    system 'make install'

    man.install Dir['man/*']
  end

  private

  # while homebrew assumes p1, macports patches at p0
  def macports_patches(files)
    { :p0 => files.map { |file| macports_patch_url('sysutils', file) } }
  end

  def macports_patch_url(group, file)
    template = 'http://svn.macports.org/repository/macports/trunk/dports/%s/%s/files/%s'
    template % [group, name, file]
  end<commit_msg>dvdrtools: dont copy man4 into cellar<commit_after>require 'formula'

class Dvdrtools < Formula
  homepage 'http://www.nongnu.org/dvdrtools/'
  url 'http://savannah.nongnu.org/download/dvdrtools/dvdrtools-0.2.1.tar.gz'
  md5 'e82d359137e716e8c0b04d5c73bd3e79'

  def patches
    macports_patches %w(
      patch-scsi-mac-iokit.c
      patch-cdda2wav-cdda2wav.c
      patch-cdrecord-cdrecord.c
    )
  end

  def install
    ENV['LIBS'] = '-lIOKit -framework CoreFoundation'

    system "./configure",
      "--prefix=#{prefix}",
      "--mandir=#{man}",
      '--disable-debug',
      '--disable-dependency-tracking'

    system 'make install'
  end

  private

  # while homebrew assumes p1, macports patches at p0
  def macports_patches(files)
    { :p0 => files.map { |file| macports_patch_url('sysutils', file) } }
  end

  def macports_patch_url(group, file)
    template = 'http://svn.macports.org/repository/macports/trunk/dports/%s/%s/files/%s'
    template % [group, name, file]
  end
{'fraction_non_alphanumeric': 0.14164588528678304, 'fraction_numerical': 0.030423940149625937, 'mean_word_length': 3.1022494887525562, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '5859277', 'n_tokens_mistral': 794, 'n_tokens_neox': 741, 'n_words': 130}