diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 17bb5b92..b171de32 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,6 @@ jobs: strategy: fail-fast: false matrix: - zig-version: [0.14.0, latest] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: @@ -27,8 +26,6 @@ jobs: - name: Setup Zig uses: mlugg/setup-zig@v2 - with: - version: ${{ matrix.zig-version }} - name: Check Formatting run: zig fmt --ast-check --check . diff --git a/build.zig b/build.zig index 11e481a8..f9394fb1 100644 --- a/build.zig +++ b/build.zig @@ -9,41 +9,43 @@ pub fn build(b: *std.Build) void { const upstream = b.dependency("SDL_ttf", .{}); + const mod = b.createModule(.{ + .target = target, + .optimize = optimize, + .link_libc = true, + .sanitize_c = sanitize_c, + }); + const lib = b.addLibrary(.{ .name = "SDL2_ttf", .version = .{ .major = 2, .minor = 24, .patch = 0 }, .linkage = .static, - .root_module = b.createModule(.{ - .target = target, - .optimize = optimize, - .link_libc = true, - .sanitize_c = sanitize_c, - }), + .root_module = mod, }); - lib.addCSourceFile(.{ .file = upstream.path("SDL_ttf.c") }); + mod.addCSourceFile(.{ .file = upstream.path("SDL_ttf.c") }); if (harfbuzz_enabled) { const harfbuzz_dep = b.dependency("harfbuzz", .{ .target = target, .optimize = optimize, }); - lib.linkLibrary(harfbuzz_dep.artifact("harfbuzz")); - lib.root_module.addCMacro("TTF_USE_HARFBUZZ", "1"); + mod.linkLibrary(harfbuzz_dep.artifact("harfbuzz")); + mod.addCMacro("TTF_USE_HARFBUZZ", "1"); } const freetype_dep = b.dependency("freetype", .{ .target = target, .optimize = optimize, }); - lib.linkLibrary(freetype_dep.artifact("freetype")); + mod.linkLibrary(freetype_dep.artifact("freetype")); const sdl_dep = b.dependency("SDL", .{ .target = target, .optimize = optimize, }); const sdl_lib = sdl_dep.artifact("SDL2"); - lib.linkLibrary(sdl_lib); - lib.addIncludePath(sdl_lib.getEmittedIncludeTree().path(b, "SDL2")); + mod.linkLibrary(sdl_lib); + mod.addIncludePath(sdl_lib.getEmittedIncludeTree().path(b, "SDL2")); lib.installHeader(upstream.path("SDL_ttf.h"), "SDL2/SDL_ttf.h"); diff --git a/build.zig.zon b/build.zig.zon index b0ec527d..f05ab731 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -2,19 +2,19 @@ .name = .SDL_ttf, .version = "2.24.0", .fingerprint = 0xa98f7681c4b9d53c, - .minimum_zig_version = "0.14.0", + .minimum_zig_version = "0.15.2", .dependencies = .{ .harfbuzz = .{ - .url = "git+https://github.com/allyourcodebase/harfbuzz#6bb522d22cee0ce1d1446bd59fa5b0417f25303e", - .hash = "harfbuzz-8.5.0-Ip1VAqCZAADRh-K2AVujG0N3VAal-AKwkZrvlYOaloyB", + .url = "git+https://github.com/allyourcodebase/harfbuzz#da947143173370b8123ef93f21353d58ce6e6d65", + .hash = "harfbuzz-12.2.0-Ip1VAuGZAAD2dBKDBtAW50eyC9VhSmXFlupI1vCNTFL4", }, .freetype = .{ - .url = "git+https://github.com/allyourcodebase/freetype#9d847affbd224cf6a7303ad6d98715e3675ef78c", - .hash = "freetype-2.13.3-C3-WdeyJAAD9z8BeYYQ8N3gNlPI9NvHRxg5039S5vhz7", + .url = "git+https://github.com/allyourcodebase/freetype#f2f3f662cfc6cf7be2d39d8373c6e6b91297ced8", + .hash = "freetype-2.14.1-C3-WdWqKAADgPV0BhYffbFweY71Qns18mICAEtclm1a6", }, .SDL = .{ - .url = "git+https://github.com/allyourcodebase/SDL#a91ef63a07449874ec049dacfd6459b1131fd27b", - .hash = "SDL-2.32.10-JToi3_a0EgFQAnsafUA-gNv9ku-yxMoYF9Wjq7HhD5q5", + .url = "git+https://github.com/allyourcodebase/SDL#25dc764272bf117198f3cd6f44f52dae5c45d60a", + .hash = "SDL-2.32.10-JToi38G1EgFICTNzwfhy7XOMuWw7gN1xDvPOQ5CCoI8R", }, .SDL_ttf = .{ .url = "git+https://github.com/libsdl-org/SDL_ttf#release-2.24.0",