MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / create

Function create

tools/ports/zlib.py:20–31  ·  view source on GitHub ↗
(final)

Source from the content-addressed store, hash-verified

18 ports.fetch_project('zlib', f'https://github.com/madler/zlib/archive/refs/tags/v{VERSION}.tar.gz', sha512hash=HASH)
19
20 def create(final):
21 source_path = ports.get_dir('zlib', 'zlib-' + VERSION)
22 # Overwrite zconf.h with our own version
23 zconf_h = os.path.join(os.path.dirname(__file__), 'zlib/zconf.h')
24 shutil.copyfile(zconf_h, os.path.join(source_path, 'zconf.h'))
25 ports.install_headers(source_path)
26 ports.make_pkg_config('zlib', VERSION, '-sUSE_ZLIB')
27
28 # build
29 srcs = 'adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c'.split()
30 flags = ['-Wno-deprecated-non-prototype']
31 ports.build_port(source_path, final, 'zlib', srcs=srcs, flags=flags)
32
33 return [shared.cache.get_lib('libz.a', create, what='port')]
34

Callers

nothing calls this directly

Calls 6

install_headersMethod · 0.80
make_pkg_configMethod · 0.80
splitMethod · 0.80
build_portMethod · 0.80
get_dirMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected