Subject: bug#46985: closed (Re: [bug#46985] Psi+)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 20 Mar 2021 16:53:02 +0000

Your bug report

#46985: Psi+

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
46985: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46985
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#46985] Psi+
From: Nicolas Goaziou <[email-masked]>
To: Raghav Gururajan via Guix-patches via <[email-masked]>
Cc: Raghav Gururajan <[email-masked]>, Danny Milosavljevic <[email-masked]>, [email-masked]
Date: Sat, 20 Mar 2021 17:52:46 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Raghav Gururajan via Guix-patches via <[email-masked]> writes:

> Please find the attached patch-set to add Psi+ (fork of Psi),
> a Qt-based XMPP Client, to Guix.

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou

Subject: Psi+
From: Raghav Gururajan <[email-masked]>
To: [email-masked]
Cc: Danny Milosavljevic <[email-masked]>
Date: Sun, 7 Mar 2021 03:19:15 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello Guix!

Please find the attached patch-set to add Psi+ (fork of Psi), a Qt-based 
XMPP Client, to Guix.

Thank you!

Regards,
RG.
From 6fe8b909142b9748f2f7846ae8565ef4fce2d4e0 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Thu, 25 Feb 2021 16:02:10 -0500
Subject: [PATCH 1/4] gnu: Add usrsctp.

* gnu/packages/networking.scm (usrsctp): New variable.
---
 gnu/packages/networking.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 5e66ddc01e..8e297c90ee 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -142,6 +142,36 @@
   #:use-module (gnu packages xml)
   #:use-module (ice-9 match))
 
