1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: reduce: Update to 2026-03-11.

* gnu/packages/algebra.scm (reduce): Update to 2026-03-11, revision 7333.
[source]<origin>: Switch to svn-fetch.
[source]<origin>{snippet}: Update list of deleted files and directories.
[arguments]<#:phases>: Add 'fix-version phase.
* gnu/packages/patches/reduce-unbundle-libffi.patch: Adjust.

Change-Id: Ie1bc2bcdeff72c1e96258f0966a7abb9b7b9fdb4
Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
Nigko Yerden
2026-03-14 09:16:49 +05:00
committed by Andreas Enge
parent c10be9949c
commit d830f7cf00
2 changed files with 77 additions and 53 deletions

View File

@@ -94,6 +94,7 @@
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix hg-download)
#:use-module (guix svn-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
@@ -2206,40 +2207,58 @@ and not by the available RAM.")
(define-public reduce
(package
(name "reduce")
(version "2024-08-12")
(version "2026-03-11")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://sourceforge/reduce-algebra/snapshot_"
version "/Reduce-svn6860-src.tar.gz"))
(method svn-fetch)
(uri (svn-reference
(url "https://svn.code.sf.net/p/reduce-algebra/code/trunk")
(revision 7333)))
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
"13bij9d4dj96vd5di59skz77s2fihj7awmkx403fvh9rd04ly25z"))
"04n7z6abfpqxgmdc1vpv2yy4qccvyxdp6klld94wr740dv8r49l2"))
(modules '((guix build utils)))
(patches (search-patches "reduce-unbundle-libffi.patch"))
;; remove binaries and unnecessary parts
;; to ensure we build from source files only
(snippet '(map delete-file-recursively
(append (find-files "csl/generated-c" "\\.img$")
'("psl" "vsl"
"jlisp"
"jslisp"
"libedit"
"macbuild"
"MacPorts"
"mac-universal"
"reduce2"
"winbuild64"
"common-lisp"
"contrib"
"generic/qreduce"
"web/htdocs/images/Thumbs.db")
(find-files "csl"
"^(embedded|new-embedded|winbuild|support-packages)$"
#:directories? #t)
(find-files "libraries"
"^(original|wineditline|libffi|libffi-for-mac)$"
#:directories? #t))))))
(append (find-files "csl/generated-c" "\\.img$")
'("common-lisp"
"contrib"
"csl/embedded"
"csl/new-embedded"
"csl/support-packages"
"csl/winbuild"
"generic/breduce"
"generic/casefold"
"generic/emacs"
"generic/qreduce"
"generic/rbench"
"generic/rlsmt"
"generic/texmacs"
"jlisp"
"jslisp"
"libedit"
"libraries/asmjit"
"libraries/C-Quadratic-Sieve"
"libraries/core-math"
;; "libraries/crlibm"
;; "libraries/libedit-20140620-3.1"
"libraries/libedit-20210216-3.1"
"libraries/libffi"
"libraries/original"
;; "libraries/SoftFloat-3a"
"libraries/SoftFloat-3e"
"libraries/webview"
"libraries/wineditline"
"macbuild"
"MacPorts"
"mac-universal"
"psl"
"reduce2"
"reduce2-2025"
"vsl"
"web"
"winbuild64"
"windows-config-cache"))))))
(build-system gnu-build-system)
(arguments
(list #:parallel-build? #f
@@ -2261,6 +2280,13 @@ and not by the available RAM.")
(add-before 'patch-source-shebangs 'autogen
(lambda _
(invoke "sh" "autogen.sh")))
(add-after 'autogen 'fix-version
(lambda _
(substitute* "csl/cslbase/version.h"
(("(#define VERSION_ID )\"\\$Id\\$\"" all def)
(format #f
"~a \"$Id: version.h ~a ~a 00:00:00Z somebody $\""
def 7333 #$version)))))
(add-after 'install 'fix-install
(lambda _
(copy-file "bin/rfcsl"

View File

@@ -1,11 +1,11 @@
This patch unbundles libffi.
Copyright (C) 2025-2026 Nigko Yerden <nigko.yerden@gmail.com>
Index: autogen.sh
===================================================================
diff --git a/autogen.sh b/autogen.sh
--- a/autogen.sh (revision 6860)
--- a/autogen.sh (revision 7333)
+++ b/autogen.sh (working copy)
@@ -142,18 +142,6 @@
@@ -143,18 +143,6 @@
;;
*--with-csl* | *--with-both*)
L="$L ./csl ./csl/cslbase ./csl/cslbase-nothrow ./libraries/SoftFloat-3a/source"
@@ -27,23 +27,19 @@ diff --git a/autogen.sh b/autogen.sh
Index: configure.ac
===================================================================
diff --git a/configure.ac b/configure.ac
--- a/configure.ac (revision 6860)
--- a/configure.ac (revision 7333)
+++ b/configure.ac (working copy)
@@ -1389,37 +1389,6 @@
@@ -1542,33 +1542,6 @@
cd "$builddir"
fi
-AC_MSG_NOTICE([About to configure libffi])
-mkdir -p libffi
-if test `uname` = "Darwin" && test "$enable_universal" != "no"
-# On the Macintosh I will use a version of libffi provided either by
-# macports or by homebrew, so I do not want to configure to build a
-# private copy.
-if test `uname` != "Darwin"
-then
-# This is a messy script that arranges to build a universal version of
-# the library on MacOS. It does this by building arm64 and an x86_64
-# separately and then merging the resulting libraries.
- sed "s+@srcdir@+$abssrcdir+" \
- < $abssrcdir/libraries/libffi-for-mac/Makefile \
- > libffi/Makefile
-else
- AC_MSG_NOTICE([About to configure libffi])
- mkdir -p libffi
- cd libffi
- setpasscc
- doconfig="$SHELL $abssrcdir/libraries/libffi/configure -C $filtered \
@@ -70,11 +66,11 @@ diff --git a/configure.ac b/configure.ac
Index: csl/cslbase/Makefile.am
===================================================================
diff --git a/csl/cslbase/Makefile.am b/csl/cslbase/Makefile.am
--- a/csl/cslbase/Makefile.am (revision 6860)
--- a/csl/cslbase/Makefile.am (revision 7333)
+++ b/csl/cslbase/Makefile.am (working copy)
@@ -807,35 +807,6 @@
@@ -897,38 +897,6 @@
endif !crlibm
else !mac_framework
-LIBFFIDEPS=../lib/libffi.a ../include/ffi.h
-
@@ -82,6 +78,7 @@ diff --git a/csl/cslbase/Makefile.am b/csl/cslbase/Makefile.am
-FFIINC = -I../include
-AM_CPPFLAGS += $(FFINC)
-reduce_CPPFLAGS += $(FFINC)
-reduce_web_CPPFLAGS += $(FFINC)
-bootstrapreduce_CPPFLAGS += $(FFINC)
-csl_CPPFLAGS += $(FFINC)
-flatcsl_CPPFLAGS += $(FFINC)
@@ -90,36 +87,37 @@ diff --git a/csl/cslbase/Makefile.am b/csl/cslbase/Makefile.am
-# instance, "make csl.o" in a clean tree and libffi building will get
-# triggered.
-
-
-csl_LDADD += ../lib/libffi.a
-flatcsl_LDADD += ../lib/libffi.a
-bootstrapreduce_LDADD += ../lib/libffi.a
-reduce_LDADD += ../lib/libffi.a
-reduce_web_LDADD += ../lib/libffi.a
-
-csl_DEPENDENCIES += $(LIBFFIDEPS)
-flatcsl_DEPENDENCIES += $(LIBFFIDEPS)
-bootstrapreduce_DEPENDENCIES += $(LIBFFIDEPS)
-reduce_DEPENDENCIES += $(LIBFFIDEPS)
-reduce_web_DEPENDENCIES += $(LIBFFIDEPS)
-
-$(LIBFFIDEPS):
- @printf "About to build libffi for %s ($@)\n" `pwd`
- printf "\n\n=== About to build libffi library\n\n";
- -$(TRACE)@$(MAKE) -C ../libffi install
-
SOFTFLOATDEPS=../lib/libsoftfloat.a ../include/softfloat.h
endif !mac_framework
SOFTFLOATDEP = ../include/softfloat.h
SOFTFLOATDEPS=../lib/libsoftfloat.a ../include/softfloat.h
Index: csl/cslbase/configure.ac
===================================================================
diff --git a/csl/cslbase/configure.ac b/csl/cslbase/configure.ac
--- a/csl/cslbase/configure.ac (revision 6860)
--- a/csl/cslbase/configure.ac (revision 7333)
+++ b/csl/cslbase/configure.ac (working copy)
@@ -146,8 +146,8 @@
@@ -146,6 +146,8 @@
AC_DEFINE(WITHOUT_FFI, [1], [remove the foreign function support])
fi
+AC_SEARCH_LIBS([ffi_call], [ffi])
-
+
# What host am I on?
AC_CANONICAL_HOST()