guix_mirror_bot pushed a commit to branch core-packages-team
in repository guix.

commit a31238f0f9aeda9c798712f39028eb0265973d5b
Author: Andreas Enge <[email protected]>
AuthorDate: Tue Jul 15 12:07:01 2025 +0200

    gnu: xournal: Fix build with gcc@14.
    
    * gnu/packages/pdf.scm (xournal)[arguments]
    <#:make-flags>: Turn errors into warnings.
    <#:phases>: New phase 'fix-includes to include a header file.
    
    Change-Id: Ie5ffa4e9edf1332480d99dadc73ad97818399068
---
 gnu/packages/pdf.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 9b3e524820..ff1a2922a3 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -1144,6 +1144,23 @@ enhance the quality of scanned pages before performing
         (base32
          "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j"))))
     (build-system gnu-build-system)
+    (arguments
+     (list
+      #:make-flags
+      #~(list (string-append "CFLAGS=-g -O2 "
+                             ;; Placate gcc@14 strictness.
+                             "-Wno-error=deprecated-declarations "
+                             "-Wno-error=implicit-function-declaration"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-includes
+            ;; Inclusion of unistd.h is conditional on HAVE_UNISTD_H being
+            ;; defined, but this comes from config.h.
+            (lambda _
+              (with-fluids ((%default-port-encoding "ISO-8859-1"))
+                (substitute* "src/ttsubset/sft.h"
+                  (("#include <sys/types.h>")
+                   "#include \"config.h\"\n#include <sys/types.h>"))))))))
     (inputs
      (list gtk+-2 pango poppler glib libgnomecanvas))
     (native-inputs

Reply via email to