bug#43232: [PATCH] gnu: jack-2: Update to 1.9.14.

2020-09-15 Thread Mike Rosset


Mark H Weaver  writes:

> Earlier, I wrote:
>> In contrast, a call to 'substitute*' will silently start doing nothing,
>> and may easily be forgotten.  To make matters worse, a future version of
>> jack-2 might add another 'for' loop in that file, matching the same
>> pattern but where it is important that 'i' _not_ be initialized to 0.
>
> Sorry, I made a mistake in the details here, since the pattern applies
> only when 'i' is already initialized to 0, but the more general point
> still stands, namely that patches are more robust than 'substitute*' for
> fixing bugs, and less likely to be misapplied or left forgotten in a
> vestigial state after they are no longer needed.
>
>   Mark

 That change was not quite fitting right with me either.
So I appreciate the review and comments.  Thankful it's not needed with
1.9.14 and I'll take your comments into account in the future.

Mike





bug#43232: [PATCH] gnu: jack-2: Update to 1.9.14.

2020-09-15 Thread Mike Rosset


Mark H Weaver  writes:

> Efraim Flashner  writes:
>
>> On Mon, Sep 14, 2020 at 09:25:25PM -0700, Mike Rosset wrote:
>>> * gnu/packages/audio.scm (jack-2): Update to 1.9.14.
>>> [arguments]: new 'declare-for-int phase after unpack that declares 'i in the
>>> for initialize statement.  Add -lstdc++ to LDFLAGS 'set-linkflags phase
>>> ensures -lstdc++ is at the tail.
> [...]
>>> @@ -2047,8 +2047,18 @@ synchronous execution of all clients, and low 
>>> latency operation.")
>>> "--alsa")
>>> #:phases
>>> (modify-phases %standard-phases
>>> + (add-after 'unpack 'declare-for-int
>>> +   (lambda _
>>> + ;; Declare the for loop i incrementer.
>>> + (substitute* "dbus/sigsegv.c"
>>> +   (("for\\(i = 0") "for(int i = 0"))
>>> + #t))
>>
>> Any chance of an upstream bug number or something for this? It seems
>> like the type of thing that might be put into a snippet.
>
> I agree that somehow this fix should be in the 'origin', so that this
> fix will be in the output of "guix build --source".  However, I'd go
> further and suggest that it should be a patch instead of a call to
> 'substitute*'.
>
> Although patches are larger and a bit more work to create, they are far
> more robust.  When this bug is eventually fixed upstream, a patch to fix
> it will begin raising an error, alerting us that it's time to remove it.
>
> In contrast, a call to 'substitute*' will silently start doing nothing,
> and may easily be forgotten.  To make matters worse, a future version of
> jack-2 might add another 'for' loop in that file, matching the same
> pattern but where it is important that 'i' _not_ be initialized to 0.
> This 'substitute*' call, likely vestigial by that time but long since
> forgotten, could start silently introducing a new bug.
>
> What do you think?
>
>   Thanks,
> Mark

Hello Mark,

 Turns out version 1.9.14 is not effected by this. So the version bump
is good enough. I resubmitted a first in series with just the version
bump and linker change. Which Andreas has merged into master.

Mike





bug#43232: [PATCH 2/2] gnu: jack2: 'declare-for-int phase no longer required.

2020-09-15 Thread Mike Rosset


Andreas Enge  writes:

> On Tue, Sep 15, 2020 at 01:37:05AM -0700, Mike Rosset wrote:
>> Apologies, I just wanted to keep a series for posterity which normally
>> I'm terrible at. I should have mentioned you could just squash them.
>
> No problem, it is just less work for me to apply just one patch :)

Totally understandable. I'll remember this in the future.

> I pushed the commit, thanks a lot! The new jack2 now also compiles on
> aarch64, so the original problem is solved.
>
> Andreas

Thanks for reviewing this, much appreciated.

Mike





bug#43232: [PATCH 2/2] gnu: jack2: 'declare-for-int phase no longer required.

2020-09-15 Thread Mike Rosset


Andreas Enge  writes:

> Hello Mike,
>
> On Tue, Sep 15, 2020 at 12:48:02AM -0700, Mike Rosset wrote:
>> * gnu/packages/audio.scm (jack2): remove 'declare-for-int phase.
>> [arguements]: phases 'declare-for-int has been removed. since package now
>> builds.
>
> I am getting a bit lost; it looks like this patch has to be applied on top
> of your previous one. But since the previous one is not in master yet, there
> will be no point in pushing one patch, then another one that partially
> reverts the first one.
>
> Could you please just post a new patch with the one modification you propose,
> to be applied on master?
>
> Thanks,
>
> Andreas

Apologies, I just wanted to keep a series for posterity which normally
I'm terrible at. I should have mentioned you could just squash them.

I emailed a new first in series that squashed and improved the commit
message.

Hope that helps.

Mike





bug#43232: [PATCH] gnu: jack-2: Update to 1.9.14.

2020-09-15 Thread Mike Rosset
* gnu/packages/audio.scm (jack-2): Update to 1.9.14.
[arguments]: 'set-linkflags phase now adds -lstdc++ to the LDFLAGS
environment variable.

This fixes an issue that where the linker would fail with "undefined reference
to symbol '__gxx_personality_v0@@CXXABI_1.3" on aarch64-linux system.
---
 gnu/packages/audio.scm | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 38ee4f8bcc..fb98777290 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2030,7 +2030,7 @@ synchronous execution of all clients, and low latency 
operation.")
 (define-public jack-2
   (package (inherit jack-1)
 (name "jack2")
-(version "1.9.13")
+(version "1.9.14")
 (source (origin
  (method url-fetch)
  (uri (string-append "https://github.com/jackaudio/jack2/releases/;
@@ -2039,7 +2039,7 @@ synchronous execution of all clients, and low latency 
operation.")
  (file-name (string-append name "-" version ".tar.gz"))
  (sha256
   (base32
-   "1d1d403jn4366mqig6g8ghr8057b3rn7gs26b5p3rkal34j20qw2"
+   "0z11hf55a6mi8h50hfz5wry9pshlwl4mzfwgslghdh40cwv342m2"
 (build-system waf-build-system)
 (arguments
  `(#:tests? #f  ; no check target
@@ -2049,6 +2049,10 @@ synchronous execution of all clients, and low latency 
operation.")
(modify-phases %standard-phases
  (add-before 'configure 'set-linkflags
(lambda _
+ ;; Ensure -lstdc++ is the tail of LDFLAGS or the simdtests.cpp
+ ;; will not link with undefined reference to symbol
+ ;; '__gxx_personality_v0@@CXXABI_1.3'
+ (setenv "LDFLAGS" "-lstdc++")
  ;; Add $libdir to the RUNPATH of all the binaries.
  (substitute* "wscript"
((".*CFLAGS.*-Wall.*" m)
-- 
2.28.0






bug#43232: [PATCH 2/2] gnu: jack2: 'declare-for-int phase no longer required.

2020-09-15 Thread Mike Rosset
* gnu/packages/audio.scm (jack2): remove 'declare-for-int phase.
[arguements]: phases 'declare-for-int has been removed. since package now
builds.
---
 gnu/packages/audio.scm | 6 --
 1 file changed, 6 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 83c08b718e..fb98777290 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2047,12 +2047,6 @@ synchronous execution of all clients, and low latency 
operation.")
"--alsa")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'declare-for-int
-   (lambda _
- ;; Declare the for loop i incrementer.
- (substitute* "dbus/sigsegv.c"
-   (("for\\(i = 0") "for(int i = 0"))
- #t))
  (add-before 'configure 'set-linkflags
(lambda _
  ;; Ensure -lstdc++ is the tail of LDFLAGS or the simdtests.cpp
-- 
2.28.0






bug#43232: [PATCH] gnu: jack-2: Update to 1.9.14.

2020-09-15 Thread Mike Rosset


Efraim Flashner  writes:

> On Mon, Sep 14, 2020 at 09:25:25PM -0700, Mike Rosset wrote:
>> (modify-phases %standard-phases
>> + (add-after 'unpack 'declare-for-int
>> +   (lambda _
>> + ;; Declare the for loop i incrementer.
>> + (substitute* "dbus/sigsegv.c"
>> +   (("for\\(i = 0") "for(int i = 0"))
>> + #t))
>
> Any chance of an upstream bug number or something for this? It seems
> like the type of thing that might be put into a snippet.
>

That's a good idea, in retrospect Andreas did not report having this
issue.  Let me do a second in series that removes this hunk.

The second hunk resolves the undefined reference to symbol
'__gxx_personality_v0@@CXXABI_1.3 I think that change is a safe one..

Then I can do some follow up the for loop initialization
errors. Hopefully it's just not me effected by that error. I'll see
about making this a snippet as well.

Mike





bug#43232: [PATCH] gnu: jack-2: Update to 1.9.14.

2020-09-14 Thread Mike Rosset
* gnu/packages/audio.scm (jack-2): Update to 1.9.14.
[arguments]: new 'declare-for-int phase after unpack that declares 'i in the
for initialize statement.  Add -lstdc++ to LDFLAGS 'set-linkflags phase
ensures -lstdc++ is at the tail.

This fixes issues that cause jack-2 to not build on system aarh64-linux.
---
 gnu/packages/audio.scm | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 38ee4f8bcc..83c08b718e 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2030,7 +2030,7 @@ synchronous execution of all clients, and low latency 
operation.")
 (define-public jack-2
   (package (inherit jack-1)
 (name "jack2")
-(version "1.9.13")
+(version "1.9.14")
 (source (origin
  (method url-fetch)
  (uri (string-append "https://github.com/jackaudio/jack2/releases/;
@@ -2039,7 +2039,7 @@ synchronous execution of all clients, and low latency 
operation.")
  (file-name (string-append name "-" version ".tar.gz"))
  (sha256
   (base32
-   "1d1d403jn4366mqig6g8ghr8057b3rn7gs26b5p3rkal34j20qw2"
+   "0z11hf55a6mi8h50hfz5wry9pshlwl4mzfwgslghdh40cwv342m2"
 (build-system waf-build-system)
 (arguments
  `(#:tests? #f  ; no check target
@@ -2047,8 +2047,18 @@ synchronous execution of all clients, and low latency 
operation.")
"--alsa")
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'declare-for-int
+   (lambda _
+ ;; Declare the for loop i incrementer.
+ (substitute* "dbus/sigsegv.c"
+   (("for\\(i = 0") "for(int i = 0"))
+ #t))
  (add-before 'configure 'set-linkflags
(lambda _
+ ;; Ensure -lstdc++ is the tail of LDFLAGS or the simdtests.cpp
+ ;; will not link with undefined reference to symbol
+ ;; '__gxx_personality_v0@@CXXABI_1.3'
+ (setenv "LDFLAGS" "-lstdc++")
  ;; Add $libdir to the RUNPATH of all the binaries.
  (substitute* "wscript"
((".*CFLAGS.*-Wall.*" m)
-- 
2.28.0






bug#43232: jack2 fails to build on aarch64

2020-09-06 Thread Mike Rosset


Andreas Enge  writes:

> The error message is:
> [228/274] Compiling example-clients/simdtests.cpp
> ...
> [243/274] Linking build/example-clients/jack_simdtests
> ...
> ld: example-clients/simdtests.cpp.28.o: undefined reference to symbol 
> '__gxx_personality_v0@@CXXABI_1.3'
> ld: 
> /gnu/store/9xmlrmk7vnlzwq5049500r9lrcf6ikqq-gcc-7.5.0-lib/lib/libstdc++.so.6: 
> error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> ...
> Waf: Leaving directory `/tmp/guix-build-jack2-1.9.13.drv-0/jack2-1.9.13/build'
> Build failed
>  -> task in 'jack_simdtests' failed with exit status 1 (run with -v to 
> display more information)
> command "python" "waf" "build" failed with status 1
>
> Following the advice and running "python waf build -v", the executed gcc
> command is printed:
> Build failed
>  -> task in 'jack_simdtests' failed with exit status 1:
>   {task 281472893294736: cprogram simdtests.cpp.28.o -> jack_simdtests}
> ['/gnu/store/ap7hgyv4rjqmhg4a6cb6cypsh3g1f5q4-gcc-7.5.0/bin/gcc', 
> '-Wl,-rpath=/gnu/store/bwmp037cg6gfz31j9q441j800mvk7wva-jack2-1.9.13/lib', 
> 'example-clients/simdtests.cpp.28.o', 
> '-o/tmp/guix-build-jack2-1.9.13.drv-0/jack2-1.9.13/build/example-clients/jack_simdtests',
>  '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Lcommon', 
> '-L/gnu/store/zwrg5jwyj1222vyjdpmppijzhz04sqid-opus-1.3.1/lib', 
> '-L/gnu/store/mpm43myhw7difa8p3a9xnag3zb6pnn4b-dbus-1.12.16/lib', '-ljack', 
> '-lpthread', '-lopus', '-ldb', '-lrt', '-ldl', '-ldbus-1', '-lm']
>
> Andreas

undefined reference to symbol '__gxx_personality_v0@@CXXABI_1.3 looks
like a potentially gcc flag order issues.  Seems -lstdc++ should be at the
end of the g++ command invocation. I'll see if I'll have time today to look 
into this more.


Mike





bug#43221: webkitgtk fails to build on aarch64

2020-09-05 Thread Mike Rosset


Andreas Enge  writes:

> Hello,
>
> On Sat, Sep 05, 2020 at 04:18:47PM +0100, Pierre Langlois wrote:
>> That sounds familiar, I think I hit this issue a few weeks
>> back. But at the moment, it seems the CI has successfully built php for
>> aarch64 https://ci.guix.gnu.org/build/3166798/details
>
> from what I understood, the problem came after PHP. But I just now rebuilt
>   successfully built 
> /gnu/store/jq17bhswc6f2a6blwbqgqd076g2mlx1x-webkitgtk-2.28.4.drv
>   /gnu/store/pyfnmny69af9jdx9jx03asmvbvp9zi6m-webkitgtk-2.28.4-doc
>   /gnu/store/ydkc33il14ynnsjaabqfcm02fxvnc7xk-webkitgtk-2.28.4
> with "guix describe":
> Generation 5  Sep 01 2020 21:10:10(current)
>   guix 4546c0d
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: 4546c0dd2f58fe9a1b1e78120a33b8c276970f62
> on dover, which is an aarch64 machine.
>
> So Vitaliy, could you please try again, and if you still have a problem,
> provide us with more details?
>
> Andreas


Hello Andreas,

  It's working now on aarch64-linux. I'm using guix describe @
81ea278e05986f9ccee078bd00d4d7fc309dd19c at least it's serving
substitutes.

Also webkitgtk2 now is unblocked from building and I was able to build
for aarch64-linux.

Think we can close this now.

Mike





bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.

2020-01-15 Thread Mike Rosset


Pierre Neidhardt writes:

> Thank you, I've merged!
> qtwebengine is finally in, hooray!
>
> Thank you to you all, and big thanks to Mike for driving this effort!
>
> I committed a few changes to your commits:
>
> - I squashed the comment fixing commits.
> - Edited some more typos.
> - Removed "bug#38148: [PATCH n/p]" from the commit headline.
>
> Cheers!

Thanks for the fix ups and merge Pierre, It's appreciated.

Mike





bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.

2020-01-14 Thread Mike Rosset


Pierre Neidhardt writes:

> Mike Rosset  writes:
>
>>> Please apply the above pyqt change to a separate commit.
>>
>> I missed this comment with my new series. If this really needs to be
>> done, I'll have to redo all of the commits and resend the series. Can
>> this be avoided if possible?
>
> Yes, this is really necessary, commits must be atomic or else the log
> gets easily tangled.
>
> This is not hard to do though:
>
> - rebase-edit the offending commit ("r m" with magit), this will leave
>   git in a detached state.
>
> - Soft-reset HEAD~.
>
> - Commit the first changes to a new commit.
>
> - Commit the rest.
>
> Let me know if you need more help.
>

I've reworked the commit as suggested. I resent the series. Nothing else
has changed in the series other then I split the first commit into two.
And I problem broke git am or the bug thread. sorry in advance :(

Mike





bug#38148: [PATCH 5/5] gnu: qutebrowser: Improve comment sections.

2020-01-14 Thread Mike Rosset
* gnu/packages/web-browsers.scm (qutebrowser)[comments]: Improve the comment
  describing why qtwebengine is used as an input. Added punctuation to FIXME
  for test phase.
---
 gnu/packages/web-browsers.scm | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 035fdc1dd9..a44add3c0a 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -301,14 +301,13 @@ access.")
;; that it's __init__.py is used first.
("python-pyqtwebengine" ,python-pyqtwebengine)
("python-pyqt" ,python-pyqt)
-   ;; qtwebengine is not a direct input because it's already provided by
-   ;; python-pyqtwebengine.  It's included so we can wrap
-   ;; QTWEBENGINEPROCESS_PATH
+   ;; While qtwebengine is provided by python-pyqtwebengine.  It's
+   ;; included here so we can wrap QTWEBENGINEPROCESS_PATH
("qtwebengine" ,qtwebengine)))
 (arguments
- `( ;; FIXME: With the existance of qtwebengine, tests can now run.  But
-   ;; they are still disabled because test phase hangs. It's not readily
-   ;; apparent as to why
+ `(;; FIXME: With the existance of qtwebengine, tests can now run.  But
+   ;; they are still disabled because test phase hangs.  It's not readily
+   ;; apparent as to why.
#:tests? #f
#:phases
(modify-phases %standard-phases
-- 
2.24.1






bug#38148: [PATCH 1/5] gnu: python-pyqt: Substitute the full path of

2020-01-14 Thread Mike Rosset
* gnu/packages/qt.scm (python-pyqt)[phases]: When building
  python-pyqtwebengine qprinter.h can not be found.  This substitutes the full
  path of qprinter.h in the qprinter sip specification file.
---
 gnu/packages/qt.scm | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 514577678e..9f289aa6df 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1947,6 +1947,17 @@ module provides support functions to the automatically 
generated code.")
   ,@%gnu-build-system-modules)
#:phases
(modify-phases %standard-phases
+ ;; When building python-pyqtwebengine  can not be
+ ;; included. Here we substitute the full path to the header in the
+ ;; store.
+ (add-before 'configure 'substitute-source
+   (lambda* (#:key inputs  #:allow-other-keys)
+ (let* ((qtbase (assoc-ref inputs "qtbase"))
+(qtprinter.h (string-append "\"" qtbase 
"/include/qt5/QtPrintSupport/qprinter.h\"")))
+   (substitute* "sip/QtPrintSupport/qprinter.sip"
+ (("")
+  qtprinter.h))
+   #t)))
  (replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
  (let* ((out (assoc-ref outputs "out"))
-- 
2.24.1






bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.

2020-01-14 Thread Mike Rosset


Pierre Neidhardt writes:

> Mike Rosset  writes:
>
>>> Please apply the above pyqt change to a separate commit.
>>
>> I missed this comment with my new series. If this really needs to be
>> done, I'll have to redo all of the commits and resend the series. Can
>> this be avoided if possible?
>
> Yes, this is really necessary, commits must be atomic or else the log
> gets easily tangled.
>
> This is not hard to do though:
>
> - rebase-edit the offending commit ("r m" with magit), this will leave
>   git in a detached state.
>
> - Soft-reset HEAD~.
>
> - Commit the first changes to a new commit.
>
> - Commit the rest.
>
> Let me know if you need more help.
>

Forgive me. After I had replied here, I realized your suggestion was
the right way to go about this. I was tired and lazy when I responded.

I will fix the commits. I'm not sure how this will effect the series
worse case I'll just send the final series. We can treat this as a
squash in away.

Mike





bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.

2020-01-13 Thread Mike Rosset


>> + ;; store.
>> + (add-before 'configure 'substitute-source
>> +   (lambda* (#:key inputs  #:allow-other-keys)
>> + (let* ((qtbase (assoc-ref inputs "qtbase"))
>> +(qtprinter.h (string-append "\"" qtbase 
>> "/include/qt5/QtPrintSupport/qprinter.h\"")))
>> +   (substitute* "sip/QtPrintSupport/qprinter.sip"
>> + (("")
>> +  qtprinter.h))
>> +   #t)))
>>   (replace 'configure
>> (lambda* (#:key inputs outputs #:allow-other-keys)
>>   (let* ((out (assoc-ref outputs "out"))
>> @@ -1986,6 +1998,91 @@ framework.  The bindings are implemented as a set of 
>> Python modules and
>>  contain over 620 classes.")
>>  (license license:gpl3)))
>
> Please apply the above pyqt change to a separate commit.

I missed this comment with my new series. If this really needs to be
done, I'll have to redo all of the commits and resend the series. Can
this be avoided if possible?

> +(arguments
>> + `(#:modules ((srfi srfi-1)
>> +  ,@%gnu-build-system-modules)
>> +   #:phases
>> +   (modify-phases %standard-phases
>> + (replace 'configure
>> +   (lambda* (#:key inputs outputs #:allow-other-keys)
>> + (let* ((out (assoc-ref outputs "out"))
>> +(sipdir (string-append out "/share/sip"))
>> +(pyqt-sipdir (string-append
>> +  (assoc-ref inputs "python-pyqt") 
>> "/share/sip"))
>> +(python (assoc-ref inputs "python"))
>> +(python-version
>> + (last (string-split python #\-)))
>> +(python-major+minor
>> + (string-join
>> +  (take (string-split python-version #\.) 2)
>> +  "."))
>
> Use version-major+minor from (guix utils) instead?


This is not an easy fix, I actually snarfed this from python-pyqt. In
fact most of the python packages in this file use this
method. Unfortunately version-major+minor cannot take an input, it needs
to take a guix package record.

This creates some scoping issues, in order to get the version for
python. you would need to do something like

semi pseudo code.
--8<---cut here---start->8---
(begin (use-modules (gnu packages python)) (version-major+minor python))
--8<---cut here---end--->8---

This approach in theory works only when the input is python. But take
the scenario were the input changes to a specific python version. Then
our above code will still work but no longer produce the correct path.

How python-build-system handles this. Is the same way as this let. In
fact it looks like they wer copied verbatim.

Unfortunately these python packages don't use python setuptools. So
gnu-build-system is used instead. Even if we could use
python-build-system. This would just make the code more ascetically
pleasing. The underlying code would still be the same.

The string parsing is not pretty, but it at least functional. If the
input version changes the so probably will the path.

Mike





bug#38148: [PATCH 3/4] gnu: python-pyqt: Improved qprinter.h substitutition comment

2020-01-13 Thread Mike Rosset
* gnu/packages/qt.scm (python-pyqt)[comments]: And python-pyqtwebengine now
uses mkdir-p instead of a system call.
---
 gnu/packages/qt.scm | 13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index fcb297e99c..611c38a443 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1948,8 +1948,8 @@ module provides support functions to the automatically 
generated code.")
   ,@%gnu-build-system-modules)
#:phases
(modify-phases %standard-phases
- ;; When building python-pyqtwebengine  can not be
- ;; included. Here we substitute the full path to the header in the
+ ;; When building python-pyqtwebengine,  can not be
+ ;; included.  Here we substitute the full path to the header in the
  ;; store.
  (add-before 'configure 'substitute-source
(lambda* (#:key inputs  #:allow-other-keys)
@@ -2025,7 +2025,6 @@ contain over 620 classes.")
("qtsvg" ,qtsvg)
("qtdeclarative" ,qtdeclarative)
("qtwebchannel" ,qtwebchannel)
-   ("qtwebengine" ,qtwebengine)
("python-pyqt" ,python-pyqt)
("qtwebengine" ,qtwebengine)))
 (arguments
@@ -2044,14 +2043,13 @@ contain over 620 classes.")
  (last (string-split python #\-)))
 (python-major+minor
  (string-join
-  (take (string-split python-version #\.) 2)
-  "."))
+  (take (string-split python-version #\.) 2) "."))
 (lib (string-append out "/lib/python"
 python-major+minor
 "/site-packages/PyQt5"))
 (stubs (string-append lib "/PyQt5")))
 
-   (system* "mkdir" "-p" sipdir)
+   (mkdir-p sipdir)
(invoke "python" "configure.py"
"-w"
"--no-dist-info"
@@ -2072,8 +2070,7 @@ contain over 620 classes.")
 from pkgutil import extend_path
 __path__ = extend_path(__path__, __name__)
 ")))
-   #t)))
- )))
+   #t))
 (home-page 
"https://www.riverbankcomputing.com/software/pyqtwebengine/intro;)
 (synopsis "Python bindings for QtWebEngine")
 (description
-- 
2.24.1






bug#38148: [PATCH 4/4] gnu: qutebrowser: Improve comment sections.

2020-01-13 Thread Mike Rosset
* gnu/packages/web-browsers.scm (qutebrowser)[comments]: Improve the comment
  describing why qtwebengine is used as an input. Added punctuation to FIXME
  for test phase.
---
 gnu/packages/web-browsers.scm | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 035fdc1dd9..a44add3c0a 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -301,14 +301,13 @@ access.")
;; that it's __init__.py is used first.
("python-pyqtwebengine" ,python-pyqtwebengine)
("python-pyqt" ,python-pyqt)
-   ;; qtwebengine is not a direct input because it's already provided by
-   ;; python-pyqtwebengine.  It's included so we can wrap
-   ;; QTWEBENGINEPROCESS_PATH
+   ;; While qtwebengine is provided by python-pyqtwebengine.  It's
+   ;; included here so we can wrap QTWEBENGINEPROCESS_PATH
("qtwebengine" ,qtwebengine)))
 (arguments
- `( ;; FIXME: With the existance of qtwebengine, tests can now run.  But
-   ;; they are still disabled because test phase hangs. It's not readily
-   ;; apparent as to why
+ `(;; FIXME: With the existance of qtwebengine, tests can now run.  But
+   ;; they are still disabled because test phase hangs.  It's not readily
+   ;; apparent as to why.
#:tests? #f
#:phases
(modify-phases %standard-phases
-- 
2.24.1






bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.

2020-01-13 Thread Mike Rosset


Hello Florian

With the addition of QtWebengine into Guix. I've created some patches to
upgrade qutebrowser to 1.9.0 and to use QtWebengine by default.

And Guix is now using Qt 5.12.6 which is not to bad.

I hope this leads to less error reports for you. Once this gets merged
in.

Regards,

Mike





bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0.

2020-01-13 Thread Mike Rosset
* gnu/packages/web-browsers.scm (qutebrowser): Update to 1.9.0.

qutebrowser no longer uses qtwebkit by default. It now defaults to qtwebengine.
---
 gnu/packages/web-browsers.scm | 40 ---
 1 file changed, 28 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 137dccab81..035fdc1dd9 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -276,7 +276,7 @@ access.")
 (define-public qutebrowser
   (package
 (name "qutebrowser")
-(version "1.8.3")
+(version "1.9.0")
 (source
  (origin
(method url-fetch)
@@ -285,11 +285,10 @@ access.")
"qutebrowser-" version ".tar.gz"))
(sha256
 (base32
- "055zmzk3q0m3hx1742nfy2mdawfllrkvijnbzp1hiv01dj1bxaf8"
+ "1y0yq1qfr6g1s7kf3w2crd0b025dv2dfknhlz3v0001ns3rgwj17"
 (build-system python-build-system)
 (native-inputs
- `(("asciidoc" ,asciidoc)
-   ("python-attrs" ,python-attrs))) ; for tests
+ `(("python-attrs" ,python-attrs))) ; for tests
 (inputs
  `(("python-colorama" ,python-colorama)
("python-cssutils" ,python-cssutils)
@@ -298,23 +297,30 @@ access.")
("python-pygments" ,python-pygments)
("python-pypeg2" ,python-pypeg2)
("python-pyyaml" ,python-pyyaml)
+   ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so
+   ;; that it's __init__.py is used first.
+   ("python-pyqtwebengine" ,python-pyqtwebengine)
("python-pyqt" ,python-pyqt)
-   ("qtwebkit" ,qtwebkit)))
+   ;; qtwebengine is not a direct input because it's already provided by
+   ;; python-pyqtwebengine.  It's included so we can wrap
+   ;; QTWEBENGINEPROCESS_PATH
+   ("qtwebengine" ,qtwebengine)))
 (arguments
- `(;; FIXME: Tests have been added to Qutebrowser. But they currently fail 
on
-   ;; trying to locate QtWebEngine, and run it on a specific display.
-   ;; There does not seem to be a trivial way to suppress this test.
-   ;; Either fix this, or wait for a liberated QtWebEngine to make into 
GNU Guix.
-   ;; Change this according to .
+ `( ;; FIXME: With the existance of qtwebengine, tests can now run.  But
+   ;; they are still disabled because test phase hangs. It's not readily
+   ;; apparent as to why
#:tests? #f
#:phases
(modify-phases %standard-phases
+ (add-before 'check 'set-env-offscreen
+   (lambda _
+ (setenv "QT_QPA_PLATFORM" "offscreen")
+ #t))
  (add-after 'install 'install-more
(lambda* (#:key outputs #:allow-other-keys)
  (let* ((out (assoc-ref outputs "out"))
 (app (string-append out "/share/applications"))
 (hicolor (string-append out "/share/icons/hicolor")))
-   (invoke "a2x" "-f" "manpage" "doc/qutebrowser.1.asciidoc")
(install-file "doc/qutebrowser.1"
  (string-append out "/share/man/man1"))
(for-each
@@ -331,11 +337,21 @@ access.")
  (("Exec=qutebrowser")
   (string-append "Exec=" out "/bin/qutebrowser")))
(install-file "misc/org.qutebrowser.qutebrowser.desktop" app)
+   #t)))
+ (add-after 'wrap 'wrap-qt-process-path
+   (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+(bin (string-append out "/bin/qutebrowser"))
+(qt-process-path (string-append
+  (assoc-ref inputs "qtwebengine")
+  "/lib/qt5/libexec/QtWebEngineProcess")))
+   (wrap-program bin
+ `("QTWEBENGINEPROCESS_PATH" ":" prefix (,qt-process-path)))
#t))
 (home-page "https://qutebrowser.org/;)
 (synopsis "Minimal, keyboard-focused, vim-like web browser")
 (description "qutebrowser is a keyboard-focused browser with a minimal
-GUI.  It is based on PyQt5 and QtWebKit.")
+GUI.  It is based on PyQt5 and QtWebEngine.")
 (license license:gpl3+)))
 
 (define-public vimb
-- 
2.24.1






bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.

2020-01-13 Thread Mike Rosset
* gnu/packages/qt.scm (python-pyqtwebengine): New variable.
---
 gnu/packages/qt.scm | 97 +
 1 file changed, 97 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 514577678e..fcb297e99c 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -38,6 +38,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build-system python)
   #:use-module (guix packages)
   #:use-module (guix deprecation)
   #:use-module (guix utils)
@@ -1947,6 +1948,17 @@ module provides support functions to the automatically 
generated code.")
   ,@%gnu-build-system-modules)
#:phases
(modify-phases %standard-phases
+ ;; When building python-pyqtwebengine  can not be
+ ;; included. Here we substitute the full path to the header in the
+ ;; store.
+ (add-before 'configure 'substitute-source
+   (lambda* (#:key inputs  #:allow-other-keys)
+ (let* ((qtbase (assoc-ref inputs "qtbase"))
+(qtprinter.h (string-append "\"" qtbase 
"/include/qt5/QtPrintSupport/qprinter.h\"")))
+   (substitute* "sip/QtPrintSupport/qprinter.sip"
+ (("")
+  qtprinter.h))
+   #t)))
  (replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
  (let* ((out (assoc-ref outputs "out"))
@@ -1986,6 +1998,91 @@ framework.  The bindings are implemented as a set of 
Python modules and
 contain over 620 classes.")
 (license license:gpl3)))
 
+(define-public python-pyqtwebengine
+  (package
+(name "python-pyqtwebengine")
+(version "5.12.1")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append
+ 
"https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/;
+version "/PyQtWebEngine_gpl-" version ".tar.gz"))
+   (sha256
+(base32
+ "0wylkd7fh2g27y3710rpxmj9wx0wpi3z7qbv6khiddm15rkh81w6"
+(build-system gnu-build-system)
+(native-inputs
+ `(("python" ,python)
+   ("python-sip" ,python-sip)
+   ;; qtbase is required for qmake
+   ("qtbase" ,qtbase)))
+(inputs
+ `(("python" ,python-wrapper)
+   ("python-sip" ,python-sip)
+   ("python-pyqt" ,python-pyqt)
+   ("qtbase" ,qtbase)
+   ("qtsvg" ,qtsvg)
+   ("qtdeclarative" ,qtdeclarative)
+   ("qtwebchannel" ,qtwebchannel)
+   ("qtwebengine" ,qtwebengine)
+   ("python-pyqt" ,python-pyqt)
+   ("qtwebengine" ,qtwebengine)))
+(arguments
+ `(#:modules ((srfi srfi-1)
+  ,@%gnu-build-system-modules)
+   #:phases
+   (modify-phases %standard-phases
+ (replace 'configure
+   (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+(sipdir (string-append out "/share/sip"))
+(pyqt-sipdir (string-append
+  (assoc-ref inputs "python-pyqt") 
"/share/sip"))
+(python (assoc-ref inputs "python"))
+(python-version
+ (last (string-split python #\-)))
+(python-major+minor
+ (string-join
+  (take (string-split python-version #\.) 2)
+  "."))
+(lib (string-append out "/lib/python"
+python-major+minor
+"/site-packages/PyQt5"))
+(stubs (string-append lib "/PyQt5")))
+
+   (system* "mkdir" "-p" sipdir)
+   (invoke "python" "configure.py"
+   "-w"
+   "--no-dist-info"
+   "--destdir" lib
+   "--no-qsci-api"
+   "--stubsdir" stubs
+   "--sipdir" sipdir
+   "--pyqt-sipdir" pyqt-sipdir
+ ;; Because this has a different prefix then python-pyqt then we need
+ ;; to make this a namespace of it's own
+ (add-after 'install 'make-namespace
+   (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((__init__.py (string-append
+  (assoc-ref outputs "out")
+  
"/lib/python3.7/site-packages/PyQt5/__init__.py")))
+   (with-output-to-file __init__.py
+ (lambda _ (display "
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)
+")))
+   #t)))
+ )))
+(home-page 
"https://www.riverbankcomputing.com/software/pyqtwebengine/intro;)
+(synopsis "Python bindings for QtWebEngine")
+(description
+ "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
+WebEngine