@@ -17,11 +17,7 @@ def needed(settings):
17
17
return settings .USE_SDL_MIXER == 2
18
18
19
19
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 ):
25
21
settings .SDL2_MIXER_FORMATS .sort ()
26
22
formats = '-' .join (settings .SDL2_MIXER_FORMATS )
27
23
@@ -30,6 +26,15 @@ def get(ports, settings, shared):
30
26
libname += '_' + formats
31
27
libname += '.a'
32
28
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
+
33
38
def create (final ):
34
39
logging .info ('building port: sdl2_mixer' )
35
40
@@ -90,7 +95,7 @@ def create(final):
90
95
91
96
92
97
def clear (ports , settings , shared ):
93
- shared .Cache .erase_lib ('libSDL2_mixer.a' )
98
+ shared .Cache .erase_lib (get_lib_name ( settings ) )
94
99
95
100
96
101
def process_dependencies (settings ):
0 commit comments