Skip to content

Commit f83d4b5

Browse files
authored
Merge pull request #276253 from atticus5/atticus5-patch-sdl3-mixer
sdl3_mixer 3.2.0 (new formula)
2 parents 9b4408b + 5445977 commit f83d4b5

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

Formula/s/sdl3_mixer.rb

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
class Sdl3Mixer < Formula
2+
desc "Sample multi-channel audio mixer library"
3+
homepage "https://github.com/libsdl-org/SDL_mixer"
4+
url "https://github.com/libsdl-org/SDL_mixer/releases/download/release-3.2.0/SDL3_mixer-3.2.0.tar.gz"
5+
sha256 "1f86fae7226d58f2ad210ca4d9e06488db722230032803423d83bad6d35fc395"
6+
license "Zlib"
7+
head "https://github.com/libsdl-org/SDL_mixer.git", branch: "main"
8+
9+
livecheck do
10+
url :stable
11+
regex(/^(?:release[._-])?v?(3(?:\.\d+)+)$/i)
12+
end
13+
14+
bottle do
15+
sha256 cellar: :any, arm64_tahoe: "40386376f65c2f80aa65dec1f95af9f0fcd55ad646218df600b686a4001db6b8"
16+
sha256 cellar: :any, arm64_sequoia: "099f6100d09f996c4d54f798cf199962b97bc4c0f123b2e78cdbbc7afdf02bfc"
17+
sha256 cellar: :any, arm64_sonoma: "6adfa053dda12cddf303f134a053f2756ee6840c05160bf62fc5f83d92213b52"
18+
sha256 cellar: :any, sonoma: "71dcfbb95c0bc67acc53260e88f8833547a7f631eaf8e8c80970456f77e62b21"
19+
sha256 cellar: :any_skip_relocation, arm64_linux: "926eb9a8c8410348e9281ebb85805a736ec8992a3c63b04bf1538ab82598b306"
20+
sha256 cellar: :any_skip_relocation, x86_64_linux: "fdb57e94cada153ef7c2069793a292c42e162b2c5ce0586a9313b325a37809db"
21+
end
22+
23+
depends_on "cmake" => :build
24+
depends_on "pkgconf" => :build
25+
depends_on "flac"
26+
depends_on "fluid-synth"
27+
depends_on "game-music-emu"
28+
depends_on "libvorbis"
29+
depends_on "libxmp"
30+
depends_on "mpg123"
31+
depends_on "opusfile"
32+
depends_on "sdl3"
33+
depends_on "wavpack"
34+
35+
def install
36+
args = %w[
37+
-DBUILD_SHARED_LIBS=ON
38+
-DSDLMIXER_DEPS_SHARED=ON
39+
-DSDLMIXER_VENDORED=OFF
40+
-DSDLMIXER_EXAMPLES=OFF
41+
-DSDLMIXER_TESTS=OFF
42+
]
43+
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
44+
system "cmake", "--build", "build"
45+
system "cmake", "--install", "build"
46+
end
47+
48+
test do
49+
(testpath/"test.c").write <<~C
50+
#include <SDL3_mixer/SDL_mixer.h>
51+
#include <stdlib.h>
52+
53+
int main()
54+
{
55+
int result = MIX_Init();
56+
MIX_Quit();
57+
return result != 0 ? EXIT_SUCCESS : EXIT_FAILURE;
58+
}
59+
C
60+
system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lSDL3_mixer"
61+
system "./test"
62+
end
63+
end

0 commit comments

Comments
 (0)