2020-04-16 21:32:02 +00:00
|
|
|
project(
|
2020-10-01 15:56:12 +00:00
|
|
|
'apk-tools',
|
|
|
|
['c'],
|
2020-10-02 11:59:32 +00:00
|
|
|
default_options : ['c_std=gnu99', 'optimization=2'],
|
2020-10-02 09:16:30 +00:00
|
|
|
version: '3.0.0_pre0',
|
2020-10-02 13:47:40 +00:00
|
|
|
meson_version: '>=0.52'
|
2020-04-16 21:32:02 +00:00
|
|
|
)
|
|
|
|
pkgc = import('pkgconfig')
|
|
|
|
|
|
|
|
apk_confdir = get_option('sysconfdir') / 'apk'
|
|
|
|
apk_libdir = get_option('libdir')
|
|
|
|
|
2020-05-19 08:11:49 +00:00
|
|
|
lua_bin = find_program('lua' + get_option('lua_version'), required: get_option('help'))
|
2020-04-16 21:32:02 +00:00
|
|
|
lua_dep = dependency('lua' + get_option('lua_version'), required: get_option('lua'))
|
2020-05-07 10:38:21 +00:00
|
|
|
scdoc_dep = dependency('scdoc', version: '>=1.10', required: get_option('docs'))
|
2020-04-16 21:32:02 +00:00
|
|
|
|
2020-10-01 15:53:36 +00:00
|
|
|
shared_deps = [
|
2020-10-01 15:56:12 +00:00
|
|
|
dependency('zlib'),
|
|
|
|
dependency('openssl'),
|
2022-07-25 11:23:37 +00:00
|
|
|
dependency('libsodium'),
|
2022-08-09 11:17:20 +00:00
|
|
|
dependency('bearssl'),
|
2020-10-01 15:53:36 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
static_deps = [
|
2020-10-01 15:56:12 +00:00
|
|
|
dependency('openssl', static: true),
|
|
|
|
dependency('zlib', static: true),
|
2022-07-25 11:23:37 +00:00
|
|
|
dependency('libsodium', static: true),
|
2022-08-09 11:17:20 +00:00
|
|
|
dependency('bearssl', static: true),
|
2020-10-01 15:53:36 +00:00
|
|
|
]
|
|
|
|
|
2020-04-16 21:32:02 +00:00
|
|
|
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
|
|
|
|
2021-12-27 19:48:22 +00:00
|
|
|
# Needed for 64-bit off_t and friends on glibc.
|
|
|
|
add_project_arguments('-D_FILE_OFFSET_BITS=64', language: 'c')
|
|
|
|
|
2020-04-16 21:32:02 +00:00
|
|
|
# If we're a subproject we only want the static lib and not files
|
|
|
|
subproject = meson.is_subproject()
|
|
|
|
|
2020-05-07 10:38:21 +00:00
|
|
|
subdir('doc')
|
2021-12-14 19:49:15 +00:00
|
|
|
subdir('portability')
|
2020-04-16 21:32:02 +00:00
|
|
|
subdir('libfetch')
|
|
|
|
subdir('src')
|
2020-10-02 13:47:40 +00:00
|
|
|
subdir('tests')
|