summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/guile.scm16
-rw-r--r--gnu/packages/patches/guile-lzlib-gcc-14.patch32
3 files changed, 37 insertions, 12 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 23433ed0dc..719679f679 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1563,6 +1563,7 @@ dist_patch_DATA = \
%D%/packages/patches/guile-fix-invalid-unicode-handling.patch \
%D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \
%D%/packages/patches/guile-hurd-posix-spawn.patch \
+ %D%/packages/patches/guile-lzlib-gcc-14.patch \
%D%/packages/patches/guile-lzlib-hurd64.patch \
%D%/packages/patches/guile-present-coding.patch \
%D%/packages/patches/guile-rsvg-pkgconfig.patch \
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 180608a646..54179619ab 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -944,21 +944,13 @@ Guile's foreign function interface.")
(file-name (string-append "guile-lzlib-" version ".tar.gz"))
(sha256
(base32
- "1whgmwkr1v8m63p4aaqn8blwl9vcrswwhbfv4bm0aghl5a6rryd7"))))
+ "1whgmwkr1v8m63p4aaqn8blwl9vcrswwhbfv4bm0aghl5a6rryd7"))
+ (patches (search-patches "guile-lzlib-gcc-14.patch"
+ "guile-lzlib-hurd64.patch"))))
(build-system gnu-build-system)
(arguments
(list
- #:make-flags #~'("GUILE_AUTO_COMPILE=0") ;prevent guild warnings
- #:phases (if (or (%current-target-system) (target-hurd64?))
- #~(modify-phases %standard-phases
- (add-after 'unpack 'apply-hurd64-patch
- (lambda _
- (let ((patch
- #$(local-file
- (search-patch
- "guile-lzlib-hurd64.patch"))))
- (invoke "patch" "--force" "-p1" "-i" patch)))))
- #~%standard-phases)))
+ #:make-flags #~'("GUILE_AUTO_COMPILE=0"))) ;prevent guild warnings
(native-inputs (list autoconf automake pkg-config guile-3.0))
(inputs (list guile-3.0 lzlib))
(synopsis "Guile bindings to lzlib")
diff --git a/gnu/packages/patches/guile-lzlib-gcc-14.patch b/gnu/packages/patches/guile-lzlib-gcc-14.patch
new file mode 100644
index 0000000000..143b7adf7b
--- /dev/null
+++ b/gnu/packages/patches/guile-lzlib-gcc-14.patch
@@ -0,0 +1,32 @@
+Upstream-status: Presented upstream.
+
+From 8b0db8997007d427ce9e77cb8191e698d1c47f02 Mon Sep 17 00:00:00 2001
+From: "janneke@gnu.org" <janneke@gnu.org>
+Date: Sat, 7 Dec 2024 09:48:49 +0100
+Subject: [PATCH] build: Support gcc-14.
+
+* configure.ac: When compiling natively declare LZ_decompress_open before
+using it in conftest.c.
+---
+ configure.ac | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4c56768..ffdab1d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,7 +43,10 @@ EOF
+ else
+ old_LIBS="$LIBS"
+ LIBS="-llz"
+- AC_LINK_IFELSE([AC_LANG_SOURCE([int main () { return LZ_decompress_open(); }])],
++ AC_LINK_IFELSE([AC_LANG_SOURCE([
++int LZ_decompress_open ();
++int main () { return LZ_decompress_open(); }
++])],
+ [guile_cv_liblz_libdir="`ldd conftest$EXEEXT | grep liblz | sed '-es/.*=> \(.*\) .*$/\1/g'`"])
+ LIBS="$old_LIBS"
+ fi])
+--
+2.46.0
+