[PATCH 0/2] gnu: eog: Fix failing build due to libportal upgrade

  • Done
  • quality assurance status badge
Details
2 participants
  • Daniel Meißner
  • Guillaume Le Vaillant
Owner
unassigned
Submitted by
Daniel Meißner
Severity
normal
D
D
Daniel Meißner wrote on 10 Jan 2022 16:32
[PATCH 0/2] gnu: eog: Fix failing build due to libportal upgrade
(address . guix-patches@gnu.org)(name . Daniel Meißner)(address . daniel.meissner-i4k@ruhr-uni-bochum.de)
20220110153211.32612-1-daniel.meissner-i4k@ruhr-uni-bochum.de
Hi Guix,

after upgrading libportal to 0.5 eog fails to build. This little patch series
fixes this.

Thanks,
Daniel

Daniel Meißner (2):
gnu: libportal: Build backend for GTK+3
gnu: eog: Fix build with libportal-0.5

gnu/local.mk | 2 +
gnu/packages/freedesktop.scm | 3 +-
gnu/packages/gnome.scm | 5 ++-
.../patches/eog-update-libportal-usage.patch | 40 +++++++++++++++++++
4 files changed, 48 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/eog-update-libportal-usage.patch

--
2.34.0
D
D
Daniel Meißner wrote on 10 Jan 2022 16:37
[PATCH 1/2] gnu: libportal: Build backend for GTK+3
(address . 53161@debbugs.gnu.org)(name . Daniel Meißner)(address . daniel.meissner-i4k@ruhr-uni-bochum.de)
20220110153715.457-1-daniel.meissner-i4k@ruhr-uni-bochum.de
* gnu/packages/freedesktop.scm (libportal)[arguments]: Change configure-flags
to build backend for GTK+3.
---
gnu/packages/freedesktop.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index a7d400d3bf..2b0739020d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -28,6 +28,7 @@
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2233,7 +2234,7 @@ (define-public libportal
(build-system meson-build-system)
(arguments
`(#:configure-flags
- (list "-Dbackends=gtk4,qt5"
+ (list "-Dbackends=gtk4,gtk3,qt5"
"-Ddocs=false"))) ; requires unpackaged gi-docgen
(native-inputs
(list pkg-config
--
2.34.0
D
D
Daniel Meißner wrote on 10 Jan 2022 16:37
[PATCH 2/2] gnu: eog: Fix build with libportal-0.5
(address . 53161@debbugs.gnu.org)(name . Daniel Meißner)(address . daniel.meissner-i4k@ruhr-uni-bochum.de)
20220110153715.457-2-daniel.meissner-i4k@ruhr-uni-bochum.de
After the update to libportal-0.5 in 294476022f19139e290acb448d4575de0f851673
eog fails with:

../eog-40.3/src/eog-util.c:48:10: fatal error: libportal/portal-gtk3.h: No such file or directory

This was already fixed upstream and this commits extracts the patch.

* gnu/packages/patches/eog-update-libportal-usage.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/gnome.scm(eog)[origin]: Add new patch.
---
gnu/local.mk | 2 +
gnu/packages/gnome.scm | 5 ++-
.../patches/eog-update-libportal-usage.patch | 40 +++++++++++++++++++
3 files changed, 46 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/eog-update-libportal-usage.patch

Toggle diff (91 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index fe21cf8062..cc83c87282 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -47,6 +47,7 @@
# Copyright © 2021 Dmitry Polyakov <polyakov@liltechdude.xyz>
# Copyright © 2021 Andrew Tropin <andrew@trop.in>
# Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+# Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
#
# This file is part of GNU Guix.
#
@@ -1027,6 +1028,7 @@ dist_patch_DATA = \
%D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \
%D%/packages/patches/enjarify-setup-py.patch \
%D%/packages/patches/enlightenment-fix-setuid-path.patch \
+ %D%/packages/patches/eog-update-libportal-usage.patch \
%D%/packages/patches/erlang-man-path.patch \
%D%/packages/patches/esmtp-add-lesmtp.patch \
%D%/packages/patches/eudev-rules-directory.patch \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 429b17c00e..c8e82f811b 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -65,6 +65,7 @@
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Josselin Poiret <josselin.poiret@protonmail.ch>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
+;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -6427,7 +6428,9 @@ (define-public eog
name "-" version ".tar.xz"))
(sha256
(base32
- "0ddjwcd77nw0rxb5x5bz5hd671m8gya9827p8rsnb58x103kpai8"))))
+ "0ddjwcd77nw0rxb5x5bz5hd671m8gya9827p8rsnb58x103kpai8"))
+ ;; XXX: Remove when upgrading to 42.0
+ (patches (search-patches "eog-update-libportal-usage.patch"))))
(build-system meson-build-system)
(arguments
`(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
diff --git a/gnu/packages/patches/eog-update-libportal-usage.patch b/gnu/packages/patches/eog-update-libportal-usage.patch
new file mode 100644
index 0000000000..220a16ddc4
--- /dev/null
+++ b/gnu/packages/patches/eog-update-libportal-usage.patch
@@ -0,0 +1,40 @@
+Fix eog to work with libportal-0.5
+
+This patch is extracted from upstream, see here
+https://gitlab.gnome.org/GNOME/eog/-/commit/a06e6325907e136678b0bbe7058c25d688034afd
+
+diff --git a/meson.build b/meson.build
+index 9a32e4bb..9d49aa45 100644
+--- a/meson.build
++++ b/meson.build
+@@ -165,10 +165,14 @@ config_h.set('HAVE_EXEMPI', enable_xmp)
+ # xdg-desktop-portal support with libportal (optional)
+ enable_libportal = get_option('libportal')
+ if enable_libportal
+- libportal_dep = dependency('libportal', version: '>= 0.3', required: false)
++ libportal_dep = dependency('libportal', version: '>= 0.5', required: false)
+ assert(libportal_dep.found() and cc.has_header('libportal/portal.h', dependencies: libportal_dep),
+ 'xdg-desktop-portal support requested but library not found. Please use -Dlibportal=false')
+
+- common_deps += libportal_dep
++ libportal_gtk3_dep = dependency('libportal-gtk3', version: '>= 0.5', required: false)
++ assert(libportal_gtk3_dep.found() and cc.has_header('libportal-gtk3/portal-gtk3.h', dependencies: libportal_gtk3_dep),
++ 'xdg-desktop-portal support requested but library not found. Please use -Dlibportal=false')
++
++ common_deps += [libportal_dep, libportal_gtk3_dep]
+ endif
+ config_h.set('HAVE_LIBPORTAL', enable_libportal)
+
+diff --git a/src/eog-util.c b/src/eog-util.c
+index 90b9768e..56d23472 100644
+--- a/src/eog-util.c
++++ b/src/eog-util.c
+@@ -45,7 +45,7 @@
+ #include <glib/gi18n.h>
+ #ifdef HAVE_LIBPORTAL
+ #include <libportal/portal.h>
+-#include <libportal/portal-gtk3.h>
++#include <libportal-gtk3/portal-gtk3.h>
+ #endif
+
+ void
--
2.34.0
G
G
Guillaume Le Vaillant wrote on 11 Jan 2022 16:19
Re: [bug#53161] [PATCH 0/2] gnu: eog: Fix failing build due to libportal upgrade
(name . Daniel Meißner)(address . daniel.meissner-i4k@ruhr-uni-bochum.de)(address . 53161-done@debbugs.gnu.org)
878rvm8fl9.fsf@kitej
Patches pushed as e92afc59048502a4a23ea5866522ba5f3ccc8aba and
following.
Thanks.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYd2gEg8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j/aZQEAnmsQNmbUv9c16ZO1O871WAk2V+imH9aT6OaY
yaNvJroBAI1oPJ9NY3pmCQqb+1aimX4eDpFlmR0h7vAC5bNFEqYF
=Nxpg
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 53161@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 53161
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch