From a957e967b10cb1ad87e5e01239b90b954f9eb532 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Tue, 9 Mar 2021 02:14:56 -0500 Subject: [PATCH 2/3] gnu: Add qtsolutions. * gnu/packages/qt.scm (qtsolutions): New variable. --- gnu/packages/qt.scm | 95 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 11e69ff5db..96efbce7fc 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -105,6 +105,101 @@ #:use-module (gnu packages xml) #:use-module (srfi srfi-1)) +(define-public qtsolutions + (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702") + (revision "53")) + (package + (name "qtsolutions") + (version + (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/qtproject/qt-solutions") + (commit commit))) + (file-name + (git-file-name name version)) + (sha256 + (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n")))) + (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* (find-files "." "common.pri") + ;; Remove prefix in library names. + (("qt5") "qt") + ;; Remove suffix in library names. + (("-head") "")) + ;; Disable building of examples. + (substitute* (find-files "." "\\.pro$") + (("SUBDIRS\\+=examples") "")) + ;; Fix deprecated functions. + (substitute* "qtsoap/src/qtsoap.cpp" + (("toAscii") "toUtf8")) + #t)) + (replace 'configure + (lambda _ + (for-each (lambda (solution) + (with-directory-excursion solution + (invoke "./configure" "-library") + (invoke "qmake"))) + '("qtlockedfile" "qtpropertybrowser" "qtservice" + "qtsingleapplication" "qtsoap")) + #t)) + (replace 'build + (lambda _ + (for-each (lambda (solution) + (with-directory-excursion solution + (invoke "make"))) + '("qtlockedfile" "qtpropertybrowser" "qtservice" + "qtsingleapplication" "qtsoap")) + #t)) + (replace 'install + (lambda args + ;; Remove an redundant header file, + ;; before it gets attempted for installation. + (delete-file "qtsingleapplication/src/qtlockedfile.h") + (for-each (lambda (solution) + (with-directory-excursion solution + (apply (assoc-ref copy:%standard-phases 'install) + #:install-plan + '(("src" "include" + #:include-regexp ("\\.h$")) + ("lib" "lib")) + args))) + '("qtlockedfile" "qtpropertybrowser" "qtservice" + "qtsingleapplication" "qtsoap"))))))) + (inputs + `(("qtbase" ,qtbase))) + (synopsis "Qt Solutions") + (description "QtSolutions are set of components that extends Qt. +@itemize +@item QtLockedFile: A class that extends QFile with advisory locking functions. +@item QtPropertyBrowser: A framework that enables the user to edit a set of +properties. +@item QtService: A component useful for developing Windows services and Unix +daemons. +@item QtSingleApplication: A component that provides support for applications +that can be only started once per user. +@item QtSoap: A component that provides basic web service support with version +1.1 of the SOAP protocol. +@end itemize\n") + (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html") + (license license:lgpl2.1+)))) + (define-public qt5ct (package (name "qt5ct") -- 2.30.1