1
1
# first the "required" modules
2
+
3
+ # TODO: support SDL3
4
+ if sdl_api != 3
2
5
base = py.extension_module(
3
6
' base' ,
4
7
' base.c' ,
@@ -7,7 +10,10 @@ base = py.extension_module(
7
10
install : true ,
8
11
subdir : pg,
9
12
)
13
+ endif
10
14
15
+ # TODO: support SDL3
16
+ if sdl_api != 3
11
17
color = py.extension_module(
12
18
' color' ,
13
19
' color.c' ,
@@ -16,7 +22,10 @@ color = py.extension_module(
16
22
install : true ,
17
23
subdir : pg,
18
24
)
25
+ endif
19
26
27
+ # TODO: support SDL3
28
+ if sdl_api != 3
20
29
constants = py.extension_module(
21
30
' constants' ,
22
31
' constants.c' ,
@@ -25,7 +34,10 @@ constants = py.extension_module(
25
34
install : true ,
26
35
subdir : pg,
27
36
)
37
+ endif
28
38
39
+ # TODO: support SDL3
40
+ if sdl_api != 3
29
41
display = py.extension_module(
30
42
' display' ,
31
43
' display.c' ,
@@ -34,7 +46,10 @@ display = py.extension_module(
34
46
install : true ,
35
47
subdir : pg,
36
48
)
49
+ endif
37
50
51
+ # TODO: support SDL3
52
+ if sdl_api != 3
38
53
event = py.extension_module(
39
54
' event' ,
40
55
' event.c' ,
@@ -43,7 +58,10 @@ event = py.extension_module(
43
58
install : true ,
44
59
subdir : pg,
45
60
)
61
+ endif
46
62
63
+ # TODO: support SDL3
64
+ if sdl_api != 3
47
65
key = py.extension_module(
48
66
' key' ,
49
67
' key.c' ,
@@ -52,7 +70,10 @@ key = py.extension_module(
52
70
install : true ,
53
71
subdir : pg,
54
72
)
73
+ endif
55
74
75
+ # TODO: support SDL3
76
+ if sdl_api != 3
56
77
mouse = py.extension_module(
57
78
' mouse' ,
58
79
' mouse.c' ,
@@ -61,7 +82,10 @@ mouse = py.extension_module(
61
82
install : true ,
62
83
subdir : pg,
63
84
)
85
+ endif
64
86
87
+ # TODO: support SDL3
88
+ if sdl_api != 3
65
89
rect = py.extension_module(
66
90
' rect' ,
67
91
[' rect.c' , ' pgcompat_rect.c' ],
@@ -70,7 +94,10 @@ rect = py.extension_module(
70
94
install : true ,
71
95
subdir : pg,
72
96
)
97
+ endif
73
98
99
+ # TODO: support SDL3
100
+ if sdl_api != 3
74
101
rwobject = py.extension_module(
75
102
' rwobject' ,
76
103
' rwobject.c' ,
@@ -79,7 +106,10 @@ rwobject = py.extension_module(
79
106
install : true ,
80
107
subdir : pg,
81
108
)
109
+ endif
82
110
111
+ # TODO: support SDL3
112
+ if sdl_api != 3
83
113
simd_blitters_avx2 = static_library (
84
114
' simd_blitters_avx2' ,
85
115
' simd_blitters_avx2.c' ,
@@ -126,7 +156,10 @@ surface = py.extension_module(
126
156
install : true ,
127
157
subdir : pg,
128
158
)
159
+ endif
129
160
161
+ # TODO: support SDL3
162
+ if sdl_api != 3
130
163
surflock = py.extension_module(
131
164
' surflock' ,
132
165
' surflock.c' ,
@@ -135,7 +168,10 @@ surflock = py.extension_module(
135
168
install : true ,
136
169
subdir : pg,
137
170
)
171
+ endif
138
172
173
+ # TODO: support SDL3
174
+ if sdl_api != 3
139
175
time = py.extension_module(
140
176
' time' ,
141
177
' time.c' ,
@@ -144,7 +180,10 @@ time = py.extension_module(
144
180
install : true ,
145
181
subdir : pg,
146
182
)
183
+ endif
147
184
185
+ # TODO: support SDL3
186
+ if sdl_api != 3
148
187
joystick = py.extension_module(
149
188
' joystick' ,
150
189
' joystick.c' ,
@@ -153,7 +192,11 @@ joystick = py.extension_module(
153
192
install : true ,
154
193
subdir : pg,
155
194
)
195
+ endif
196
+
156
197
198
+ # TODO: support SDL3
199
+ if sdl_api != 3
157
200
draw = py.extension_module(
158
201
' draw' ,
159
202
' draw.c' ,
@@ -162,7 +205,10 @@ draw = py.extension_module(
162
205
install : true ,
163
206
subdir : pg,
164
207
)
208
+ endif
165
209
210
+ # TODO: support SDL3
211
+ if sdl_api != 3
166
212
image = py.extension_module(
167
213
' image' ,
168
214
' image.c' ,
@@ -171,7 +217,10 @@ image = py.extension_module(
171
217
install : true ,
172
218
subdir : pg,
173
219
)
220
+ endif
174
221
222
+ # TODO: support SDL3
223
+ if sdl_api != 3
175
224
simd_transform_avx2 = static_library (
176
225
' simd_transform_avx2' ,
177
226
' simd_transform_avx2.c' ,
@@ -212,7 +261,10 @@ transform = py.extension_module(
212
261
install : true ,
213
262
subdir : pg,
214
263
)
264
+ endif
215
265
266
+ # TODO: support SDL3
267
+ if sdl_api != 3
216
268
mask = py.extension_module(
217
269
' mask' ,
218
270
[' mask.c' , ' bitmask.c' ],
@@ -221,7 +273,10 @@ mask = py.extension_module(
221
273
install : true ,
222
274
subdir : pg,
223
275
)
276
+ endif
224
277
278
+ # TODO: support SDL3
279
+ if sdl_api != 3
225
280
bufferproxy = py.extension_module(
226
281
' bufferproxy' ,
227
282
' bufferproxy.c' ,
@@ -230,7 +285,10 @@ bufferproxy = py.extension_module(
230
285
install : true ,
231
286
subdir : pg,
232
287
)
288
+ endif
233
289
290
+ # TODO: support SDL3
291
+ if sdl_api != 3
234
292
pixelarray = py.extension_module(
235
293
' pixelarray' ,
236
294
' pixelarray.c' ,
@@ -239,7 +297,10 @@ pixelarray = py.extension_module(
239
297
install : true ,
240
298
subdir : pg,
241
299
)
300
+ endif
242
301
302
+ # TODO: support SDL3
303
+ if sdl_api != 3
243
304
math = py.extension_module(
244
305
' math' ,
245
306
' math.c' ,
@@ -248,7 +309,10 @@ math = py.extension_module(
248
309
install : true ,
249
310
subdir : pg,
250
311
)
312
+ endif
251
313
314
+ # TODO: support SDL3
315
+ if sdl_api != 3
252
316
pixelcopy = py.extension_module(
253
317
' pixelcopy' ,
254
318
' pixelcopy.c' ,
@@ -257,7 +321,10 @@ pixelcopy = py.extension_module(
257
321
install : true ,
258
322
subdir : pg,
259
323
)
324
+ endif
260
325
326
+ # TODO: support SDL3
327
+ if sdl_api != 3
261
328
newbuffer = py.extension_module(
262
329
' newbuffer' ,
263
330
' newbuffer.c' ,
@@ -266,8 +333,11 @@ newbuffer = py.extension_module(
266
333
install : true ,
267
334
subdir : pg,
268
335
)
336
+ endif
269
337
270
338
# new/experimental/uncommon stuff, but built by default
339
+ # TODO: support SDL3
340
+ if sdl_api != 3
271
341
system = py.extension_module(
272
342
' system' ,
273
343
' system.c' ,
@@ -276,7 +346,10 @@ system = py.extension_module(
276
346
install : true ,
277
347
subdir : pg,
278
348
)
349
+ endif
279
350
351
+ # TODO: support SDL3
352
+ if sdl_api != 3
280
353
geometry = py.extension_module(
281
354
' geometry' ,
282
355
' geometry.c' ,
@@ -285,7 +358,10 @@ geometry = py.extension_module(
285
358
install : true ,
286
359
subdir : pg,
287
360
)
361
+ endif
288
362
363
+ # TODO: support SDL3
364
+ if sdl_api != 3
289
365
window = py.extension_module(
290
366
' window' ,
291
367
' window.c' ,
@@ -294,7 +370,10 @@ window = py.extension_module(
294
370
install : true ,
295
371
subdir : pg,
296
372
)
373
+ endif
297
374
375
+ # TODO: support SDL3
376
+ if sdl_api != 3
298
377
gfxdraw = py.extension_module(
299
378
' gfxdraw' ,
300
379
[' gfxdraw.c' , ' SDL_gfx/SDL_gfxPrimitives.c' ],
@@ -303,11 +382,18 @@ gfxdraw = py.extension_module(
303
382
install : true ,
304
383
subdir : pg,
305
384
)
385
+ endif
306
386
307
387
# pygame._sdl2
388
+ # TODO: support SDL3
389
+ if sdl_api != 3
308
390
subdir (' _sdl2' )
391
+ endif
309
392
310
393
# pygame._camera
394
+
395
+ # TODO: support SDL3
396
+ if sdl_api != 3
311
397
pg_camera_sources = [' _camera.c' ]
312
398
pg_camera_link = []
313
399
if plat == ' win'
@@ -338,8 +424,12 @@ _camera = py.extension_module(
338
424
install : true ,
339
425
subdir : pg,
340
426
)
427
+ endif
341
428
342
429
# pygame.scrap
430
+
431
+ # TODO: support SDL3
432
+ if sdl_api != 3
343
433
pg_scrap_link = [] # TODO: should this link logic be improved/made meson-ey?
344
434
if plat == ' win'
345
435
pg_scrap_link += [' -luser32' , ' -lgdi32' ]
@@ -354,8 +444,13 @@ scrap = py.extension_module(
354
444
install : true ,
355
445
subdir : pg,
356
446
)
447
+ endif
357
448
358
449
# optional modules
450
+
451
+ # TODO: support SDL3
452
+ if sdl_api != 3
453
+
359
454
if sdl_image_dep.found()
360
455
imageext = py.extension_module(
361
456
' imageext' ,
@@ -417,6 +512,8 @@ if freetype_dep.found()
417
512
)
418
513
endif
419
514
515
+ endif
516
+
420
517
if portmidi_dep.found()
421
518
pypm = py.extension_module(
422
519
' pypm' ,
0 commit comments