2024-10-07 18:11:29 +03:00
|
|
|
#! /usr/bin/env python
|
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
def options(opt):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def configure(conf):
|
|
|
|
conf.define('_GNU_SOURCE', 1)
|
2024-10-08 13:06:02 +03:00
|
|
|
conf.define('BZ_NO_STDIO', 1)
|
2024-10-07 18:11:29 +03:00
|
|
|
|
|
|
|
if conf.env.DEST_OS == 'win32':
|
|
|
|
conf.define('BZ_LCCWIN32', 1)
|
|
|
|
else:
|
|
|
|
conf.define('BZ_UNIX', 1)
|
|
|
|
|
|
|
|
def build(bld):
|
2024-10-23 23:20:47 +03:00
|
|
|
# doesn't work with CMake generator
|
2024-10-08 12:27:41 +03:00
|
|
|
# bld(
|
|
|
|
# features = 'subst',
|
|
|
|
# source = 'bzip2/bz_version.h.in',
|
|
|
|
# target = 'bz_version.h',
|
|
|
|
# BZ_VERSION='1.1.0-fwgs'
|
|
|
|
# )
|
2024-10-07 18:11:29 +03:00
|
|
|
|
2024-10-08 15:39:56 +03:00
|
|
|
bz_sources = ['bzip2/blocksort.c', 'bzip2/huffman.c', 'bzip2/crctable.c', 'bzip2/randtable.c', 'bzip2/compress.c', 'bzip2/decompress.c', 'bzip2/bzlib.c']
|
|
|
|
|
2024-10-07 18:11:29 +03:00
|
|
|
bld.stlib(
|
2024-10-08 15:39:56 +03:00
|
|
|
source = bz_sources,
|
2024-10-07 18:11:29 +03:00
|
|
|
target = 'bzip2',
|
2024-10-08 12:27:41 +03:00
|
|
|
# use = 'bz_version.h',
|
2024-10-08 13:06:02 +03:00
|
|
|
includes = ['.', 'bzip2/'],
|
2024-10-07 18:11:29 +03:00
|
|
|
subsystem = bld.env.MSVC_SUBSYSTEM,
|
|
|
|
export_includes = ['bzip2/']
|
|
|
|
)
|