homebrew-core/Formula/qemu.rb
2015-09-21 15:25:48 +01:00

57 lines
1.9 KiB
Ruby

class Qemu < Formula
desc "x86 and PowerPC Emulator"
homepage "http://wiki.qemu.org"
url "http://wiki.qemu-project.org/download/qemu-2.4.0.tar.bz2"
sha256 "72b0b991bbcc540663a019e1e8c4f714053b691dda32c9b9ee80b25f367e6620"
head "git://git.qemu-project.org/qemu.git"
bottle do
sha256 "4d10274191ecfd568eb3405234850530868d46d2c75345ab174a4f9ce873a0a5" => :el_capitan
sha256 "61b412440c385fbf72b82e9219b06f36afcdbbcaaf3413ab7916ea737457866e" => :yosemite
sha256 "d00b7115acd2576c6a7c9c86878e3d11689e30d666c2ac4ad4bbe9df7be6cbf4" => :mavericks
sha256 "e3ac5d506519645ba982cf8d031373a400c8dbb706a27cb134453a7f5e399983" => :mountain_lion
end
depends_on "pkg-config" => :build
depends_on "libtool" => :build
depends_on "jpeg"
depends_on "gnutls"
depends_on "glib"
depends_on "pixman"
depends_on "vde" => :optional
depends_on "sdl" => :optional
depends_on "gtk+" => :optional
depends_on "libssh2" => :optional
# 3.2MB working disc-image file hosted on upstream's servers for people to use to test qemu functionality.
resource "armtest" do
url "http://wiki.qemu.org/download/arm-test-0.2.tar.gz"
sha256 "4b4c2dce4c055f0a2adb93d571987a3d40c96c6cbfd9244d19b9708ce5aea454"
end
def install
ENV["LIBTOOL"] = "glibtool"
args = %W[
--prefix=#{prefix}
--cc=#{ENV.cc}
--host-cc=#{ENV.cc}
--enable-cocoa
--disable-bsd-user
--disable-guest-agent
]
args << (build.with?("sdl") ? "--enable-sdl" : "--disable-sdl")
args << (build.with?("vde") ? "--enable-vde" : "--disable-vde")
args << (build.with?("gtk+") ? "--enable-gtk" : "--disable-gtk")
args << (build.with?("libssh2") ? "--enable-libssh2" : "--disable-libssh2")
system "./configure", *args
system "make", "V=1", "install"
end
test do
resource("armtest").stage testpath
assert_match /file format: raw/, shell_output("#{bin}/qemu-img info arm_root.img")
end
end