diff mbox

[1/8] gnu: qt: Update to 5.6.1-1.

Message ID 20160729082357.17501-1-david@craven.ch
State New
Headers show

Commit Message

David Craven July 29, 2016, 8:23 a.m. UTC
* gnu/packages/qt.scm (qt): Update to 5.6.1-1.
---
 gnu/packages/qt.scm | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

Comments

Ludovic Courtès July 29, 2016, 7:20 p.m. UTC | #1
David Craven <david@craven.ch> skribis:

> * gnu/packages/qt.scm (qt): Update to 5.6.1-1.

I think there are 3 patches here: the update, the switch to
‘modify-phases’, and the thing that disables examples.  Could you
separate them?

> +       (modify-phases %standard-phases
> +         (add-after 'configure 'patch-bin-sh
> +           (lambda _
> +             (substitute* '("qtbase/config.status"
> +                            "qtbase/configure"
> +                            "qtbase/mkspecs/features/qt_functions.prf"
> +                            "qtbase/qmake/library/qmakebuiltins.cpp")
> +                          (("/bin/sh") (which "sh")))
                             ^
This should be aligned with the ‘u’ of ‘substitute*’.

It seems like these substitutions could be added to the existing ones
int the ‘configure’ phase.

Otherwise LGTM.

Could you send updated patches?

Thank you!

Ludo’.
David Craven July 29, 2016, 7:23 p.m. UTC | #2
Andreas said exactly the same thing!! Wow.

I think he's already taking care of this, our conversation went off
the mailing list...
Andreas Enge July 30, 2016, 8:53 a.m. UTC | #3
Sorry, the below message was intended to be cc-ed to the list,
but I apparently forgot.

Andreas

On Fri, Jul 29, 2016 at 08:00:53PM +0200, Andreas Enge wrote:
> Hello,
> 
> On Fri, Jul 29, 2016 at 03:01:21PM +0200, David Craven wrote:
> > The reason why I'm hesitant to split this into three, apart from my
> > personal opinion that that's overkill, I'd rather not build qt three
> > times... If you really want me to I'll do it, but I'm not really sure
> > what -no-mips_dspr2 even does =P
> 
> I am just quietly recompiling Qt over and over again :-)  It just takes
> a long waiting time. We had actually not planned to upgrade the monolithic
> Qt any more; rather, it is supposed to disappear once our current packages
> have migrated to the more modular one. So even if we update once again,
> please continue to try solving your build problem with the modular Qt.
> 
> I will also check whether our packages currently relying on the monolithic Qt
> still compile; otherwise I would not push the upgrade so shortly (let us
> hope so!) before a new Guix release.
> 
> So I will commit the update in time, thank you for your patience.
Andreas Enge July 30, 2016, 8:57 a.m. UTC | #4
On Fri, Jul 29, 2016 at 09:20:48PM +0200, Ludovic Courtès wrote:
> > +       (modify-phases %standard-phases
> > +         (add-after 'configure 'patch-bin-sh
> > +           (lambda _
> > +             (substitute* '("qtbase/config.status"
> > +                            "qtbase/configure"
> > +                            "qtbase/mkspecs/features/qt_functions.prf"
> > +                            "qtbase/qmake/library/qmakebuiltins.cpp")
> > +                          (("/bin/sh") (which "sh")))
>                              ^
> This should be aligned with the ‘u’ of ‘substitute*’.

I need indentation help again! I thought we either indented like this:

(function 1
          2
          3)
with the first argument following the procedure name; or like this:

(function
  1
  2
  3)
with the first argument on the next line.

So I misunderstood, and it is actually
(function 1
  2
  3)
in the first case?

Andreas
Ludovic Courtès July 30, 2016, 10:44 p.m. UTC | #5
Andreas Enge <andreas@enge.fr> skribis:

> On Fri, Jul 29, 2016 at 09:20:48PM +0200, Ludovic Courtès wrote:
>> > +       (modify-phases %standard-phases
>> > +         (add-after 'configure 'patch-bin-sh
>> > +           (lambda _
>> > +             (substitute* '("qtbase/config.status"
>> > +                            "qtbase/configure"
>> > +                            "qtbase/mkspecs/features/qt_functions.prf"
>> > +                            "qtbase/qmake/library/qmakebuiltins.cpp")
>> > +                          (("/bin/sh") (which "sh")))
>>                              ^
>> This should be aligned with the ‘u’ of ‘substitute*’.
>
> I need indentation help again! I thought we either indented like this:
>
> (function 1
>           2
>           3)

Good.

> with the first argument following the procedure name; or like this:
>
> (function
>   1
>   2
>   3)
> with the first argument on the next line.

Works as well, but aligned with ‘f’; the first option is preferred.

> So I misunderstood, and it is actually
> (function 1
>   2
>   3)
> in the first case?

Bad.

See
<https://www.gnu.org/software/guix/manual/html_node/Formatting-Code.html>
and the rest of the code base.

Bonus to whoever posts indentation rules for their favorite editor!  :-)

Ludo’.
Danny Milosavljevic July 31, 2016, 10:34 a.m. UTC | #6
> Bonus to whoever posts indentation rules for their favorite editor!  :-)

Is there a standalone program that reformats Scheme code to what we want it to be? 

It would be best if such a program just automatically normalized all the files for us. There's no reason this needs to stay a degree of freedom where every single person has to manually make sure it's the same regardless.
Andreas Enge July 31, 2016, 10:37 a.m. UTC | #7
On Sun, Jul 31, 2016 at 12:34:12PM +0200, Danny Milosavljevic wrote:
> Is there a standalone program that reformats Scheme code to what we want it to be? 
> It would be best if such a program just automatically normalized all the files for us. There's no reason this needs to stay a degree of freedom where every single person has to manually make sure it's the same regardless.

That would be great, especially to run it once over all our source files.
I tend to program by copy-paste, which also pastes random indentation errors
from random packages.

Andreas
Ludovic Courtès July 31, 2016, 10:59 a.m. UTC | #8
Danny Milosavljevic <dannym@scratchpost.org> skribis:

>> Bonus to whoever posts indentation rules for their favorite editor!  :-)
>
> Is there a standalone program that reformats Scheme code to what we want it to be? 

There’s Emacs, which can be invoked for batch processing.  I’m not sure
what the right incantation is.

Though to me, it sounds more productive to have $EDITOR do the right
thing.

Ludo’.
Andreas Enge Sept. 11, 2016, 4:35 p.m. UTC | #9
On Sun, Jul 31, 2016 at 12:59:02PM +0200, Ludovic Courtès wrote:
> Danny Milosavljevic <dannym@scratchpost.org> skribis:
> >> Bonus to whoever posts indentation rules for their favorite editor!  :-)
> > Is there a standalone program that reformats Scheme code to what we want it to be? 
> There’s Emacs, which can be invoked for batch processing.  I’m not sure
> what the right incantation is.
> 
> Though to me, it sounds more productive to have $EDITOR do the right
> thing.

Well, that would be optimal, but there are so many editors in the wild...
So I still think it would be good to have a batch processor, or at least
a recipe for non-emacs users on which keys to press to obtain correct
indentation, like so (from my vague memory of emacs):
 run "emacs module.scm"
 press "n" or "arrow down" until you arrive on the package recipe
 alternate "tab" and "n" until you arrive at the end of the recipe
 press "ctrl-x ctrl-somethingelse"

Also, it might be good to do one commit that fixes all indentations,
since I tend to copy wrongly indented code (from my own and other people's
recipes).

Andreas
diff mbox

Patch

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index f246550..dbd6a0a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -60,7 +60,7 @@ 
 (define-public qt
   (package
     (name "qt")
-    (version "5.5.1")
+    (version "5.6.1-1")
     (source (origin
              (method url-fetch)
              (uri
@@ -71,8 +71,8 @@ 
                  "/single/qt-everywhere-opensource-src-"
                  version ".tar.xz"))
              (sha256
-               (base32
-                 "0615cn4n3n78v48lnmapqz2jizm2pzrjwvsjlnsf4awrsiiqw0kg"))
+              (base32
+               "1nrn2wivjwdxc9q03gpsi336gcl9l2axi0xjbzsha5v6akmsf26f"))
              (modules '((guix build utils)))
              (snippet
               '(begin
@@ -151,8 +151,16 @@ 
        ;; A more structural fix is needed.
        #:parallel-build? #f
        #:phases
-         (alist-replace
-          'configure
+       (modify-phases %standard-phases
+         (add-after 'configure 'patch-bin-sh
+           (lambda _
+             (substitute* '("qtbase/config.status"
+                            "qtbase/configure"
+                            "qtbase/mkspecs/features/qt_functions.prf"
+                            "qtbase/qmake/library/qmakebuiltins.cpp")
+                          (("/bin/sh") (which "sh")))
+             #t))
+         (replace 'configure
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (substitute* '("configure" "qtbase/configure")
@@ -167,6 +175,10 @@ 
                       "-prefix" out
                       "-opensource"
                       "-confirm-license"
+                      ;; Do not build examples; if desired, these could go
+                      ;; into a separate output, but for the time being, we
+                      ;; prefer to save the space and build time.
+                      "-nomake" "examples"
                       ;; Most "-system-..." are automatic, but some use
                       ;; the bundled copy by default.
                       "-system-sqlite"
@@ -189,8 +201,7 @@ 
                       "-no-avx"
                       "-no-avx2"
                       "-no-mips_dsp"
-                      "-no-mips_dspr2"))))
-          %standard-phases)))
+                      "-no-mips_dspr2"))))))))
     (home-page "http://qt-project.org/")
     (synopsis "Cross-platform GUI library")
     (description "Qt is a cross-platform application and UI framework for