[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#35446] [PATCH v2 12/24] gnu: calibre: Use to install deskt

From: Brendan Tildesley
Subject: [bug#35446] [PATCH v2 12/24] gnu: calibre: Use to install desktop files.
Date: Sat, 4 May 2019 02:42:20 +1000

    * gnu/packages/ebook.scm (calibre):[arguments]: is for installing
      various freedestkop files in one's home directory. Here we hack it to
      install into the /share folder in the output.

      This also installs the mimetypes.xml, so we no longer require that
      explicit phase.

      Note that the patch looks a little confusing as the diff thinks I've
      remove a #t)) line and left the other #t)))) line below it, but it all 
 gnu/packages/ebook.scm | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index 2b557ab08d..964fdd7b75 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -102,9 +102,6 @@
      `(("pkg-config" ,pkg-config)
        ("qtbase" ,qtbase) ; for qmake
-       ;; xdg-utils is supposed to be used for desktop integration, but it
-       ;; also creates lots of messages
-       ;; mkdir: cannot create directory '/homeless-shelter': Permission denied
        ("python2-flake8" ,python2-flake8)
        ("xdg-utils" ,xdg-utils)))
     ;; Beautifulsoup3 is bundled but obsolete and not packaged, so just leave 
it bundled.
@@ -174,15 +171,24 @@
          (add-before 'build 'configure
-          (lambda* (#:key inputs #:allow-other-keys)
+          (lambda* (#:key inputs outputs #:allow-other-keys)
             (let ((podofo (assoc-ref inputs "podofo"))
-                  (pyqt (assoc-ref inputs "python2-pyqt")))
+                  (pyqt (assoc-ref inputs "python2-pyqt"))
+                  (out (assoc-ref outputs "out")))
               (substitute* "setup/"
                 (("sys.prefix") (string-append "'" pyqt "'")))
               (substitute* "src/calibre/ebooks/pdf/"
                 (("PDFTOHTML = 'pdftohtml'")
                  (string-append "PDFTOHTML = \"" (assoc-ref inputs "poppler")
-                  "/bin/pdftohtml\"")))
+                                "/bin/pdftohtml\"")))
+              ;; Calibre thinks we are installing desktop files into a home
+              ;; directory, but here we butcher the script in to installing
+              ;; to calibres /share directory.
+              (setenv "XDG_DATA_HOME" (string-append out "/share"))
+              (substitute* "src/calibre/"
+                (("'~/.local/share'") "''"))
               (setenv "PODOFO_INC_DIR" (string-append podofo 
               (setenv "PODOFO_LIB_DIR" (string-append podofo "/lib"))
               ;; This informs the tests we are a continuous integration
@@ -204,12 +210,6 @@
                (delete-file-recursively font-dest)
                (symlink font-src font-dest))
-             #t))
-         (add-after 'unbundle-font-liberation 'install-mimetypes
-           (lambda* (#:key outputs #:allow-other-keys)
-             (install-file "resources/calibre-mimetypes.xml"
-                           (string-append (assoc-ref outputs "out")
-                                          "/share/mime/packages"))
     (home-page "";)
     (synopsis "E-book library management software")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]