commit:     449ff656f92846237d68ae3f27b3ab2aedd62da8
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 24 15:42:07 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct 25 00:27:39 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=449ff656

net-libs/libaccounts-glib: python3_9, fix assert failure

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../libaccounts-glib-1.25-assert-failure.patch     | 26 +++++++++
 .../libaccounts-glib-1.25-r2.ebuild                | 62 ++++++++++++++++++++++
 2 files changed, 88 insertions(+)

diff --git 
a/net-libs/libaccounts-glib/files/libaccounts-glib-1.25-assert-failure.patch 
b/net-libs/libaccounts-glib/files/libaccounts-glib-1.25-assert-failure.patch
new file mode 100644
index 00000000000..f35aee5c6a8
--- /dev/null
+++ b/net-libs/libaccounts-glib/files/libaccounts-glib-1.25-assert-failure.patch
@@ -0,0 +1,26 @@
+From 29bdc47abe11d3bfcec7a35ed83475eba04bfdaa Mon Sep 17 00:00:00 2001
+From: Pekka Vuorela <pekka.vuor...@jolla.com>
+Date: Tue, 7 Jul 2020 12:51:50 +0300
+Subject: [PATCH] Avoid assert failure on ag_provider_get_tags
+
+---
+ libaccounts-glib/ag-provider.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/libaccounts-glib/ag-provider.c b/libaccounts-glib/ag-provider.c
+index 93d1541..8a79616 100644
+--- a/libaccounts-glib/ag-provider.c
++++ b/libaccounts-glib/ag-provider.c
+@@ -464,6 +464,9 @@ GList *ag_provider_get_tags (AgProvider *provider)
+ {
+     g_return_val_if_fail (provider != NULL, NULL);
+ 
++    if (G_UNLIKELY (provider->tags == NULL))
++        return NULL;
++
+     return g_hash_table_get_keys (provider->tags);
+ }
+ 
+-- 
+GitLab
+

diff --git a/net-libs/libaccounts-glib/libaccounts-glib-1.25-r2.ebuild 
b/net-libs/libaccounts-glib/libaccounts-glib-1.25-r2.ebuild
new file mode 100644
index 00000000000..7b08a98a220
--- /dev/null
+++ b/net-libs/libaccounts-glib/libaccounts-glib-1.25-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+inherit meson python-r1 vala
+
+DESCRIPTION="Accounts SSO (Single Sign-On) management library for GLib 
applications"
+HOMEPAGE="https://gitlab.com/accounts-sso/libaccounts-glib";
+SRC_URI="https://gitlab.com/accounts-sso/${PN}/-/archive/VERSION_${PV}/${PN}-VERSION_${PV}.tar.gz
 -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="doc"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+       dev-db/sqlite:3
+       dev-libs/glib:2
+       dev-libs/gobject-introspection:=
+       dev-libs/libxml2
+       dev-python/pygobject:3[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       $(vala_depend)
+       dev-util/gdbus-codegen
+       dev-util/glib-utils
+       dev-libs/check
+       doc? ( dev-util/gtk-doc )
+"
+
+# fails
+RESTRICT="test"
+
+S="${WORKDIR}/${PN}-VERSION_${PV}"
+
+PATCHES=( "${FILESDIR}/${P}-assert-failure.patch" )
+
+src_prepare() {
+       default
+       vala_src_prepare --ignore-use
+
+       use doc || sed -e "/^subdir('docs')$/d" -i meson.build || die
+}
+
+src_configure() {
+       python_foreach_impl run_in_build_dir meson_src_configure
+}
+
+src_compile() {
+       python_foreach_impl run_in_build_dir meson_src_compile
+}
+
+src_install() {
+       einstalldocs
+       python_foreach_impl run_in_build_dir meson_src_install
+       python_foreach_impl python_optimize
+}

Reply via email to