aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/lcov.rb
blob: 103b574de32c0fba6335119217213f5139c1fd22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
require 'formula'

class Lcov < Formula
  homepage 'http://ltp.sourceforge.net/coverage/lcov.php'
  url 'https://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
 }
 
 
--- lcov-1.8/Makefile~	2010-01-29 19:14:46.000000000 +0900
+++ lcov-1.8/Makefile	2010-04-16 21:42:26.000000000 +0900
@@ -15,8 +15,8 @@
 RELEASE := 1
 
 CFG_DIR := $(PREFIX)/etc
-BIN_DIR := $(PREFIX)/usr/bin
-MAN_DIR := $(PREFIX)/usr/share/man
+BIN_DIR := $(PREFIX)/bin
+MAN_DIR := $(PREFIX)/share/man
 TMP_DIR := /tmp/lcov-tmp.$(shell echo $$$$)
 FILES   := $(wildcard bin/*) $(wildcard man/*) README CHANGES Makefile \
 	   $(wildcard rpm/*) lcovrc