[PATCH] gnu: nautilus: Fix build with libportal-0.5.

  • Done
  • quality assurance status badge
Details
One participant
  • Pierre Langlois
Owner
unassigned
Submitted by
Pierre Langlois
Severity
normal
P
P
Pierre Langlois wrote on 11 Jan 2022 21:05
(address . guix-patches@gnu.org)
87o84iuj8u.fsf@gmx.com
Hi Guix!

I noticed nautilus fails to build and saw there was a patch upstream so
here's a patch! I've also added a patch to update nautilus to 41.1 and
adjust its style while I was there. The patch will only be in nautilus
42 though.

These patches are pretty trivial so I'll push them in the next few hours
unless somebody beats me to it :-).

Thanks,
Pierre
-----BEGIN PGP SIGNATURE-----

iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmHd5BEYHHBpZXJyZS5s
YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UgTwH/R9UCnVhfrCO3sYc+RyIcfDK
EPdgfWoKMl9BhkyW6F27yH6JPtZmcyLajj0bCY+JbRpaTSsSJspNRw0PlPmysLrd
IZHZpSPsM315DYbgHYgd5kECpiLLoFXVQ0pIAaP7/eLi5nH7Qw+lfw1RiDRel8/I
VIEVy8o00iT7cdbGxaZY0nzfK9W/GA2/uvLRGWr1vMD5d6XG0nZt5D89+Ebbv8Iq
ND0n2fTJRdRDqrl6UJA953kDPe62AuLF+PV7gQ0ItWkcgjjlLWxzrNmruYt0xVdt
kspghvGI9Lqwg99kCFSr9oreTlFzMyKC8QQZh2mdNbTLVgnibImzqfLD4Rv4d9E=
=kC/A
-----END PGP SIGNATURE-----

From 3191e0e9084a1afeefac35e585d5a6afe1782290 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Tue, 11 Jan 2022 19:51:21 +0000
Subject: [PATCH 1/3] gnu: nautilus: Fix build with libportal-0.5.

* gnu/packages/patches/nautilus-add-libportal-gtk3.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/gnome.scm (nautilus)[source]: Use it.
---
gnu/local.mk | 1 +
gnu/packages/gnome.scm | 6 +-
.../patches/nautilus-add-libportal-gtk3.patch | 61 +++++++++++++++++++
3 files changed, 67 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/nautilus-add-libportal-gtk3.patch

