commit:     dc7197ada80d1a3bbcd061c0f5a094cc934b7924
Author:     Z. Liu <zhixu.liu <AT> gmail <DOT> com>
AuthorDate: Wed Jun 11 02:15:58 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 13 00:15:11 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc7197ad

dev-lisp/clisp: fix build issue on musl

patch from upstream

Thanks-to: Tom Gillespie <tgbugs <AT> gmail.com>
Closes: https://bugs.gentoo.org/957726
Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42539
Closes: https://github.com/gentoo/gentoo/pull/42539
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...p-2.49.92-r2.ebuild => clisp-2.49.92-r3.ebuild} |  1 +
 ...2.49.92-build-Build-genclx-without-gnulib.patch | 52 ++++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/dev-lisp/clisp/clisp-2.49.92-r2.ebuild 
b/dev-lisp/clisp/clisp-2.49.92-r3.ebuild
similarity index 98%
rename from dev-lisp/clisp/clisp-2.49.92-r2.ebuild
rename to dev-lisp/clisp/clisp-2.49.92-r3.ebuild
index 167263a375bf..2627bef14100 100644
--- a/dev-lisp/clisp/clisp-2.49.92-r2.ebuild
+++ b/dev-lisp/clisp/clisp-2.49.92-r3.ebuild
@@ -48,6 +48,7 @@ BDEPEND="X? ( x11-misc/imake )"
 PATCHES=(
        "${FILESDIR}"/${P}-after_glibc_cfree_bdb.patch
        "${FILESDIR}"/${P}-gdbm_and_bdb5.3.patch
+       "${FILESDIR}"/${P}-build-Build-genclx-without-gnulib.patch
 )
 
 BUILDDIR="builddir"

diff --git 
a/dev-lisp/clisp/files/clisp-2.49.92-build-Build-genclx-without-gnulib.patch 
b/dev-lisp/clisp/files/clisp-2.49.92-build-Build-genclx-without-gnulib.patch
new file mode 100644
index 000000000000..af173d118dd7
--- /dev/null
+++ b/dev-lisp/clisp/files/clisp-2.49.92-build-Build-genclx-without-gnulib.patch
@@ -0,0 +1,52 @@
+From 766baa4f47b59b70c9d865786182c16dc93aafe6 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <[email protected]>
+Date: Sat, 9 Nov 2024 12:57:02 +0100
+Subject: [PATCH] build: Build genclx without gnulib.
+
+Reported by Peter Van Eynde in
+<https://gitlab.com/gnu-clisp/clisp/-/issues/53>.
+
+* modules/clx/new-clx/Makefile.in (BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS,
+BUILD_LDFLAGS): New variables.
+(clx.d): Use them to compile genclx.c.
+
+diff --git a/modules/clx/new-clx/Makefile.in b/modules/clx/new-clx/Makefile.in
+index 7b0056ad0..600f2752b 100644
+--- a/modules/clx/new-clx/Makefile.in
++++ b/modules/clx/new-clx/Makefile.in
+@@ -1,11 +1,22 @@
+-# Makefile for CLISP module set clx
++# Makefile for CLISP module set new-clx
+ 
+ srcdir = @srcdir@
++
++# These variables are used to build binaries for the build platform,
++# that are not linked to Gnulib or CLISP code.
++BUILD_CC = @CC@
++BUILD_CPPFLAGS = @CPPFLAGS@
++BUILD_CFLAGS = @CFLAGS@
++BUILD_LDFLAGS = @LDFLAGS@
++
++# These variables are used to build binaries for the target platform.
++# They are set through link.sh (invoked from clisp-link).
+ CC = @CC@
+ CPPFLAGS = @CPPFLAGS@
+ CFLAGS = -O
+ CLISP = @CLISP@ -norc -q
+ CLISP_LINKKIT = @CLISP_LINKKIT@
++
+ LN = @LN@
+ LN_S = @LN_S@
+ SHELL = /bin/sh
+@@ -35,7 +46,7 @@ resource.fas: $(srcdir)/resource.lisp clx.lib
+ 
+ clx.d: $(srcdir)/clx.f
+       $(CCMP2C) $(srcdir)/clx.f > genclx.c
+-      $(CC) $(CPPFLAGS) $(CFLAGS) $(WANTS) genclx.c -o genclx
++      $(BUILD_CC) $(BUILD_CPPFLAGS) $(WANTS) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) 
-o genclx genclx.c
+       ./genclx -l -o clx.d > clx.d
+       $(RM) genclx.c
+       $(RM) genclx
+-- 
+2.45.2
+

Reply via email to