summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2024-03-16 20:21:26 +0200
committerMart Raudsepp <leio@gentoo.org>2024-03-17 00:06:37 +0200
commit4682908b4ab386eadbcb7e923ac4d6f136dd9ce4 (patch)
treec65971814ab5ad99c7857d838e3c62f3c8ef3494 /dev-libs/folks
parentnet-im/swift: fix compilation with libxml2-2.12 (diff)
downloadgentoo-4682908b4ab386eadbcb7e923ac4d6f136dd9ce4.tar.gz
gentoo-4682908b4ab386eadbcb7e923ac4d6f136dd9ce4.tar.bz2
gentoo-4682908b4ab386eadbcb7e923ac4d6f136dd9ce4.zip
dev-libs/folks: add 0.15.7, fix tests handling
Intentionally not yet 0.15.8 as upstream mirrored tarball was accidentally made bad and equals 0.15.7 tag instead of the 0.15.8 tag. Fix tests passing when they shouldn't (missing die), avoid bogus warnings in tests when flatpak is installed and fix tests (that now would fail due to the fix to make them fail when they don't pass) with python-dbusmock-0.30.1 or newer. Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'dev-libs/folks')
-rw-r--r--dev-libs/folks/Manifest1
-rw-r--r--dev-libs/folks/files/0.15.7-bluez-tests-dbusmock-0.30.1.patch28
-rw-r--r--dev-libs/folks/folks-0.15.7.ebuild106
3 files changed, 135 insertions, 0 deletions
diff --git a/dev-libs/folks/Manifest b/dev-libs/folks/Manifest
index 74f84e9500ed..2959c442751f 100644
--- a/dev-libs/folks/Manifest
+++ b/dev-libs/folks/Manifest
@@ -1 +1,2 @@
DIST folks-0.15.6.tar.xz 497968 BLAKE2B bb9237fae05a748a18a85d29034e879947c4ffcc1d3dbe7277c8e1f41e6e9c9ec27170e9e7d2ccb6dcc89789d331f7f320648620636e1ee54685906fc67ba4f9 SHA512 8d77c3b4c963d88877798b24da9edd977b3ac4b18568ed75885fa87bf81e0e8f29dc8232352e3fefc0bf2c9bb8ca6cea984d87d946a3892963a158bd4f45dc30
+DIST folks-0.15.7.tar.xz 502128 BLAKE2B b93146b216dd31dbc07cf770130593f830c01568aff3424bf4d0d8588ac651ea225ed6d3b38b9855d82dbef168605145a3a3de49706dd2ab31a4d368636dddf0 SHA512 52657b45678aa2418a44b0c8d332ac207eff18b02ca5c0d1491bdf8bae6552f30f2b6435804adc2a5fa66997f2cea09bdfe399dfaf52f3d8b7a5bde11b137c35
diff --git a/dev-libs/folks/files/0.15.7-bluez-tests-dbusmock-0.30.1.patch b/dev-libs/folks/files/0.15.7-bluez-tests-dbusmock-0.30.1.patch
new file mode 100644
index 000000000000..7ab37e0b1bc2
--- /dev/null
+++ b/dev-libs/folks/files/0.15.7-bluez-tests-dbusmock-0.30.1.patch
@@ -0,0 +1,28 @@
+From 9c3212cd6c3f4157e1b9afa5c90d054de1418acf Mon Sep 17 00:00:00 2001
+From: Niels De Graef <ndegraef@redhat.com>
+Date: Fri, 12 Jan 2024 22:57:42 +0100
+Subject: [PATCH] Revert "tests/bluez: Follow PairDevice() API change"
+
+This reverts commit b6b7d41aad9e36e0d0e6ec9822ed2e310923c8fd.
+
+See https://github.com/martinpitt/python-dbusmock/pull/192
+---
+ tests/lib/bluez/backend.vala | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/lib/bluez/backend.vala b/tests/lib/bluez/backend.vala
+index 72c688d3..023117e6 100644
+--- a/tests/lib/bluez/backend.vala
++++ b/tests/lib/bluez/backend.vala
+@@ -39,7 +39,7 @@ namespace org
+
+ [DBus (name = "PairDevice")]
+ public abstract void pair_device (string adapter_device_name,
+- string device_address, int class_=5898764) throws GLib.Error;
++ string device_address) throws GLib.Error;
+
+ [DBus (name = "BlockDevice")]
+ public abstract void block_device (string adapter_device_name,
+--
+GitLab
+
diff --git a/dev-libs/folks/folks-0.15.7.ebuild b/dev-libs/folks/folks-0.15.7.ebuild
new file mode 100644
index 000000000000..321ca83f3284
--- /dev/null
+++ b/dev-libs/folks/folks-0.15.7.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit gnome.org gnome2-utils meson python-any-r1 vala xdg
+
+DESCRIPTION="Library for aggregating people from multiple sources"
+HOMEPAGE="https://wiki.gnome.org/Projects/Folks https://gitlab.gnome.org/GNOME/folks"
+
+LICENSE="LGPL-2.1+"
+SLOT="0/26" # subslot = libfolks soname version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x86-linux"
+
+IUSE="bluetooth eds telepathy test utils"
+REQUIRED_USE="bluetooth? ( eds )"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ >=dev-libs/glib-2.58:2
+ >=dev-libs/libgee-0.10:0.8[introspection]
+ >=dev-libs/gobject-introspection-1.54:=
+ telepathy? (
+ >=net-libs/telepathy-glib-0.19.9
+ dev-libs/dbus-glib
+ )
+ eds? ( >=gnome-extra/evolution-data-server-3.38:= )
+ dev-libs/libxml2:2
+ utils? ( sys-libs/readline:0= )
+"
+# telepathy-mission-control needed at runtime; it is used by the telepathy
+# backend via telepathy-glib's AccountManager binding.
+RDEPEND="${DEPEND}
+ bluetooth? ( >=net-wireless/bluez-5[obex] )
+ telepathy? ( net-im/telepathy-mission-control )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=sys-devel/gettext-0.19.8
+ virtual/pkgconfig
+ $(vala_depend)
+ telepathy? ( net-libs/telepathy-glib[vala] )
+ eds? ( gnome-extra/evolution-data-server[vala] )
+ test? (
+ sys-apps/dbus
+ bluetooth? (
+ $(python_gen_any_dep '
+ >=dev-python/python-dbusmock-0.30.1[${PYTHON_USEDEP}]
+ ')
+ )
+ )
+"
+
+PATCHES=(
+ # implicit function declaration (Modern C porting):
+ # - https://bugs.gentoo.org/920098
+ # - https://gitlab.gnome.org/GNOME/folks/-/merge_requests/68
+ "${FILESDIR}"/folks-0.15.6-implicit-decl.patch
+ # Fix BluezBackend tests with python-dbusmock-0.30.1 and newer
+ "${FILESDIR}"/${PV}-bluez-tests-dbusmock-0.30.1.patch
+)
+
+python_check_deps() {
+ if use test && use bluetooth; then
+ python_has_version ">=dev-python/python-dbusmock-0.30.1[${PYTHON_USEDEP}]"
+ fi
+}
+
+src_prepare() {
+ default
+ vala_setup
+ xdg_environment_reset
+}
+
+src_configure() {
+ local emesonargs=(
+ $(meson_use bluetooth bluez_backend)
+ $(meson_use eds eds_backend)
+ $(meson_use eds ofono_backend)
+ $(meson_use telepathy telepathy_backend)
+ -Dzeitgeist=false # last rited package
+ -Dimport_tool=true
+ $(meson_use utils inspect_tool)
+ $(meson_use test tests)
+ -Dinstalled_tests=false
+ -Ddocs=false # Needs find_program sedding to specific version; only dev docs, don't bother
+ )
+ meson_src_configure
+}
+
+src_test() {
+ # Avoid warnings when /etc/profile.d/flatpak.sh from flatpak modified XDG_DATA_DIRS
+ export XDG_DATA_DIRS="${EPREFIX}"/usr/share
+ dbus-run-session meson test -C "${BUILD_DIR}" -t 5 || die "tests failed"
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+ gnome2_schemas_update
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+ gnome2_schemas_update
+}