Skip to content

Commit

Permalink
Merge pull request #155476 from Homebrew/PR/155469
Browse files Browse the repository at this point in the history
Replacement for #155469
  • Loading branch information
BrewTestBot authored Nov 25, 2023
2 parents 0c15b3e + 676c692 commit a7a1298
Showing 1 changed file with 8 additions and 32 deletions.
40 changes: 8 additions & 32 deletions Formula/q/qemu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Qemu < Formula
url "https://download.qemu.org/qemu-8.1.3.tar.xz"
sha256 "43cc176804105586f74f90398f34e9f85787dff400d3b640d81f7779fbe265bb"
license "GPL-2.0-only"
revision 1
revision 2
head "https://git.qemu.org/git/qemu.git", branch: "master"

livecheck do
Expand All @@ -13,13 +13,13 @@ class Qemu < Formula
end

bottle do
sha256 arm64_sonoma: "f754152f89de7291b5ce45318c35813c44552d34565a81e3d71ada1679ea2c17"
sha256 arm64_ventura: "123ae1752bd8df3f045e72209c0c36fb8748443f9d0bb6f8ac11dc1494de8cf3"
sha256 arm64_monterey: "5a99a7ca79c3d175cc9a7dbd0dfa79d3710007582d448051f5b261719ff7c156"
sha256 sonoma: "7d5584cf788135157592867aadc36763c52dee2cfc2722a899b132cda2b5ee0c"
sha256 ventura: "174332acb37743ec324c8e98205578d54d5548d03b24f54cb32bd2fa60d04ab1"
sha256 monterey: "2d60b648b6484e10241bc9f9c3e1b81217e8f3dc392cf72e9b17881e2be0f149"
sha256 x86_64_linux: "b5d993d366e188e5a72cbf228fef7a410246c4ba80cf33fe45c8dadf321bd177"
sha256 arm64_sonoma: "0e014bd08f9cba2d8f7fa9f080abd56a22fbad130709735af5d7d5808dfb6f67"
sha256 arm64_ventura: "93a9c3f749e636642d8910a4620a4b3c4bc2c5a13e1b7a24a23506115b21d884"
sha256 arm64_monterey: "5e1f8994011ef7624396b0fd0dfb7d473a057d5740b4756a4268fc0b0ef99842"
sha256 sonoma: "4e02534017485a86218a0e0285788afea3ce4fe3e91956dc80cfe8e43d264b9d"
sha256 ventura: "7d9f4cdc4d1990981734cbb027851dc0174ad76c7405c8860c79c2af41f1ad1c"
sha256 monterey: "834e334ab5149ad89fed06b5a2e5213ab37a743d5ca0911a021a4cc79fd61a74"
sha256 x86_64_linux: "f01852dbfd458d73b4be1f62299e43474d15dfd530ed3a3604fc4ac30a2fb97a"
end

depends_on "libtool" => :build
Expand Down Expand Up @@ -62,19 +62,6 @@ class Qemu < Formula
sha256 "81237c7b42dc0ffc8b32a2f5734e3480a3f9a470c50c14a9c4576a2561a35807"
end

# The default EFI image included in QEMU 8.1.3 (edk2-stable202302) does not work on Apple M3:
# https://gitlab.com/qemu-project/qemu/-/issues/1990
#
# The issue is reported to be fixed in:
# https://github.com/tianocore/edk2/commit/5ce29ae84db340244c3c3299f84713a88dec5171
# (included in edk2-stable202305 and later)
#
# Replace the EFI image until QEMU updates it, to rescue M3 users.
resource "efi-aarch64" do
url "https://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstream/5040/QEMU-AARCH64/RELEASE_CLANGDWARF/QEMU_EFI.fd"
sha256 "e5cc7beda96bc07d0e80745c84d648701586f8f1fd11223c3fe725327fd6e20c"
end

def install
ENV["LIBTOOL"] = "glibtool"

Expand Down Expand Up @@ -111,17 +98,6 @@ def install

system "./configure", *args
system "make", "V=1", "install"

# Overwrite edk2-aarch64-code.fd
resource("efi-aarch64").stage do
# The file has to be padded to 64MiB: https://gitlab.com/qemu-project/qemu/-/blob/v8.1.3/roms/edk2-build.config?ref_type=tags#L113
# Otherwise it fails with: `device requires 67108864 bytes, block backend provides 2097152 bytes`
File.open("QEMU_EFI.fd", "a") do |file|
file.truncate(64 * 1024 * 1024)
end
rm pkgshare/"edk2-aarch64-code.fd"
pkgshare.install "QEMU_EFI.fd" => "edk2-aarch64-code.fd"
end
end

test do
Expand Down

0 comments on commit a7a1298

Please sign in to comment.