commit:     780a34ac50aedf131ad9840e910d026eab4ca256
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  9 09:32:04 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Mar  9 09:57:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=780a34ac

xfce-base/xfce4-session: Install xdg-desktop-portal file

Closes: https://bugs.gentoo.org/915708
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 ...ession-4.18.3.ebuild => xfce4-session-4.18.3-r1.ebuild} | 14 +++++++++++++-
 ...ession-4.19.1.ebuild => xfce4-session-4.19.1-r1.ebuild} | 14 +++++++++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/xfce-base/xfce4-session/xfce4-session-4.18.3.ebuild 
b/xfce-base/xfce4-session/xfce4-session-4.18.3-r1.ebuild
similarity index 76%
rename from xfce-base/xfce4-session/xfce4-session-4.18.3.ebuild
rename to xfce-base/xfce4-session/xfce4-session-4.18.3-r1.ebuild
index 6c91ba8afe5f..0d8fcab79d15 100644
--- a/xfce-base/xfce4-session/xfce4-session-4.18.3.ebuild
+++ b/xfce-base/xfce4-session/xfce4-session-4.18.3-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -66,6 +66,18 @@ src_install() {
                startxfce4
        EOF
        dosym Xfce4 /etc/X11/Sessions/Xfce
+
+       if [[ -f ${ED}/usr/share/xdg-desktop-portal/xfce-portals.conf ]]; then
+               die "Please remove the xfce-portals.conf hack"
+       fi
+       insinto /usr/share/xdg-desktop-portal
+       # 
https://gitlab.xfce.org/xfce/xfce4-session/-/blob/master/xfce4-session/xfce-portals.conf
+       newins - xfce-portals.conf <<-EOF
+               [preferred]
+               default=gtk;
+               org.freedesktop.impl.portal.Wallpaper=xapp;gtk;
+               org.freedesktop.impl.portal.Screenshot=xapp;gtk;
+       EOF
 }
 
 pkg_postinst() {

diff --git a/xfce-base/xfce4-session/xfce4-session-4.19.1.ebuild 
b/xfce-base/xfce4-session/xfce4-session-4.19.1-r1.ebuild
similarity index 76%
rename from xfce-base/xfce4-session/xfce4-session-4.19.1.ebuild
rename to xfce-base/xfce4-session/xfce4-session-4.19.1-r1.ebuild
index 85ee23d89717..563047e907f0 100644
--- a/xfce-base/xfce4-session/xfce4-session-4.19.1.ebuild
+++ b/xfce-base/xfce4-session/xfce4-session-4.19.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -65,6 +65,18 @@ src_install() {
                startxfce4
        EOF
        dosym Xfce4 /etc/X11/Sessions/Xfce
+
+       if [[ -f ${ED}/usr/share/xdg-desktop-portal/xfce-portals.conf ]]; then
+               die "Please remove the xfce-portals.conf hack"
+       fi
+       insinto /usr/share/xdg-desktop-portal
+       # 
https://gitlab.xfce.org/xfce/xfce4-session/-/blob/master/xfce4-session/xfce-portals.conf
+       newins - xfce-portals.conf <<-EOF
+               [preferred]
+               default=gtk;
+               org.freedesktop.impl.portal.Wallpaper=xapp;gtk;
+               org.freedesktop.impl.portal.Screenshot=xapp;gtk;
+       EOF
 }
 
 pkg_postinst() {

Reply via email to