<commit_before>require 'formula'

class Irssi < Formula
  homepage 'http://irssi.org/'
  url 'http://irssi.org/files/irssi-0.8.15.tar.bz2'
  sha1 'b79ce8c2c98a76b004f63706e7868cd363000d89'

  depends_on 'pkg-config' => :build
  depends_on 'glib'

  # Fix Perl build flags and paths in man page
  def patches; DATA; end

  def install
    system "./configure", "--prefix=#{prefix}",
                          "--sysconfdir=#{etc}",
                          "--with-perl=yes",
                          "--with-perl-lib=#{lib}/perl5/site_perl",
                          "--with-bot",
                          "--with-proxy",
                          "--enable-ssl",
                          "--enable-ipv6",
                          "--with-socks"
    # 'make' and 'make install' must be done separately on some systems
    system "make"
    system "make install"
  end
end

__END__
--- a/configure	2009-12-03 19:35:07.000000000 -0800
+++ b/configure	2009-12-03 19:35:33.000000000 -0800
@@ -27419,7 +27419,7 @@
 	if test -z "$perlpath"; then<commit_msg>irssi: allow opting out of perl support<commit_after>require 'formula'

class Irssi < Formula
  homepage 'http://irssi.org/'
  url 'http://irssi.org/files/irssi-0.8.15.tar.bz2'
  sha1 'b79ce8c2c98a76b004f63706e7868cd363000d89'

  option "without-perl", "Build without perl support."

  depends_on 'pkg-config' => :build
  depends_on 'glib'

  # Fix Perl build flags and paths in man page
  def patches; DATA; end unless build.

  def install
    args =%W[
      --prefix=#{prefix}
      --sysconfdir=#{etc}
      --with-bot
      --with-proxy
      --enable-ssl
      --enable-ipv6
      --with-socks
    ]

    if build.with? "perl"
      args << "--with-perl=yes"
      args << "--with-perl-lib=#{lib}/perl5/site_perl"
    else
      args << "--with-perl=no"
    end

    system "./configure", *args

    # 'make' and 'make install' must be done separately on some systems
    system "make"
    system "make install"
  end
end

__END__
--- a/configure	2009-12-03 19:35:07.000000000 -0800
+++ b/configure	2009-12-03 19:35:33.000000000 -0800
@@ -27419,7 +27419,7 @@
 	if test -z "$perlpath"; then
{'fraction_non_alphanumeric': 0.14584300975383185, 'fraction_numerical': 0.09475150952159778, 'mean_word_length': 2.077142857142857, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '5583180', 'n_tokens_mistral': 895, 'n_tokens_neox': 751, 'n_words': 177}