Subject: Re: [PATCHES] KDE updates (5.90, 22.12.2)

From: Brendan Tildesley <[email-masked]>
Date: Wed, 16 Mar 2022 06:42:51 +0100 (CET)

Anyone mind giving me a hand with something?
I've been trying to package libaccounts-qt but I've been stuck for far too long
unable to figure out why it can't find libaccounts-glib, it should use pkg-config 
to like it finds glib and gobject, but qmake just reports

Project ERROR: libaccounts-glib development package not found

>From Accounts.pro, there is:
PKGCONFIG += \
	glib-2.0 \
	gobject-2.0 \
	libaccounts-glib

I was running qmake with strace but it wasn't showing anything that seemed all that useful,
and I can't see anything wrong with the libaccounts-glib package

any ideas?

From eafcfea1d7e30b1bcea12f64a2d0c20afb88d806 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <[email-masked]>
Date: Wed, 2 Mar 2022 08:29:54 +1100
Subject: [PATCH 1/2] gnu: Add libaccounts-glib.

* gnu/packages/qt.scm (libaccounts-glib): New variable.
---
 gnu/packages/qt.scm | 59 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 0163d02bc0..6d2e54783a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -48,6 +48,7 @@ (define-module (gnu packages qt)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt)
   #:use-module (guix gexp)
@@ -57,6 +58,7 @@ (define-module (gnu packages qt)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cups)
@@ -3123,3 +3125,60 @@ (define-public soqt
 also compatible with SGI and TGS Open Inventor, and the API is based on the API
 of the InventorXt GUI component toolkit.")
     (license license:bsd-3))))
+
+(define-public libaccounts-glib
+  (package
+    (name "libaccounts-glib")
+    (version "1.25")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/accounts-sso/libaccounts-glib")
+                    (commit (string-append version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "19rhk9f97m736d5ia26vfcbjp5kgi454558yhf9mrwm4iw5d9pk4"))))
+    (build-system meson-build-system)
+    (native-inputs
+     (list dbus pkg-config))
+    (inputs (list check
+                  gobject-introspection
+                  gtk-doc
+                  libxml2
+                  python
+                  python-pygobject
+                  sqlite
+                  glib
+                  `(,glib "bin")
+                  vala))
+    (arguments
+     (list
+      #:tests? #f ; one test fails.
+      #:imported-modules `((guix build python-build-system)
+                          ,@%meson-build-system-modules)
+      #:modules '(((guix build python-build-system) #:select
+                   (python-version))
+                  (guix build meson-build-system)
+                  (guix build utils))
+      ;; don't try installing to python store path.
+      #:configure-flags
+      #~(list (string-append
+               "-Dpy-overrides-dir=" #$output "/lib/python"
+               (python-version #$(this-package-input "python"))
+               "/site-packages/gi/overrides"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "dbus-run-session" "--" "meson" "test"
+                        "--print-errorlogs")))))))
+    (home-page "https://accounts-sso.gitlab.io/")
+    (synopsis "Accounts SSO (Single Sign-On) management library for GLib
+applications")
+    (description "Accounts SSO is a framework for application developers who
+wish to acquire, use and store web account details and credentials.  It
+handles the authentication process of an account and securely stores the
+credentials and service-specific settings.")
+    (license license:lgpl2.1+)))
-- 
2.34.0

From 7c0860a147d3b72f718ac3c06a202cd8181094d4 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <[email-masked]>
Date: Sat, 5 Mar 2022 11:46:47 +1100
Subject: [PATCH 2/2] . libaccounts-qt

---
 gnu/packages/qt.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 6d2e54783a..eebede4176 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -3182,3 +3182,33 @@ (define-public libaccounts-glib
 handles the authentication process of an account and securely stores the
 credentials and service-specific settings.")
     (license license:lgpl2.1+)))
+
+(define-public libaccounts-qt
+  (package
+    (name "libaccounts-qt")
+    (version "1.16")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/accounts-sso/libaccounts-qt")
+                    (commit (string-append "VERSION_" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1vmpjvysm0ld8dqnx8msa15hlhrkny02cqycsh4k2azrnijg0xjz"))))
+    (build-system gnu-build-system)
+    (native-inputs (list pkg-config qtbase-5 strace qttools))
+    (inputs (list doxygen
+                  libaccounts-glib
+                  glib))
+    (arguments
+     (list
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'configure
+            (lambda _ (invoke "qmake"))))))
+    (home-page "https://accounts-sso.gitlab.io/")
+    (synopsis "Qt5 bindings for libaccounts-glib")
+    (description (package-description libaccounts-glib))
+    (license #f)))
-- 
2.34.0