<commit_before>require 'formula'

class Wireshark <Formula
  url 'http://media-2.cacetech.com/wireshark/src/wireshark-1.4.1.tar.bz2'
  md5 '1719d20a10990e7c2cb261df7021aab6'
  homepage 'http://www.wireshark.org'

  depends_on 'gnutls' => :optional
  depends_on 'pcre' => :optional
  depends_on 'glib'
  depends_on 'gtk+' if ARGV.include? "--with-x"

  def options
    [["--with-x", "Include X11 support"]]
  end
  
  def patches
    # Fix a crash on launch bug in 1.4.1 as fixed in wireshark SVN revision 34494
    DATA
  end

  def install
    args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]

    # actually just disables the GTK GUI
    args << "--disable-wireshark" if not ARGV.include? "--with-x"

    system "./configure", *args
    system "make"
    ENV.j1 # Install failed otherwise.
    system "make install"
  end
end


__END__
--- trunk-1.4/gtk/main.c	2010/10/12 21:33:08	34493<commit_msg>Wireshark - fix audit<commit_after>require 'formula'

class Wireshark <Formula
  url 'http://media-2.cacetech.com/wireshark/src/wireshark-1.4.1.tar.bz2'
  md5 '1719d20a10990e7c2cb261df7021aab6'
  homepage 'http://www.wireshark.org'

  depends_on 'gnutls' => :optional
  depends_on 'pcre' => :optional
  depends_on 'glib'
  depends_on 'gtk+' if ARGV.include? "--with-x"

  def options
    [["--with-x", "Include X11 support"]]
  end

  def patches
    # Fix a crash on launch bug in 1.4.1 as fixed in wireshark SVN revision 34494
    DATA
  end

  def install
    args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]

    # actually just disables the GTK GUI
    args << "--disable-wireshark" if not ARGV.include? "--with-x"

    system "./configure", *args
    system "make"
    ENV.j1 # Install failed otherwise.
    system "make install"
  end
end


__END__
--- trunk-1.4/gtk/main.c	2010/10/12 21:33:08	34493
{'fraction_non_alphanumeric': 0.13794983642311887, 'fraction_numerical': 0.064340239912759, 'mean_word_length': 3.086859688195991, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '4584283', 'n_tokens_mistral': 774, 'n_tokens_neox': 700, 'n_words': 173}