|
1 | 1 | diff --git a/tools/ports/sdl2_image.py b/tools/ports/sdl2_image.py |
2 | | -index 70fa1499..36be807b 100644 |
| 2 | +index 7a7d0aa..145bc6d 100644 |
3 | 3 | --- a/tools/ports/sdl2_image.py |
4 | 4 | +++ b/tools/ports/sdl2_image.py |
5 | 5 | @@ -18,7 +18,8 @@ variants = { |
@@ -29,27 +29,27 @@ index 70fa1499..36be807b 100644 |
29 | 29 | - if settings.PTHREADS: |
30 | 30 | + if settings.PTHREADS or opts['mt']: |
31 | 31 | 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): |
35 | 35 | if 'jpg' in formats: |
36 | 36 | flags += ['-sUSE_LIBJPEG'] |
37 | 37 |
|
38 | 38 | - if settings.PTHREADS: |
39 | 39 | + if settings.PTHREADS or opts['mt']: |
40 | 40 | flags += ['-pthread'] |
41 | 41 |
|
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): |
45 | 44 | else: |
46 | 45 | opts['formats'].add(format) |
47 | | -+ |
| 46 | + |
48 | 47 | + mt = options['mt'] |
49 | | -+ if mt not in ["1","0"]: |
| 48 | ++ if mt not in ["1", "0"]: |
50 | 49 | + error_handler(f'{mt} has to be either 0 or 1') |
51 | 50 | + else: |
52 | 51 | + opts['mt'] = int(mt) |
53 | | - |
| 52 | ++ |
54 | 53 |
|
55 | 54 | def show(): |
| 55 | + return 'sdl2_image (-sUSE_SDL_IMAGE=2 or --use-port=sdl2_image; zlib license)' |
0 commit comments