Skip to content

Commit 619e80f

Browse files
committed
fix: fix web build
after an upstream patch the local patch files needed to be adjusted
1 parent 42413e5 commit 619e80f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

platforms/emscripten/sdl2_image_port.diff

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/tools/ports/sdl2_image.py b/tools/ports/sdl2_image.py
2-
index 70fa1499..36be807b 100644
2+
index 7a7d0aa..145bc6d 100644
33
--- a/tools/ports/sdl2_image.py
44
+++ b/tools/ports/sdl2_image.py
55
@@ -18,7 +18,8 @@ variants = {
@@ -29,27 +29,27 @@ index 70fa1499..36be807b 100644
2929
- if settings.PTHREADS:
3030
+ if settings.PTHREADS or opts['mt']:
3131
libname += '-mt'
32-
return libname + '.a'
33-
34-
@@ -75,7 +77,7 @@ def get(ports, settings, shared):
32+
if settings.SUPPORT_LONGJMP == 'wasm':
33+
libname += '-wasm-sjlj'
34+
@@ -76,7 +78,7 @@ def get(ports, settings, shared):
3535
if 'jpg' in formats:
3636
flags += ['-sUSE_LIBJPEG']
3737

3838
- if settings.PTHREADS:
3939
+ if settings.PTHREADS or opts['mt']:
4040
flags += ['-pthread']
4141

42-
ports.build_port(src_dir, final, 'sdl2_image', flags=flags, srcs=srcs)
43-
@@ -106,6 +108,12 @@ def handle_options(options, error_handler):
44-
error_handler(f'{format} is not a supported format')
42+
if settings.SUPPORT_LONGJMP == 'wasm':
43+
@@ -111,6 +113,12 @@ def handle_options(options, error_handler):
4544
else:
4645
opts['formats'].add(format)
47-
+
46+
4847
+ mt = options['mt']
49-
+ if mt not in ["1","0"]:
48+
+ if mt not in ["1", "0"]:
5049
+ error_handler(f'{mt} has to be either 0 or 1')
5150
+ else:
5251
+ opts['mt'] = int(mt)
53-
52+
+
5453

5554
def show():
55+
return 'sdl2_image (-sUSE_SDL_IMAGE=2 or --use-port=sdl2_image; zlib license)'

0 commit comments

Comments
 (0)