GNU bug report logs - #57251
[PATCH] gnu: mupdf: Update to 1.20.3.

Previous Next

Package: guix-patches;

Reported by: Pierre-Henry Fröhring <contact <at> phfrohring.com>

Date: Tue, 16 Aug 2022 22:32:01 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <marius <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57251 in the body.
You can then email your comments to 57251 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#57251; Package guix-patches. (Tue, 16 Aug 2022 22:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre-Henry Fröhring <contact <at> phfrohring.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 16 Aug 2022 22:32:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre-Henry Fröhring <contact <at> phfrohring.com>
To: guix-patches <at> gnu.org
Cc: Pierre-Henry Fröhring <contact <at> phfrohring.com>
Subject: [PATCH] gnu: mupdf: Update to 1.20.3.
Date: Wed, 17 Aug 2022 00:31:19 +0200
* Copy/paste is fixed.

The build now uses the patched version of freeglut that is included in the
thirdparty directory so that copy/paste works.
---
 gnu/packages/pdf.scm | 127 +++++++++++++++++++++++--------------------
 1 file changed, 69 insertions(+), 58 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 39266a2822..f21a30e805 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -731,66 +731,77 @@ (define-public python-pydyf
 (define-public mupdf
   (package
     (name "mupdf")
-    (version "1.19.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://mupdf.com/downloads/archive/"
-                           "mupdf-" version "-source.tar.xz"))
-       (sha256
-        (base32 "0gl0wf16m1cafs20h3v1f4ysf7zlbijjyd6s1r1krwvlzriwdsmm"))
-       (modules '((guix build utils)))
-       (snippet
-        #~(begin
-            ;; Remove bundled software.
-            (let* ((keep (list "extract"
-                               "lcms2")) ; different from our lcms2 package
-                   (from "thirdparty")
-                   (kept (string-append from "~temp")))
-              (mkdir-p kept)
-              (for-each (lambda (file)
-                          (rename-file (string-append from "/" file)
-                                       (string-append kept "/" file)))
-                        keep)
-              (delete-file-recursively from)
-              (rename-file kept from))))))
+    (version "1.20.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://mupdf.com/downloads/archive/"
+                                  "mupdf-" version "-source.tar.lz"))
+              (sha256
+               (base32
+                "0s0qclxxdjis04mczgz0fhfpv0j8llk48g82zlfrk0daz0zgcwvg"))
+              (modules '((guix build utils)))
+              (snippet #~(begin
+                           (let* ((keep (list "extract" "freeglut" "lcms2"))
+                                  (from "thirdparty")
+                                  (kept (string-append from "~temp")))
+                             (mkdir-p kept)
+                             (for-each (lambda (file)
+                                         (rename-file (string-append from "/"
+                                                                     file)
+                                                      (string-append kept "/"
+                                                                     file)))
+                                       keep)
+                             (delete-file-recursively from)
+                             (rename-file kept from))))))
     (build-system gnu-build-system)
