summaryrefslogtreecommitdiff
path: root/sys-apps/xdg-desktop-portal
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-22 23:18:20 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-22 23:18:20 +0100
commit820b3cf4687f358703c643bacf3e5a06ccfa4402 (patch)
tree9cb7c40b4ec609b7d07a8ec876bdd3207d132bb9 /sys-apps/xdg-desktop-portal
parentf66a06e8f9736ea679bc3e95d8c8e90ff7c3f466 (diff)
gentoo auto-resync : 22:09:2023 - 23:18:20
Diffstat (limited to 'sys-apps/xdg-desktop-portal')
-rw-r--r--sys-apps/xdg-desktop-portal/Manifest7
-rw-r--r--sys-apps/xdg-desktop-portal/files/0001-meson.build-allow-linux-to-build-without-flatpak-ins.patch37
-rw-r--r--sys-apps/xdg-desktop-portal/files/0002-meson.build-allow-linux-to-build-without-bubblewrap.patch33
-rw-r--r--sys-apps/xdg-desktop-portal/files/0003-Make-flatpak-bwrap-optional.patch57
-rw-r--r--sys-apps/xdg-desktop-portal/metadata.xml4
-rw-r--r--sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.0-r1.ebuild (renamed from sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.0.ebuild)40
6 files changed, 165 insertions, 13 deletions
diff --git a/sys-apps/xdg-desktop-portal/Manifest b/sys-apps/xdg-desktop-portal/Manifest
index b6d985a413ae..348f8b43f044 100644
--- a/sys-apps/xdg-desktop-portal/Manifest
+++ b/sys-apps/xdg-desktop-portal/Manifest
@@ -1,7 +1,10 @@
+AUX 0001-meson.build-allow-linux-to-build-without-flatpak-ins.patch 1270 BLAKE2B 892318bc64ec5ff4eb1f4fe0b2d2e718dd278d59e3e1d2a67746fdcd60c3e74723e8696b73ab4c4436f2aa63e945cc03e6abfbb367ab39edcb7a11a703d57441 SHA512 2cff5d7feaf2c3eac46779105104160ec2b19a2330afd4366d54a6dce77366b72322b1896d711e462495fd79d56b4d9df0f389c6f29dc7a72447b2b2214c71b7
+AUX 0002-meson.build-allow-linux-to-build-without-bubblewrap.patch 1150 BLAKE2B b1dc54021e05b35e9a6478e0ed94e46498288d39901c98ce711cb3942a8cdaecde5c0d6d83cf275bf18960d7e8a74fca1c34375f3690f7a3fe9315ae575f707f SHA512 c7c751725b7a8bdb4151447822df33057c15e1406b2b524a7e3f5b16f71ff7492b2ba5687c111f3c6196a972753c6f46e2a401c9ed3ba015ed61168fd865f16a
+AUX 0003-Make-flatpak-bwrap-optional.patch 1993 BLAKE2B 967cfbf0936cd612a227935ecfe297d1df654c08fb0da3c6b344f7687d4bcbc43aca34e3b3b96318e4da13769b6286776996a67d35558a5152b67ef89e291dcc SHA512 ed6d0f5829a58b7ce7c665a564e14778e7302fa486251befa827f653abcf7b05a75cf71897029e293dc0c6561c902420ff62cd12e00082b634132f04d9a75584
AUX xdg-desktop-portal-1.16.0-delay-open-fix.patch 14123 BLAKE2B 92ad185c8ef9155b3285614a230b83bbd97d741772a51e27ee026c606ca9893dd5bdb8cf3882334e0f6abb687e819df0c08cd3d0aa144a72b37ad6da778f41ef SHA512 5d36d0259bea8d40f112861044fd8f8da77aec5144b3518d5c8d77b3cc2c86a84473a34e3c20a873d72427ad5caf02a97a1282a880cfcea620eab9fac18d39fc
AUX xdg-desktop-portal-1.18.0-sandbox-disable-failing-tests.patch 2444 BLAKE2B a93b089a7bbd23b258d28711a144982b9c102f7d0001b10a80d1f378da6965f7547ce11c4bfee8e534aa23b573b600d6a40d22877d6d9ddbe81f89d46dc73373 SHA512 99f87d9ed61cdf63af2449c1e2d2f3472db4fd21fa2baec7403bee6460146183a84af01ec18b13c1c072e5a7dd68b2e07a47b0e0886e4dffa09bf788d92ab5ec
DIST xdg-desktop-portal-1.16.0.tar.xz 250524 BLAKE2B 9d5bd760621b114a19c1cc8895f91c43fcfed0dd067ba9678de0f11dc7835ec29c4a2c452274adbd36ee1318359caa8d7ca0c585558eb73a2a4e53528e6b02da SHA512 f7e7e96d3a6757901fbc4c0310aac0afbf37882c279a2859e06f63528049cd9b50dd2d55445d1386f03f62557c1a2ec81d4ee081200367d6269d2dffc75f0912
DIST xdg-desktop-portal-1.18.0.tar.xz 260788 BLAKE2B 3a7575af17a5b21d6f313a098a9144df9d6f24768c6e16e4fb45382fac3c64aab3b361b29226769c8cc979c278ec61469f32841792bb0f4e7d9e83fc1fab40fc SHA512 416c0736342b2909c10db025da72edca6d106b46224341bdf45ab41152c01b97f4a4eb78df924a6fbc771475bf103c1aea3005d8ff683f1eca935dbd1afe4a51
EBUILD xdg-desktop-portal-1.16.0-r1.ebuild 1810 BLAKE2B df6be02fd06693018cd95e4bc76cde9aa852bac499febac04c8775a8df78875dc7463bdd509f7c4df1f7be46fb9116bf7c24a0ab10a5a7baf10278ec8a46642c SHA512 7a776e3a8b9614519408e23436c05ca18f4430090c0b8f8a5c0acd89469b56215767e191e712ac1cf11618f9ae23ea9fd9b13a6b6157119fc8dbe427ba2ce214
-EBUILD xdg-desktop-portal-1.18.0.ebuild 2536 BLAKE2B 141cc177c95845f9a706fec3aae21a44cbbe1fad800fcc058e82bb0dc722163b8a54b1b4ac9fa282140e54d30cdebda211a732c1967970abbf9a84d7eb3c6d25 SHA512 421aa9166b8415bb92ef47ce0d871306e4f35ce334b6b9801427b941d7cb71d4b9a86ba9e1f4bfed794c699ff91f60db1039f8d7c6cc53cf41783c860683bc9b
-MISC metadata.xml 341 BLAKE2B 5d5ab4565c6859d6c23908ad19dd01566dcdba5c93d8fe4e232a477dd3689c60549d24f9952cf30aa32220a8b926a5262ceb9674b6b2622d914c192482917662 SHA512 7810a57f4f26d983976932f5efec72f1eb5282a0b22594ae45dec37ca77cb550f9f86c139832412fd1e14e50671231b9f91829753d099b8c90dc3100651649b8
+EBUILD xdg-desktop-portal-1.18.0-r1.ebuild 3127 BLAKE2B 14ea42bb8c3ca47c93e94d3ec3196ea48f726d57efbe98149a9996326f634720abb5b2b05078cabae115046c4725db055d9ea41be0da552e7c0f5f0cba8e8c72 SHA512 e5600c0d1615f5af39e8375cf1dc72d3f54addb918f4937b3c72c6a39c3014d05c35667cdce2ef8f2a7d64eec665acce96652788bfae00c62989764e82edd9fa
+MISC metadata.xml 572 BLAKE2B 5d1abb01d74881886beab22900a545b0364cd7b48990577a153bdd1d8125d517b8a26c89382b0ceb9e127e0cbd11d7462d3d74908facb521295314ddf2699723 SHA512 ffaa7cfd28794dd57d1229e5839a28cf5b178c6416cf1817e7e6753c7460c22e96e2997f005b80b574d7f4b49e3a0e5d9f44101258824edb00e328caf449b9d5
diff --git a/sys-apps/xdg-desktop-portal/files/0001-meson.build-allow-linux-to-build-without-flatpak-ins.patch b/sys-apps/xdg-desktop-portal/files/0001-meson.build-allow-linux-to-build-without-flatpak-ins.patch
new file mode 100644
index 000000000000..9f758f7b5432
--- /dev/null
+++ b/sys-apps/xdg-desktop-portal/files/0001-meson.build-allow-linux-to-build-without-flatpak-ins.patch
@@ -0,0 +1,37 @@
+https://github.com/flatpak/xdg-desktop-portal/pull/1100
+
+From b734c44545276141b785dd31ff9c0c78a7801baa Mon Sep 17 00:00:00 2001
+From: "Anna (navi) Figueiredo Gomes" <navi@vlhl.dev>
+Date: Fri, 8 Sep 2023 22:07:06 +0200
+Subject: [PATCH 1/3] meson.build: allow linux to build without flatpak
+ installed
+
+the old automake scripts would allow for building without flatpak, as the
+xml file would just not be copied (because it doesn't exist) so it
+wouldn't be used to generate files.
+
+this allows similar behaviour by not requiring the flatpak dependency in
+meson.
+
+Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
+---
+ meson.build | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 2254c0d..2366d9e 100644
+--- a/meson.build
++++ b/meson.build
+@@ -21,8 +21,7 @@ endif
+
+ flatpak_intf_dir = get_option('flatpak-interfaces-dir')
+ if flatpak_intf_dir == ''
+- flatpak_required = host_machine.system() in ['linux']
+- flatpak_dep = dependency('flatpak', version: '>= 1.5.0', required : flatpak_required)
++ flatpak_dep = dependency('flatpak', version: '>= 1.5.0', required : false)
+ if flatpak_dep.found()
+ flatpak_intf_dir = flatpak_dep.get_variable(pkgconfig: 'interfaces_dir')
+ endif
+--
+2.42.0
+
diff --git a/sys-apps/xdg-desktop-portal/files/0002-meson.build-allow-linux-to-build-without-bubblewrap.patch b/sys-apps/xdg-desktop-portal/files/0002-meson.build-allow-linux-to-build-without-bubblewrap.patch
new file mode 100644
index 000000000000..ce10d326828f
--- /dev/null
+++ b/sys-apps/xdg-desktop-portal/files/0002-meson.build-allow-linux-to-build-without-bubblewrap.patch
@@ -0,0 +1,33 @@
+https://github.com/flatpak/xdg-desktop-portal/pull/1100
+
+From 8cf28b590ab23e94d6b80eaa6893ed51542d3dd8 Mon Sep 17 00:00:00 2001
+From: "Anna (navi) Figueiredo Gomes" <navi@vlhl.dev>
+Date: Sat, 9 Sep 2023 01:20:36 +0200
+Subject: [PATCH 2/3] meson.build: allow linux to build without bubblewrap
+
+per the same logic as flatpak, there's no reason to force bwrap as a
+dependency to build xdp under linux, as there is systems without bwrap
+that would want to be able to build xdp
+
+Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
+---
+ meson.build | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 2366d9e..ad7faae 100644
+--- a/meson.build
++++ b/meson.build
+@@ -112,8 +112,7 @@ libportal_dep = dependency('libportal',
+ pipewire_dep = dependency('libpipewire-0.3', version: '>= 0.2.90')
+ libsystemd_dep = dependency('libsystemd', required: get_option('systemd'))
+
+-bwrap_required = host_machine.system() in ['linux']
+-bwrap = find_program('bwrap', required: bwrap_required)
++bwrap = find_program('bwrap', required: false)
+
+ have_libportal = libportal_dep.found()
+ if have_libportal
+--
+2.42.0
+
diff --git a/sys-apps/xdg-desktop-portal/files/0003-Make-flatpak-bwrap-optional.patch b/sys-apps/xdg-desktop-portal/files/0003-Make-flatpak-bwrap-optional.patch
new file mode 100644
index 000000000000..78b0b3e522a2
--- /dev/null
+++ b/sys-apps/xdg-desktop-portal/files/0003-Make-flatpak-bwrap-optional.patch
@@ -0,0 +1,57 @@
+From 5b4ad3e7a9828df2cd06d663d89800c346f5051f Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 22 Sep 2023 17:35:21 +0100
+Subject: [PATCH] Make flatpak, bwrap optional
+
+See https://github.com/flatpak/xdg-desktop-portal/pull/1100
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ meson.build | 4 ++--
+ meson_options.txt | 8 ++++++++
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index ad7faae..933eb54 100644
+--- a/meson.build
++++ b/meson.build
+@@ -21,7 +21,7 @@ endif
+
+ flatpak_intf_dir = get_option('flatpak-interfaces-dir')
+ if flatpak_intf_dir == ''
+- flatpak_dep = dependency('flatpak', version: '>= 1.5.0', required : false)
++ flatpak_dep = dependency('flatpak', version: '>= 1.5.0', required : get_option('flatpak'))
+ if flatpak_dep.found()
+ flatpak_intf_dir = flatpak_dep.get_variable(pkgconfig: 'interfaces_dir')
+ endif
+@@ -112,7 +112,7 @@ libportal_dep = dependency('libportal',
+ pipewire_dep = dependency('libpipewire-0.3', version: '>= 0.2.90')
+ libsystemd_dep = dependency('libsystemd', required: get_option('systemd'))
+
+-bwrap = find_program('bwrap', required: false)
++bwrap = find_program('bwrap', required: get_option('bwrap'))
+
+ have_libportal = libportal_dep.found()
+ if have_libportal
+diff --git a/meson_options.txt b/meson_options.txt
+index edcbcd8..d1914ce 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -2,6 +2,14 @@ option('dbus-service-dir',
+ type: 'string',
+ value: '',
+ description: 'directory for dbus service files (default: PREFIX/share/dbus-1/services)')
++option('bwrap',
++ type: 'feature',
++ value: 'enabled',
++ description: 'Use bwrap (requires seccomp) for sandboxing for e.g. icon validation. Recommended.')
++option('flatpak',
++ type: 'feature',
++ value: 'enabled',
++ description: 'Enable flatpak integration')
+ option('flatpak-interfaces-dir',
+ type: 'string',
+ value: '',
+--
+2.42.0
+
diff --git a/sys-apps/xdg-desktop-portal/metadata.xml b/sys-apps/xdg-desktop-portal/metadata.xml
index 004564dfa989..0b034d09a049 100644
--- a/sys-apps/xdg-desktop-portal/metadata.xml
+++ b/sys-apps/xdg-desktop-portal/metadata.xml
@@ -5,6 +5,10 @@
<email>kde@gentoo.org</email>
<name>Gentoo KDE Project</name>
</maintainer>
+ <use>
+ <flag name="flatpak">Enable <pkg>sys-apps/flatpak</pkg> integration</flag>
+ <flag name="seccomp">Use <pkg>sys-apps/bubblewrap</pkg> (which requires seccomp) to sandbox some functionality like icon handling</flag>
+ </use>
<upstream>
<remote-id type="github">flatpak/xdg-desktop-portal</remote-id>
</upstream>
diff --git a/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.0.ebuild b/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.0-r1.ebuild
index c06c7f539604..0b47fc2c5796 100644
--- a/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.0.ebuild
+++ b/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.0-r1.ebuild
@@ -14,23 +14,25 @@ SRC_URI="https://github.com/flatpak/${PN}/releases/download/${PV}/${P}.tar.xz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
-IUSE="geolocation man systemd test"
+IUSE="geolocation flatpak seccomp systemd test"
RESTRICT="!test? ( test )"
+# Upstream expect flatpak to be used w/ seccomp and flatpak needs bwrap anyway
+REQUIRED_USE="flatpak? ( seccomp )"
DEPEND="
>=dev-libs/glib-2.66:2
dev-libs/json-glib
+ dev-python/docutils
+ >=media-video/pipewire-0.3:=
>=sys-fs/fuse-3.10.0:3[suid]
x11-libs/gdk-pixbuf
geolocation? ( >=app-misc/geoclue-2.5.3:2.0 )
- >=media-video/pipewire-0.3:=
+ flatpak? ( sys-apps/flatpak )
+ seccomp? ( sys-apps/bubblewrap )
systemd? ( sys-apps/systemd )
- test? (
- dev-libs/libportal
- )
- man? ( dev-python/docutils )
"
-RDEPEND="${DEPEND}
+RDEPEND="
+ ${DEPEND}
sys-apps/dbus
"
BDEPEND="
@@ -39,8 +41,10 @@ BDEPEND="
virtual/pkgconfig
test? (
${PYTHON_DEPS}
+ dev-libs/libportal
$(python_gen_any_dep '
dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
dev-python/python-dbusmock[${PYTHON_USEDEP}]
')
)
@@ -49,28 +53,42 @@ BDEPEND="
PATCHES=(
# These tests require connections to pipewire, internet, /dev/fuse
"${FILESDIR}/${P}-sandbox-disable-failing-tests.patch"
+
+ # https://github.com/flatpak/xdg-desktop-portal/pull/1100
+ "${FILESDIR}/0001-meson.build-allow-linux-to-build-without-flatpak-ins.patch"
+ "${FILESDIR}/0002-meson.build-allow-linux-to-build-without-bubblewrap.patch"
+ "${FILESDIR}/0003-Make-flatpak-bwrap-optional.patch"
)
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
python_check_deps() {
python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" &&
+ python_has_version "dev-python/pytest-xdist[${PYTHON_USEDEP}]" &&
python_has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
}
src_configure() {
local emesonargs=(
-Ddbus-service-dir="${EPREFIX}/usr/share/dbus-1/services"
- -Dflatpak-interfaces-dir="${EPREFIX}/usr/share/dbus-1/interfaces"
-Dsystemd-user-unit-dir="$(systemd_get_userunitdir)"
- $(meson_feature test libportal) # Only used for tests
+ $(meson_feature flatpak)
+ # Only used for tests
+ $(meson_feature test libportal)
$(meson_feature geolocation geoclue)
+ $(meson_feature seccomp bwrap)
$(meson_feature systemd)
- -Ddocbook-docs=disabled # requires flatpak
+ # Requires flatpak
+ -Ddocbook-docs=disabled
# -Dxmlto-flags=
-Ddatarootdir="${EPREFIX}/usr/share"
+ -Dman-pages=enabled
-Dinstalled-tests=false
$(meson_feature test pytest)
- $(meson_feature man man-pages)
)
+
meson_src_configure
}