summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2022-03-01 09:08:19 -0600
committerTimo Teräs <timo.teras@iki.fi>2022-03-30 09:17:25 +0000
commit917698ec1d4c9a79e3580cce4cbeb56fd4fa5a96 (patch)
tree18fd0b7d0c963069dfb84607e1f8f0b1e0bc5135
parentc29638cd8143e624012041acb24fc4dc94d6121b (diff)
downloadapk-tools-917698ec1d4c9a79e3580cce4cbeb56fd4fa5a96.tar.gz
apk-tools-917698ec1d4c9a79e3580cce4cbeb56fd4fa5a96.tar.bz2
apk-tools-917698ec1d4c9a79e3580cce4cbeb56fd4fa5a96.tar.xz
apk-tools-917698ec1d4c9a79e3580cce4cbeb56fd4fa5a96.zip
use arch_prefix for this feature instead
-rw-r--r--meson_options.txt2
-rw-r--r--src/apk.c4
-rw-r--r--src/apk_defines.h6
-rw-r--r--src/app_mkpkg.c2
-rw-r--r--src/database.c2
-rw-r--r--src/meson.build6
6 files changed, 11 insertions, 11 deletions
diff --git a/meson_options.txt b/meson_options.txt
index 95346a9..14dd36c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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')
diff --git a/src/apk.c b/src/apk.c
index 4b9890a..1d56352 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -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:
diff --git a/src/apk_defines.h b/src/apk_defines.h
index e7fe34c..7024932 100644
--- a/src/apk_defines.h
+++ b/src/apk_defines.h
@@ -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 */
diff --git a/src/app_mkpkg.c b/src/app_mkpkg.c
index 3272613..5b2e7cd 100644
--- a/src/app_mkpkg.c
+++ b/src/app_mkpkg.c
@@ -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) {
diff --git a/src/database.c b/src/database.c
index 113597f..1622c1b 100644
--- a/src/database.c
+++ b/src/database.c
@@ -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;
}
}
diff --git a/src/meson.build b/src/meson.build
index 6ca4d68..24362d7 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -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(