aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/lolcode.rb
blob: bb12ac01231d8d063816b4b2c8a2947a29ebe64d (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
require 'formula'

class Lolcode <Formula
  homepage 'http://www.icanhaslolcode.org/'
  url 'http://github.com/justinmeza/lci/tarball/v0.9.2'
  head 'git://github.com/justinmeza/lolcode.git'
  md5 '04493a3e491723d2928eb37cd90bbf54'

  # Makefile 'lci' target depends on the compiler flag '-lm'
  def patches
    DATA
  end unless ARGV.build_head?

  def install
    inreplace 'Makefile' do |s|
      s.change_make_var! "prefix", prefix
    end

    system "make"

    # v0.9.2 should use 'make install'.
    # Later versions can just copy the 'lolcode' bin.
    if ARGV.build_head?
      bin.install 'lolcode'
    else
      bin.mkpath
      system "make install"
    end
  end
end


__END__
diff --git a/Makefile b/Makefile
index ff3df8c..5fdedb5 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ testdir = ./test
 
 all: $(TARGET)
 
-$(TARGET): $(OBJS) $(LIBS)
+$(TARGET): $(OBJS)
 	$(CC) $(CPPFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
 
 pedantic: $(OBJS) $(LIBS)