Subject: [bug#78401] [PATCH] gnu: mupdf: Update to 1.26.0., [PATCH] gnu: mupdf: Update to 1.26.0., [PATCH] gnu: mupdf: Modify #:make-flags

From: Divya Ranjan <[email-masked]>
Date: Sat, 17 May 2025 17:48:45 +0000

Maxim Cournoyer <[email-masked]> writes:

> Hi Divya,
>
> Divya Ranjan <[email-masked]> writes:
>
> [...]
>
>>>> * gnu/packages/pdf.scm (mupdf): Update to 1.26.0.
>>>
>>> Various changes done here are not listed in the change log.  Please
>>> consult other commits for examples or (info "(standards) Style of Change
>>> Logs").
>>
>> Please find the updated patch with the indentation and commit message fixed.
>
> Thanks for you efforts, but the change log is still missing many
> entries.  It should list for example every input added or remove, every
> configure flag added or removed, every phase added or removed, etc.  For
> some examples, you can install the 'standards' package and consult (info
> "(standards) Style of Change Logs"), or simply read examples through
> 'git log'.
>
> While the whitespace is fixed in v2, it seems you ran the package
> through 'guix style', which sadly is not always optimal and adds noise
> to the diff.  Could you please keep this commit to just modify what's
> needed?

Hello Maxim,

Apologies, indeed I had used guix style since I considered that it’d be appropriate. I’ve restricted the patch to now only include the necessary changes.
>From f0246b9de792b4da53224367fc22499a8b4a2de5 Mon Sep 17 00:00:00 2001
Message-ID: <[email-masked]>
From: Divya Ranjan <[email-masked]>
Date: Sat, 17 May 2025 17:40:37 +0000
Subject: [PATCH] gnu: mupdf: Update to 1.26.0.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/pdf.scm (mupdf): Update to 1.26.0.
[inputs]: Add brotli
[arguments]: Use system’s brotli package
[arguments]: Enable semantic versioning to avoid symlink issues

Change-Id: I2c09e4c1aded109dbec810be9a40b5916c365743
---
 gnu/packages/pdf.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index a1c9da2c8a..017609b338 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -862,14 +862,14 @@ (define-public python-pydyf
 (define-public mupdf
   (package
     (name "mupdf")
-    (version "1.25.2")
+    (version "1.26.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://mupdf.com/downloads/archive/"
                            "mupdf-" version "-source.tar.lz"))
        (sha256
-        (base32 "0lg45wp3ici2g2i49fmwa1k32bgkqqgl51nxnqqk0i8ilmdh8hnx"))
+        (base32 "1nncar9w0qdpwp4s00nazr7hbl2kpbp665a6gwpsmdz5d7j1hqz9"))
        (modules '((guix build utils)
                   (ice-9 ftw)
                   (srfi srfi-1)))
@@ -895,6 +895,7 @@ (define-public mupdf
            libx11
            libxext
            mujs
+           brotli
            openjpeg
            openssl
            zlib))
@@ -907,6 +908,7 @@ (define-public mupdf
       #~(list "verbose=yes"
               (string-append "CC=" #$(cc-for-target))
               "XCFLAGS=-fpic"
+              "USE_SYSTEM_BROTLI=yes"
               "USE_SYSTEM_FREETYPE=yes"
               "USE_SYSTEM_GUMBO=yes"
               "USE_SYSTEM_HARFBUZZ=yes"
@@ -921,7 +923,7 @@ (define-public mupdf
               "USE_SYSTEM_CURL=yes"
               "USE_SYSTEM_LEPTONICA=yes"
               "USE_SYSTEM_TESSERACT=yes"
-              "USE_SONAME=no"           ;install as libmupdf.so
+              "USE_SONAME=yes"
               "shared=yes"
               (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
               (string-append "prefix=" #$output))

base-commit: efac01f19b65d7d77a98bbfd57fe2073fb13064a
-- 
2.49.0

Also find the patch for mupdf-1.24, without which several packages break (as suggested by the QA).

>From 27443887660f0179610a37c5ca8137021a8afef2 Mon Sep 17 00:00:00 2001
Message-ID: <[email-masked]>
From: Divya Ranjan <[email-masked]>
Date: Sat, 17 May 2025 17:47:04 +0000
Subject: [PATCH] * gnu: mupdf-1.24: Modify #:make-flags

[arguments]: Disable SONAME

Change-Id: I7557a5d8c9638acfc40abd79a78c196eb30f6baa
---
 gnu/packages/pdf.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 017609b338..f716da4d74 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -969,7 +969,14 @@ (define-public mupdf-1.24 ; Needed for sioyek
               (for-each delete-file-recursively
                         (lset-difference string=?
                                          (scandir ".")
-                                         (cons* "." ".." keep))))))))))
+                                         (cons* "." ".." keep))))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments mupdf)
+       ((#:make-flags flags)
+        #~(append (filter (lambda (flag)
+                            (not (string-prefix? "USE_SONAME=" flag)))
+                          #$flags)
+                  (list "USE_SONAME=no")))))))

 (define-public qpdf

base-commit: efac01f19b65d7d77a98bbfd57fe2073fb13064a
prerequisite-patch-id: bc8c7d6415d46bb7e474e6c50bf33339c41defd3
-- 
2.49.0

-- 
Divya Ranjan,
Philosophy, Mathematics, Libre Software.

PGP Fingerprint: F0B3 1A69 8006 8FB8 096A  2F12 B245 10C6 108C 8D4A