aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhrxi <hrrrxi@gmail.com>2023-06-20 18:54:28 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2023-10-06 15:25:12 +0200
commit715fabb5bb793f35926180363bd6f9236d904f42 (patch)
treedcfbb9f1ed133a197a172307d989399cf64bf6c8
parent3edda368f33c1ffbdcb76c41a32953f50b6ef6bc (diff)
downloaddino-715fabb5bb793f35926180363bd6f9236d904f42.tar.gz
dino-715fabb5bb793f35926180363bd6f9236d904f42.zip
meson: Add omemo plugin
-rw-r--r--meson.build5
-rw-r--r--plugins/meson.build1
-rw-r--r--plugins/omemo/data/gresource.xml7
-rw-r--r--plugins/omemo/meson.build68
-rw-r--r--plugins/omemo/po/meson.build1
-rw-r--r--plugins/omemo/vapi/libgcrypt.vapi0
6 files changed, 82 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 7f86f002..887397c2 100644
--- a/meson.build
+++ b/meson.build
@@ -17,7 +17,12 @@ dep_icu_uc = dependency('icu-uc')
dep_libadwaita = dependency('libadwaita-1')
dep_libcanberra = dependency('libcanberra')
dep_libgcrypt = dependency('libgcrypt')
+dep_libqrencode = dependency('libqrencode')
dep_libsrtp2 = dependency('libsrtp2')
+# libsignal-protocol-c has a history of breaking compatibility on the patch level
+# we'll have to check compatibility for every new release
+# distro maintainers may update this dependency after compatibility tests
+dep_libsignal_protocol_c = dependency('libsignal-protocol-c', version: ['>=2.3.2', '<2.3.4'])
dep_libsoup = dependency('libsoup-3.0')
dep_nice = dependency('nice', version: '>=0.1.15')
dep_m = meson.get_compiler('c').find_library('m', required: false)
diff --git a/plugins/meson.build b/plugins/meson.build
index 9a995f87..cf47aea8 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -1,4 +1,5 @@
subdir('http-files')
subdir('ice')
subdir('notification-sound')
+subdir('omemo')
subdir('openpgp')
diff --git a/plugins/omemo/data/gresource.xml b/plugins/omemo/data/gresource.xml
new file mode 100644
index 00000000..616dcdc1
--- /dev/null
+++ b/plugins/omemo/data/gresource.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/im/dino/Dino/omemo">
+ <file>contact_details_dialog.ui</file>
+ <file>manage_key_dialog.ui</file>
+ </gresource>
+</gresources>
diff --git a/plugins/omemo/meson.build b/plugins/omemo/meson.build
new file mode 100644
index 00000000..57eec2ce
--- /dev/null
+++ b/plugins/omemo/meson.build
@@ -0,0 +1,68 @@
+subdir('po')
+dependencies = [
+ dep_crypto_vala,
+ dep_dino,
+ dep_gee,
+ dep_glib,
+ dep_gmodule,
+ dep_gtk4,
+ dep_libgcrypt,
+ dep_libqrencode,
+ dep_libsignal_protocol_c,
+ dep_qlite,
+ dep_xmpp_vala,
+]
+sources = files(
+ 'src/dtls_srtp_verification_draft.vala',
+ 'src/file_transfer/file_decryptor.vala',
+ 'src/file_transfer/file_encryptor.vala',
+ 'src/jingle/jet_omemo.vala',
+ 'src/jingle/jingle_helper.vala',
+ 'src/logic/database.vala',
+ 'src/logic/decrypt.vala',
+ 'src/logic/encrypt.vala',
+ 'src/logic/manager.vala',
+ 'src/logic/pre_key_store.vala',
+ 'src/logic/session_store.vala',
+ 'src/logic/signed_pre_key_store.vala',
+ 'src/logic/trust_manager.vala',
+ 'src/plugin.vala',
+ 'src/protocol/bundle.vala',
+ 'src/protocol/message_flag.vala',
+ 'src/protocol/stream_module.vala',
+ 'src/register_plugin.vala',
+ 'src/signal/context.vala',
+ 'src/signal/signal_helper.c',
+ 'src/signal/simple_iks.vala',
+ 'src/signal/simple_pks.vala',
+ 'src/signal/simple_spks.vala',
+ 'src/signal/simple_ss.vala',
+ 'src/signal/store.vala',
+ 'src/signal/util.vala',
+ 'src/trust_level.vala',
+ 'src/ui/account_settings_entry.vala',
+ 'src/ui/bad_messages_populator.vala',
+ 'src/ui/call_encryption_entry.vala',
+ 'src/ui/contact_details_dialog.vala',
+ 'src/ui/contact_details_provider.vala',
+ 'src/ui/device_notification_populator.vala',
+ 'src/ui/encryption_list_entry.vala',
+ 'src/ui/manage_key_dialog.vala',
+ 'src/ui/own_notifications.vala',
+ 'src/ui/util.vala',
+)
+sources += gnome.compile_resources(
+ 'resources',
+ 'data/gresource.xml',
+ source_dir: 'data',
+)
+c_args = [
+ '-DG_LOG_DOMAIN="OMEMO"',
+ '-DGETTEXT_PACKAGE="dino-omemo"',
+ '-DLOCALE_INSTALL_DIR="@0@"'.format(get_option('prefix') / get_option('localedir')),
+]
+vala_args = [
+ '--vapidir', meson.current_source_dir() / 'vapi',
+]
+lib_omemo = shared_library('omemo', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, include_directories: include_directories('src'), dependencies: dependencies, install: true, install_dir: get_option('libdir') / 'dino/plugins')
+dep_omemo = declare_dependency(link_with: lib_omemo, include_directories: include_directories('.'))
diff --git a/plugins/omemo/po/meson.build b/plugins/omemo/po/meson.build
new file mode 100644
index 00000000..fa22f211
--- /dev/null
+++ b/plugins/omemo/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext('dino-omemo')
diff --git a/plugins/omemo/vapi/libgcrypt.vapi b/plugins/omemo/vapi/libgcrypt.vapi
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/plugins/omemo/vapi/libgcrypt.vapi