<commit_before>require 'formula'

class Libmagic < Formula
  homepage 'http://www.darwinsys.com/file/'
  url 'ftp://ftp.astron.com/pub/file/file-5.14.tar.gz'
  mirror 'http://fossies.org/unix/misc/file-5.14.tar.gz'
  sha1 '064c8f17a5f7ae1e336a9285131e046d3b2d04d7'

  # Fixed upstream, should be in next release
  # See http://bugs.gw.com/view.php?id=230
  def patches; DATA; end if MacOS.version < :lion

  def install
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--enable-fsect-man5"
    system "make install"

    # Don't dupe this system utility
    rm bin/"file"
    rm man1/"file.1"<commit_msg>libmagic: add option for universal binary<commit_after>require 'formula'

class Libmagic < Formula
  homepage 'http://www.darwinsys.com/file/'
  url 'ftp://ftp.astron.com/pub/file/file-5.14.tar.gz'
  mirror 'http://fossies.org/unix/misc/file-5.14.tar.gz'
  sha1 '064c8f17a5f7ae1e336a9285131e046d3b2d04d7'

  option :universal

  # Fixed upstream, should be in next release
  # See http://bugs.gw.com/view.php?id=230
  def patches; DATA; end if MacOS.version < :lion

  def install
    ENV.universal_binary if build.universal?

    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--enable-fsect-man5"
    system "make install"

    # Don't dupe this system utility
    rm bin/"file"
    rm man1/"file.1"
{'fraction_non_alphanumeric': 0.13781398506449424, 'fraction_numerical': 0.05431093007467753, 'mean_word_length': 2.6216216216216215, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2237453', 'n_tokens_mistral': 580, 'n_tokens_neox': 512, 'n_words': 105}