custom version of libportal with inputcapture
This commit is contained in:
parent
dc80b5bfd2
commit
c300b72235
|
@ -0,0 +1 @@
|
|||
DIST libportal-0.7.1.tar.xz 74268 BLAKE2B b519fa88735d640a74e18cc791ec69862f136b793a7c855b1f3873cf6b15626d69088747f1a7ff54f8cd96f79e82e3df31e5349e3da57906e769b8f809f4ba34 SHA512 cbc50bfd86787fffc975fc53835acc6c3c0fd54b7ee02fce1983f1bd0fc40b15a0537780cd5e943ecedcf951840080a0f55a23a96e706223e52a6144ee70332c
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,47 @@
|
|||
From 6cd7c2ab82575b76f876ee2bd2d31f6cb77f022f Mon Sep 17 00:00:00 2001
|
||||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Tue, 26 Dec 2023 14:35:46 +0000
|
||||
Subject: [PATCH] pyportaltest: Only create one session bus per DBusTestCase
|
||||
subclass
|
||||
|
||||
DBusTestCase.start_session_bus() is a class method, and can only be
|
||||
called once per class, because DBusTestCase.tearDownClass() will only
|
||||
clean up one session bus. In older versions of dbusmock, calling it more
|
||||
than once will result in dbus-daemon processes being leaked; since
|
||||
0.30.0, calling it more than once will result in an assertion failure.
|
||||
|
||||
Resolves: https://github.com/flatpak/libportal/issues/136
|
||||
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1058245
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
---
|
||||
tests/pyportaltest/__init__.py | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/pyportaltest/__init__.py b/tests/pyportaltest/__init__.py
|
||||
index af053c2a..80f04a91 100644
|
||||
--- a/tests/pyportaltest/__init__.py
|
||||
+++ b/tests/pyportaltest/__init__.py
|
||||
@@ -83,6 +83,14 @@ def setUpClass(cls):
|
||||
except AttributeError:
|
||||
pytest.skip("Updated version of dbusmock required")
|
||||
|
||||
+ cls.__have_session_bus = False
|
||||
+
|
||||
+ @classmethod
|
||||
+ def ensure_session_bus(cls):
|
||||
+ if not cls.__have_session_bus:
|
||||
+ cls.__have_session_bus = True
|
||||
+ cls.start_session_bus()
|
||||
+
|
||||
def setUp(self):
|
||||
self.p_mock = None
|
||||
self._mainloop = None
|
||||
@@ -96,7 +104,7 @@ def setup_daemon(self, params=None, extra_templates: List[Tuple[str, Dict]] = []
|
||||
portal name as first value and the param dict to be passed to that
|
||||
template as second value, e.g. ("ScreenCast", {...}).
|
||||
"""
|
||||
- self.start_session_bus()
|
||||
+ self.ensure_session_bus()
|
||||
self.p_mock, self.obj_portal = self.spawn_server_template(
|
||||
template=f"pyportaltest/templates/{self.PORTAL_NAME.lower()}.py",
|
||||
parameters=params,
|
|
@ -0,0 +1,118 @@
|
|||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
inherit flag-o-matic meson python-any-r1 vala virtualx
|
||||
|
||||
DESCRIPTION="Flatpak portal library"
|
||||
HOMEPAGE="https://github.com/flatpak/libportal"
|
||||
SRC_URI="https://github.com/flatpak/libportal/releases/download/${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0/1-1-1-1" # soname of libportal{,-gtk3,-gtk4,-qt5}.so
|
||||
KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86"
|
||||
IUSE="gtk gtk-doc +introspection qt5 test +vala wayland X"
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="
|
||||
gtk-doc? ( introspection )
|
||||
vala? ( introspection )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/glib-2.58:2
|
||||
introspection? ( dev-libs/gobject-introspection:= )
|
||||
gtk? (
|
||||
>=x11-libs/gtk+-3.24.41-r1:3[X?,wayland?]
|
||||
>=gui-libs/gtk-4.12.5-r2:4[X?,wayland?]
|
||||
)
|
||||
qt5? (
|
||||
dev-qt/qtcore:=
|
||||
dev-qt/qtgui:=
|
||||
dev-qt/qtx11extras:=
|
||||
dev-qt/qtwidgets:=
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
qt5? (
|
||||
test? ( dev-qt/qttest:= )
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
dev-util/glib-utils
|
||||
virtual/pkgconfig
|
||||
gtk-doc? ( dev-util/gi-docgen )
|
||||
qt5? (
|
||||
test? ( dev-qt/linguist-tools )
|
||||
)
|
||||
test? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_any_dep '
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/dbus-python[${PYTHON_USEDEP}]
|
||||
dev-python/python-dbusmock[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
vala? ( $(vala_depend) )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# backport fix for tests incompatibility with dbusmock 0.30.0
|
||||
"${FILESDIR}"/6cd7c2ab82575b76f876ee2bd2d31f6cb77f022f.patch
|
||||
)
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version \
|
||||
"dev-python/pytest[${PYTHON_USEDEP}]" \
|
||||
"dev-python/dbus-python[${PYTHON_USEDEP}]" \
|
||||
"dev-python/python-dbusmock[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use test; then
|
||||
python-any-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
vala_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# defang automagic dependencies
|
||||
use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND
|
||||
use X || append-cflags -DGENTOO_GTK_HIDE_X11
|
||||
|
||||
local emesonargs=(
|
||||
$(meson_feature gtk backend-gtk3)
|
||||
$(meson_feature gtk backend-gtk4)
|
||||
$(meson_feature qt5 backend-qt5)
|
||||
-Dportal-tests=false
|
||||
$(meson_use introspection)
|
||||
$(meson_use vala vapi)
|
||||
$(meson_use gtk-doc docs)
|
||||
$(meson_use test tests)
|
||||
)
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests only exist for Qt5
|
||||
if use qt5; then
|
||||
virtx meson_src_test
|
||||
else
|
||||
# run meson_src_test to notice if tests are added
|
||||
meson_src_test
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
meson_src_install
|
||||
|
||||
if use gtk-doc; then
|
||||
mkdir -p "${ED}"/usr/share/gtk-doc/html/ || die
|
||||
mv "${ED}"/usr/share/doc/${PN}-1 "${ED}"/usr/share/gtk-doc/html/ || die
|
||||
fi
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
inherit flag-o-matic meson python-any-r1 vala virtualx
|
||||
|
||||
DESCRIPTION="Flatpak portal library"
|
||||
HOMEPAGE="https://github.com/flatpak/libportal"
|
||||
SRC_URI="https://github.com/flatpak/libportal/releases/download/${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0/1-1-1-1" # soname of libportal{,-gtk3,-gtk4,-qt5}.so
|
||||
KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86"
|
||||
IUSE="gtk gtk-doc +introspection inputcapture qt5 test +vala wayland X"
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="
|
||||
gtk-doc? ( introspection )
|
||||
vala? ( introspection )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/glib-2.58:2
|
||||
introspection? ( dev-libs/gobject-introspection:= )
|
||||
gtk? (
|
||||
>=x11-libs/gtk+-3.24.41-r1:3[X?,wayland?]
|
||||
>=gui-libs/gtk-4.12.5-r2:4[X?,wayland?]
|
||||
)
|
||||
qt5? (
|
||||
dev-qt/qtcore:=
|
||||
dev-qt/qtgui:=
|
||||
dev-qt/qtx11extras:=
|
||||
dev-qt/qtwidgets:=
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
qt5? (
|
||||
test? ( dev-qt/qttest:= )
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
dev-util/glib-utils
|
||||
virtual/pkgconfig
|
||||
gtk-doc? ( dev-util/gi-docgen )
|
||||
qt5? (
|
||||
test? ( dev-qt/linguist-tools )
|
||||
)
|
||||
test? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_any_dep '
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/dbus-python[${PYTHON_USEDEP}]
|
||||
dev-python/python-dbusmock[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
vala? ( $(vala_depend) )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# backport fix for tests incompatibility with dbusmock 0.30.0
|
||||
"${FILESDIR}"/6cd7c2ab82575b76f876ee2bd2d31f6cb77f022f.patch
|
||||
)
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version \
|
||||
"dev-python/pytest[${PYTHON_USEDEP}]" \
|
||||
"dev-python/dbus-python[${PYTHON_USEDEP}]" \
|
||||
"dev-python/python-dbusmock[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use test; then
|
||||
python-any-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
if use inputcapture; then
|
||||
eapply "${FILESDIR}"/0001-Input-capture-support.patch
|
||||
fi
|
||||
vala_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# defang automagic dependencies
|
||||
use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND
|
||||
use X || append-cflags -DGENTOO_GTK_HIDE_X11
|
||||
|
||||
local emesonargs=(
|
||||
$(meson_feature gtk backend-gtk3)
|
||||
$(meson_feature gtk backend-gtk4)
|
||||
$(meson_feature qt5 backend-qt5)
|
||||
-Dportal-tests=false
|
||||
$(meson_use introspection)
|
||||
$(meson_use vala vapi)
|
||||
$(meson_use gtk-doc docs)
|
||||
$(meson_use test tests)
|
||||
)
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests only exist for Qt5
|
||||
if use qt5; then
|
||||
virtx meson_src_test
|
||||
else
|
||||
# run meson_src_test to notice if tests are added
|
||||
meson_src_test
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
meson_src_install
|
||||
|
||||
if use gtk-doc; then
|
||||
mkdir -p "${ED}"/usr/share/gtk-doc/html/ || die
|
||||
mv "${ED}"/usr/share/doc/${PN}-1 "${ED}"/usr/share/gtk-doc/html/ || die
|
||||
fi
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
inherit meson python-any-r1 vala virtualx
|
||||
|
||||
DESCRIPTION="Flatpak portal library"
|
||||
HOMEPAGE="https://github.com/flatpak/libportal"
|
||||
SRC_URI="https://github.com/flatpak/libportal/releases/download/${PV}/${P}.tar.xz"
|
||||
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0/1-1-1-1" # soname of libportal{,-gtk3,-gtk4,-qt5}.so
|
||||
KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86"
|
||||
IUSE="gtk gtk-doc +introspection qt5 test +vala"
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="
|
||||
gtk-doc? ( introspection )
|
||||
vala? ( introspection )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/glib-2.58:2
|
||||
introspection? ( dev-libs/gobject-introspection:= )
|
||||
gtk? (
|
||||
x11-libs/gtk+:3
|
||||
gui-libs/gtk:4
|
||||
)
|
||||
qt5? (
|
||||
dev-qt/qtcore:=
|
||||
dev-qt/qtgui:=
|
||||
dev-qt/qtx11extras:=
|
||||
dev-qt/qtwidgets:=
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
qt5? (
|
||||
test? ( dev-qt/qttest:= )
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
dev-util/glib-utils
|
||||
virtual/pkgconfig
|
||||
gtk-doc? ( dev-util/gi-docgen )
|
||||
qt5? (
|
||||
test? ( dev-qt/linguist-tools )
|
||||
)
|
||||
test? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_any_dep '
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/dbus-python[${PYTHON_USEDEP}]
|
||||
dev-python/python-dbusmock[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
vala? ( $(vala_depend) )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# backport fix for tests incompatibility with dbusmock 0.30.0
|
||||
"${FILESDIR}"/6cd7c2ab82575b76f876ee2bd2d31f6cb77f022f.patch
|
||||
)
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version \
|
||||
"dev-python/pytest[${PYTHON_USEDEP}]" \
|
||||
"dev-python/dbus-python[${PYTHON_USEDEP}]" \
|
||||
"dev-python/python-dbusmock[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use test; then
|
||||
python-any-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
vala_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local emesonargs=(
|
||||
$(meson_feature gtk backend-gtk3)
|
||||
$(meson_feature gtk backend-gtk4)
|
||||
$(meson_feature qt5 backend-qt5)
|
||||
-Dportal-tests=false
|
||||
$(meson_use introspection)
|
||||
$(meson_use vala vapi)
|
||||
$(meson_use gtk-doc docs)
|
||||
$(meson_use test tests)
|
||||
)
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests only exist for Qt5
|
||||
if use qt5; then
|
||||
virtx meson_src_test
|
||||
else
|
||||
# run meson_src_test to notice if tests are added
|
||||
meson_src_test
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
meson_src_install
|
||||
|
||||
if use gtk-doc; then
|
||||
mkdir -p "${ED}"/usr/share/gtk-doc/html/ || die
|
||||
mv "${ED}"/usr/share/doc/${PN}-1 "${ED}"/usr/share/gtk-doc/html/ || die
|
||||
fi
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?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>
|
||||
<upstream>
|
||||
<remote-id type="github">flatpak/libportal</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
Loading…
Reference in New Issue