<commit_before>require 'formula'

class Libxmlsec1 < Formula
  url 'http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.18.tar.gz'
  homepage 'http://www.aleksey.com/xmlsec/'
  md5 '8694b4609aab647186607f79e1da7f1a'

  depends_on 'pkg-config' => :build
  depends_on 'libxml2' #version on 10.6/10.7 is too old
  depends_on 'gnutls' => :optional

  def patches
    DATA
  end

  def install
    libxml2 = Formula.factory('libxml2')

    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--with-libxml=#{libxml2.prefix}",
                          "--disable-apps-crypto-dl"
    system "make install"
  end
end

__END__
diff --git a/src/dl.c b/src/dl.c
index 6e8a56a..0e7f06b 100644<commit_msg>libxmlsec1: add patch note<commit_after>require 'formula'

class Libxmlsec1 < Formula
  homepage 'http://www.aleksey.com/xmlsec/'
  url 'http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.18.tar.gz'
  md5 '8694b4609aab647186607f79e1da7f1a'

  depends_on 'pkg-config' => :build
  depends_on 'libxml2' # Version on 10.6/10.7 is too old
  depends_on 'gnutls' => :optional

  # Add HOMEBREW_PREFIX/lib to dl load path
  def patches; DATA;end

  def install
    libxml2 = Formula.factory('libxml2')

    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--with-libxml=#{libxml2.prefix}",
                          "--disable-apps-crypto-dl"
    system "make install"
  end
end

__END__
diff --git a/src/dl.c b/src/dl.c
index 6e8a56a..0e7f06b 100644
{'fraction_non_alphanumeric': 0.1362209667294413, 'fraction_numerical': 0.06716886377903326, 'mean_word_length': 2.480349344978166, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 19}, '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': '7434072', 'n_tokens_mistral': 635, 'n_tokens_neox': 578, 'n_words': 111}