From 8051d458c61a8b250c4be256b85b5d67e2b592ac Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Thu, 13 Jan 2022 08:14:24 -0600 Subject: [PATCH] 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 --- meson_options.txt | 1 + src/meson.build | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/meson_options.txt b/meson_options.txt index 0eaa4e5..95346a9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') diff --git a/src/meson.build b/src/meson.build index f83ad62..6ca4d68 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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,