diff mbox series

[bug#47042] gnu: qtsolutions: Enable examples.

Message ID 4eb6a0a4-7c99-5f7c-4c2d-edf6e71d87e5@raghavgururajan.name
State Accepted
Headers show
Series [bug#47042] gnu: qtsolutions: Enable examples. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Raghav Gururajan March 10, 2021, 3 p.m. UTC
Hi Leo!

>> Then I guess we have to rewrite that Makefile (or pseudo-Makefile) in
>> the snippet as well?
>>
>> I don't think the compiled examples need to be installed at all –
>> rather their source code etc. should be installed to share/doc (in a
>> qtsolutions subfolder of course).  The act of compiling them is merely
>> a check, that they (plus the code they are an example of) "work as
>> intended" or at least compile as intended.
> 
> Never mind this patch then. I started working on this, thinking that 
> example binaries might be useful. So I'll close this report.

FWIW, can you merge the attached patch please? It enables building of 
examples, except for qtsingleapplication.

Regards,
RG.

Comments

Leo Prikler March 10, 2021, 3:15 p.m. UTC | #1
Am Mittwoch, den 10.03.2021, 10:00 -0500 schrieb Raghav Gururajan:
> Hi Leo!
> 
> > > Then I guess we have to rewrite that Makefile (or pseudo-
> > > Makefile) in
> > > the snippet as well?
> > > 
> > > I don't think the compiled examples need to be installed at all –
> > > rather their source code etc. should be installed to share/doc
> > > (in a
> > > qtsolutions subfolder of course).  The act of compiling them is
> > > merely
> > > a check, that they (plus the code they are an example of) "work
> > > as
> > > intended" or at least compile as intended.
> > 
> > Never mind this patch then. I started working on this, thinking
> > that 
> > example binaries might be useful. So I'll close this report.
> 
> FWIW, can you merge the attached patch please? It enables building
> of 
> examples, except for qtsingleapplication.
I don't think the problem with disabling examples is bad enough to
warrant this kind of "hot fix".  I'd rather patch in all examples at
once if that's possible.

Regards,
Leo
Raghav Gururajan March 10, 2021, 3:28 p.m. UTC | #2
Hi Leo!

> I don't think the problem with disabling examples is bad enough to
> warrant this kind of "hot fix".  I'd rather patch in all examples at
> once if that's possible.

Cool!

Regards,
RG.
diff mbox series

Patch

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(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index d921aa87fe..f3b2c5e8ed 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -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