From c722c494d2a210b53bf869a874dbc7237bf64920 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Wed, 10 Mar 2021 03:09:38 -0500
Subject: [PATCH] gnu: qtsolutions: Enable building of examples, except for
qtsingleapplication.
* gnu/packages/qt.scm (qtsolutions) [arguments]: Modify phase 'patch-source.
---
gnu/packages/qt.scm | 39 ++++++++++++++++++++++-----------------
1 file changed, 22 insertions(+), 17 deletions(-)
@@ -2497,18 +2497,18 @@ securely. It will not store any data unencrypted unless explicitly requested.")
(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")))
+ (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
@@ -2528,12 +2528,17 @@ securely. It will not store any data unencrypted unless explicitly requested.")
;; Remove unnecessary prefixes/suffixes in library names.
(("qt5") "qt")
(("-head") ""))
- ;; Disable building of examples.
- (substitute* (find-files "." "\\.pro$")
+ ;; Disable building of examples for QtSingleApplication.
+ (substitute* "qtsingleapplication/qtsingleapplication.pro"
(("SUBDIRS\\+=examples") ""))
- ;; Fix deprecated functions.
- (substitute* "qtsoap/src/qtsoap.cpp"
- (("toAscii") "toUtf8"))
+ (with-directory-excursion "qtsoap/src"
+ ;; Patch Qt imports for QtSoap.
+ (substitute* "qtsoap.pri"
+ (("QT \\+= xml network")
+ "QT += core gui widgets xml network"))
+ ;; Fix deprecated functions.
+ (substitute* "qtsoap.cpp"
+ (("toAscii") "toUtf8")))
#t))
(replace 'configure
(lambda _
--
2.30.1