@APP_ID@
@APP_ID@.desktop
@APP_ID@
@@ -25,6 +25,11 @@
Libretranslate support is considered, but a heavy time and energy investment, so may or may not happen.
+
+ 360
+ always
+
+
Main window, showcasing a translation with the highlighting feature
diff --git a/data/meson.build b/data/meson.build
index 8851f43..99f9a21 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -30,6 +30,7 @@ gschema_file = configure_file(
install_data(
gschema_file,
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas',
+ install_tag: 'runtime'
)
compile_schemas = find_program('glib-compile-schemas', required: false)
diff --git a/meson.build b/meson.build
index 25a4131..450ab1e 100644
--- a/meson.build
+++ b/meson.build
@@ -34,15 +34,21 @@ add_project_arguments(
linux = get_option('profile') == 'linux'
windows = get_option('profile') == 'windows'
+android = get_option('profile') == 'android'
# Here is to autodetect and adjust
# Remember however that people may do cross compiling, so do not assume by default it is for linux
# So avoid else conditions adding linux stuff
build_machine_system = build_machine.system()
-if build_machine_system == 'windows'
+host_machine_system = host_machine.system()
+
+if host_machine_system == 'windows'
windows = true
+elif host_machine_system == 'android'
+ android = true
+
endif
# Here is to adjust the project accordingly to stuff
@@ -51,6 +57,19 @@ endif
if windows
add_project_arguments('--define=WINDOWS', language: 'vala')
+elif android
+ add_project_arguments([
+ '--define=ANDROID',
+ '--pkg=gtk4',
+ '--pkg=json-glib-1.0',
+ '--pkg=glib-2.0',
+ '--pkg=libsecret-1',
+ '--pkg=libsoup-3.0'
+ ], language: 'vala')
+
+ subproject('granite-stylesheet')
+ subproject('glib-networking', default_options: ['default_library=static'])
+
elif linux
add_project_arguments('--define=LINUX', language: 'vala')
@@ -87,6 +106,6 @@ subdir ('src')
gnome.post_install(
glib_compile_schemas: true,
- gtk_update_icon_cache: true,
+ gtk_update_icon_cache: not android,
update_desktop_database: true,
-)
\ No newline at end of file
+)
diff --git a/meson.options b/meson.options
index c6864fa..c3f3c4a 100644
--- a/meson.options
+++ b/meson.options
@@ -1,7 +1,7 @@
option('profile',
type : 'combo',
- choices : ['linux', 'windows'],
+ choices : ['linux', 'windows', 'android'],
value : 'linux',
description : 'What we build for. Switched on automatically on windows machines, usually'
)
-option('development', type: 'boolean', value: false, description: 'If this is a development build')
\ No newline at end of file
+option('development', type: 'boolean', value: false, description: 'If this is a development build')
diff --git a/src/Application.vala b/src/Application.vala
index c411cc8..d41e581 100644
--- a/src/Application.vala
+++ b/src/Application.vala
@@ -125,6 +125,13 @@ public class Inscriptions.Application : Gtk.Application {
}
public static int main (string[] args) {
+ #if ANDROID
+ GLib.Environment.set_variable ("SECRET_BACKEND", "file", false);
+ if (GLib.Environment.get_variable ("SECRET_BACKEND") == "file")
+ GLib.Environment.set_variable ("SECRET_FILE_TEST_PASSWORD", @"$(GLib.Environment.get_user_name ())", false);
+ g_io_openssl_load (null);
+ #endif
+
return new Application ().run (args);
}
-}
\ No newline at end of file
+}
diff --git a/src/Backend/DeepL/DeepL.vala b/src/Backend/DeepL/DeepL.vala
index 424015b..f8fa51e 100644
--- a/src/Backend/DeepL/DeepL.vala
+++ b/src/Backend/DeepL/DeepL.vala
@@ -54,7 +54,7 @@ public class Inscriptions.DeepL : Object {
secrets = Secrets.get_default ();
- system_language = DeepLUtils.detect_system ();
+ system_language = "EN-GB"; //DeepLUtils.detect_system ();
// Fallback
this.current_usage = Application.settings_translate.get_int (KEY_CURRENT_USAGE);
diff --git a/src/Constants.vala b/src/Constants.vala
index b2b84e8..b7f3c70 100644
--- a/src/Constants.vala
+++ b/src/Constants.vala
@@ -5,6 +5,11 @@
namespace Inscriptions {
+ #if ANDROID
+ [CCode (cname = "g_io_openssl_load")]
+ extern void g_io_openssl_load (GLib.IOModule? module);
+ #endif
+
// Alkrjnlgjrt
const string DONATE_LINK = "https://ko-fi.com/teamcons/tip";
const string LINK = "https://www.deepl.com/your-account/keys";
diff --git a/src/Services/Secrets.vala b/src/Services/Secrets.vala
index bc61913..2d9967b 100644
--- a/src/Services/Secrets.vala
+++ b/src/Services/Secrets.vala
@@ -30,7 +30,7 @@ public class Inscriptions.Secrets : Object {
GLib.HashTable attributes;
construct {
- schema = new Secret.Schema (APP_ID, Secret.SchemaFlags.NONE,
+ schema = new Secret.Schema (APP_ID, Secret.SchemaFlags.DONT_MATCH_NAME,
"label", Secret.SchemaAttributeType.STRING);
attributes = new GLib.HashTable (str_hash, str_equal);
diff --git a/src/Widgets/ErrorBonusBox.vala b/src/Widgets/ErrorBonusBox.vala
index 7332dc5..4041c66 100644
--- a/src/Widgets/ErrorBonusBox.vala
+++ b/src/Widgets/ErrorBonusBox.vala
@@ -61,7 +61,7 @@ public class Inscriptions.ErrorBonusBox : Gtk.Box {
margin_bottom = MARGIN_MENU_STANDARD
};
- var instruction = new Granite.HeaderLabel (_("To be able to do translations, paste your API Key in the field below")) {
+ var instruction = new Granite.HeaderLabel (_("API Key")) {
halign = Gtk.Align.START,
size = Granite.HeaderLabel.Size.H4
};
@@ -87,4 +87,4 @@ public class Inscriptions.ErrorBonusBox : Gtk.Box {
append (link_to_github);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/meson.build b/src/meson.build
index 3571ee0..9731c81 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -22,7 +22,8 @@ deps = [
dependency ('granite-7', version: '>=7.7.0'), # Due to using new custom widgets
dependency ('json-glib-1.0'),
dependency ('libsoup-3.0'),
- dependency ('libsecret-1')
+ dependency ('libsecret-1'),
+ dependency('gioopenssl', required: host_machine.system() == 'android')
]
@@ -109,5 +110,6 @@ executable(
sources,
dependencies: deps,
win_subsystem: 'windows',
+ android_exe_type: 'application',
install: true
-)
\ No newline at end of file
+)
diff --git a/subprojects/glib-networking.wrap b/subprojects/glib-networking.wrap
new file mode 100644
index 0000000..f72087c
--- /dev/null
+++ b/subprojects/glib-networking.wrap
@@ -0,0 +1,10 @@
+[wrap-file]
+directory = glib-networking-2.80.1
+source_url = https://download.gnome.org/sources/glib-networking/2.80/glib-networking-2.80.1.tar.xz
+source_filename = glib-networking-2.80.1.tar.xz
+source_hash = b80e2874157cd55071f1b6710fa0b911d5ac5de106a9ee2a4c9c7bee61782f8e
+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/glib-networking_2.80.1-1/glib-networking-2.80.1.tar.xz
+wrapdb_version = 2.80.1-1
+
+[provide]
+dependency_names = gioopenssl
diff --git a/subprojects/granite-stylesheet.wrap b/subprojects/granite-stylesheet.wrap
new file mode 100644
index 0000000..09d8664
--- /dev/null
+++ b/subprojects/granite-stylesheet.wrap
@@ -0,0 +1,6 @@
+[wrap-git]
+directory=granite-stylesheet
+url=https://github.com/elementary/stylesheet.git
+revision=main
+depth=1
+diff_files=granite-stylesheet_install_tag.patch
diff --git a/subprojects/granite.wrap b/subprojects/granite.wrap
new file mode 100644
index 0000000..9be734f
--- /dev/null
+++ b/subprojects/granite.wrap
@@ -0,0 +1,9 @@
+[wrap-git]
+directory=granite
+url=https://github.com/elementary/granite.git
+revision=7.8.1
+depth=1
+diff_files=granite_disable_icon_cache.patch,granite_pass_pkg_args_to_valac.patch
+
+[provide]
+granite-7 = libgranite_dep
diff --git a/subprojects/json-glib.wrap b/subprojects/json-glib.wrap
new file mode 100644
index 0000000..fbae403
--- /dev/null
+++ b/subprojects/json-glib.wrap
@@ -0,0 +1,10 @@
+[wrap-file]
+directory = json-glib-1.10.8
+source_url = https://download.gnome.org/sources/json-glib/1.10/json-glib-1.10.8.tar.xz
+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/json-glib_1.10.8-1/json-glib-1.10.8.tar.xz
+source_filename = json-glib-1.10.8.tar.xz
+source_hash = 55c5c141a564245b8f8fbe7698663c87a45a7333c2a2c56f06f811ab73b212dd
+wrapdb_version = 1.10.8-1
+
+[provide]
+json-glib-1.0 = json_glib_dep
diff --git a/subprojects/libgee.wrap b/subprojects/libgee.wrap
new file mode 100644
index 0000000..742e765
--- /dev/null
+++ b/subprojects/libgee.wrap
@@ -0,0 +1,7 @@
+[wrap-git]
+url = https://github.com/frida/libgee
+revision = ad17ed847039469fcc2dc711ecfee2bbf7d2bf87
+
+[provide]
+dependency_names = gee-0.8
+
diff --git a/subprojects/libproxy.wrap b/subprojects/libproxy.wrap
new file mode 100644
index 0000000..6068760
--- /dev/null
+++ b/subprojects/libproxy.wrap
@@ -0,0 +1,7 @@
+[wrap-git]
+url = https://github.com/libproxy/libproxy
+revision = 0.5.12
+depth = 1
+
+[provide]
+libproxy-1.0 = libproxy_dep
diff --git a/subprojects/libpsl.wrap b/subprojects/libpsl.wrap
new file mode 100644
index 0000000..11e00e5
--- /dev/null
+++ b/subprojects/libpsl.wrap
@@ -0,0 +1,10 @@
+[wrap-file]
+directory = libpsl-0.21.5
+source_url = https://github.com/rockdaboot/libpsl/releases/download/0.21.5/libpsl-0.21.5.tar.gz
+source_filename = libpsl-0.21.5.tar.gz
+source_hash = 1dcc9ceae8b128f3c0b3f654decd0e1e891afc6ff81098f227ef260449dae208
+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/libpsl_0.21.5-2/libpsl-0.21.5.tar.gz
+wrapdb_version = 0.21.5-2
+
+[provide]
+libpsl = libpsl_dep
diff --git a/subprojects/libsecret.wrap b/subprojects/libsecret.wrap
new file mode 100644
index 0000000..f449c3d
--- /dev/null
+++ b/subprojects/libsecret.wrap
@@ -0,0 +1,8 @@
+[wrap-git]
+url = https://gitlab.gnome.org/GNOME/libsecret
+revision = 0.21.7
+depth = 1
+diff_files=libsecret_remove_getpass.patch,libsecret_plaintext_file_backend.patch
+
+[provide]
+libsecret-1 = libsecret_dep
diff --git a/subprojects/libsoup.wrap b/subprojects/libsoup.wrap
new file mode 100644
index 0000000..9e8ae81
--- /dev/null
+++ b/subprojects/libsoup.wrap
@@ -0,0 +1,7 @@
+[wrap-git]
+url = https://gitlab.gnome.org/GNOME/libsoup
+revision = 3.7.1
+depth = 1
+
+[provide]
+dependency_names = libsoup-3.0
diff --git a/subprojects/nghttp2.wrap b/subprojects/nghttp2.wrap
new file mode 100644
index 0000000..a396f1e
--- /dev/null
+++ b/subprojects/nghttp2.wrap
@@ -0,0 +1,13 @@
+[wrap-file]
+directory = nghttp2-1.62.1
+source_url = https://github.com/nghttp2/nghttp2/releases/download/v1.62.1/nghttp2-1.62.1.tar.xz
+source_filename = nghttp2-1.62.1.tar.xz
+source_hash = 2345d4dc136fda28ce243e0bb21f2e7e8ef6293d62c799abbf6f633a6887af72
+patch_filename = nghttp2_1.62.1-3_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/nghttp2_1.62.1-3/get_patch
+patch_hash = 4b53c0b0b89825ba61e542d9696b13f52ba33c80a7b6577d3d843aedf9572b1c
+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/nghttp2_1.62.1-3/nghttp2-1.62.1.tar.xz
+wrapdb_version = 1.62.1-3
+
+[provide]
+dependency_names = libnghttp2
diff --git a/subprojects/openssl.wrap b/subprojects/openssl.wrap
new file mode 100644
index 0000000..eea8154
--- /dev/null
+++ b/subprojects/openssl.wrap
@@ -0,0 +1,16 @@
+[wrap-file]
+directory = openssl-3.0.8
+source_url = https://www.openssl.org/source/openssl-3.0.8.tar.gz
+source_filename = openssl-3.0.8.tar.gz
+source_hash = 6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e
+patch_filename = openssl_3.0.8-3_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.8-3/get_patch
+patch_hash = 300da189e106942347d61a4a4295aa2edbcf06184f8d13b4cee0bed9fb936963
+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.8-3/openssl-3.0.8.tar.gz
+wrapdb_version = 3.0.8-3
+diff_files = openssl-3.0.8-android.patch
+
+[provide]
+libcrypto = libcrypto_dep
+libssl = libssl_dep
+openssl = openssl_dep
diff --git a/subprojects/packagefiles/granite-stylesheet_install_tag.patch b/subprojects/packagefiles/granite-stylesheet_install_tag.patch
new file mode 100644
index 0000000..4add88d
--- /dev/null
+++ b/subprojects/packagefiles/granite-stylesheet_install_tag.patch
@@ -0,0 +1,23 @@
+diff --git a/src/gtk-4.0/meson.build b/src/gtk-4.0/meson.build
+index a381884..9baec00 100644
+--- a/src/gtk-4.0/meson.build
++++ b/src/gtk-4.0/meson.build
+@@ -41,15 +41,15 @@ foreach variant : variants
+
+ meson.add_install_script (install_exec,
+ variant_target.full_path(),
+- dest_theme_dir / 'gtk-4.0' / 'gtk.css'
++ dest_theme_dir / 'gtk-4.0' / 'gtk.css', install_tag: 'runtime'
+ )
+
+ meson.add_install_script (install_exec,
+ variant_dark_target.full_path(),
+- dest_theme_dir / 'gtk-4.0' / 'gtk-dark.css'
++ dest_theme_dir / 'gtk-4.0' / 'gtk-dark.css', install_tag: 'runtime'
+ )
+
+ install_subdir([
+ 'assets',
+- ], install_dir: dest_theme_dir / 'gtk-4.0' )
++ ], install_dir: dest_theme_dir / 'gtk-4.0', install_tag: 'runtime')
+ endforeach
diff --git a/subprojects/packagefiles/granite_disable_icon_cache.patch b/subprojects/packagefiles/granite_disable_icon_cache.patch
new file mode 100644
index 0000000..e4bf1d5
--- /dev/null
+++ b/subprojects/packagefiles/granite_disable_icon_cache.patch
@@ -0,0 +1,11 @@
+diff --git a/meson.build b/meson.build
+index 004caaee..fbb7317d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -77,5 +77,5 @@ if get_option('demo')
+ endif
+
+ gnome.post_install(
+- gtk_update_icon_cache: true
++ gtk_update_icon_cache: false
+ )
diff --git a/subprojects/packagefiles/granite_pass_pkg_args_to_valac.patch b/subprojects/packagefiles/granite_pass_pkg_args_to_valac.patch
new file mode 100644
index 0000000..67b526e
--- /dev/null
+++ b/subprojects/packagefiles/granite_pass_pkg_args_to_valac.patch
@@ -0,0 +1,20 @@
+diff --git a/meson.build b/meson.build
+index 004caaee..c11e0b10 100644
+--- a/meson.build
++++ b/meson.build
+@@ -28,6 +28,15 @@ else
+ vala_os_arg = []
+ endif
+
++if host_machine.system() == 'android'
++ vala_os_arg = ['--define=ANDROID']
++
++ add_project_arguments([
++ '--pkg=gtk4',
++ '--pkg=glib-2.0'
++ ], language: 'vala')
++endif
++
+ glib_min_version = '2.50'
+ if build_machine.system() == 'windows'
+ gio_os_dep = dependency('gio-windows-2.0', version: '>=' + glib_min_version)
diff --git a/subprojects/packagefiles/libsecret_plaintext_file_backend.patch b/subprojects/packagefiles/libsecret_plaintext_file_backend.patch
new file mode 100644
index 0000000..af61489
--- /dev/null
+++ b/subprojects/packagefiles/libsecret_plaintext_file_backend.patch
@@ -0,0 +1,309 @@
+diff --git a/libsecret/meson.build b/libsecret/meson.build
+index 3c534d0..07830b1 100644
+--- a/libsecret/meson.build
++++ b/libsecret/meson.build
+@@ -36,13 +36,13 @@ libsecret_headers = [
+ 'secret-value.h',
+ ]
+
+-if with_crypto
++# if with_crypto
+ libsecret_sources += [
+ 'secret-file-backend.c',
+ 'secret-file-collection.c',
+ 'secret-file-item.c',
+ ]
+-endif
++# endif
+
+ version_numbers = meson.project_version().split('.')
+ version_major = version_numbers[0].to_int()
+@@ -101,6 +101,7 @@ libsecret_dep = declare_dependency(
+ link_with: [ libsecret, libegg ],
+ dependencies: libsecret_dependencies,
++ include_directories: config_h_dir,
+ )
+
+ # GObject Introspection
+
+@@ -231,11 +231,11 @@ test_names = [
+ 'test-collection',
+ ]
+
+-if with_crypto
++# if with_crypto
+ test_names += [
+ 'test-file-collection',
+ ]
+-endif
++# endif
+
+ foreach _test : test_names
+
+diff --git a/libsecret/secret-backend.c b/libsecret/secret-backend.c
+index 75c42da..cdd05ca 100644
+--- a/libsecret/secret-backend.c
++++ b/libsecret/secret-backend.c
+@@ -16,9 +16,9 @@
+
+ #include "secret-backend.h"
+
+-#ifdef WITH_CRYPTO
++// #ifdef WITH_CRYPTO
+ #include "secret-file-backend.h"
+-#endif
++// #endif
+
+ #include "secret-private.h"
+
+@@ -148,16 +148,16 @@ backend_get_impl_type (void)
+ GIOExtensionPoint *ep;
+
+ g_type_ensure (secret_service_get_type ());
+-#ifdef WITH_CRYPTO
++// #ifdef WITH_CRYPTO
+ g_type_ensure (secret_file_backend_get_type ());
+-#endif
++// #endif
+
+-#ifdef WITH_CRYPTO
++// #ifdef WITH_CRYPTO
+ if ((g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS) || g_getenv ("SNAP_NAME") != NULL) &&
+ _secret_file_backend_check_portal_version ())
+ extension_name = "file";
+ else
+-#endif
++// #endif
+ {
+ envvar = g_getenv ("SECRET_BACKEND");
+ if (envvar == NULL || *envvar == '\0')
+diff --git a/libsecret/secret-file-collection.c b/libsecret/secret-file-collection.c
+index b33caad..b78837c 100644
+--- a/libsecret/secret-file-collection.c
++++ b/libsecret/secret-file-collection.c
+@@ -16,14 +16,16 @@
+
+ #include "secret-file-collection.h"
+
+-#include "egg/egg-keyring1.h"
+ #include "egg/egg-secure-memory.h"
+
+ EGG_SECURE_DECLARE (secret_file_collection);
+
++#ifdef WITH_CRYPTO
++#include "egg/egg-keyring1.h"
+ #ifdef WITH_GCRYPT
+ #include "egg/egg-libgcrypt.h"
+ #endif
++#endif
+
+ #define KEYRING_FILE_HEADER "GnomeKeyring\n\r\0\n"
+ #define KEYRING_FILE_HEADER_LEN 16
+@@ -166,8 +168,10 @@ load_contents (SecretFileCollection *self,
+ guint64 usage_count;
+ gconstpointer data;
+ gsize n_data;
++#ifdef WITH_CRYPTO
+ const gchar *password;
+ gsize n_password;
++#endif
+
+ p = contents;
+ if (length < KEYRING_FILE_HEADER_LEN ||
+@@ -219,6 +223,7 @@ load_contents (SecretFileCollection *self,
+ g_variant_unref (salt_array);
+ g_variant_unref (variant);
+
++#ifdef WITH_CRYPTO
+ password = secret_value_get (self->password, &n_password);
+ self->key = egg_keyring1_derive_key (password,
+ n_password,
+@@ -231,6 +236,7 @@ load_contents (SecretFileCollection *self,
+ "couldn't derive key");
+ return FALSE;
+ }
++#endif
+
+ return TRUE;
+ }
+@@ -240,6 +246,7 @@ init_empty_file (SecretFileCollection *self,
+ GError **error)
+ {
+ GVariantBuilder builder;
++#ifdef WITH_CRYPTO
+ const gchar *password;
+ gsize n_password;
+ guint8 salt[SALT_SIZE];
+@@ -247,9 +254,14 @@ init_empty_file (SecretFileCollection *self,
+ egg_keyring1_create_nonce (salt, sizeof(salt));
+ self->salt = g_bytes_new (salt, sizeof(salt));
+ self->iteration_count = ITERATION_COUNT;
++#else
++ self->salt = g_bytes_new (NULL, 0);
++ self->iteration_count = 0;
++#endif
+ self->modified = g_date_time_new_now_utc ();
+ self->usage_count = 0;
+
++#ifdef WITH_CRYPTO
+ password = secret_value_get (self->password, &n_password);
+ self->key = egg_keyring1_derive_key (password,
+ n_password,
+@@ -262,6 +274,7 @@ init_empty_file (SecretFileCollection *self,
+ "couldn't derive key");
+ return FALSE;
+ }
++#endif
+
+ g_variant_builder_init (&builder,
+ G_VARIANT_TYPE ("a(a{say}ay)"));
+@@ -393,7 +406,9 @@ hash_attributes (SecretFileCollection *self,
+ GHashTable *attributes)
+ {
+ GVariantBuilder builder;
++#ifdef WITH_CRYPTO
+ guint8 buffer[MAC_SIZE];
++#endif
+ GList *keys;
+ GList *l;
+
+@@ -407,6 +422,7 @@ hash_attributes (SecretFileCollection *self,
+ GVariant *variant;
+
+ value = g_hash_table_lookup (attributes, l->data);
++#ifdef WITH_CRYPTO
+ if (!egg_keyring1_calculate_mac (self->key,
+ (const guint8 *)value,
+ strlen (value),
+@@ -419,6 +435,12 @@ hash_attributes (SecretFileCollection *self,
+ buffer,
+ MAC_SIZE,
+ sizeof(guint8));
++#else
++ variant = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
++ value,
++ strlen (value),
++ sizeof(guint8));
++#endif
+ g_variant_builder_add (&builder, "{s@ay}", l->data, variant);
+ }
+ g_list_free (keys);
+@@ -447,6 +469,7 @@ hashed_attributes_match (SecretFileCollection *self,
+
+ data = g_variant_get_fixed_array (hashed_attribute,
+ &n_data, sizeof(guint8));
++#ifdef WITH_CRYPTO
+ if (n_data != MAC_SIZE) {
+ g_variant_unref (hashed_attribute);
+ return FALSE;
+@@ -456,6 +479,13 @@ hashed_attributes_match (SecretFileCollection *self,
+ g_variant_unref (hashed_attribute);
+ return FALSE;
+ }
++#else
++ if (n_data != strlen ((char *)value) ||
++ memcmp (data, value, n_data) != 0) {
++ g_variant_unref (hashed_attribute);
++ return FALSE;
++ }
++#endif
+ g_variant_unref (hashed_attribute);
+ }
+
+@@ -477,7 +507,9 @@ secret_file_collection_replace (SecretFileCollection *self,
+ GVariant *serialized_item;
+ guint8 *data = NULL;
+ gsize n_data;
++#ifdef WITH_CRYPTO
+ gsize n_padded;
++#endif
+ GVariant *variant;
+ GDateTime *created = NULL;
+ GDateTime *modified;
+@@ -540,6 +572,7 @@ secret_file_collection_replace (SecretFileCollection *self,
+ serialized_item = secret_file_item_serialize (item);
+ g_object_unref (item);
+
++#ifdef WITH_CRYPTO
+ /* Encrypt the item with PKCS #7 padding */
+ n_data = g_variant_get_size (serialized_item);
+ n_padded = ((n_data + CIPHER_BLOCK_SIZE) / CIPHER_BLOCK_SIZE) *
+@@ -577,6 +610,23 @@ secret_file_collection_replace (SecretFileCollection *self,
+ TRUE,
+ egg_secure_free,
+ data);
++#else
++ n_data = g_variant_get_size (serialized_item);
++ data = egg_secure_alloc (n_data);
++ g_variant_store (serialized_item, data);
++ g_variant_unref (serialized_item);
++
++ self->usage_count++;
++ g_date_time_unref (self->modified);
++ self->modified = g_date_time_new_now_utc ();
++
++ variant = g_variant_new_from_data (G_VARIANT_TYPE ("ay"),
++ data,
++ n_data,
++ TRUE,
++ egg_secure_free,
++ data);
++#endif
+ variant = g_variant_new ("(@a{say}@ay)", hashed_attributes, variant);
+ g_variant_builder_add_value (&builder, variant);
+
+@@ -630,12 +680,13 @@ _secret_file_item_decrypt (GVariant *encrypted,
+
+ g_variant_get (encrypted, "(a{say}@ay)", NULL, &blob);
+
+- /* Decrypt the item */
+ padded = g_variant_get_fixed_array (blob, &n_padded, sizeof(guint8));
+ data = egg_secure_alloc (n_padded);
+ memcpy (data, padded, n_padded);
+ g_variant_unref (blob);
+
++#ifdef WITH_CRYPTO
++ /* Decrypt the item */
+ if (n_padded < IV_SIZE + MAC_SIZE) {
+ egg_secure_free (data);
+ g_set_error (error,
+@@ -667,6 +718,9 @@ _secret_file_item_decrypt (GVariant *encrypted,
+
+ /* Remove PKCS #7 padding */
+ n_data = n_padded - data[n_padded - 1];
++#else
++ n_data = n_padded;
++#endif
+
+ serialized_item =
+ g_variant_new_from_data (G_VARIANT_TYPE ("(a{ss}sttay)"),
+diff --git a/libsecret/test-file-collection.c b/libsecret/test-file-collection.c
+index 512bfb6..ee75c43 100644
+--- a/libsecret/test-file-collection.c
++++ b/libsecret/test-file-collection.c
+@@ -308,6 +308,7 @@ test_write (Test *test,
+ g_main_loop_run (test->loop);
+ }
+
++#ifdef WITH_CRYPTO
+ static void
+ test_read (Test *test,
+ gconstpointer unused)
+@@ -350,6 +351,7 @@ test_read (Test *test,
+ g_object_unref (item);
+ g_hash_table_unref (attributes);
+ }
++#endif
+
+ int
+ main (int argc, char **argv)
+@@ -362,7 +364,9 @@ main (int argc, char **argv)
+ g_test_add ("/file-collection/search", Test, NULL, setup, test_search, teardown);
+ g_test_add ("/file-collection/decrypt", Test, NULL, setup, test_decrypt, teardown);
+ g_test_add ("/file-collection/write", Test, NULL, setup, test_write, teardown);
++#ifdef WITH_CRYPTO
+ g_test_add ("/file-collection/read", Test, "default.keyring", setup, test_read, teardown);
++#endif
+
+ return egg_tests_run_with_loop ();
+ }
diff --git a/subprojects/packagefiles/libsecret_remove_getpass.patch b/subprojects/packagefiles/libsecret_remove_getpass.patch
new file mode 100644
index 0000000..8601196
--- /dev/null
+++ b/subprojects/packagefiles/libsecret_remove_getpass.patch
@@ -0,0 +1,40 @@
+diff --git a/tool/secret-tool.c b/tool/secret-tool.c
+index c72e403..829c44c 100644
+--- a/tool/secret-tool.c
++++ b/tool/secret-tool.c
+@@ -281,15 +281,15 @@ read_password_stdin (void)
+ }
+ }
+
+-static SecretValue *
+-read_password_tty (void)
+-{
+- gchar *password;
++// static SecretValue *
++// read_password_tty (void)
++// {
++// gchar *password;
+
+- password = getpass ("Password: ");
+- return secret_value_new_full (password, -1, "text/plain",
+- (GDestroyNotify)secret_password_wipe);
+-}
++// password = getpass ("Password: ");
++// return secret_value_new_full (password, -1, "text/plain",
++// (GDestroyNotify)secret_password_wipe);
++// }
+
+ static int
+ secret_tool_action_store (int argc,
+@@ -327,10 +327,7 @@ secret_tool_action_store (int argc,
+ collection = g_strconcat (SECRET_ALIAS_PREFIX, store_collection, NULL);
+ }
+
+- if (isatty (0))
+- value = read_password_tty ();
+- else
+- value = read_password_stdin ();
++ value = read_password_stdin ();
+
+ ret = secret_password_storev_binary_sync (NULL, attributes, collection, store_label, value, NULL, &error);
+ secret_value_unref (value);
diff --git a/subprojects/packagefiles/openssl-3.0.8-android.patch b/subprojects/packagefiles/openssl-3.0.8-android.patch
new file mode 100644
index 0000000..9b135bf
--- /dev/null
+++ b/subprojects/packagefiles/openssl-3.0.8-android.patch
@@ -0,0 +1,62 @@
+diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c
+index cb40c77..547d01d 100644
+--- a/crypto/x509/by_dir.c
++++ b/crypto/x509/by_dir.c
+@@ -233,7 +233,9 @@ static int get_cert_by_subject_ex(X509_LOOKUP *xl, X509_LOOKUP_TYPE type,
+ X509_CRL crl;
+ } data;
+ int ok = 0;
+- int i, j, k;
++ int i, j, k, l;
++ unsigned long hash[2];
++ int valid_hash[2]; /* '0' for invalid value in `hash` array */
+ unsigned long h;
+ BUF_MEM *b = NULL;
+ X509_OBJECT stmp, *tmp;
+@@ -261,9 +263,19 @@ static int get_cert_by_subject_ex(X509_LOOKUP *xl, X509_LOOKUP_TYPE type,
+ }
+
+ ctx = (BY_DIR *)xl->method_data;
+- h = X509_NAME_hash_ex(name, libctx, propq, &i);
+- if (i == 0)
+- goto finish;
++ hash[0] = X509_NAME_hash_ex(name, libctx, propq, &i);
++ valid_hash[0] = (i != 0);
++#ifndef OPENSSL_NO_MD5
++ hash[1] = X509_NAME_hash_old(name); /* MD5 name hash */
++ valid_hash[1] = 1;
++#else
++ valid_hash[1] = 0;
++#endif
++ for (l = 0; l < 2; ++l) {
++ h = hash[l];
++ if (valid_hash[l] == 0)
++ continue; /* skip invalid hash */
++
+ for (i = 0; i < sk_BY_DIR_ENTRY_num(ctx->dirs); i++) {
+ BY_DIR_ENTRY *ent;
+ int idx;
+@@ -416,6 +428,7 @@ static int get_cert_by_subject_ex(X509_LOOKUP *xl, X509_LOOKUP_TYPE type,
+ goto finish;
+ }
+ }
++ }
+ finish:
+ BUF_MEM_free(b);
+ return ok;
+diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
+index 934d4b0..277d10d 100644
+--- a/include/internal/cryptlib.h
++++ b/include/internal/cryptlib.h
+@@ -65,7 +65,11 @@ DEFINE_LHASH_OF(MEM);
+
+ # ifndef OPENSSL_SYS_VMS
+ # define X509_CERT_AREA OPENSSLDIR
++# if defined(ANDROID) || defined(__ANDROID__)
++# define X509_CERT_DIR "/system/etc/security/cacerts"
++# else
+ # define X509_CERT_DIR OPENSSLDIR "/certs"
++# endif
+ # define X509_CERT_FILE OPENSSLDIR "/cert.pem"
+ # define X509_PRIVATE_DIR OPENSSLDIR "/private"
+ # define CTLOG_FILE OPENSSLDIR "/ct_log_list.cnf"
diff --git a/subprojects/sqlite3.wrap b/subprojects/sqlite3.wrap
new file mode 100644
index 0000000..512cc85
--- /dev/null
+++ b/subprojects/sqlite3.wrap
@@ -0,0 +1,14 @@
+[wrap-file]
+directory = sqlite-amalgamation-3530200
+source_url = https://www.sqlite.org/2026/sqlite-amalgamation-3530200.zip
+source_filename = sqlite-amalgamation-3530200.zip
+source_hash = 8a310d0a16c7a90cacd4c884e70faa51c902afed2a89f63aaa0126ab83558a32
+source_fallback_url = https://wrapdb.mesonbuild.com/v2/sqlite3_3.53.2-1/get_source/sqlite-amalgamation-3530200.zip
+patch_filename = sqlite3_3.53.2-1_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/sqlite3_3.53.2-1/get_patch
+patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sqlite3_3.53.2-1/sqlite3_3.53.2-1_patch.zip
+patch_hash = c3e1bdf6b571da4e7fbe9bd6513c2ba0f8d77a6ee7f724bb62f9614fbf8fa486
+wrapdb_version = 3.53.2-1
+
+[provide]
+dependency_names = sqlite3