-    (inputs
-     (list curl
-           freeglut
-           freetype
-           gumbo-parser
-           harfbuzz
-           jbig2dec
-           libjpeg-turbo
-           libx11
-           libxext
-           mujs
-           openjpeg
-           openssl
-           zlib))
-    (native-inputs
-     (list pkg-config))
+    (inputs (list curl
+                  libxrandr
+                  libxi
+                  freeglut ;for GL/gl.h
+                  freetype
+                  gumbo-parser
+                  harfbuzz
+                  jbig2dec
+                  libjpeg-turbo
+                  libx11
+                  libxext
+                  mujs
+                  openjpeg
+                  openssl
+                  zlib))
+    (native-inputs (list pkg-config))
     (arguments
-     (list
-       #:tests? #f                      ; no check target
-       #:make-flags
-       #~(list "verbose=yes"
-               (string-append "CC=" #$(cc-for-target))
-               "XCFLAGS=-fpic"
-               "USE_SYSTEM_LIBS=yes"
-               "USE_SYSTEM_MUJS=yes"
-               "shared=yes"
-               ;; Even with the linkage patch we must fix RUNPATH.
-               (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
-               (string-append "prefix=" #$output))
-        #:phases
-        #~(modify-phases %standard-phases
-            (delete 'configure))))      ; no configure script
+     (list #:tests? #f ;no check target
+           #:make-flags #~(list "verbose=yes"
+                           (string-append "CC="
+                                          #$(cc-for-target))
+                           "XCFLAGS=-fpic"
+                           "USE_SYSTEM_FREETYPE=yes"
+                           "USE_SYSTEM_GUMBO=yes"
+                           "USE_SYSTEM_HARFBUZZ=yes"
+                           "USE_SYSTEM_JBIG2DEC=yes"
+                           "USE_SYSTEM_JPEGXR=no # not available"
+                           "USE_SYSTEM_LCMS2=no # lcms2mt is strongly preferred"
+                           "USE_SYSTEM_LIBJPEG=yes"
+                           "USE_SYSTEM_MUJS=no # not available"
+                           "USE_SYSTEM_OPENJPEG=yes"
+                           "USE_SYSTEM_ZLIB=yes"
+                           "USE_SYSTEM_GLUT=no"
+                           "USE_SYSTEM_CURL=yes"
+                           "USE_SYSTEM_LEPTONICA=yes"
+                           "USE_SYSTEM_TESSERACT=yes"
+                           "USE_SYSTEM_MUJS=yes"
+                           "shared=yes"
+                           (string-append "LDFLAGS=-Wl,-rpath="
+                                          #$output "/lib")
+                           (string-append "prefix="
+                                          #$output))
+           #:phases #~(modify-phases %standard-phases
+                        (delete 'configure)))) ;no configure script
     (home-page "https://mupdf.com")
     (synopsis "Lightweight PDF viewer and toolkit")
     (description
-      "MuPDF is a C library that implements a PDF and XPS parsing and
+     "MuPDF is a C library that implements a PDF and XPS parsing and
 rendering engine.  It is used primarily to render pages into bitmaps,
 but also provides support for other operations such as searching and
 listing the table of contents and hyperlinks.
@@ -799,9 +810,9 @@ (define-public mupdf
 line tools for batch rendering @command{pdfdraw}, rewriting files
 @command{pdfclean}, and examining the file structure @command{pdfshow}.")
     (license (list license:agpl3+
-                   license:bsd-3 ; resources/cmaps
-                   license:x11 ; thirdparty/lcms2
-                   license:silofl1.1 ; resources/fonts/{han,noto,sil,urw}
+                   license:bsd-3 ;resources/cmaps
+                   license:x11 ;thirdparty/lcms2
+                   license:silofl1.1 ;resources/fonts/{han,noto,sil,urw}
                    license:asl2.0)))) ; resources/fonts/droid
 
 (define-public qpdf
-- 
2.37.1





Reply sent to Marius Bakke <marius <at> gnu.org>:
You have taken responsibility. (Mon, 29 Aug 2022 15:54:02 GMT) Full text and rfc822 format available.

Notification sent to Pierre-Henry Fröhring <contact <at> phfrohring.com>:
bug acknowledged by developer. (Mon, 29 Aug 2022 15:54:02 GMT) Full text and rfc822 format available.

Message #10 received at 57251-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Pierre-Henry Fröhring <contact <at> phfrohring.com>,
 57251-done <at> debbugs.gnu.org
Cc: Pierre-Henry Fröhring <contact <at> phfrohring.com>
Subject: Re: [bug#57251] [PATCH] gnu: mupdf: Update to 1.20.3.
Date: Mon, 29 Aug 2022 17:53:08 +0200
[Message part 1 (text/plain, inline)]
Pierre-Henry Fröhring <contact <at> phfrohring.com> skriver:

> * Copy/paste is fixed.
>
> The build now uses the patched version of freeglut that is included in the
> thirdparty directory so that copy/paste works.

Pushed as f26b9d5ced516343d0c6bb8534d2043f34b7ddd7!

I filled in the commit message for you.  In future patches, please list
what changes are done in the various fields (snippet, arguments) etc.
See the commit log for inspiration.

I also (mostly) reverted the indentation changes to make it easier to
see what went on in the patch.  Feel free to submit it separately.

Thanks!
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#57251; Package guix-patches. (Mon, 29 Aug 2022 21:42:02 GMT) Full text and rfc822 format available.

Message #13 received at 57251 <at> debbugs.gnu.org (full text, mbox):

From: Pierre-Henry Fröhring <concat <at> phfrohring.com>
To: 57251 <at> debbugs.gnu.org
Subject: Re: bug#57251: closed (Re: [bug#57251] [PATCH] gnu: mupdf: Update
 to 1.20.3.)
Date: Mon, 29 Aug 2022 22:51:37 +0200
[Message part 1 (text/plain, inline)]
Hello Marius,

> I filled in the commit message for you.  In future patches, please
> list what changes are done in the various fields (snippet, arguments)
> etc.  See the commit log for inspiration.  I also (mostly) reverted
> the indentation changes to make it easier to see what went on in the
> patch.  Feel free to submit it separately.

Great. I included these remarks into our little guide about building
packages.

Thanks!

— Pierre-Henry Fröhring
— GPG signing key: 4E452C9CA3456D9BF5CD2DA09856B12E14312667
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 27 Sep 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.