<commit_before>require 'formula'

class Lcov < Formula
  homepage 'http://ltp.sourceforge.net/coverage/lcov.php'
  url 'http://downloads.sourceforge.net/ltp/lcov-1.10.tar.gz'
  sha1 '70fb361bcfd7dd81ea30731d6fe532ddea56f283'

  def install
    %w(bin/gendesc bin/genhtml bin/geninfo bin/genpng bin/lcov).each do |file|
      inreplace file, '/etc/lcovrc', "#{prefix}/etc/lcovrc"
    end
    system "make", "PREFIX=#{prefix}", "install"
  end

  def patches
    DATA
  end
end

__END__
--- lcov-1.8/bin/install.sh~	2010-01-29 19:14:46.000000000 +0900
+++ lcov-1.8/bin/install.sh	2010-04-16 21:40:57.000000000 +0900
@@ -34,7 +34,8 @@
   local TARGET=$2
   local PARAMS=$3
 
-  install -p -D $PARAMS $SOURCE $TARGET
+  mkdir -p `dirname $TARGET`
+  install -p $PARAMS $SOURCE $TARGET
 }
 <commit_msg>lcov: fix inreplace warnings<commit_after>require 'formula'

class Lcov < Formula
  homepage 'http://ltp.sourceforge.net/coverage/lcov.php'
  url 'http://downloads.sourceforge.net/ltp/lcov-1.10.tar.gz'
  sha1 '70fb361bcfd7dd81ea30731d6fe532ddea56f283'

  def install
    %w(bin/genhtml bin/geninfo bin/lcov).each do |file|
      inreplace file, '/etc/lcovrc', "#{prefix}/etc/lcovrc"
    end
    system "make", "PREFIX=#{prefix}", "install"
  end

  def patches
    DATA
  end
end

__END__
--- lcov-1.8/bin/install.sh~	2010-01-29 19:14:46.000000000 +0900
+++ lcov-1.8/bin/install.sh	2010-04-16 21:40:57.000000000 +0900
@@ -34,7 +34,8 @@
   local TARGET=$2
   local PARAMS=$3
 
-  install -p -D $PARAMS $SOURCE $TARGET
+  mkdir -p `dirname $TARGET`
+  install -p $PARAMS $SOURCE $TARGET
 }
 
{'fraction_non_alphanumeric': 0.15699873896595207, 'fraction_numerical': 0.11601513240857503, 'mean_word_length': 3.4329608938547485, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '1302489', 'n_tokens_mistral': 771, 'n_tokens_neox': 651, 'n_words': 131}