blob: 8890c5d0f701df2a79979ad392c43e542b813d79 (
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
 | require "formula"
class Radare2 < Formula
  homepage "http://radare.org"
  revision 2
  stable do
    url "http://radare.org/get/radare2-0.9.7.tar.xz"
    sha1 "34af6c6ba53ac08c852b4e110ac6908054616b9d"
    # Fixes file name of dynamic libraries so that version goes before .dylib.
    # *radare2 pull request #693
    patch do
      url "https://github.com/radare/radare2/commit/f0dbeb9950c55cdb75a2515b1cf6add4e0f4a591.diff"
      sha1 "1b02e071728c2ef9b328e25ae46eac15eed391be"
    end
    resource "bindings" do
      url "http://radare.org/get/radare2-bindings-0.9.7.tar.xz"
      sha1 "b425e3faeebd3f212e6542a64dafa3b629535e7a"
    end
  end
  bottle do
    sha1 "7bece65a73bd1aab23c5765b3bee164a6e6fdfb6" => :yosemite
    sha1 "e9fca9c3e8aa86c32f8fda6c1a6d15b6064bbcd6" => :mavericks
    sha1 "5a872355becc0ab276eee5297b951a5814c1e6a6" => :mountain_lion
  end
  head do
    url "https://github.com/radare/radare2.git"
    resource "bindings" do
      url "https://github.com/radare/radare2-bindings.git"
    end
  end
  depends_on "pkg-config" => :build
  depends_on "valabind" => :build
  depends_on "swig" => :build
  depends_on "gobject-introspection" => :build
  depends_on "libewf"
  depends_on "libmagic"
  depends_on "gmp"
  depends_on "lua51" # It seems to latch onto Lua51 rather than Lua. Enquire this upstream.
  depends_on "openssl"
  def install
    # Build Radare2 before bindings, otherwise compile = nope.
    system "./configure", "--prefix=#{prefix}", "--with-openssl"
    system "make"
    system "make", "install"
    resource("bindings").stage do
      ENV.append_path "PKG_CONFIG_PATH", "#{lib}/pkgconfig"
      # https://github.com/radare/radare2-bindings/pull/18
      inreplace "python-config-wrapper", '\s', '\ ' if build.stable?
      system "./configure", "--prefix=#{prefix}"
      system "make"
      system "make", "install", "DESTDIR=#{prefix}"
    end
  end
end
 |