aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDominyk Tiller2015-03-24 14:21:38 +0000
committerMike McQuaid2015-03-24 16:39:51 +0000
commit71c63135be615bd86b3cecfbe7740d577b4b70b4 (patch)
tree3eeab90785bce1b8770c356ee988e702b1dda35d /Library
parentcb946286974f55f397a6511044f284518c72ff85 (diff)
downloadhomebrew-71c63135be615bd86b3cecfbe7740d577b4b70b4.tar.bz2
qemu 2.2.1
Version bump, added optional dep, slight re-jig of the install block for readability, added test. Closes #38023. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/qemu.rb26
1 files changed, 20 insertions, 6 deletions
diff --git a/Library/Formula/qemu.rb b/Library/Formula/qemu.rb
index 85af8c153..c6fdd47fe 100644
--- a/Library/Formula/qemu.rb
+++ b/Library/Formula/qemu.rb
@@ -1,10 +1,8 @@
-require "formula"
-
class Qemu < Formula
- homepage "http://www.qemu.org/"
+ homepage "http://wiki.qemu.org"
+ url "http://wiki.qemu-project.org/download/qemu-2.2.1.tar.bz2"
+ sha256 "4617154c6ef744b83e10b744e392ad111dd351d435d6563ce24d8da75b1335a0"
head "git://git.qemu-project.org/qemu.git"
- url "http://wiki.qemu-project.org/download/qemu-2.2.0.tar.bz2"
- sha1 "9a16623775a92fd25334f4eced4e6a56ab536233"
bottle do
sha1 "becc370764c6a1408112cd0bfd534842591cdda5" => :yosemite
@@ -21,8 +19,17 @@ class Qemu < Formula
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}
@@ -31,11 +38,18 @@ class Qemu < Formula
--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")
- ENV["LIBTOOL"] = "glibtool"
+ 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