aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/wrangler.rb
blob: df1e9fa6b05aff4ef6d6b0a960e7d006b0b14410 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
require 'formula'

class Wrangler < Formula
  homepage 'http://www.cs.kent.ac.uk/projects/forse/'
  url 'http://www.cs.kent.ac.uk/projects/forse/wrangler/wrangler-0.9/wrangler-0.9.3.1.tar.gz'
  md5 '64582d6d2955d739edf6edb255becb91'

  depends_on 'erlang'

  def patches
    # Respect $CC during compilation. Merged upstream:
    # https://github.com/RefactoringTools/wrangler/pull/41
    DATA
  end

  def install
    ENV.deparallelize
    system "./configure", "--prefix=#{prefix}"
    system "make"
    system "make install"
  end
end

__END__
diff --git i/c_src/gsuffixtree/Makefile.in w/c_src/gsuffixtree/Makefile.in
index 3f4e6fa..751ed55 100755
--- i/c_src/gsuffixtree/Makefile.in
+++ w/c_src/gsuffixtree/Makefile.in
@@ -1,5 +1,6 @@
  
 
+CC          = @CC@
 ERL_CFLAGS  = @ERL_CFLAGS@
 ERL_LIB     = @ERL_LIB@
 CFLAGS      = @CFLAGS@
@@ -10,13 +11,13 @@ ERL_LDFLAGS= ${LDFLAGS} ${ERL_LIB}
 
 
 gsuffixtree:	main.o gsuffix_tree.o
-	gcc  ${ERL_LDFLAGS} main.o gsuffix_tree.o -lerl_interface -lei -lpthread -o gsuffixtree 
+	$(CC) ${ERL_LDFLAGS} main.o gsuffix_tree.o -lerl_interface -lei -lpthread -o gsuffixtree
 
 gsuffix_tree.o:	gsuffix_tree.c gsuffix_tree.h
-	gcc ${CFLAGS} ${ERL_CFLAGS} -o gsuffix_tree.o -c gsuffix_tree.c
+	$(CC) ${CFLAGS} ${ERL_CFLAGS} -o gsuffix_tree.o -c gsuffix_tree.c
 
 main.o:	gsuffix_tree.h 
-	gcc ${CFLAGS} ${ERL_CFLAGS} -o main.o -c main.c 
+	$(CC) ${CFLAGS} ${ERL_CFLAGS} -o main.o -c main.c
 
 clean: 
 	-rm -f *.o 
diff --git i/c_src/suffixtree/Makefile.in w/c_src/suffixtree/Makefile.in
index 8ed7c1d..3f40de4 100755
--- i/c_src/suffixtree/Makefile.in
+++ w/c_src/suffixtree/Makefile.in
@@ -1,5 +1,6 @@
  
 
+CC          = @CC@
 ERL_CFLAGS  = @ERL_CFLAGS@
 ERL_LIB     = @ERL_LIB@
 CFLAGS      = @CFLAGS@
@@ -10,13 +11,13 @@ ERL_LDFLAGS= ${LDFLAGS} ${ERL_LIB}
 
 
 suffixtree:	main.o suffix_tree.o
-	gcc  ${ERL_LDFLAGS} main.o suffix_tree.o -lerl_interface -lei -lpthread -o suffixtree 
+	$(CC) ${ERL_LDFLAGS} main.o suffix_tree.o -lerl_interface -lei -lpthread -o suffixtree
 
 suffix_tree.o:	suffix_tree.c suffix_tree.h
-	gcc ${CFLAGS} ${ERL_CFLAGS} -o suffix_tree.o -c suffix_tree.c
+	$(CC) ${CFLAGS} ${ERL_CFLAGS} -o suffix_tree.o -c suffix_tree.c
 
 main.o:	suffix_tree.h 
-	gcc ${CFLAGS} ${ERL_CFLAGS} -o main.o -c main.c 
+	$(CC) ${CFLAGS} ${ERL_CFLAGS} -o main.o -c main.c
 
 clean: 
 	-rm -f *.o