meson: support definition of a custom abi tag

this is intended to allow for distributions to have alternate streams, such as
glibc-x86_64 or darwin-aarch64
cute-signatures
Ariadne Conill 2022-01-13 08:14:24 -06:00 committed by Timo Teräs
parent bc2b5b69b7
commit 8051d458c6
2 changed files with 6 additions and 0 deletions

View File

@ -4,3 +4,4 @@ option('compressed-help', description: 'Compress help database, needs lua-zlib',
option('lua', description: 'Build luaapk (lua bindings)', type: 'feature', value: 'auto')
option('lua_version', description: 'Lua version to build against', type: 'string', value: '5.3')
option('static_apk', description: 'Also build apk.static', type: 'boolean', value: false)
option('abi_tag', description: 'Define a custom ABI tag for default arch', type: 'string')

View File

@ -115,6 +115,11 @@ apk_cargs = [
'-D_ATFILE_SOURCE',
]
apk_abi_tag = get_option('abi_tag')
if apk_abi_tag != ''
apk_cargs += ['-DAPK_ABI_TAG="@0@"'.format(apk_abi_tag)]
endif
libapk_shared = shared_library(
'apk',
libapk_src,