Toggle diff (96 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 7c75a1043b..1706663bde 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1507,6 +1507,7 @@ dist_patch_DATA = \
%D%/packages/patches/musl-cross-locale.patch \
%D%/packages/patches/mutt-store-references.patch \
%D%/packages/patches/m4-gnulib-libio.patch \
+ %D%/packages/patches/nautilus-add-libportal-gtk3.patch \
%D%/packages/patches/ncompress-fix-softlinks.patch \
%D%/packages/patches/netcdf-date-time.patch \
%D%/packages/patches/netpbm-CVE-2017-2586.patch \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 60e79a7039..8181e498c3 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9095,7 +9095,11 @@ (define-public nautilus
name "-" version ".tar.xz"))
(sha256
(base32
- "1rd1a0wjh2sc7mzw6m61rryvgxpi2lin4xj0x9khqw04q6nl3fgr"))))
+ "1rd1a0wjh2sc7mzw6m61rryvgxpi2lin4xj0x9khqw04q6nl3fgr"))
+ (patches
+ ;; This patch is already upstream and can be removed next
+ ;; release.
+ (search-patches "nautilus-add-libportal-gtk3.patch"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
diff --git a/gnu/packages/patches/nautilus-add-libportal-gtk3.patch b/gnu/packages/patches/nautilus-add-libportal-gtk3.patch
new file mode 100644
index 0000000000..cefa47cc64
--- /dev/null
+++ b/gnu/packages/patches/nautilus-add-libportal-gtk3.patch
@@ -0,0 +1,61 @@
+From 55cfd66ccca391fc144f5863ff6bfc1f3b137e2d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ant=C3=B3nio=20Fernandes?= <antoniojpfernandes@gmail.com>
+Date: Tue, 21 Dec 2021 17:42:27 +0000
+Subject: [PATCH] general: Add libportal-gtk3 dependency
+
+The portal-gtk3.h header has been moved into a separate library which
+binds gtk3 explicitly.
+
+https://github.com/flatpak/libportal/pull/53
+---
+ build-aux/flatpak/org.gnome.Nautilus.json | 5 +++-- ;; Changes removed in Guix
+ build-aux/flatpak/org.gnome.Nautilus.yml | 3 ++- ;; Changes removed in Guix
+ meson.build | 4 +++-
+ src/meson.build | 1 +
+ src/nautilus-files-view.c | 2 +-
+ 5 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 927216636..4626fa0bb 100644
+--- a/meson.build
++++ b/meson.build
+@@ -122,8 +122,10 @@ gnome_desktop = dependency('gnome-desktop-3.0', version: '>= 3.0.0')
+ gtk = dependency('gtk+-3.0', version: '>= 3.22.27')
+ libhandy = dependency('libhandy-1', version: '>= 1.1.90')
+ libportal = []
++libportal_gtk3 = []
+ if get_option('libportal')
+- libportal = dependency('libportal', version: '>= 0.3')
++ libportal = dependency('libportal', version: '>= 0.5')
++ libportal_gtk3 = dependency('libportal-gtk3', version: '>= 0.5')
+ endif
+ selinux = []
+ if get_option('selinux')
+diff --git a/src/meson.build b/src/meson.build
+index 682d6f3a3..d7fb76d53 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -285,6 +285,7 @@ nautilus_deps = [
+ libgd_dep,
+ libhandy,
+ libportal,
++ libportal_gtk3,
+ nautilus_extension,
+ selinux,
+ tracker_sparql,
+diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
+index dfb7fb26c..a24005a11 100644
+--- a/src/nautilus-files-view.c
++++ b/src/nautilus-files-view.c
+@@ -93,7 +93,7 @@
+
+ #ifdef HAVE_LIBPORTAL
+ #include <libportal/portal.h>
+-#include <libportal/portal-gtk3.h>
++#include <libportal-gtk3/portal-gtk3.h>
+ #endif
+
+ /* Minimum starting update inverval */
+--
+GitLab
+
--
2.34.0
From 25b9874e65e18de668e46da1f6bb7b83b23050e7 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Tue, 11 Jan 2022 19:55:03 +0000
Subject: [PATCH 2/3] gnu: nautilus: Update to 41.1.

* gnu/packages/gnome.scm (nautilus): Update to 41.1.
[arguments]: Remove #:meson keyword.
---
gnu/packages/gnome.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 8181e498c3..b621f6c43a 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9087,7 +9087,7 @@ (define-public tracker-miners
(define-public nautilus
(package
(name "nautilus")
- (version "41.0")
+ (version "41.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -9095,7 +9095,7 @@ (define-public nautilus
name "-" version ".tar.xz"))
(sha256
(base32
- "1rd1a0wjh2sc7mzw6m61rryvgxpi2lin4xj0x9khqw04q6nl3fgr"))
+ "0bsqh241m43x3qb3z0mjakjic610ncl95zhjdgls649phnc30qry"))
(patches
;; This patch is already upstream and can be removed next
;; release.
@@ -9103,7 +9103,6 @@ (define-public nautilus
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
- #:meson ,meson-0.59
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'make-extensible
--
2.34.0
From 625c25732ce7e7bc28bda9164c6145993b3689a4 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Tue, 11 Jan 2022 19:59:23 +0000
Subject: [PATCH 3/3] gnu: nautilus: Adjust style.

* gnu/packages/gnome.scm (nautilus)[native-inputs, inputs]: Remove labels.
---
gnu/packages/gnome.scm | 56 +++++++++++++++++++++---------------------
1 file changed, 28 insertions(+), 28 deletions(-)

Toggle diff (68 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index b621f6c43a..b30edcc736 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9135,35 +9135,35 @@ (define-public nautilus
;; Settings schema 'org.gnome.nautilus.preferences' is not installed
#:tests? #f))
(native-inputs
- `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
- ("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
- ("gobject-introspection" ,gobject-introspection)
- ("intltool" ,intltool)
- ("pkg-config" ,pkg-config)))
+ (list desktop-file-utils ; for update-desktop-database
+ `(,glib "bin") ; for glib-mkenums, etc.
+ gobject-introspection
+ intltool
+ pkg-config))
(inputs
- `(("dconf" ,dconf)
- ("gexiv2" ,gexiv2)
- ("gvfs" ,gvfs)
- ("exempi" ,exempi)
- ("gnome-desktop" ,gnome-desktop)
- ("gnome-autoar" ,gnome-autoar)
- ("gst-plugins-base" ,gst-plugins-base)
- ("json-glib" ,json-glib)
- ("libhandy" ,libhandy)
- ("libportal" ,libportal)
- ("libseccomp" ,libseccomp)
- ("libselinux" ,libselinux)
- ("libsoup" ,libsoup-minimal-2) ; to satisfy tracker dependencies
- ("tracker" ,tracker)
- ("tracker-miners" ,tracker-miners)
- ;; XXX: gtk+ is required by libnautilus-extension.pc
- ;;
- ;; Don't propagate it to reduces "profile pollution" of the 'gnome' meta
- ;; package. See:
- ;; <http://lists.gnu.org/archive/html/guix-devel/2016-03/msg00283.html>.
- ("gtk+" ,gtk+)
- ("libexif" ,libexif)
- ("libxml2" ,libxml2)))
+ (list dconf
+ gexiv2
+ gvfs
+ exempi
+ gnome-desktop
+ gnome-autoar
+ gst-plugins-base
+ json-glib
+ libhandy
+ libportal
+ libseccomp
+ libselinux
+ libsoup-minimal-2 ; to satisfy tracker dependencies
+ tracker
+ tracker-miners
+ ;; XXX: gtk+ is required by libnautilus-extension.pc
+ ;;
+ ;; Don't propagate it to reduces "profile pollution" of the 'gnome' meta
+ ;; package. See:
+ ;; <http://lists.gnu.org/archive/html/guix-devel/2016-03/msg00283.html>.
+ gtk+
+ libexif
+ libxml2))
(native-search-paths
(list (search-path-specification
(variable "NAUTILUS_EXTENSION_PATH")
--
2.34.0
P
P
Pierre Langlois wrote on 12 Jan 2022 01:24
(address . 53195-done@debbugs.gnu.org)
871r1dvlxc.fsf@gmx.com
Pierre Langlois <pierre.langlois@gmx.com> writes:

Toggle quote (11 lines)
> [[PGP Signed Part:Undecided]]
> Hi Guix!
>
> I noticed nautilus fails to build and saw there was a patch upstream so
> here's a patch! I've also added a patch to update nautilus to 41.1 and
> adjust its style while I was there. The patch will only be in nautilus
> 42 though.
>
> These patches are pretty trivial so I'll push them in the next few hours
> unless somebody beats me to it :-).

Pushed with

a9678953ea0be55fb40500066ddeb2451298a190
5b0a7fd9ad3f3e3fbb89bd19dc90490f4bc5ca4a
857dc1cc64aa365cd6ba79a55b1e8f2f667c5d20

And gnome builds again! :-)

Thanks,
Pierre
-----BEGIN PGP SIGNATURE-----

iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmHeID8YHHBpZXJyZS5s
YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UmBkIAIUsVJ/EHysMywdM9evmc1/0
K9K9F6mYZOYV6YV09TIGkfPj91CQ7l+Pmpll373Wj/LaPOz+uEz7pYHagjApROGB
Jsmeab2gSmFYy3DtruhRw/qaXjNn8fjTfujHbpi6nNHL6Z5hFPMDc3Cqxx3KTKC8
7MYOssvQw/ukXmwVWpzJQ/T2/j5ePv72qdfw62PYibklEkLhBDFSDZDjOaGWrAs7
DfV7lH0CECw1N3EFRwik4Ct4znpdhxwotuBo6wWhZxu7NpfPQ5kGjyP/yy11nufx
3//8fVXdE4fWqZG8mHsoiP5c/NuAVxDLeD+2FFqDqQHdhmKCEpJVRFHwFvZ/TSE=
=w5nY
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 53195
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