Skip to content

Commit e2e362b

Browse files
committed
Require Zig 0.14.0 and depend on SDL 3.2.8
1 parent dbff15b commit e2e362b

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

build.zig

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@ pub fn build(b: *std.Build) void {
55
const optimize = b.standardOptimizeOption(.{});
66
const harfbuzz_enabled = b.option(bool, "enable-harfbuzz", "Use HarfBuzz to improve text shaping") orelse true;
77

8-
const upstream = b.dependency("sdl_ttf", .{});
8+
const upstream = b.dependency("SDL_ttf", .{});
99

10-
const lib = b.addStaticLibrary(.{
10+
const lib = b.addLibrary(.{
1111
.name = "SDL3_ttf",
12-
.target = target,
13-
.optimize = optimize,
12+
.version = .{ .major = 3, .minor = 2, .patch = 0 },
13+
.linkage = .static,
14+
.root_module = b.createModule(.{
15+
.target = target,
16+
.optimize = optimize,
17+
.link_libc = true,
18+
}),
1419
});
1520
lib.addIncludePath(upstream.path("include"));
1621
lib.addIncludePath(upstream.path("src"));
1722
lib.addCSourceFiles(.{
1823
.root = upstream.path("src"),
1924
.files = srcs,
2025
});
21-
lib.linkLibC();
2226

2327
if (harfbuzz_enabled) {
2428
const harfbuzz_dep = b.dependency("harfbuzz", .{
@@ -35,12 +39,11 @@ pub fn build(b: *std.Build) void {
3539
});
3640
lib.linkLibrary(freetype_dep.artifact("freetype"));
3741

38-
const sdl_dep = b.dependency("sdl", .{
42+
const sdl = b.dependency("SDL", .{
3943
.target = target,
4044
.optimize = optimize,
41-
});
42-
const sdl_lib = sdl_dep.artifact("SDL3");
43-
lib.linkLibrary(sdl_lib);
45+
}).artifact("SDL3");
46+
lib.linkLibrary(sdl);
4447

4548
lib.installHeadersDirectory(upstream.path("include"), "", .{});
4649

build.zig.zon

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
.{
2-
.name = "SDL_ttf",
3-
.version = "3.1.0",
2+
.name = .SDL_ttf,
3+
.version = "3.2.0",
4+
.fingerprint = 0xa98f7681c4b9d53c,
5+
.minimum_zig_version = "0.14.0",
46
.dependencies = .{
57
.harfbuzz = .{
68
.url = "git+https://github.com/allyourcodebase/harfbuzz#d642b5da200481be30a2e3518e7716722079d6a5",
7-
.hash = "122070f575e5d253373a1cb40352118f59b5934858a178370add2d3de9ad8819e149",
9+
.hash = "harfbuzz-8.4.0-AAAAAESZAABw9XXl0lM3Ohy0A1IRj1m1k0hYoXg3Ct0t",
810
},
911
.freetype = .{
1012
.url = "git+https://github.com/allyourcodebase/freetype#d0a748192f26bd20f9f339d0d7156b84e90eb4dc",
11-
.hash = "1220fb290c4071d0d889d27762282f473b5f9cb9a7e2b429bcb9acbd9172a6e2a1e4",
13+
.hash = "freetype-2.13.2-AAAAAByJAAD7KQxAcdDYidJ3YigvRztfnLmn4rQpvLms",
1214
},
13-
.sdl = .{
14-
.url = "git+https://github.com/castholm/SDL#v0.1.5+SDL-3.2.4",
15-
.hash = "1220f653f5b656888b522bf5be06fc3062278767cfa7764e5d00eb559056d65b616f",
15+
.SDL = .{
16+
.url = "git+https://github.com/castholm/SDL/#v0.2.0+3.2.8",
17+
.hash = "sdl-0.2.0+3.2.8-7uIn9FxHfQE325TK7b0qpgt10G3x1xl-3ZMOfTzxUg3C",
1618
},
17-
.sdl_ttf = .{
19+
.SDL_ttf = .{
1820
.url = "git+https://github.com/libsdl-org/SDL_ttf#release-3.2.0",
19-
.hash = "1220dc0abc324224429322175c9083eb4bc708c5bb18a39bf765559edf9572929bff",
21+
.hash = "N-V-__8AAG-6gADcCrwyQiRCkyIXXJCD60vHCMW7GKOb92VV",
2022
},
2123
},
2224
.paths = .{

0 commit comments

Comments
 (0)