Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,59 @@
From 19dddc4b8acaeefc505e1b45f53048901839aede Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Sat, 8 Apr 2023 13:06:50 +0200
Subject: [PATCH] client: Add missing type-arguments for interfaces to fix build with newer vala
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/geary/-/commit/4a7ca820b1d3d6130fedf254dc5b4cd7efb58f2c]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/client/accounts/accounts-editor-row.vala | 2 +-
src/client/accounts/accounts-editor-servers-pane.vala | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/client/accounts/accounts-editor-row.vala b/src/client/accounts/accounts-editor-row.vala
index 6e7ac2ab..70223d71 100644
--- a/src/client/accounts/accounts-editor-row.vala
+++ b/src/client/accounts/accounts-editor-row.vala
@@ -386,7 +386,7 @@ private abstract class Accounts.ServiceRow<PaneType,V> : AccountRow<PaneType,V>
/** Interface for rows that use a validator for editable values. */
-internal interface Accounts.ValidatingRow : EditorRow {
+internal interface Accounts.ValidatingRow<PaneType> : EditorRow<PaneType> {
/** The row's validator */
diff --git a/src/client/accounts/accounts-editor-servers-pane.vala b/src/client/accounts/accounts-editor-servers-pane.vala
index 8bd9bde1..982acd5c 100644
--- a/src/client/accounts/accounts-editor-servers-pane.vala
+++ b/src/client/accounts/accounts-editor-servers-pane.vala
@@ -694,7 +694,7 @@ private class Accounts.SaveSentRow :
private class Accounts.ServiceHostRow :
- ServiceRow<EditorServersPane,Gtk.Entry>, ValidatingRow {
+ ServiceRow<EditorServersPane,Gtk.Entry>, ValidatingRow<EditorServersPane> {
public Components.Validator validator {
@@ -848,7 +848,7 @@ private class Accounts.ServiceSecurityRow :
private class Accounts.ServiceLoginRow :
- ServiceRow<EditorServersPane,Gtk.Entry>, ValidatingRow {
+ ServiceRow<EditorServersPane,Gtk.Entry>, ValidatingRow<EditorServersPane> {
public Components.Validator validator {
@@ -972,7 +972,7 @@ private class Accounts.ServiceLoginRow :
private class Accounts.ServicePasswordRow :
- ServiceRow<EditorServersPane,Gtk.Entry>, ValidatingRow {
+ ServiceRow<EditorServersPane,Gtk.Entry>, ValidatingRow<EditorServersPane> {
public Components.Validator validator {
--
2.41.0
@@ -0,0 +1,51 @@
From a300be5877f35379bb569313eec901bda9c8d762 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 30 Apr 2023 22:08:39 -0700
Subject: [PATCH] meson: Use PKG_CONFIG_SYSROOT_DIR when using pkg-config
OE cross-builds and absolute paths found by pkg-config points to
non-sysroot'ed locations which are not correct as they point into native
sysroot from build machine which is incorrect.
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meson.build | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index d563dd08..9b72aeb4 100644
--- a/meson.build
+++ b/meson.build
@@ -38,6 +38,9 @@ metadata_dir = meson.project_source_root() / 'bindings'/ 'metadata'
po_dir = meson.project_source_root() / 'po'
vapi_dir = meson.project_source_root() / 'bindings' / 'vapi'
+# pkg-config sysroot location
+pkgconf_sysroot = run_command('python3', '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
+
# Compiler configuration
add_project_arguments([
# Make sure Meson can find custom VAPIs
@@ -120,7 +123,7 @@ icu_uc = declare_dependency(
if libunwind_dep.found()
# We need to add native lib to the search path for these so Flatpak
# builds can find it.
- unwind_lib = libunwind_dep.get_variable(pkgconfig: 'libdir')
+ unwind_lib = pkgconf_sysroot + libunwind_dep.get_variable(pkgconfig: 'libdir')
libunwind = declare_dependency(
dependencies: [
valac.find_library('libunwind', dirs: [vapi_dir, unwind_lib]),
@@ -207,8 +210,7 @@ vala_unit_proj = subproject(
vala_unit_dep = vala_unit_proj.get_variable('vala_unit_dep')
# Language detection
-
-iso_codes_dir = iso_codes.get_variable(pkgconfig: 'prefix')/'share'/'xml'/'iso-codes'
+iso_codes_dir = pkgconf_sysroot + iso_codes.get_variable(pkgconfig: 'prefix')/'share'/'xml'/'iso-codes'
iso_639_xml = get_option('iso_639_xml')
if iso_639_xml == ''
--
2.40.1
@@ -0,0 +1,156 @@
From 116aead44e01e046f83931574980991df66f69c3 Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Fri, 14 Apr 2023 09:42:23 +0200
Subject: [PATCH] vala-unit: Fix non-null build with newer vala
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/geary/-/commit/10f9c133a2ad515127d65f3bba13a0d91b75f4af]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../vala-unit/src/collection-assertions.vala | 12 ++++++------
subprojects/vala-unit/src/mock-object.vala | 6 +++---
subprojects/vala-unit/src/test-assertions.vala | 18 +++++++++---------
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/subprojects/vala-unit/src/collection-assertions.vala b/subprojects/vala-unit/src/collection-assertions.vala
index 3b34acda..29223a0d 100644
--- a/subprojects/vala-unit/src/collection-assertions.vala
+++ b/subprojects/vala-unit/src/collection-assertions.vala
@@ -256,7 +256,7 @@ internal class ValaUnit.ArrayCollectionAssertion<E> : GLib.Object,
public CollectionAssertions<E> contains(E expected)
throws GLib.Error {
- E boxed_expected = box_value(expected);
+ E? boxed_expected = box_value(expected);
bool found = false;
for (int i = 0; i < this.actual.length; i++) {
try {
@@ -281,7 +281,7 @@ internal class ValaUnit.ArrayCollectionAssertion<E> : GLib.Object,
public CollectionAssertions<E> not_contains(E expected)
throws GLib.Error {
- E boxed_expected = box_value(expected);
+ E? boxed_expected = box_value(expected);
for (int i = 0; i < this.actual.length; i++) {
try {
assert_equal(box_value(this.actual[i]), boxed_expected);
@@ -312,8 +312,8 @@ internal class ValaUnit.ArrayCollectionAssertion<E> : GLib.Object,
this.context
);
}
- E boxed_actual = box_value(this.actual[index]);
- E boxed_expected = box_value(expected);
+ E? boxed_actual = box_value(this.actual[index]);
+ E? boxed_expected = box_value(expected);
try {
assert_equal(boxed_actual, boxed_expected);
} catch (TestError.FAILED err) {
@@ -453,8 +453,8 @@ internal class ValaUnit.GeeCollectionAssertion<E> :
for (int i = 0; i <= index; i++) {
iterator.next();
}
- E boxed_actual = box_value(iterator.get());
- E boxed_expected = box_value(expected);
+ E? boxed_actual = box_value(iterator.get());
+ E? boxed_expected = box_value(expected);
try {
assert_equal(boxed_actual, boxed_expected);
} catch (TestError.FAILED err) {
diff --git a/subprojects/vala-unit/src/mock-object.vala b/subprojects/vala-unit/src/mock-object.vala
index 766777a4..eb086e10 100644
--- a/subprojects/vala-unit/src/mock-object.vala
+++ b/subprojects/vala-unit/src/mock-object.vala
@@ -138,7 +138,7 @@ public interface ValaUnit.MockObject : GLib.Object, TestAssertions {
throws GLib.Error {
assert_false(this.expected.is_empty, "Unexpected call: %s".printf(name));
- ExpectedCall expected = this.expected.poll();
+ ExpectedCall expected = (!) this.expected.poll();
assert_equal(name, expected.name, "Unexpected call");
if (expected.expected_args != null) {
assert_args(args, expected.expected_args, "Call %s".printf(name));
@@ -229,7 +229,7 @@ public interface ValaUnit.MockObject : GLib.Object, TestAssertions {
R default_return)
throws GLib.Error {
check_for_exception(expected);
- R? return_object = default_return;
+ R return_object = default_return;
if (expected.return_object != null) {
return_object = (R) expected.return_object;
}
@@ -243,7 +243,7 @@ public interface ValaUnit.MockObject : GLib.Object, TestAssertions {
if (expected.return_object == null) {
throw default_error;
}
- return expected.return_object;
+ return (!) expected.return_object;
}
private inline void check_for_exception(ExpectedCall expected)
diff --git a/subprojects/vala-unit/src/test-assertions.vala b/subprojects/vala-unit/src/test-assertions.vala
index 784dd9fd..e61fdf82 100644
--- a/subprojects/vala-unit/src/test-assertions.vala
+++ b/subprojects/vala-unit/src/test-assertions.vala
@@ -21,8 +21,8 @@ namespace ValaUnit {
}
- internal inline void assert_equal<T>(T actual,
- T expected,
+ internal inline void assert_equal<T>(T? actual,
+ T? expected,
string? context = null)
throws TestError {
if ((actual == null && expected != null) ||
@@ -107,9 +107,9 @@ namespace ValaUnit {
*
* This will only work when the values are not already boxed.
*/
- internal T box_value<T>(T value) {
+ internal T? box_value<T>(T value) {
var type = typeof(T);
- T boxed = value;
+ T? boxed = value;
if (type == typeof(int) || type.is_enum()) {
int actual = (int) value;
@@ -133,7 +133,7 @@ namespace ValaUnit {
return boxed;
}
- internal string to_display_string<T>(T value) {
+ internal string to_display_string<T>(T? value) {
var type = typeof(T);
var display = "";
@@ -191,8 +191,8 @@ namespace ValaUnit {
);
}
- private void assert_equal_enum<T>(T actual,
- T expected,
+ private void assert_equal_enum<T>(T? actual,
+ T? expected,
string? context)
throws TestError {
int actual_val = (int) ((int?) actual);
@@ -342,7 +342,7 @@ public interface ValaUnit.TestAssertions : GLib.Object {
/** Asserts a value is null */
- public void assert_non_null<T>(T actual, string? context = null)
+ public void assert_non_null<T>(T? actual, string? context = null)
throws TestError {
if (actual == null) {
ValaUnit.assert(
@@ -353,7 +353,7 @@ public interface ValaUnit.TestAssertions : GLib.Object {
}
/** Asserts a value is null */
- public void assert_is_null<T>(T actual, string? context = null)
+ public void assert_is_null<T>(T? actual, string? context = null)
throws TestError {
if (actual != null) {
ValaUnit.assert(
--
2.41.0
@@ -0,0 +1,63 @@
SUMMARY = "Geary is an email application built around conversations, for the GNOME 3 desktop."
SECTION = "network"
LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=2a2244d5a13871ad950c55877546a6a2"
DEPENDS = " \
appstream-glib \
cairo \
desktop-file-utils-native \
enchant2 \
evolution-data-server \
folks \
gcr3 \
gmime \
gnome-online-accounts \
gsound \
gspell \
gtk+3 \
icu \
iso-codes \
json-glib \
libhandy \
libical \
libpeas \
libsecret \
libstemmer \
libxml2 \
sqlite3 \
webkitgtk \
"
RDEPENDS:${PN} = "gnome-keyring"
inherit meson pkgconfig mime-xdg gtk-icon-cache gobject-introspection vala features_check
SRC_URI = " \
git://github.com/GNOME/geary.git;nobranch=1;protocol=https \
file://0001-meson-Use-PKG_CONFIG_SYSROOT_DIR-when-using-pkg-conf.patch \
file://0001-client-Add-missing-type-arguments-for-interfaces-to-.patch \
file://0001-vala-unit-Fix-non-null-build-with-newer-vala.patch \
"
S = "${WORKDIR}/git"
SRCREV = "94d6bec861daffb27efea85a296f347db7a5af6d"
ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
REQUIRED_DISTRO_FEATURES = "gobject-introspection-data opengl"
GIR_MESON_OPTION = ""
EXTRA_OEMESON = "-Dprofile=release"
PACKAGECONFIG[libunwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
PACKAGECONFIG[tnef] = "-Dtnef=enabled,-Dtnef=disabled,libytnef"
PACKAGECONFIG[valadoc] = "-Dvaladoc=enabled,-Dvaladoc=disabled"
PACKAGECONFIG ??= ""
# rfc822/rfc822-message.c:2097:12: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'gboolean' (aka 'int') [-Wint-conversion]
#| return NULL;
#| ^~~~
CFLAGS:append:toolchain-clang = " -Wno-error=int-conversion"
FILES:${PN} += "${datadir}"