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

class Qemu < Formula
  homepage 'http://www.qemu.org/'
  url 'http://wiki.qemu.org/download/qemu-1.0.1.tar.gz'
  sha1 '4d08b5a83538fcd7b222bec6f1c584da8d12497a'

  depends_on 'jpeg'
  depends_on 'gnutls'

  # Borrow these patches from MacPorts
  def patches
    { :p0 => [
      "https://trac.macports.org/export/92470/trunk/dports/emulators/qemu/files/patch-configure.diff",
      "https://trac.macports.org/export/92470/trunk/dports/emulators/qemu/files/patch-cocoa-uint16-redefined.diff"
    ]}
  end

  def install
    system "./configure", "--prefix=#{prefix}",
                          "--cc=#{ENV.cc}",
                          "--host-cc=#{ENV.cc}",
                          "--disable-darwin-user",
                          "--enable-cocoa",
                          "--disable-bsd-user",
                          "--disable-guest-agent"
    system "make install"
  end
end