Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/tools/ports/sdl2_gfx.py
4130 views
1
# Copyright 2016 The Emscripten Authors. All rights reserved.
2
# Emscripten is available under two separate licenses, the MIT license and the
3
# University of Illinois/NCSA Open Source License. Both these licenses can be
4
# found in the LICENSE file.
5
6
TAG = '2b147ffef10ec541d3eace326eafe11a54e635f8'
7
HASH = 'f39f1f50a039a1667fe92b87d28548d32adcf0eb8526008656de5315039aa21f29d230707caa47f80f6b3a412a577698cd4bbfb9458bb92ac47e6ba993b8efe6'
8
9
deps = ['sdl2']
10
11
12
def needed(settings):
13
return settings.USE_SDL_GFX == 2
14
15
16
def get(ports, settings, shared):
17
ports.fetch_project('sdl2_gfx', f'https://github.com/svn2github/sdl2_gfx/archive/{TAG}.zip', sha512hash=HASH)
18
19
def create(final):
20
source_path = ports.get_dir('sdl2_gfx', 'sdl2_gfx-' + TAG)
21
ports.build_port(source_path, final, 'sdl2_gfx', exclude_dirs=['test'], flags=['-sUSE_SDL=2'])
22
ports.install_headers(source_path, target='SDL2')
23
24
return [shared.cache.get_lib('libSDL2_gfx.a', create)]
25
26
27
def clear(ports, settings, shared):
28
shared.cache.erase_lib('libSDL2_gfx.a')
29
30
31
def process_dependencies(settings):
32
settings.USE_SDL = 2
33
34
35
def show():
36
return 'sdl2_gfx (-sUSE_SDL_GFX=2 or --use-port=sdl2_gfx; zlib license)'
37
38