--- /dev/null
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_EAUTORECONF="yes"
+
+inherit gnome2 systemd
+
+DESCRIPTION="D-Bus interfaces for querying and manipulating user account information"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/AccountsService/"
+SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+IUSE="doc elogind +introspection selinux systemd"
+REQUIRED_USE="?? ( elogind systemd )"
+
+CDEPEND="
+ >=dev-libs/glib-2.44:2
+ sys-auth/polkit
+ elogind? ( >=sys-auth/elogind-229.4 )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.12:= )
+ systemd? ( >=sys-apps/systemd-186:0= )
+ !systemd? ( !elogind? ( sys-auth/consolekit ) )
+"
+DEPEND="${CDEPEND}
+ dev-libs/libxslt
+ dev-util/gdbus-codegen
+ >=dev-util/gtk-doc-am-1.15
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+ doc? (
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto )
+"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-accountsd )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.6.35-gentoo-system-users.patch
+
+ # lib: don't set loaded state until seat is fetched (from 'master')
+ "${FILESDIR}"/${P}-loaded-state.patch
+)
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-static \
+ --disable-more-warnings \
+ --localstatedir="${EPREFIX}"/var \
+ --enable-admin-group="wheel" \
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+ $(use_enable doc docbook-docs) \
+ $(use_enable elogind) \
+ $(use_enable introspection) \
+ $(use_enable systemd)
+}
--- /dev/null
+From c7fa612023a163e8b2352e1170c6df3fceb19b27 Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode@redhat.com>
+Date: Thu, 19 Jul 2018 13:14:09 -0400
+Subject: lib: don't set loaded state until seat is fetched
+
+At the moment we set is-loaded on the user-manager
+object as soon as we start fetching the seat, but
+we should waiting until the seat is fetched, so
+that can_switch() will return the correct value
+if the caller waited until the loaded signal
+to use it.
+
+This commit changes the >= to > which I believe
+was the original intention anyway.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=107298
+---
+ src/libaccountsservice/act-user-manager.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c
+index 325421b..e7e26b1 100644
+--- a/src/libaccountsservice/act-user-manager.c
++++ b/src/libaccountsservice/act-user-manager.c
+@@ -2382,7 +2382,7 @@ maybe_set_is_loaded (ActUserManager *manager)
+ /* Don't set is_loaded yet unless the seat is already loaded enough
+ * or failed to load.
+ */
+- if (manager->priv->seat.state >= ACT_USER_MANAGER_SEAT_STATE_GET_ID) {
++ if (manager->priv->seat.state > ACT_USER_MANAGER_SEAT_STATE_GET_ID) {
+ g_debug ("ActUserManager: Seat loaded, so now setting loaded property");
+ } else if (manager->priv->seat.state == ACT_USER_MANAGER_SEAT_STATE_UNLOADED) {
+ g_debug ("ActUserManager: Seat wouldn't load, so giving up on it and setting loaded property");
+--
+cgit v1.1
+