<commit_before>require 'formula'

class Xar < Formula
  url 'http://xar.googlecode.com/files/xar-1.5.2.tar.gz'
  homepage 'http://code.google.com/p/xar/'
  md5 '8eabb055d3387b8edc30ecfb08d2e80d'

  def patches
    DATA
  end

  def install
    system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
    system "make"
    system "make install"
  end
end


__END__
diff -Naur old/lib/archive.c new/lib/archive.c
--- old/lib/archive.c
+++ new/lib/archive.c
@@ -79,6 +79,10 @@
 #define LONG_MIN INT32_MIN
 #endif
 
+#if LIBXML_VERSION < 20618
+#define xmlDictCleanup()        /* function doesn't exist in older API */
+#endif
+
 static int32_t xar_unserialize(xar_t x);
 void xar_serialize(xar_t x, const char *file);
<commit_msg>xar: add url to patch<commit_after>require 'formula'

class Xar < Formula
  url 'http://xar.googlecode.com/files/xar-1.5.2.tar.gz'
  homepage 'http://code.google.com/p/xar/'
  md5 '8eabb055d3387b8edc30ecfb08d2e80d'

  # Known issue upstream:
  # http://code.google.com/p/xar/issues/detail?id=51
  def patches
    DATA
  end

  def install
    system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
    system "make"
    system "make install"
  end
end


__END__
diff -Naur old/lib/archive.c new/lib/archive.c
--- old/lib/archive.c
+++ new/lib/archive.c
@@ -79,6 +79,10 @@
 #define LONG_MIN INT32_MIN
 #endif
 
+#if LIBXML_VERSION < 20618
+#define xmlDictCleanup()        /* function doesn't exist in older API */
+#endif
+
 static int32_t xar_unserialize(xar_t x);
 void xar_serialize(xar_t x, const char *file);

{'fraction_non_alphanumeric': 0.15009264978381717, 'fraction_numerical': 0.04570722668313774, 'mean_word_length': 3.487534626038781, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6236186', 'n_tokens_mistral': 672, 'n_tokens_neox': 614, 'n_words': 136}