use arch_prefix for this feature instead
parent
c29638cd81
commit
917698ec1d
|
@ -4,4 +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')
|
||||
option('arch_prefix', description: 'Define a custom arch prefix for default arch', type: 'string')
|
||||
|
|
|
@ -48,7 +48,7 @@ time_t time(time_t *tloc)
|
|||
|
||||
static void version(struct apk_out *out, const char *prefix)
|
||||
{
|
||||
apk_out_fmt(out, prefix, "apk-tools " APK_VERSION ", compiled for " APK_DEFAULT_ABI_TAG ".");
|
||||
apk_out_fmt(out, prefix, "apk-tools " APK_VERSION ", compiled for " APK_DEFAULT_FULL_ARCH ".");
|
||||
#ifdef TEST_MODE
|
||||
apk_out_fmt(out, prefix, "TEST MODE BUILD. NOT FOR PRODUCTION USE.");
|
||||
#endif
|
||||
|
@ -201,7 +201,7 @@ static int option_parse_global(void *ctx, struct apk_ctx *ac, int opt, const cha
|
|||
ac->arch = optarg;
|
||||
break;
|
||||
case OPT_GLOBAL_print_arch:
|
||||
puts(APK_DEFAULT_ABI_TAG);
|
||||
puts(APK_DEFAULT_FULL_ARCH);
|
||||
return -ESHUTDOWN;
|
||||
#ifdef TEST_MODE
|
||||
case OPT_GLOBAL_test_repo:
|
||||
|
|
|
@ -142,10 +142,10 @@ static inline int IS_ERR(const void *ptr) { return (unsigned long)ptr >= (unsign
|
|||
#error APK_DEFAULT_ARCH not detected for this architecture
|
||||
#endif
|
||||
|
||||
#ifndef APK_ABI_TAG
|
||||
#define APK_DEFAULT_ABI_TAG APK_DEFAULT_ARCH
|
||||
#ifndef APK_ARCH_PREFIX
|
||||
#define APK_DEFAULT_FULL_ARCH APK_DEFAULT_ARCH
|
||||
#else
|
||||
#define APK_DEFAULT_ABI_TAG APK_ABI_TAG "-" APK_DEFAULT_ARCH
|
||||
#define APK_DEFAULT_FULL_ARCH APK_ARCH_PREFIX "-" APK_DEFAULT_ARCH
|
||||
#endif
|
||||
|
||||
#define APK_MAX_REPOS 32 /* see struct apk_package */
|
||||
|
|
|
@ -263,7 +263,7 @@ static int mkpkg_main(void *pctx, struct apk_ctx *ac, struct apk_string_array *a
|
|||
}
|
||||
}
|
||||
if (adb_ro_val(&pkgi, ADBI_PI_ARCH) == ADB_VAL_NULL)
|
||||
adb_wo_blob(&pkgi, ADBI_PI_ARCH, APK_BLOB_STRLIT(APK_DEFAULT_ABI_TAG));
|
||||
adb_wo_blob(&pkgi, ADBI_PI_ARCH, APK_BLOB_STRLIT(APK_DEFAULT_FULL_ARCH));
|
||||
|
||||
// scan and add all files
|
||||
if (ctx->files_dir) {
|
||||
|
|
|
@ -1680,7 +1680,7 @@ int apk_db_open(struct apk_database *db, struct apk_ctx *ac)
|
|||
db->arch = apk_atomize_dup(&db->atoms, apk_blob_trim(arch));
|
||||
free(arch.ptr);
|
||||
} else {
|
||||
db->arch = apk_atomize(&db->atoms, APK_BLOB_STR(APK_DEFAULT_ABI_TAG));
|
||||
db->arch = apk_atomize(&db->atoms, APK_BLOB_STR(APK_DEFAULT_FULL_ARCH));
|
||||
db->write_arch = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,9 +115,9 @@ 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)]
|
||||
apk_arch_prefix = get_option('arch_prefix')
|
||||
if apk_arch_prefix != ''
|
||||
apk_cargs += ['-DAPK_ARCH_PREFIX="@0@"'.format(apk_arch_prefix)]
|
||||
endif
|
||||
|
||||
libapk_shared = shared_library(
|
||||
|
|
Loading…
Reference in New Issue