+(define-public usrsctp
+  (package
+    (name "usrsctp")
+    (version "0.9.5.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/sctplab/usrsctp")
+         (commit version)))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "10ndzkip8blgkw572n3dicl6mgjaa7kygwn3vls80liq92vf1sa9"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("which" ,which)))
+    (synopsis "SCTP user-land implementation")
+    (description "UsrSCTP is a portable SCTP userland stack.  SCTP is a message
+oriented, reliable transport protocol with direct support for multihoming that
+runs on top of IP or UDP, and supports both v4 and v6 versions.")
+    (home-page "https://github.com/sctplab/usrsctp/")
+    (license license:bsd-3)))
+
 (define-public axel
   (package
     (name "axel")
-- 
2.30.1

From acc991c0cc22ff0919ddf8cd8402b092a23d2d38 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Thu, 25 Feb 2021 19:45:04 -0500
Subject: [PATCH 2/4] gnu: Add qhttp.

* gnu/packages/web.scm (qhttp): New variable.
---
 gnu/packages/web.scm | 78 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 9892dde0b9..6af3dbb856 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -77,6 +77,7 @@
   #:use-module (guix build-system ant)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
@@ -170,6 +171,83 @@
   #:use-module (gnu packages xml)
   #:use-module ((srfi srfi-1) #:select (delete-duplicates)))
 
+(define-public qhttp
+  (package
+    (name "qhttp")
+    (version "3.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/azadkuh/qhttp")
+         (commit
+          (string-append "version-" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "0cx23g4y4k4v9p5ph6h7gfhp8sfy1gcdv1g6bl44hppar1y0zfdq"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:imported-modules
+       ((guix build copy-build-system)
+        ,@%gnu-build-system-modules)
+       #:modules
+       (((guix build copy-build-system)
+         #:prefix copy:)
+        (guix build gnu-build-system)
+        (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "commondir.pri"
+               (("\\$\\$PRJDIR/xbin")
+                (string-append (assoc-ref outputs "out") "/lib"))
+               (("-L")
+                "-lhttp_parser -L")
+               (("\\$\\$PRJDIR/3rdparty")
+                ""))
+             (substitute* "src/src.pro"
+               (("SOURCES  \\+= \\$\\$PRJDIR/3rdparty/http-parser/http_parser.c")
+                "")
+               (("HEADERS  \\+= \\$\\$PRJDIR/3rdparty/http-parser/http_parser.h")
+                ""))
+             (substitute* '("src/private/qhttpbase.hpp" "src/qhttpabstracts.cpp")
+               (("http-parser/http_parser.h")
+                "http_parser.h"))
+             #t))
+         (replace 'configure
+           (lambda _
+             (invoke "qmake")
+             #t))
+         (replace 'install
+           (lambda args
+             (apply (assoc-ref copy:%standard-phases 'install)
+                    #:install-plan
+                    '(("src" "include"
+                       #:include-regexp ("\\.hpp$")))
+                    args)))
+         (add-after 'install 'remove-examples
+           (lambda* (#:key outputs #:allow-other-keys)
+             (with-directory-excursion
+                 (string-append (assoc-ref outputs "out") "/lib")
+               (for-each delete-file
+                         (list
+                          "basic-server"
+                          "helloworld"
+                          "postcollector")))
+             #t)))))
+    (inputs
+     `(("http-parser" ,http-parser)
+       ("qtbase" ,qtbase)))
+    (synopsis "Qt-based HTTP Library")
+    (description "Qhttp is a light-weight and asynchronous HTTP library
+(both server & client) in Qt5 and c++14.")
+    (home-page "https://github.com/azadkuh/qhttp/")
+    (license license:expat)))
+
 (define-public httpd
   (package
     (name "httpd")
-- 
2.30.1

From 63b3688b925e5e638bda44f11d59b8d379736aa1 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Fri, 26 Feb 2021 16:16:02 -0500
Subject: [PATCH 3/4] gnu: Add qite.

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

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 11e69ff5db..c49251053d 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -105,6 +105,41 @@
   #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1))
 
+(define-public qite
+  (let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
+        (revision "74"))
+    (package
+      (name "qite")
+      (version
+       (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/Ri0n/qite")
+           (commit commit)))
+         (file-name
+          (git-file-name name version))
+         (sha256
+          (base32 "0jmmgy9pvk9hwwph1nwy7hxhczy8drhl4ymhnjjn6yx7bckssvsq"))))
+      (build-system qt-build-system)
+      (arguments
+       `(#:tests? #f                    ; No target
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'chdir
+             (lambda _
+               (chdir "libqite")
+               #t)))))
+      (inputs
+       `(("qtbase" ,qtbase)
+         ("qtmultimedia" ,qtmultimedia)))
+      (synopsis "Qt Interactive Text Elements")
+      (description "Qite allows to manage interactive elements on QTextEdit.")
+      (home-page "https://github.com/Ri0n/qite/")
+      (license license:asl2.0))))
+
 (define-public qt5ct
   (package
     (name "qt5ct")
-- 
2.30.1

From 38f17832c3841e584af6cd973ea179e9c6c465d9 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <[email-masked]>
Date: Sun, 7 Mar 2021 01:47:19 -0500
Subject: [PATCH 4/4] gnu: Add psi-plus.

* gnu/packages/messaging.scm (psi-plus): New variable.
---
 gnu/packages/messaging.scm | 135 +++++++++++++++++++++++++++++++++++++
 1 file changed, 135 insertions(+)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 6c40545fd5..039ec52c15 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -2775,4 +2775,139 @@ as phones, embedded computers or microcontrollers.")
     ;; Dual licensed.
     (license (list license:epl1.0 license:edl1.0))))
 
+(define-public psi-plus
+  (package
+    (name "psi-plus")
+    (version "1.5.1482")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/psi-plus/psi-plus-snapshots")
+         (commit version)))
+       (file-name
+        (git-file-name name version))
+       (modules '((guix build utils)))
+       (snippet
+        `(begin
+           (delete-file-recursively "3rdparty")))
+       (sha256
+        (base32 "0lcx616hchwf492m1dm8ddb4qd2pmgf703ajnnb0y9ky99kgg8q2"))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:imported-modules
+       (,@%qt-build-system-modules
+        (guix build glib-or-gtk-build-system))
+       #:modules
+       ((guix build qt-build-system)
+        ((guix build glib-or-gtk-build-system)
+         #:prefix glib-or-gtk:)
+        (guix build utils))
+       #:configure-flags
+       (list
+        "-DBUILD_PSIMEDIA=ON"           ; For A/V support
+        "-DENABLE_PLUGINS=ON"
+        "-DUSE_HUNSPELL=OFF"            ; Use Enchant instead
+        "-DUSE_ENCHANT=ON"
+        "-DUSE_CCACHE=OFF")             ; Not required
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("\\$\\{PROJECT_SOURCE_DIR\\}/3rdparty/http-parser/http_parser.h")
+                "")
+               (("\\$\\{PROJECT_SOURCE_DIR\\}/3rdparty/qhttp/qhttp.pro")
+                "")
+               (("\\$\\{PROJECT_SOURCE_DIR\\}/3rdparty/qite/qite.pro")
+                "")
+               (("add_subdirectory\\( 3rdparty \\)")
+                ""))
+             (substitute* "src/CMakeLists.txt"
+               (("\\$\\{PROJECT_SOURCE_DIR\\}/3rdparty/qite/libqite")
+                "")
+               (("\\$\\{PROJECT_SOURCE_DIR\\}/3rdparty/http-parser")
+                "")
+               (("\\$\\{PROJECT_SOURCE_DIR\\}/3rdparty/qhttp/src/private")
+                "")
+               (("\\$\\{PROJECT_SOURCE_DIR\\}/3rdparty/qhttp/src")
+                "")
+               (("\\$\\{PROJECT_SOURCE_DIR\\}/3rdparty")
+                "")
+               (("add_dependencies\\(\\$\\{PROJECT_NAME\\} qhttp\\)")
+                "target_link_libraries(${PROJECT_NAME} qhttp)"))
+             (substitute* "src/src.cmake"
+               (("include\\(\\$\\{PROJECT_SOURCE_DIR\\}/3rdparty/qite/libqite/libqite.cmake\\)")
+                "list(APPEND EXTRA_LIBS qite)"))
+             (substitute* '("src/filesharingmanager.h" "src/widgets/psirichtext.cpp"
+                            "src/filesharingmanager.cpp" "src/widgets/psitextview.cpp"
+                            "src/chatview_te.cpp" "src/msgmle.cpp")
+               (("qite.h")
+                "qite/qite.h")
+               (("qiteaudio.h")
+                "qite/qiteaudio.h")
+               (("qiteaudiorecorder.h")
+                "qite/qiteaudiorecorder.h"))
+             #t))
+         (add-after 'install 'wrap-env
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (for-each
+                (lambda (name)
+                  (let ((file (string-append out "/bin/" name))
+                        (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
+                        (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+                    (wrap-program file
+                      `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
+                      `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))
+                '("psi-plus")))
+             #t))
+         (add-after 'wrap-env 'glib-or-gtk-compile-schemas
+           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
+         (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
+           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
+    (native-inputs
+     `(("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("ruby" ,ruby)))
+    (inputs
+     `(("blake2" ,libb2)
+       ("dbus" ,dbus)
+       ("enchant" ,enchant)
+       ("glib" ,glib)
+       ("gstreamer" ,gstreamer)
+       ("gst-plugins-base" ,gst-plugins-base)
+       ("http-parser" ,http-parser)
+       ("libgcrypt" ,libgcrypt)
+       ("libgpg-error" ,libgpg-error)
+       ("libidn" ,libidn)
+       ("libotr" ,libotr)
+       ("libsignal-protocol-c" ,libsignal-protocol-c)
+       ("libtidy" ,tidy-html)
+       ("openssl" ,openssl)
+       ("qca" ,qca)
+       ("qhttp" ,qhttp)
+       ("qite" ,qite)
+       ("qtbase" ,qtbase)
+       ("qtkeychain" ,qtkeychain)
+       ("qtmultimedia" ,qtmultimedia)
+       ("qtsvg" ,qtsvg)
+       ("qtx11extras" ,qtx11extras)
+       ("usrsctp" ,usrsctp)
+       ("x11" ,libx11)
+       ("xext" ,libxext)
+       ("xcb" ,libxcb)
+       ("xss" ,libxscrnsaver)
+       ("zlib" ,zlib)))
+    (synopsis "Qt-based XMPP Client")
+    (description "Psi+ is a spin-off of Psi XMPP client.  It is a cross-platform
+powerful XMPP client designed for experienced users.")
+    (home-page "https://psi-plus.com/")
+    (license license:gpl2+)))
+
 ;;; messaging.scm ends here
-- 
2.30.1