You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
# -*- python -*-
|
|
|
|
def options(ctx):
|
|
ctx.system_opt('zlib')
|
|
|
|
def configure(ctx):
|
|
def system_zlib(ctx):
|
|
ctx.check_cfg(package='zlib', args='--cflags --libs',
|
|
define_name='', add_to_env=False)
|
|
|
|
ctx.with_chk('zlib', {'system': system_zlib, 'bundle': 'zlib'})
|
|
|
|
def build(ctx):
|
|
if ctx.env.WITH_ZLIB != 'bundle': return
|
|
|
|
src = [
|
|
'zlib/adler32.c',
|
|
# 'zlib/compress.c',
|
|
'zlib/crc32.c',
|
|
# 'zlib/deflate.c',
|
|
# 'zlib/gzclose.c',
|
|
# 'zlib/gzlib.c',
|
|
# 'zlib/gzread.c',
|
|
# 'zlib/gzwrite.c',
|
|
# 'zlib/infback.c',
|
|
'zlib/inffast.c',
|
|
'zlib/inflate.c',
|
|
'zlib/inftrees.c',
|
|
# 'zlib/trees.c',
|
|
# 'zlib/uncompr.c',
|
|
'zlib/zutil.c',
|
|
]
|
|
|
|
ctx.stlib(idx = 10000,
|
|
source = src,
|
|
defines = ['HAVE_STDARG_H', 'HAVE_HIDDEN',
|
|
'NO_GZCOMPRESS', 'Z_SOLO' ],
|
|
includes = 'zlib',
|
|
export_includes = 'zlib',
|
|
target = 'zlib',
|
|
uselib = 'EXT')
|