commit:     200628a102423dde245c298c81dd51129152a727
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sat Mar 30 17:41:55 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Apr  6 18:25:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=200628a1

net-libs/libaccounts-glib: add 1.27

* Enable python3.12
* Enable tests and put test dependencies behind a use flag.
* Still install python unconditionally, could be made optional at
  a later point.

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36000
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 net-libs/libaccounts-glib/Manifest                 |  1 +
 .../libaccounts-glib/libaccounts-glib-1.27.ebuild  | 77 ++++++++++++++++++++++
 2 files changed, 78 insertions(+)

diff --git a/net-libs/libaccounts-glib/Manifest 
b/net-libs/libaccounts-glib/Manifest
index 104dcd65bedf..37eb55a5088b 100644
--- a/net-libs/libaccounts-glib/Manifest
+++ b/net-libs/libaccounts-glib/Manifest
@@ -1 +1,2 @@
 DIST libaccounts-glib-1.26.tar.gz 117365 BLAKE2B 
a3c7bf4058372001079c9c153b30f947882521f1f9680a63db2883307e998335a1e646112dc8a51640824f238d871d96da2c18b4ef175c837cebfe056ded2cbb
 SHA512 
c08a11087745ba771e539b61de57693390960ad6b4e8217c159be49d31bd7f8856fffa835e7a230f352049bbf7cec9184ff225e74bbc195964221d3d9d49743b
+DIST libaccounts-glib-1.27.tar.bz2 88050 BLAKE2B 
12d4ded072584150d9011e7c684301cf407d822e42ef131cf5b2d1c370cb5f59f00991a52c27d444dfe654f743984a9b5e9983f204a1a4172e8730f8020a7662
 SHA512 
3a4ccc9193e69dcab1b6618da0dc628f5a2a7c57174f99adf690bef71bbcec0bde3957077411d0528e85447e9f0d037e3ee93c2a3d3b2e6404b257de34a6493c

diff --git a/net-libs/libaccounts-glib/libaccounts-glib-1.27.ebuild 
b/net-libs/libaccounts-glib/libaccounts-glib-1.27.ebuild
new file mode 100644
index 000000000000..64657ad3f041
--- /dev/null
+++ b/net-libs/libaccounts-glib/libaccounts-glib-1.27.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+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.bz2
 -> ${P}.tar.bz2"
+S="${WORKDIR}/${PN}-VERSION_${PV}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="doc test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="!test? ( test )"
+
+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
+       virtual/pkgconfig
+       doc? ( dev-util/gtk-doc )
+       test? (
+               dev-libs/check
+               dev-util/dbus-test-runner
+       )
+"
+
+src_prepare() {
+       default
+       vala_setup --ignore-use
+
+       use doc || sed -e "/^subdir('docs')$/d" -i meson.build || die
+       use test || sed -e "/^subdir('tests')$/d" -i meson.build || die
+
+       # /tmp isn't accessible from sandbox
+       sed -i -e "s|/tmp/\(.*\)|${T}/\1|" tests/check_ag.c || die
+       sed -i -e "s|/tmp|${T}|" tests/meson.build || die
+}
+
+src_configure() {
+       my_configure() {
+               local emesonargs=(
+                       -Dinstall-py-overrides=true
+               )
+               meson_src_configure
+       }
+       python_foreach_impl run_in_build_dir my_configure
+}
+
+src_compile() {
+       python_foreach_impl run_in_build_dir meson_src_compile
+}
+
+src_test() {
+       python_foreach_impl run_in_build_dir meson_src_test
+}
+
+src_install() {
+       einstalldocs
+       python_foreach_impl run_in_build_dir meson_src_install
+       python_foreach_impl python_optimize
+}

Reply via email to