From 0f9b915d86e948d7fa09de1a5bb912a0d7d203f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20=C3=85stholm?= Date: Sat, 18 Jan 2025 13:39:11 +0100 Subject: [PATCH] Update for SDL 3.1.10 --- README.md | 15 ++++++++++----- build.zig | 22 ++++++++++++---------- build.zig.zon | 2 +- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 93536464e18b7..394962dfa6565 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ SPDX-License-Identifier: MIT # SDL ported to the Zig build system -This is a port of [SDL](https://libsdl.org/) 3.0 to the Zig build system, packaged for the Zig package manager. +This is a port of [SDL](https://libsdl.org/) to the Zig build system, packaged for the Zig package manager. ## Usage @@ -35,7 +35,9 @@ Example projects using this SDL package: Target \ Host|Windows|Linux|macOS -|:-:|:-:|:-: `x86_64-windows-gnu`|โœ…|โœ…|โœ… +`aarch64-windows-gnu`|๐Ÿงช|๐Ÿงช|๐Ÿงช `x86_64-linux-gnu`|โœ…|โœ…|โœ… +`aarch64-linux-gnu`|๐Ÿงช|๐Ÿงช|๐Ÿงช `x86_64-macos-none`|โŒ|โŒ|๐Ÿ‰‘ `aarch64-macos-none`|โŒ|โŒ|๐Ÿ‰‘ @@ -43,19 +45,22 @@ Legend: - โœ… Supported - ๐Ÿ‰‘ Supported, but requires external SDKs +- ๐Ÿงช Experimental - โŒ Not supported ### Windows -Building for x86-64 Windows from any host system works out of the box. +Building for x86-64 Windows from any host system works out of the box. AArch64 Windows support is experimental and not yet actively tested. ### Linux -Building for x86-64 Linux from any host system works out of the box. The [castholm/SDL_linux_deps](https://github.com/castholm/SDL_linux_deps) package provides supplementary headers and source files required for compiling for Linux. +Building for x86-64 Linux from any host system works out of the box. AArch64 Linux support is experimental and not yet actively tested. + +The [castholm/SDL_linux_deps](https://github.com/castholm/SDL_linux_deps) package provides supplementary headers and source files required for compiling for Linux. ### macOS -Building for macOS requires Xcode 14.1 or later to be installed on the host system. +Building for x86-64 or AArch64 macOS requires Xcode 14.1 or later to be installed on the host system. When building for non-native targets (for example for x86-64 from an AArch64 Mac), you must provide a path to the macOS SDK via `--sysroot`. This path can be obtained by running `xcrun --sdk macosx --show-sdk-path`: @@ -74,6 +79,6 @@ This repository is [REUSE-compliant](https://reuse.software/). The effective SPD (BSD-3-Clause OR GPL-3.0 OR HIDAPI) AND Apache-2.0 AND BSD-3-Clause AND CC0-1.0 AND HIDAPI AND HPND-sell-variant AND MIT AND SunPro AND Zlib ``` -(This is the same as the upstream SDL repository.) +(This is identical to the upstream SDL repository, just expressed in more explicit terms.) Copyright notices and license texts have been reproduced in [`LICENSE.txt`](LICENSE.txt), for your convenience. diff --git a/build.zig b/build.zig index 80f1b6385e686..652dd7d890de1 100644 --- a/build.zig +++ b/build.zig @@ -3,9 +3,9 @@ const std = @import("std"); -pub const version: std.SemanticVersion = .{ .major = 3, .minor = 1, .patch = 8 }; +pub const version: std.SemanticVersion = .{ .major = 3, .minor = 1, .patch = 10 }; const formatted_version = std.fmt.comptimePrint("SDL-{}", .{version}); -pub const vendor_info = "https://github.com/castholm/SDL 0.1.1"; +pub const vendor_info = "https://github.com/castholm/SDL 0.1.2"; pub const revision = formatted_version ++ " (" ++ vendor_info ++ ")"; pub fn build(b: *std.Build) void { @@ -643,6 +643,7 @@ pub fn build(b: *std.Build) void { "src/events/SDL_events.c", "src/events/SDL_keyboard.c", "src/events/SDL_keymap.c", + "src/events/SDL_keysym_to_keycode.c", "src/events/SDL_keysym_to_scancode.c", "src/events/SDL_mouse.c", "src/events/SDL_pen.c", @@ -651,13 +652,13 @@ pub fn build(b: *std.Build) void { "src/events/SDL_touch.c", "src/events/SDL_windowevents.c", "src/events/imKStoUCS.c", - "src/file/SDL_asyncio.c", - "src/file/SDL_iostream.c", - "src/file/generic/SDL_asyncio_generic.c", "src/filesystem/SDL_filesystem.c", "src/gpu/SDL_gpu.c", "src/haptic/SDL_haptic.c", "src/hidapi/SDL_hidapi.c", + "src/io/SDL_asyncio.c", + "src/io/SDL_iostream.c", + "src/io/generic/SDL_asyncio_generic.c", "src/joystick/SDL_gamepad.c", "src/joystick/SDL_joystick.c", "src/joystick/SDL_steam_virtual_gamepad.c", @@ -765,6 +766,7 @@ pub fn build(b: *std.Build) void { "src/core/windows/SDL_xinput.c", "src/core/windows/pch.c", "src/main/windows/SDL_sysmain_runapp.c", + "src/io/windows/SDL_asyncio_windows_ioring.c", "src/misc/windows/SDL_sysurl.c", "src/audio/directsound/SDL_directsound.c", "src/audio/wasapi/SDL_wasapi.c", @@ -923,7 +925,7 @@ pub fn build(b: *std.Build) void { "src/core/linux/SDL_udev.c", "src/core/linux/SDL_evdev.c", "src/core/linux/SDL_evdev_kbd.c", - "src/file/io_uring/SDL_asyncio_liburing.c", + "src/io/io_uring/SDL_asyncio_liburing.c", "src/core/linux/SDL_evdev_capabilities.c", "src/core/linux/SDL_threadprio.c", "src/joystick/hidapi/SDL_hidapi_combined.c", @@ -1107,10 +1109,10 @@ pub fn build(b: *std.Build) void { sdl_mod.linkFramework("AudioToolbox", .{}); sdl_mod.linkFramework("AVFoundation", .{}); sdl_mod.linkFramework("Foundation", .{}); - sdl_mod.linkFramework("GameController", .{ .weak = true }); - sdl_mod.linkFramework("Metal", .{ .weak = true }); - sdl_mod.linkFramework("QuartzCore", .{ .weak = true }); - sdl_mod.linkFramework("CoreHaptics", .{}); + sdl_mod.linkFramework("GameController", .{}); + sdl_mod.linkFramework("Metal", .{}); + sdl_mod.linkFramework("QuartzCore", .{}); + sdl_mod.linkFramework("CoreHaptics", .{ .weak = true }); } sdl_lib.installHeadersDirectory(b.path("include/SDL3"), "SDL3", .{ diff --git a/build.zig.zon b/build.zig.zon index 60899bedb075b..1f4022126922b 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -3,7 +3,7 @@ .{ .name = "sdl", - .version = "0.1.1+SDL-3.1.8", + .version = "0.1.2+SDL-3.1.10", .minimum_zig_version = "0.12.1", .dependencies = .{ .sdl_linux_deps = .{