3
3
4
4
const std = @import ("std" );
5
5
6
- pub const version : std.SemanticVersion = .{ .major = 3 , .minor = 1 , .patch = 6 };
6
+ pub const version : std.SemanticVersion = .{ .major = 3 , .minor = 1 , .patch = 8 };
7
7
const formatted_version = std .fmt .comptimePrint ("SDL-{}" , .{version });
8
- pub const vendor_info = "https://github.com/castholm/SDL 0.1.0 " ;
8
+ pub const vendor_info = "https://github.com/castholm/SDL 0.1.1 " ;
9
9
pub const revision = formatted_version ++ " (" ++ vendor_info ++ ")" ;
10
10
11
11
pub fn build (b : * std.Build ) void {
@@ -57,20 +57,19 @@ pub fn build(b: *std.Build) void {
57
57
.HAVE_GCC_ATOMICS = windows or linux or macos ,
58
58
.HAVE_GCC_SYNC_LOCK_TEST_AND_SET = false ,
59
59
.SDL_DISABLE_ALLOCA = false ,
60
+ .HAVE_FLOAT_H = windows or linux or macos ,
61
+ .HAVE_STDARG_H = windows or linux or macos ,
62
+ .HAVE_STDDEF_H = windows or linux or macos ,
63
+ .HAVE_STDINT_H = windows or linux or macos ,
60
64
.HAVE_LIBC = windows or linux or macos ,
61
65
.HAVE_ALLOCA_H = linux or macos ,
62
- .HAVE_FLOAT_H = windows or linux or macos ,
63
66
.HAVE_ICONV_H = linux or macos ,
64
67
.HAVE_INTTYPES_H = windows or linux or macos ,
65
68
.HAVE_LIMITS_H = windows or linux or macos ,
66
69
.HAVE_MALLOC_H = windows or linux ,
67
70
.HAVE_MATH_H = windows or linux or macos ,
68
71
.HAVE_MEMORY_H = windows or linux or macos ,
69
72
.HAVE_SIGNAL_H = windows or linux or macos ,
70
- .HAVE_STDARG_H = windows or linux or macos ,
71
- .HAVE_STDBOOL_H = windows or linux or macos ,
72
- .HAVE_STDDEF_H = windows or linux or macos ,
73
- .HAVE_STDINT_H = windows or linux or macos ,
74
73
.HAVE_STDIO_H = windows or linux or macos ,
75
74
.HAVE_STDLIB_H = windows or linux or macos ,
76
75
.HAVE_STRINGS_H = windows or linux or macos ,
@@ -80,10 +79,7 @@ pub fn build(b: *std.Build) void {
80
79
.HAVE_PTHREAD_NP_H = false ,
81
80
.HAVE_DLOPEN = linux or macos ,
82
81
.HAVE_MALLOC = windows or linux or macos ,
83
- .HAVE_CALLOC = windows or linux or macos ,
84
- .HAVE_REALLOC = windows or linux or macos ,
85
82
.HAVE_FDATASYNC = linux ,
86
- .HAVE_FREE = windows or linux or macos ,
87
83
.HAVE_GETENV = windows or linux or macos ,
88
84
.HAVE_GETHOSTNAME = linux or macos ,
89
85
.HAVE_SETENV = linux or macos ,
@@ -99,8 +95,6 @@ pub fn build(b: *std.Build) void {
99
95
.HAVE_WCSNLEN = windows or linux or macos ,
100
96
.HAVE_WCSLCPY = macos ,
101
97
.HAVE_WCSLCAT = macos ,
102
- .HAVE__WCSDUP = windows ,
103
- .HAVE_WCSDUP = windows or linux or macos ,
104
98
.HAVE_WCSSTR = windows or linux or macos ,
105
99
.HAVE_WCSCMP = windows or linux or macos ,
106
100
.HAVE_WCSNCMP = windows or linux or macos ,
@@ -111,8 +105,6 @@ pub fn build(b: *std.Build) void {
111
105
.HAVE_STRLCAT = macos ,
112
106
.HAVE_STRPBRK = windows or linux or macos ,
113
107
.HAVE__STRREV = windows ,
114
- .HAVE__STRUPR = false ,
115
- .HAVE__STRLWR = false ,
116
108
.HAVE_INDEX = linux or macos ,
117
109
.HAVE_RINDEX = linux or macos ,
118
110
.HAVE_STRCHR = windows or linux or macos ,
@@ -135,8 +127,6 @@ pub fn build(b: *std.Build) void {
135
127
.HAVE_ATOF = windows or linux or macos ,
136
128
.HAVE_STRCMP = windows or linux or macos ,
137
129
.HAVE_STRNCMP = windows or linux or macos ,
138
- .HAVE_STRCASESTR = linux or macos ,
139
- .HAVE_SSCANF = windows or linux or macos ,
140
130
.HAVE_VSSCANF = windows or linux or macos ,
141
131
.HAVE_VSNPRINTF = windows or linux or macos ,
142
132
.HAVE_ACOS = windows or linux or macos ,
@@ -151,6 +141,7 @@ pub fn build(b: *std.Build) void {
151
141
.HAVE_CEILF = windows or linux or macos ,
152
142
.HAVE_COPYSIGN = windows or linux or macos ,
153
143
.HAVE_COPYSIGNF = windows or linux or macos ,
144
+ .HAVE__COPYSIGN = windows ,
154
145
.HAVE_COS = windows or linux or macos ,
155
146
.HAVE_COSF = windows or linux or macos ,
156
147
.HAVE_EXP = windows or linux or macos ,
@@ -189,6 +180,7 @@ pub fn build(b: *std.Build) void {
189
180
.HAVE_TANF = windows or linux or macos ,
190
181
.HAVE_TRUNC = windows or linux or macos ,
191
182
.HAVE_TRUNCF = windows or linux or macos ,
183
+ .HAVE__FSEEKI64 = windows ,
192
184
.HAVE_FOPEN64 = windows or linux ,
193
185
.HAVE_FSEEKO = windows or linux or macos ,
194
186
.HAVE_FSEEKO64 = windows or linux ,
@@ -218,16 +210,14 @@ pub fn build(b: *std.Build) void {
218
210
.HAVE_DBUS_DBUS_H = linux ,
219
211
.HAVE_FCITX = linux ,
220
212
.HAVE_IBUS_IBUS_H = linux ,
221
- .HAVE_SYS_INOTIFY_H = linux ,
222
- .HAVE_INOTIFY_INIT = linux ,
223
213
.HAVE_INOTIFY_INIT1 = linux ,
224
214
.HAVE_INOTIFY = linux ,
225
215
.HAVE_LIBUSB = linux ,
226
216
.HAVE_O_CLOEXEC = linux or macos ,
227
217
.HAVE_LINUX_INPUT_H = linux ,
228
218
.HAVE_LIBUDEV_H = linux ,
229
219
.HAVE_LIBDECOR_H = linux ,
230
- .HAVE_D3D11_H = windows ,
220
+ .HAVE_LIBURING_H = linux ,
231
221
.HAVE_DDRAW_H = windows ,
232
222
.HAVE_DSOUND_H = windows ,
233
223
.HAVE_DINPUT_H = windows ,
@@ -237,25 +227,24 @@ pub fn build(b: *std.Build) void {
237
227
.HAVE_DXGI_H = windows ,
238
228
.HAVE_DXGI1_6_H = windows ,
239
229
.HAVE_MMDEVICEAPI_H = windows ,
240
- .HAVE_AUDIOCLIENT_H = windows ,
241
230
.HAVE_TPCSHRD_H = windows ,
242
- .HAVE_SENSORSAPI_H = windows ,
243
231
.HAVE_ROAPI_H = windows ,
244
232
.HAVE_SHELLSCALINGAPI_H = windows ,
245
233
.USE_POSIX_SPAWN = false ,
246
234
.SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED = false ,
247
235
.SDL_DEFAULT_ASSERT_LEVEL = null ,
248
236
.SDL_AUDIO_DISABLED = false ,
237
+ .SDL_VIDEO_DISABLED = false ,
238
+ .SDL_GPU_DISABLED = false ,
239
+ .SDL_RENDER_DISABLED = false ,
240
+ .SDL_CAMERA_DISABLED = false ,
249
241
.SDL_JOYSTICK_DISABLED = false ,
250
242
.SDL_HAPTIC_DISABLED = false ,
251
243
.SDL_HIDAPI_DISABLED = false ,
244
+ .SDL_POWER_DISABLED = false ,
252
245
.SDL_SENSOR_DISABLED = false ,
253
- .SDL_RENDER_DISABLED = false ,
246
+ .SDL_DIALOG_DISABLED = false ,
254
247
.SDL_THREADS_DISABLED = false ,
255
- .SDL_VIDEO_DISABLED = false ,
256
- .SDL_POWER_DISABLED = false ,
257
- .SDL_CAMERA_DISABLED = false ,
258
- .SDL_GPU_DISABLED = false ,
259
248
.SDL_AUDIO_DRIVER_ALSA = linux ,
260
249
.SDL_AUDIO_DRIVER_ALSA_DYNAMIC = if (lazy_linux_deps_values ) | x | b .fmt ("\" {s}\" " , .{x .alsa_soname }) else "" ,
261
250
.SDL_AUDIO_DRIVER_OPENSLES = false ,
@@ -324,7 +313,6 @@ pub fn build(b: *std.Build) void {
324
313
.SDL_SENSOR_N3DS = false ,
325
314
.SDL_LOADSO_DLOPEN = linux or macos ,
326
315
.SDL_LOADSO_DUMMY = false ,
327
- .SDL_LOADSO_LDG = false ,
328
316
.SDL_LOADSO_WINDOWS = windows ,
329
317
.SDL_THREAD_GENERIC_COND_SUFFIX = windows ,
330
318
.SDL_THREAD_GENERIC_RWLOCK_SUFFIX = windows ,
@@ -343,7 +331,6 @@ pub fn build(b: *std.Build) void {
343
331
.SDL_TIME_PS2 = false ,
344
332
.SDL_TIME_N3DS = false ,
345
333
.SDL_TIMER_HAIKU = false ,
346
- .SDL_TIMER_DUMMY = false ,
347
334
.SDL_TIMER_UNIX = linux or macos ,
348
335
.SDL_TIMER_WINDOWS = windows ,
349
336
.SDL_TIMER_VITA = false ,
@@ -395,6 +382,7 @@ pub fn build(b: *std.Build) void {
395
382
.SDL_VIDEO_DRIVER_X11_XRANDR = linux ,
396
383
.SDL_VIDEO_DRIVER_X11_XSCRNSAVER = linux ,
397
384
.SDL_VIDEO_DRIVER_X11_XSHAPE = linux ,
385
+ .SDL_VIDEO_DRIVER_X11_XSYNC = linux ,
398
386
.SDL_VIDEO_DRIVER_QNX = false ,
399
387
.SDL_VIDEO_RENDER_D3D = windows ,
400
388
.SDL_VIDEO_RENDER_D3D11 = windows ,
@@ -410,13 +398,10 @@ pub fn build(b: *std.Build) void {
410
398
.SDL_VIDEO_OPENGL = windows or linux or macos ,
411
399
.SDL_VIDEO_OPENGL_ES = linux ,
412
400
.SDL_VIDEO_OPENGL_ES2 = windows or linux or macos ,
413
- .SDL_VIDEO_OPENGL_BGL = false ,
414
401
.SDL_VIDEO_OPENGL_CGL = macos ,
415
402
.SDL_VIDEO_OPENGL_GLX = linux ,
416
403
.SDL_VIDEO_OPENGL_WGL = windows ,
417
404
.SDL_VIDEO_OPENGL_EGL = windows or linux or macos ,
418
- .SDL_VIDEO_OPENGL_OSMESA = false ,
419
- .SDL_VIDEO_OPENGL_OSMESA_DYNAMIC = "" ,
420
405
.SDL_VIDEO_VULKAN = windows or linux or macos ,
421
406
.SDL_VIDEO_METAL = macos ,
422
407
.SDL_GPU_D3D11 = windows ,
@@ -446,7 +431,6 @@ pub fn build(b: *std.Build) void {
446
431
.SDL_FILESYSTEM_PSP = false ,
447
432
.SDL_FILESYSTEM_PS2 = false ,
448
433
.SDL_FILESYSTEM_N3DS = false ,
449
- .SDL_STORAGE_GENERIC = windows or linux or macos ,
450
434
.SDL_STORAGE_STEAM = windows or linux or macos ,
451
435
.SDL_FSOPS_POSIX = linux or macos ,
452
436
.SDL_FSOPS_WINDOWS = windows ,
@@ -462,11 +446,11 @@ pub fn build(b: *std.Build) void {
462
446
.SDL_CAMERA_DRIVER_PIPEWIRE_DYNAMIC = if (lazy_linux_deps_values ) | x | b .fmt ("\" {s}\" " , .{x .pipewire_soname }) else "" ,
463
447
.SDL_CAMERA_DRIVER_VITA = false ,
464
448
.SDL_DIALOG_DUMMY = false ,
465
- .SDL_MISC_DUMMY = false ,
466
- .SDL_LOCALE_DUMMY = false ,
467
449
.SDL_ALTIVEC_BLITTERS = false ,
468
450
.DYNAPI_NEEDS_DLOPEN = linux or macos ,
469
451
.SDL_USE_IME = linux ,
452
+ .SDL_DISABLE_WINDOWS_IME = false ,
453
+ .SDL_GDK_TEXTINPUT = false ,
470
454
.SDL_IPHONE_KEYBOARD = false ,
471
455
.SDL_IPHONE_LAUNCHSCREEN = false ,
472
456
.SDL_VIDEO_VITA_PIB = false ,
@@ -593,6 +577,9 @@ pub fn build(b: *std.Build) void {
593
577
if (target .result .cpu .arch == .x86_64 and target .result .abi .isGnu ()) {
594
578
sdl_mod .addSystemIncludePath (dep .path ("include/x86_64-linux-gnu" ));
595
579
}
580
+ if (target .result .cpu .arch == .aarch64 and target .result .abi .isGnu ()) {
581
+ sdl_mod .addSystemIncludePath (dep .path ("include/aarch64-linux-gnu" ));
582
+ }
596
583
}
597
584
}
598
585
if (macos ) {
@@ -664,7 +651,9 @@ pub fn build(b: *std.Build) void {
664
651
"src/events/SDL_touch.c" ,
665
652
"src/events/SDL_windowevents.c" ,
666
653
"src/events/imKStoUCS.c" ,
654
+ "src/file/SDL_asyncio.c" ,
667
655
"src/file/SDL_iostream.c" ,
656
+ "src/file/generic/SDL_asyncio_generic.c" ,
668
657
"src/filesystem/SDL_filesystem.c" ,
669
658
"src/gpu/SDL_gpu.c" ,
670
659
"src/haptic/SDL_haptic.c" ,
@@ -678,7 +667,6 @@ pub fn build(b: *std.Build) void {
678
667
"src/main/SDL_runapp.c" ,
679
668
"src/misc/SDL_url.c" ,
680
669
"src/power/SDL_power.c" ,
681
- "src/process/SDL_process.c" ,
682
670
"src/render/SDL_d3dmath.c" ,
683
671
"src/render/SDL_render.c" ,
684
672
"src/render/SDL_render_unsupported.c" ,
@@ -755,6 +743,9 @@ pub fn build(b: *std.Build) void {
755
743
"src/video/yuv2rgb/yuv_rgb_lsx.c" ,
756
744
"src/video/yuv2rgb/yuv_rgb_sse.c" ,
757
745
"src/video/yuv2rgb/yuv_rgb_std.c" ,
746
+ "src/dialog/SDL_dialog.c" ,
747
+ "src/process/SDL_process.c" ,
748
+ "src/tray/SDL_tray_utils.c" ,
758
749
},
759
750
});
760
751
if (windows ) {
@@ -777,7 +768,7 @@ pub fn build(b: *std.Build) void {
777
768
"src/misc/windows/SDL_sysurl.c" ,
778
769
"src/audio/directsound/SDL_directsound.c" ,
779
770
"src/audio/wasapi/SDL_wasapi.c" ,
780
- "src/audio/wasapi/SDL_wasapi_win32 .c" ,
771
+ "src/video/windows/SDL_surface_utils .c" ,
781
772
"src/video/windows/SDL_windowsclipboard.c" ,
782
773
"src/video/windows/SDL_windowsevents.c" ,
783
774
"src/video/windows/SDL_windowsframebuffer.c" ,
@@ -816,6 +807,7 @@ pub fn build(b: *std.Build) void {
816
807
"src/core/windows/SDL_windows.c" ,
817
808
"src/core/windows/SDL_xinput.c" ,
818
809
"src/core/windows/pch.c" ,
810
+ "src/tray/windows/SDL_tray.c" ,
819
811
"src/joystick/hidapi/SDL_hidapi_combined.c" ,
820
812
"src/joystick/hidapi/SDL_hidapi_gamecube.c" ,
821
813
"src/joystick/hidapi/SDL_hidapi_luna.c" ,
@@ -836,6 +828,7 @@ pub fn build(b: *std.Build) void {
836
828
"src/joystick/hidapi/SDL_hidapijoystick.c" ,
837
829
"src/joystick/windows/SDL_dinputjoystick.c" ,
838
830
"src/joystick/windows/SDL_rawinputjoystick.c" ,
831
+ "src/joystick/windows/SDL_windows_gaming_input.c" ,
839
832
"src/joystick/windows/SDL_windowsjoystick.c" ,
840
833
"src/joystick/windows/SDL_xinputjoystick.c" ,
841
834
"src/haptic/windows/SDL_dinputhaptic.c" ,
@@ -850,7 +843,6 @@ pub fn build(b: *std.Build) void {
850
843
"src/video/offscreen/SDL_offscreenvideo.c" ,
851
844
"src/video/offscreen/SDL_offscreenvulkan.c" ,
852
845
"src/video/offscreen/SDL_offscreenwindow.c" ,
853
- "src/gpu/d3d11/SDL_gpu_d3d11.c" ,
854
846
"src/gpu/d3d12/SDL_gpu_d3d12.c" ,
855
847
"src/gpu/vulkan/SDL_gpu_vulkan.c" ,
856
848
"src/main/generic/SDL_sysmain_callbacks.c" ,
@@ -897,6 +889,7 @@ pub fn build(b: *std.Build) void {
897
889
"src/video/x11/SDL_x11window.c" ,
898
890
"src/video/x11/SDL_x11xfixes.c" ,
899
891
"src/video/x11/SDL_x11xinput2.c" ,
892
+ "src/video/x11/SDL_x11xsync.c" ,
900
893
"src/video/x11/edid-parse.c" ,
901
894
"src/video/x11/xsettings-client.c" ,
902
895
"src/video/kmsdrm/SDL_kmsdrmdyn.c" ,
@@ -917,6 +910,7 @@ pub fn build(b: *std.Build) void {
917
910
"src/video/wayland/SDL_waylandvideo.c" ,
918
911
"src/video/wayland/SDL_waylandvulkan.c" ,
919
912
"src/video/wayland/SDL_waylandwindow.c" ,
913
+ "src/tray/unix/SDL_tray.c" ,
920
914
"src/core/unix/SDL_appid.c" ,
921
915
"src/core/unix/SDL_poll.c" ,
922
916
"src/camera/v4l2/SDL_camera_v4l2.c" ,
@@ -929,6 +923,7 @@ pub fn build(b: *std.Build) void {
929
923
"src/core/linux/SDL_udev.c" ,
930
924
"src/core/linux/SDL_evdev.c" ,
931
925
"src/core/linux/SDL_evdev_kbd.c" ,
926
+ "src/file/io_uring/SDL_asyncio_liburing.c" ,
932
927
"src/core/linux/SDL_evdev_capabilities.c" ,
933
928
"src/core/linux/SDL_threadprio.c" ,
934
929
"src/joystick/hidapi/SDL_hidapi_combined.c" ,
@@ -950,7 +945,6 @@ pub fn build(b: *std.Build) void {
950
945
"src/joystick/hidapi/SDL_hidapi_xboxone.c" ,
951
946
"src/joystick/hidapi/SDL_hidapijoystick.c" ,
952
947
"src/joystick/linux/SDL_sysjoystick.c" ,
953
- "src/joystick/steam/SDL_steamcontroller.c" ,
954
948
"src/thread/pthread/SDL_systhread.c" ,
955
949
"src/thread/pthread/SDL_sysmutex.c" ,
956
950
"src/thread/pthread/SDL_syscond.c" ,
@@ -1050,6 +1044,7 @@ pub fn build(b: *std.Build) void {
1050
1044
"src/video/cocoa/SDL_cocoawindow.m" ,
1051
1045
"src/render/metal/SDL_render_metal.m" ,
1052
1046
"src/gpu/metal/SDL_gpu_metal.m" ,
1047
+ "src/tray/cocoa/SDL_tray.m" ,
1053
1048
"src/thread/pthread/SDL_systhread.c" ,
1054
1049
"src/thread/pthread/SDL_sysmutex.c" ,
1055
1050
"src/thread/pthread/SDL_syscond.c" ,
@@ -1104,18 +1099,18 @@ pub fn build(b: *std.Build) void {
1104
1099
sdl_mod .linkFramework ("CoreMedia" , .{});
1105
1100
sdl_mod .linkFramework ("CoreVideo" , .{});
1106
1101
sdl_mod .linkFramework ("Cocoa" , .{});
1102
+ sdl_mod .linkFramework ("UniformTypeIdentifiers" , .{ .weak = true });
1107
1103
sdl_mod .linkFramework ("IOKit" , .{});
1108
1104
sdl_mod .linkFramework ("ForceFeedback" , .{});
1109
1105
sdl_mod .linkFramework ("Carbon" , .{});
1110
1106
sdl_mod .linkFramework ("CoreAudio" , .{});
1111
1107
sdl_mod .linkFramework ("AudioToolbox" , .{});
1112
1108
sdl_mod .linkFramework ("AVFoundation" , .{});
1113
1109
sdl_mod .linkFramework ("Foundation" , .{});
1114
- sdl_mod .linkFramework ("CoreHaptics" , .{});
1115
1110
sdl_mod .linkFramework ("GameController" , .{ .weak = true });
1116
1111
sdl_mod .linkFramework ("Metal" , .{ .weak = true });
1117
1112
sdl_mod .linkFramework ("QuartzCore" , .{ .weak = true });
1118
- sdl_mod .linkFramework ("UniformTypeIdentifiers " , .{ . weak = true });
1113
+ sdl_mod .linkFramework ("CoreHaptics " , .{});
1119
1114
}
1120
1115
1121
1116
sdl_lib .installHeadersDirectory (b .path ("include/SDL3" ), "SDL3" , .{
0 commit comments