Skip to content

Commit 04c7daa

Browse files
authored
Clear correct sdl2 mixer library (#16754)
1 parent 985fc3b commit 04c7daa

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

tools/ports/sdl2_mixer.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ def needed(settings):
1717
return settings.USE_SDL_MIXER == 2
1818

1919

20-
def get(ports, settings, shared):
21-
sdl_build = os.path.join(ports.get_build_dir(), 'sdl2')
22-
assert os.path.exists(sdl_build), 'You must use SDL2 to use SDL2_mixer'
23-
ports.fetch_project('sdl2_mixer', 'https://github.com/emscripten-ports/SDL2_mixer/archive/' + TAG + '.zip', 'SDL2_mixer-' + TAG, sha512hash=HASH)
24-
20+
def get_lib_name(settings):
2521
settings.SDL2_MIXER_FORMATS.sort()
2622
formats = '-'.join(settings.SDL2_MIXER_FORMATS)
2723

@@ -30,6 +26,15 @@ def get(ports, settings, shared):
3026
libname += '_' + formats
3127
libname += '.a'
3228

29+
return libname
30+
31+
32+
def get(ports, settings, shared):
33+
sdl_build = os.path.join(ports.get_build_dir(), 'sdl2')
34+
assert os.path.exists(sdl_build), 'You must use SDL2 to use SDL2_mixer'
35+
ports.fetch_project('sdl2_mixer', 'https://github.com/emscripten-ports/SDL2_mixer/archive/' + TAG + '.zip', 'SDL2_mixer-' + TAG, sha512hash=HASH)
36+
libname = get_lib_name(settings)
37+
3338
def create(final):
3439
logging.info('building port: sdl2_mixer')
3540

@@ -90,7 +95,7 @@ def create(final):
9095

9196

9297
def clear(ports, settings, shared):
93-
shared.Cache.erase_lib('libSDL2_mixer.a')
98+
shared.Cache.erase_lib(get_lib_name(settings))
9499

95100

96101
def process_dependencies(settings):

0 commit comments

Comments
 (0)