diff options
author | Raghav Gururajan <rg@raghavgururajan.name> | 2021-03-09 02:14:56 -0500 |
---|---|---|
committer | Leo Prikler <leo.prikler@student.tugraz.at> | 2021-03-10 00:19:49 +0100 |
commit | 92a432c1f83f1929ae41fb53c1cf9910836e6b3a (patch) | |
tree | fe7102e026747ab5e6fff3b7030e065eb6753375 | |
parent | afd83de0879f43f82e9f0765b710cc12808a7e1e (diff) | |
download | guix-92a432c1f83f1929ae41fb53c1cf9910836e6b3a.tar.gz |
gnu: Add qtsolutions.
* gnu/packages/qt.scm (qtsolutions): New variable. Signed-off-by: Leo Prikler <leo.prikler@student.tugraz.at>
-rw-r--r-- | gnu/packages/qt.scm | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 11e69ff5db..d921aa87fe 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -2473,6 +2473,117 @@ This package provides the Python bindings."))) securely. It will not store any data unencrypted unless explicitly requested.") (license license:bsd-3))) +(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")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-1))) + (snippet + ;; Unvendor QtLockFile from QtSingleApplication. + '(begin + (with-directory-excursion "qtsingleapplication/src" + (for-each delete-file + (find-files "." "qtlockedfile.*\\.(h|cpp)")) + (substitute* "qtsingleapplication.pri" + ;; Add include path of LockedFile. + (("INCLUDEPATH \\+=") + "INCLUDEPATH += ../../qtlockedfile/src") + ;; Link library of LockedFile. + (("LIBS \\+=") + "LIBS += -lQtSolutions_LockedFile")) + (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp") + (("#include \"qtlockedfile.*\\.cpp\"") "") + ;; Unwrap namespace added in the vendoring process. + (("QtLP_Private::QtLockedFile") + "QtLockedFile"))) + #t)))) + (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 unnecessary prefixes/suffixes in library names. + (("qt5") "qt") + (("-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 + (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 "Collection of Qt extensions") + (description "QtSolutions is a set of components extending 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 helper for writing services such as 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 (list license:bsd-3 + ;; QScriptParser and QScriptGrammar specifically allow + ;; redistribution under GPL3 or LGPL2.1 + license:gpl3 license:lgpl2.1))))) + (define-public qwt (package (name "qwt") |