Skip to content
Snippets Groups Projects
Verified Commit 9beacbb3 authored by Spotlight Deveaux's avatar Spotlight Deveaux :fox:
Browse files

mail-client/evolution: backport gnome-desktop API

This manually applies https://gitlab.gnome.org/GNOME/evolution/-/commit/9e3019a0961e91e5fbffe190b973a47c7fafd361
which updates Evolution to utilize API changes for gnome-desktop 43.0.

This should be safe to revert and resolv whenever GNOME 43.0 becomes more
stable on Gentoo.
parent 168ff419
No related branches found
No related tags found
No related merge requests found
AUX 0001-update-for-gnome-desktop-API.patch 1945 BLAKE2B 643b04506cd3707518ba022657db6b323f70dafcd616053de8f098521aa7a27b71bb7871fe7b00064b48975f20b488b87310018bd5b5de49368b45a6e7f55b88 SHA512 2a8d2c4d8e19ec6a24850977f8e70955f21c422f3a785bf24be30d8bc96b267ba416cd3f540e46591b3606cb125a80001f8177ea82ae2f241cda09a3b7df9b7a
DIST evolution-3.44.4.tar.xz 13130588 BLAKE2B ffb6da420acbf7be7e5eb6fad44bcb9f00e9c52f99314a4f8e8e35e898eaac8a8fdc511328fd519fed5ac9ef98e63e326cfc7dde324919c1cc6e60ff17b3ad76 SHA512 1c2a30e00e4f9226ced2617cf5a69f33db914d5a94dd22223c9dc12e635952a52e2fac395d49de70c70c21004fb0d87e3ba81725aff924bb0b386ffb4901d058
EBUILD evolution-3.44.4-r3.ebuild 4161 BLAKE2B 7d69b2d1c6e5421330689b803eae0f854f717fbf9a3c2d476a84bed1a04b80a7690add8c619d9033873cebff05c0b42581df24ea768c5225ee3b68f35a857499 SHA512 90a556bd66f2bff0231c1bd57341ee5a609f1e42d985a7d2b3675c741b001c1ff93172410ec5217c875767401d4416160a67eb307cb4d6ec36977ec75b24a709
MISC metadata.xml 1174 BLAKE2B 745a372088a3891dee71c205ef8d512df56e338ca41cd91d861938447e1cf42f0305fe27e385b7e4f391dd26cbd5173bdba9e158b65cec1260fe9c45382465c4 SHA512 d19c6775d576c35458674c301bfc5502e1f8f62cee76fe46aa749507fd9c2a1494a21a6c9a5886f8ca7e3b2e107b3e28dee448c8ecbd999cf3c3bb800c03f405
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake gnome2 readme.gentoo-r1
DESCRIPTION="Integrated mail, addressbook and calendaring functionality"
HOMEPAGE="https://wiki.gnome.org/Apps/Evolution https://gitlab.gnome.org/GNOME/evolution"
# Note: explicitly "|| ( LGPL-2 LGPL-3 )", not "LGPL-2+".
LICENSE="|| ( LGPL-2 LGPL-3 ) CC-BY-SA-3.0 FDL-1.3+ OPENLDAP"
SLOT="2.0"
IUSE="archive +bogofilter geolocation gtk-doc highlight ldap spamassassin spell ssl +weather ytnef"
KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv x86"
# glade-3 support is for maintainers only per configure.ac
# pst is not mature enough and changes API/ABI frequently
# dconf explicitely needed for backup plugin
# gnome-desktop support is optional with --enable-gnome-desktop
# automagic libunity dep
# >=gspell-1.8 to ensure it uses enchant:2 like webkit-gtk
# <libgweather-4.2.0 because of libsoup:3 transition
DEPEND="
>=app-crypt/gcr-3.4:0=[gtk]
>=app-text/enchant-2.2.0:2
>=dev-db/sqlite-3.7.17
>=dev-libs/glib-2.56:2[dbus]
>=dev-libs/libxml2-2.7.3:2
>=gnome-base/gnome-desktop-2.91.3:3=
>=gnome-base/gsettings-desktop-schemas-2.91.92
>=gnome-extra/evolution-data-server-${PV}:=[gtk,weather?]
>=media-libs/libcanberra-0.25[gtk3]
>=net-libs/libsoup-2.42:2.4
>=net-libs/webkit-gtk-2.28.0:4=[spell?]
>=x11-libs/cairo-1.9.15[glib]
>=x11-libs/gdk-pixbuf-2.24:2
>=x11-libs/gtk+-3.22:3
>=x11-libs/libnotify-0.7
>=x11-misc/shared-mime-info-0.22
app-text/cmark:=
>=app-text/iso-codes-0.49
dev-libs/atk
gnome-base/dconf
x11-libs/libSM
x11-libs/libICE
archive? ( >=app-arch/gnome-autoar-0.1.1[gtk] )
bogofilter? ( mail-filter/bogofilter )
geolocation? (
>=media-libs/libchamplain-0.12:0.12[gtk]
>=media-libs/clutter-1.0.0:1.0
>=media-libs/clutter-gtk-0.90:1.0
>=sci-geosciences/geocode-glib-3.10.0:0 )
ldap? ( >=net-nds/openldap-2:= )
spamassassin? ( mail-filter/spamassassin )
spell? ( >=app-text/gspell-1.8:= )
ssl? (
>=dev-libs/nspr-4.6.1
>=dev-libs/nss-3.11
)
weather? (
>=dev-libs/libgweather-3.91.0:4=
<dev-libs/libgweather-4.2.0:4=
)
ytnef? ( net-mail/ytnef )
"
RDEPEND="${DEPEND}
highlight? ( app-text/highlight )
"
BDEPEND="
app-text/docbook-xml-dtd:4.1.2
dev-util/gdbus-codegen
dev-util/glib-utils
dev-util/itstool
gtk-doc? ( dev-util/gtk-doc
app-text/docbook-xml-dtd:4.3 )
>=dev-util/intltool-0.40.0
>=sys-devel/gettext-0.18.3
virtual/pkgconfig
"
DISABLE_AUTOFORMATTING="yes"
DOC_CONTENTS="To change the default browser if you are not using GNOME, edit
~/.local/share/applications/mimeapps.list so it includes the
following content:
[Default Applications]
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
(replace firefox.desktop with the name of the appropriate .desktop
file from /usr/share/applications if you use a different browser)."
# global scope PATCHES or DOCS array mustn't be used due to double default_src_prepare
# call; if needed, set them after cmake_src_prepare call, if that works
src_prepare() {
cmake_src_prepare
PATCHES=("${FILESDIR}/0001-update-for-gnome-desktop-API.patch")
gnome2_src_prepare
}
src_configure() {
# Use NSS/NSPR only if 'ssl' is enabled.
local mycmakeargs=(
-DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc
-DENABLE_SCHEMAS_COMPILE=OFF
-DENABLE_GTK_DOC=$(usex gtk-doc)
-DWITH_OPENLDAP=$(usex ldap)
-DENABLE_SMIME=$(usex ssl)
-DENABLE_GNOME_DESKTOP=ON
-DWITH_ENCHANT_VERSION=2
-DENABLE_CANBERRA=ON
-DENABLE_AUTOAR=$(usex archive)
-DWITH_HELP=ON
-DENABLE_YTNEF=OFF
-DWITH_BOGOFILTER=$(usex bogofilter)
-DWITH_SPAMASSASSIN=$(usex spamassassin)
-DENABLE_GSPELL=$(usex spell)
-DENABLE_TEXT_HIGHLIGHT=$(usex highlight)
-DENABLE_WEATHER=$(usex weather)
-DWITH_GWEATHER4=ON
-DENABLE_CONTACT_MAPS=$(usex geolocation)
-DENABLE_YTNEF=$(usex ytnef)
-DENABLE_PST_IMPORT=OFF
-DWITH_GLADE_CATALOG=OFF
-DENABLE_MARKDOWN=ON
)
cmake_src_configure
}
src_compile() {
cmake_src_compile
}
src_test() {
cmake_src_test
}
src_install() {
cmake_src_install
readme.gentoo_create_doc
}
pkg_postinst() {
gnome2_pkg_postinst
readme.gentoo_print_elog
}
diff --git a/src/e-util/e-icon-factory.c b/src/e-util/e-icon-factory.c
index 25c2ecbbb664a10898a36a0b455b1e285d114635..71ffd72f8a1dde6f0a7bfae82c9586fa5cb1e21d 100644
--- a/src/e-util/e-icon-factory.c
+++ b/src/e-util/e-icon-factory.c
@@ -170,6 +170,9 @@ e_icon_factory_create_thumbnail (const gchar *filename)
static GnomeDesktopThumbnailFactory *thumbnail_factory = NULL;
struct stat file_stat;
gchar *thumbnail = NULL;
+#if defined(GNOME_DESKTOP_PLATFORM_VERSION) && GNOME_DESKTOP_PLATFORM_VERSION >= 43
+ GError *error = NULL;
+#endif
g_return_val_if_fail (filename != NULL, NULL);
@@ -194,10 +197,26 @@ e_icon_factory_create_thumbnail (const gchar *filename)
if (!thumbnail && gnome_desktop_thumbnail_factory_can_thumbnail (thumbnail_factory, uri, mime, file_stat.st_mtime)) {
GdkPixbuf *pixbuf;
+#if defined(GNOME_DESKTOP_PLATFORM_VERSION) && GNOME_DESKTOP_PLATFORM_VERSION >= 43
+ pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (thumbnail_factory, uri, mime, NULL, &error);
+ if (!pixbuf) {
+ g_warning ("Failed to generate thumbnail for %s: %s", uri, error ? error->message : "Unknown error");
+ g_clear_error (&error);
+ }
+#else
pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (thumbnail_factory, uri, mime);
+#endif
if (pixbuf) {
+#if defined(GNOME_DESKTOP_PLATFORM_VERSION) && GNOME_DESKTOP_PLATFORM_VERSION >= 43
+ gnome_desktop_thumbnail_factory_save_thumbnail (thumbnail_factory, pixbuf, uri, file_stat.st_mtime, NULL, &error);
+ if (error) {
+ g_warning ("Failed to save thumbnail for %s: %s", uri, error ? error->message : "Unknown error");
+ g_clear_error (&error);
+ }
+#else
gnome_desktop_thumbnail_factory_save_thumbnail (thumbnail_factory, pixbuf, uri, file_stat.st_mtime);
+#endif
g_object_unref (pixbuf);
thumbnail = gnome_desktop_thumbnail_factory_lookup (thumbnail_factory, uri, file_stat.st_mtime);
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<use>
<flag name="archive">Enable archives support in attachments via <pkg>app-arch/gnome-autoar</pkg></flag>
<flag name="bogofilter">Build <pkg>mail-filter/bogofilter</pkg> plugin</flag>
<flag name="geolocation">Enable support for displaying contacts on a map inside evolution using <pkg>media-libs/libchamplain</pkg></flag>
<flag name="highlight">Enable text highlighting plugin</flag>
<flag name="ldap">Enable support for fetching contacts from an LDAP or Active Directory server using <pkg>net-nds/openldap</pkg></flag>
<flag name="spamassassin">Build <pkg>mail-filter/spamassassin</pkg> plugin</flag>
<flag name="weather">Enable optional weather calendar support</flag>
<flag name="ytnef">Enable optional TNEF attachments parser support using <pkg>net-mail/ytnef</pkg></flag>
</use>
<upstream>
<remote-id type="gnome-gitlab">GNOME/evolution</remote-id>
</upstream>
</pkgmetadata>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment