* [bug#43419] [PATCH: gnu: calibre: Clean up 'wrap phase]
@ 2020-09-15 11:47 Prafulla Giri
2020-09-18 13:22 ` bug#43419: " Mathieu Othacehe
0 siblings, 1 reply; 3+ messages in thread
From: Prafulla Giri @ 2020-09-15 11:47 UTC (permalink / raw)
To: 43419
[-- Attachment #1.1: Type: text/plain, Size: 583 bytes --]
Esteemed maintainers,
This commit cleans up the changes made by
fd3eac4dd774597d493e6d8aae7b1c2653070bc7 (which worked-around the issue of
repeated (wrap-program) calls creating wrappers of wrappers --- i.e.
..calibre-real-real-s --- by creating a manual 'wrap phase that did the
work of the standard 'wrap phase and also the runtime dependency resolution
of QtWebEngineProcess), based on the suggestion of the author of the commit
himself (https://issues.guix.gnu.org/43249#14).
For more information, please consult the discussions in
https://issues.guix.gnu.org/43249
Thank you
[-- Attachment #1.2: Type: text/html, Size: 904 bytes --]
[-- Attachment #2: 0001-gnu-calibre-Clean-up-wrap-phase.patch --]
[-- Type: text/x-patch, Size: 4251 bytes --]
From 6c89037f8d8221eb447c3cf225e70559a5ba4cbb Mon Sep 17 00:00:00 2001
From: Prafulla Giri <pratheblackdiamond@gmail.com>
Date: Tue, 15 Sep 2020 17:13:36 +0545
Subject: [PATCH] gnu: calibre: Clean up 'wrap phase.
Based on the suggestion of the author, this commit cleans up the
changes introduced by fd3eac4dd774597d493e6d8aae7b1c2653070bc7
For more information, see: https://issues.guix.gnu.org/43249
* gnu/packages/e-book.scm (calibre):
[arguments]: Remove the manual 'wrap phase replacement and add a
'wrap-program phase after standard 'wrap phase to make the runtime
dependency QtWebEngineProcess available to the binaries.
---
gnu/packages/ebook.scm | 46 +++++++++++++++++++++---------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index b7c78b6a64..a18b953654 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -245,29 +245,7 @@
"--path-to-mathjax" (string-append
(assoc-ref inputs "js-mathjax")
"/share/javascript/mathjax"))
- (invoke "python2" "setup.py" "rapydscript")))
- (replace 'wrap
- ;; Here we wrap PYTHONPATH exactly as it would be in
- ;; python-build-system, plus the addition of
- ;; QTWEBENGINEPROCESS_PATH, fixing a bug where Calibre would not
- ;; find Qtwebengine.
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (python (assoc-ref inputs "python"))
- (site-packages
- (cons (string-append out "/lib/python"
- (python-version python)
- "/site-packages")
- (search-path-as-string->list (getenv "PYTHONPATH"))))
- (qtwebengineprocess
- (string-append (assoc-ref inputs "qtwebengine")
- "/lib/qt5/libexec/QtWebEngineProcess")))
- (for-each (lambda (program)
- (wrap-program program
- `("QTWEBENGINEPROCESS_PATH" = (,qtwebengineprocess))
- `("PYTHONPATH" prefix ,site-packages)))
- (find-files bin ".")))
+ (invoke "python2" "setup.py" "rapydscript")
#t))
(add-after 'install 'install-man-pages
(lambda* (#:key outputs #:allow-other-keys)
@@ -285,6 +263,28 @@
"/share/fonts/truetype")))
(delete-file-recursively font-dest)
(symlink font-src font-dest))
+ #t))
+ ;; Make run-time dependencies available to the binaries
+ (add-after 'wrap 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (qtwebengine (assoc-ref inputs "qtwebengine")))
+ (with-directory-excursion (string-append out "/bin")
+ (for-each
+ (lambda (binary)
+ (wrap-program binary
+ ;; Make QtWebEngineProcess available
+ `("QTWEBENGINEPROCESS_PATH" ":" =
+ ,(list (string-append
+ qtwebengine
+ "/lib/qt5/libexec/QtWebEngineProcess")))))
+ ;; wrap all the binaries shipping with the package, except
+ ;; for the wrappings created during the 'wrap standard phase.
+ ;; This extends existing .calibre-real wrappers rather than
+ ;; create ..calibre-real-real-s.
+ ;; For more information see: https://issues.guix.gnu.org/43249
+ (find-files "." (lambda (file stat)
+ (not (wrapper? file)))))))
#t)))))
(home-page "https://calibre-ebook.com/")
(synopsis "E-book library management software")
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#43419: [PATCH: gnu: calibre: Clean up 'wrap phase]
2020-09-15 11:47 [bug#43419] [PATCH: gnu: calibre: Clean up 'wrap phase] Prafulla Giri
@ 2020-09-18 13:22 ` Mathieu Othacehe
2020-09-18 13:24 ` [bug#43419] " Prafulla Giri
0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Othacehe @ 2020-09-18 13:22 UTC (permalink / raw)
To: Prafulla Giri; +Cc: 43419-done
Hello,
> This commit cleans up the changes made by fd3eac4dd774597d493e6d8aae7b1c2653070bc7 (which worked-around the issue of repeated (wrap-program) calls creating wrappers of
> wrappers --- i.e. ..calibre-real-real-s --- by creating a manual 'wrap phase that did the work of the standard 'wrap phase and also the runtime dependency resolution of
> QtWebEngineProcess), based on the suggestion of the author of the commit himself (https://issues.guix.gnu.org/43249#14).
>
> For more information, please consult the discussions in https://issues.guix.gnu.org/43249
This seems indeed nicer, pushed!
Thanks,
Mathieu
--
https://othacehe.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* [bug#43419] [PATCH: gnu: calibre: Clean up 'wrap phase]
2020-09-18 13:22 ` bug#43419: " Mathieu Othacehe
@ 2020-09-18 13:24 ` Prafulla Giri
0 siblings, 0 replies; 3+ messages in thread
From: Prafulla Giri @ 2020-09-18 13:24 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 43419-done
[-- Attachment #1: Type: text/plain, Size: 811 bytes --]
Thank you very much, once again, Mr. Othacehe. (:
On Fri, Sep 18, 2020 at 7:07 PM Mathieu Othacehe <othacehe@gnu.org> wrote:
>
> Hello,
>
> > This commit cleans up the changes made by
> fd3eac4dd774597d493e6d8aae7b1c2653070bc7 (which worked-around the issue of
> repeated (wrap-program) calls creating wrappers of
> > wrappers --- i.e. ..calibre-real-real-s --- by creating a manual 'wrap
> phase that did the work of the standard 'wrap phase and also the runtime
> dependency resolution of
> > QtWebEngineProcess), based on the suggestion of the author of the commit
> himself (https://issues.guix.gnu.org/43249#14).
> >
> > For more information, please consult the discussions in
> https://issues.guix.gnu.org/43249
>
> This seems indeed nicer, pushed!
>
> Thanks,
>
> Mathieu
> --
> https://othacehe.org
>
[-- Attachment #2: Type: text/html, Size: 1387 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-18 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-15 11:47 [bug#43419] [PATCH: gnu: calibre: Clean up 'wrap phase] Prafulla Giri
2020-09-18 13:22 ` bug#43419: " Mathieu Othacehe
2020-09-18 13:24 ` [bug#43419] " Prafulla Giri
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).