Skip to content

Commit fcf5161

Browse files
authored
Merge pull request #245601 from Homebrew/blastem-head
blastem: fix HEAD build with arm64 macOS support
2 parents 277f196 + 2d5714b commit fcf5161

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

Formula/b/blastem.rb

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
11
class Blastem < Formula
22
desc "Fast and accurate Genesis emulator"
33
homepage "https://www.retrodev.com/blastem/"
4-
url "https://www.retrodev.com/repos/blastem/archive/v0.6.2.tar.gz"
5-
sha256 "d460632eff7e2753a0048f6bd18e97b9d7c415580c358365ff35ac64af30a452"
64
license "GPL-3.0-or-later"
75
revision 2
86
head "https://www.retrodev.com/repos/blastem", using: :hg
97

8+
stable do
9+
url "https://www.retrodev.com/repos/blastem/archive/v0.6.2.tar.gz"
10+
sha256 "d460632eff7e2753a0048f6bd18e97b9d7c415580c358365ff35ac64af30a452"
11+
12+
depends_on arch: :x86_64
13+
14+
# Convert Python 2 script to Python 3. Remove with next release.
15+
patch do
16+
url "https://www.retrodev.com/repos/blastem/raw-rev/dbbf0100f249"
17+
sha256 "e332764bfa08e08e0f9cbbebefe73b88adb99a1e96a77a16a0aeeae827ac72ff"
18+
end
19+
20+
# Fix build with -fno-common which is default in GCC 10+. Remove with next release.
21+
patch do
22+
on_linux do
23+
url "https://www.retrodev.com/repos/blastem/raw-rev/e45a317802bd"
24+
sha256 "8f869909df6eb66375eea09dde806422aa007aee073d557b774666f51c2e40dd"
25+
end
26+
end
27+
end
28+
1029
livecheck do
1130
url "https://www.retrodev.com/repos/blastem/json-tags"
1231
regex(/^v?(\d+(?:\.\d+)+)$/i)
@@ -33,7 +52,6 @@ class Blastem < Formula
3352
depends_on "pillow" => :build
3453
depends_on "pkgconf" => :build
3554
depends_on "[email protected]" => :build
36-
depends_on arch: :x86_64
3755
depends_on "glew"
3856
depends_on "sdl2"
3957

@@ -48,20 +66,6 @@ class Blastem < Formula
4866
sha256 "9ae0b37bca11cae5cf00e4d47e7225737bdaec4028e4db2a501b4eca7df8639d"
4967
end
5068

51-
# Convert Python 2 script to Python 3. Remove with next release.
52-
patch do
53-
url "https://www.retrodev.com/repos/blastem/raw-rev/dbbf0100f249"
54-
sha256 "e332764bfa08e08e0f9cbbebefe73b88adb99a1e96a77a16a0aeeae827ac72ff"
55-
end
56-
57-
# Fix build with -fno-common which is default in GCC 10+. Remove with next release.
58-
patch do
59-
on_linux do
60-
url "https://www.retrodev.com/repos/blastem/raw-rev/e45a317802bd"
61-
sha256 "8f869909df6eb66375eea09dde806422aa007aee073d557b774666f51c2e40dd"
62-
end
63-
end
64-
6569
def install
6670
resource("vasm").stage do
6771
system "make", "CPU=m68k", "SYNTAX=mot"
@@ -71,7 +75,7 @@ def install
7175

7276
# Use imagemagick to convert XCF files instead of xcftools, which is unmaintained and broken.
7377
# Fix was sent to upstream developer.
74-
inreplace "Makefile", "xcf2png $< > $@", "convert $< $@"
78+
inreplace "Makefile", "xcf2png $< > $@", "convert $< $@" if build.stable?
7579

7680
system "make", "all", "menu.bin", "HOST_ZLIB=1"
7781
libexec.install %w[blastem default.cfg menu.bin rom.db shaders]

0 commit comments

Comments
 (0)