mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-libs/libportal: add 0.9.1 w/ IUSE qt6, python3_13, drop virtualx
Thanks-to: Paul Zander <negril.nx+gentoo@gmail.com> Thanks-to: Mathieu Gollain <mathieu.gollain@zero-sum.fr> Closes: https://github.com/gentoo/gentoo/pull/38065 Closes: https://github.com/gentoo/gentoo/pull/39717 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST libportal-0.7.1.tar.xz 74268 BLAKE2B b519fa88735d640a74e18cc791ec69862f136b793a7c855b1f3873cf6b15626d69088747f1a7ff54f8cd96f79e82e3df31e5349e3da57906e769b8f809f4ba34 SHA512 cbc50bfd86787fffc975fc53835acc6c3c0fd54b7ee02fce1983f1bd0fc40b15a0537780cd5e943ecedcf951840080a0f55a23a96e706223e52a6144ee70332c
|
||||
DIST libportal-0.9.1.tar.xz 108572 BLAKE2B 3574d141a42802a38b6e276848bff86a557b77e3ab1f269cf9ccf59f0706ee68271c90c2e81ff8593fd271c5edb6d51dab86ff18a9ff5147f00b74e18f3b8e7d SHA512 445f0c9295220668123b9b3503bb5e75edef3ea939d6f28b159c0ded2f017b35b35e8a6013f550ac6a1f8a5fb9f04c93ce5ced39694bd14731da19172649c895
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/libportal/meson.build
|
||||
+++ b/libportal/meson.build
|
||||
@@ -280,7 +280,7 @@
|
||||
|
||||
if meson.version().version_compare('>= 0.63.0')
|
||||
have_cpp = add_languages('cpp', required: get_option('backend-qt6'), native: false)
|
||||
- qt6_dep = dependency('qt6', modules: ['Core', 'Gui', 'Widgets'], private_headers: true, required: get_option('backend-qt6'))
|
||||
+ qt6_dep = dependency('qt6', modules: ['Core', 'Gui'], private_headers: true, required: get_option('backend-qt6'))
|
||||
|
||||
if have_cpp and qt6_dep.found()
|
||||
qt6_headers = ['portal-qt6.h']
|
||||
101
dev-libs/libportal/libportal-0.9.1.ebuild
Normal file
101
dev-libs/libportal/libportal-0.9.1.ebuild
Normal file
@@ -0,0 +1,101 @@
|
||||
# Copyright 2022-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
inherit flag-o-matic meson python-any-r1 vala
|
||||
|
||||
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,-qt6}.so
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
IUSE="gtk gtk-doc +introspection qt6 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[wayland?,X?]
|
||||
>=gui-libs/gtk-4.12.5-r2:4[wayland?,X?]
|
||||
)
|
||||
qt6? ( dev-qt/qtbase:6=[gui] )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
dev-util/glib-utils
|
||||
virtual/pkgconfig
|
||||
gtk-doc? ( dev-util/gi-docgen )
|
||||
test? (
|
||||
qt6? ( dev-qt/qttools:6[linguist] )
|
||||
${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=( "${FILESDIR}/${P}-bogus-qt6widgets.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)
|
||||
-Dbackend-qt5=disabled
|
||||
$(meson_feature qt6 backend-qt6)
|
||||
-Dportal-tests=false
|
||||
$(meson_use introspection)
|
||||
$(meson_use vala vapi)
|
||||
$(meson_use gtk-doc docs)
|
||||
$(meson_use test tests)
|
||||
)
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x QT_QPA_PLATFORM=offscreen
|
||||
meson_src_test
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user