From 3ec19820a7c132373fb24808737b8be63e43c7c229f5115571b74faa8b6f24e2 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 29 Aug 2024 12:27:52 +0000 Subject: [PATCH] Update to clisp-2.49.93+ with git commit f5acef38 from 20240704 OBS-URL: https://build.opensuse.org/package/show/devel:languages:misc/clisp?expand=0&rev=132 --- clhs.el | 142 ++++++++++++++++++++++ clisp-2.49-configure.dif | 107 +++++++++++----- clisp-2.49-gctoken.dif | 2 +- clisp-2.49-rpath.dif | 16 --- clisp-2.49.92.tar.bz2 | 3 - clisp-2.49.93+git20240704.f5acef38.tar.xz | 3 + clisp-gcc14.patch | 131 +++++++++++++------- clisp-link.dif | 4 +- clisp.changes | 15 +++ clisp.spec | 44 +++++-- 10 files changed, 363 insertions(+), 104 deletions(-) create mode 100644 clhs.el delete mode 100644 clisp-2.49-rpath.dif delete mode 100644 clisp-2.49.92.tar.bz2 create mode 100644 clisp-2.49.93+git20240704.f5acef38.tar.xz diff --git a/clhs.el b/clhs.el new file mode 100644 index 0000000..492e82f --- /dev/null +++ b/clhs.el @@ -0,0 +1,142 @@ +;;; clhs.el -- access the Common Lisp HyperSpec (CLHS) + +;;; this works with both +;;; * the "long file name" version released by Harlequin and available +;;; at the MIT web site as +;;; and +;;; * the "8.3 file name" version released later by Xanalys and available at +;;; +;;; and downloadable as +;;; +;;; This is accomplished by not hard-wiring the symbol->file table +;;; but reading the Data/ file instead + +;;; Copyright (C) 2002-2008, 2017 Sam Steingold +;;; Keywords: lisp, common lisp, emacs, ANSI CL, hyperspec +;;; released under the GNU GPL +;;; as a part of GNU CLISP , + +;;; Commentary: + +;; Kent Pitman and the Harlequin Group (later Xanalys) have made the +;; text of the "American National Standard for Information Technology -- +;; Programming Language -- Common Lisp", ANSI X3.226-1994 available on +;; the WWW, in the form of the Common Lisp HyperSpec. This package +;; makes it convenient to peruse this documentation from within Emacs. + +;; This is inspired by the Erik Naggum's version of 1997. + +;;; Code: + +(eval-when-compile (require 'cl)) ; push +(require 'browse-url) +(require 'thingatpt) +(require 'url) + +(defcustom common-lisp-hyperspec-root "http://clhs.lisp.se/" + ;; "http://www.lispworks.com/documentation/HyperSpec/" + ;; "http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/html/hyperspec/HyperSpec/" + ;; "http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/" + "*The root of the Common Lisp HyperSpec URL. +If you copy the HyperSpec to your local system, set this variable to +something like \"file:/usr/local/doc/HyperSpec/\"." + :group 'lisp + :type 'string) + +(defvar clhs-history nil + "History of symbols looked up in the Common Lisp HyperSpec so far.") + +(defvar clhs-symbols nil) + +(defun clhs-table-buffer (&optional root) + (unless root (setq root common-lisp-hyperspec-root)) + (if (string-match "^file:/" root) + (with-current-buffer (get-buffer-create " *clhs-tmp-buf*") + (insert-file-contents-literally + (let* ((d (concat (substring root 6) "/Data/")) + (f (concat d "Map_Sym.txt"))) + (if (file-exists-p f) f + (setq f (concat d "Symbol-Table.text")) + (if (file-exists-p f) f + (error "no symbol table at %s" root)))) + nil nil nil t) + (goto-char 0) + (current-buffer)) + (let* ((d (concat root "/Data/")) + (f (concat d "Map_Sym.txt"))) + (set-buffer (url-retrieve-synchronously f)) + (goto-char 0) + (unless (looking-at "^HTTP/.*200 *OK$") + (kill-buffer (current-buffer)) + (setq f (concat d "Symbol-Table.text")) + (set-buffer (url-retrieve-synchronously f)) + (goto-char 0) + (unless (looking-at "^HTTP/.*200 *OK$") + (kill-buffer (current-buffer)) + (error "no symbol table at %s" root))) + ;; skip to the first symbol + (search-forward "\n\n") + (current-buffer)))) + +(defun clhs-read-symbols () + "read `clhs-symbols' from the current position in the current buffer" + (while (not (eobp)) + (puthash (buffer-substring-no-properties ; symbol + (line-beginning-position) (line-end-position)) + (progn (forward-line 1) ; file name + (buffer-substring-no-properties ; strip "../" + (+ 3 (line-beginning-position)) (line-end-position))) + clhs-symbols) + (forward-line 1))) + +(defun clhs-symbols () + "Get `clhs-symbols' from `common-lisp-hyperspec-root'." + (if (and clhs-symbols (not (= 0 (hash-table-count clhs-symbols)))) + clhs-symbols + (with-current-buffer (clhs-table-buffer) + (unless clhs-symbols + (setq clhs-symbols (make-hash-table :test 'equal :size 1031))) + (clhs-read-symbols) + (kill-buffer (current-buffer)) + clhs-symbols))) + +(defun hash-table-complete (string table how) + "This makes it possible to use hash-tables with `completing-read'. +Actually, `completing-read' in Emacs 22 accepts hash-tables natively." + (let ((res nil) (st (upcase string)) (len (length string))) + (maphash (lambda (key val) + (when (and (<= len (length key)) + (string= st (substring key 0 len))) + (push key res))) + table) + (if how + res ; `all-completions' + (if (cdr res) + (try-completion st (mapcar #'list res)) + (if (string= st (car res)) + t + (car res)))))) + +;;;###autoload +(defun common-lisp-hyperspec (symbol-name &optional kill) + "Browse the Common Lisp HyperSpec documentation for SYMBOL-NAME. +Finds the HyperSpec at `common-lisp-hyperspec-root'. +With prefix arg, save the URL in the `kill-ring' instead." + (interactive (list (let ((sym (thing-at-point 'symbol t)) + (completion-ignore-case t)) + (completing-read + "Look-up symbol in the Common Lisp HyperSpec: " + #'hash-table-complete (clhs-symbols) + t sym 'clhs-history)) + current-prefix-arg)) + (unless (= ?/ (aref common-lisp-hyperspec-root + (1- (length common-lisp-hyperspec-root)))) + (setq common-lisp-hyperspec-root + (concat common-lisp-hyperspec-root "/"))) + (let ((url (concat common-lisp-hyperspec-root + (gethash (upcase symbol-name) (clhs-symbols))))) + (if kill + (kill-new url) + (browse-url url)))) + +(provide 'clhs) diff --git a/clisp-2.49-configure.dif b/clisp-2.49-configure.dif index 1a33089..5ddcf11 100644 --- a/clisp-2.49-configure.dif +++ b/clisp-2.49-configure.dif @@ -1,12 +1,17 @@ --- - clisp-2.49.90/configure | 4 ++-- - clisp-2.49.90/src/lispbibl.d | 16 +++++++++++----- - clisp-2.49.90/src/makemake.in | 17 +++++++++++++---- - clisp-2.49.90/utils/modprep.lisp | 2 +- - 4 files changed, 27 insertions(+), 12 deletions(-) + clisp-2.49.93+git20240704.f5acef38/configure | 4 +- + clisp-2.49.93+git20240704.f5acef38/modules/clx/new-clx/Makefile.in | 2 - + clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure | 2 - + clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure.in | 2 - + clisp-2.49.93+git20240704.f5acef38/modules/libsvm/libsvm.lisp | 2 - + clisp-2.49.93+git20240704.f5acef38/src/lispbibl.d | 16 ++++++---- + clisp-2.49.93+git20240704.f5acef38/src/makemake.in | 8 ++++- + clisp-2.49.93+git20240704.f5acef38/utils/ccmp2c.c | 1 + clisp-2.49.93+git20240704.f5acef38/utils/modprep.lisp | 2 - + 9 files changed, 26 insertions(+), 13 deletions(-) ---- clisp-2.49.90/configure -+++ clisp-2.49.90/configure 2018-02-12 08:20:34.280915654 +0000 +--- clisp-2.49.93+git20240704.f5acef38/configure ++++ clisp-2.49.93+git20240704.f5acef38/configure 2024-08-29 06:36:55.221117779 +0000 @@ -429,11 +429,11 @@ do passnext=makemake ;; @@ -21,8 +26,52 @@ makemake_args="$makemake_args --vimdir=" prev=vimdir passnext=both ;; ---- clisp-2.49.90/src/lispbibl.d -+++ clisp-2.49.90/src/lispbibl.d 2018-02-12 08:20:34.284915577 +0000 +--- clisp-2.49.93+git20240704.f5acef38/modules/clx/new-clx/Makefile.in ++++ clisp-2.49.93+git20240704.f5acef38/modules/clx/new-clx/Makefile.in 2024-08-29 11:29:26.062049361 +0000 +@@ -18,7 +18,7 @@ distribdir = + ### Custom defs. + CCMP2C = ../../ccmp2c + RM = rm -f +-WANTS = @WANTS@ ++WANTS = @WANTS@ -I ../../ + X_CFLAGS = @X_CFLAGS@ + + # default target: make the module +--- clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure.in ++++ clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure.in 2024-08-29 10:51:10.118941018 +0000 +@@ -16,7 +16,7 @@ AC_LIB_LINKFLAGS([svm]) + BOLD_MSG([LibSVM (Headers)]) + AC_SUBST(LIBSVM_CFLAGS) + AC_SUBST(LIBSVM_LIBS) +-AC_CHECK_HEADERS(svm.h) ++AC_CHECK_HEADERS([libsvm/svm.h]) + if test "$ac_cv_header_svm_h" = "no"; then + AC_MSG_ERROR([cannot find LibSVM headers]) + fi +--- clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure ++++ clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure 2024-08-29 10:50:28.015691883 +0000 +@@ -5526,7 +5526,7 @@ printf "%s\n" "$as_me: ${term_bold}** Li + + + +-ac_fn_c_check_header_compile "$LINENO" "svm.h" "ac_cv_header_svm_h" "$ac_includes_default" ++ac_fn_c_check_header_compile "$LINENO" "libsvm/svm.h" "ac_cv_header_svm_h" "$ac_includes_default" + if test "x$ac_cv_header_svm_h" = xyes + then : + printf "%s\n" "#define HAVE_SVM_H 1" >>confdefs.h +--- clisp-2.49.93+git20240704.f5acef38/modules/libsvm/libsvm.lisp ++++ clisp-2.49.93+git20240704.f5acef38/modules/libsvm/libsvm.lisp 2024-08-29 10:50:46.759357613 +0000 +@@ -15,7 +15,7 @@ + + (default-foreign-language :stdc) + +-(c-lines "#include \"config.h\"~%#include ~%") ++(c-lines "#include \"config.h\"~%#include ~%") + + (defvar *libsvm-output* *standard-output* "The stream for svm.so messages.") + (cl:defun write-string-to-libsvm-output (s) +--- clisp-2.49.93+git20240704.f5acef38/src/lispbibl.d ++++ clisp-2.49.93+git20240704.f5acef38/src/lispbibl.d 2024-08-29 06:36:55.221117779 +0000 @@ -178,7 +178,7 @@ #define PC386 /* IBMPC-compatible with 80386/80486-processor */ #endif @@ -32,7 +81,7 @@ #define PC386 #endif #if (defined(sun) && defined(unix) && defined(sparc)) -@@ -270,8 +270,14 @@ +@@ -274,8 +274,14 @@ #endif #ifdef GENERIC_UNIX #define UNIX @@ -48,7 +97,7 @@ #endif #ifdef __GNU__ #define UNIX_HURD /* the GNU system (Hurd + glibc) */ -@@ -1281,7 +1287,7 @@ typedef signed int signean; +@@ -1271,7 +1277,7 @@ typedef signed int signean; address of its component 'ident' and return it as number: */ #include #ifndef offsetof @@ -57,7 +106,7 @@ #endif /* Determine the offset of an array 'ident' in a struct of the type 'type': */ #if defined(__cplusplus) || defined(MICROSOFT) -@@ -5520,9 +5526,9 @@ typedef signed_int_with_n_bits(intVsize) +@@ -5439,9 +5445,9 @@ typedef signed_int_with_n_bits(intVsize) type_data_object(type,data) */ #if defined(WIDE) && defined(WIDE_STRUCT) #if BIG_ENDIAN_P==WIDE_ENDIANNESS @@ -69,9 +118,9 @@ #endif #elif !(oint_addr_shift==0) #define type_data_object(type,data) \ ---- clisp-2.49.90/src/makemake.in -+++ clisp-2.49.90/src/makemake.in 2018-02-12 08:24:54.275897762 +0000 -@@ -250,6 +250,9 @@ verbose=${CLISP_MAKEMAKE_VERBOSE:-false} +--- clisp-2.49.93+git20240704.f5acef38/src/makemake.in ++++ clisp-2.49.93+git20240704.f5acef38/src/makemake.in 2024-08-29 06:36:55.221117779 +0000 +@@ -248,6 +248,9 @@ verbose=${CLISP_MAKEMAKE_VERBOSE:-false} # Handle --with-... arguments while test -z "$endofargs"; do case "$1" in @@ -81,7 +130,7 @@ -verb* | --verb* ) verbose=`echol "$1"|sed 's/-*v[^=]*=*//'` test -n "${verbose}" || verbose=true -@@ -1183,11 +1186,13 @@ else +@@ -1166,11 +1169,13 @@ else fi # Main cpu dependencies: @@ -95,17 +144,7 @@ test "${verbose}" = true -o "${verbose}" = yes && \ cat <&2 -@@ -1384,6 +1389,9 @@ if [ $XCC_GCC = true ] ; then - XCFLAGS=${XCFLAGS}" -pthread" - fi - -+ if [ -n "${MYCFLAGS}" ] ; then -+ XCFLAGS=$XCFLAGS' ${MYCFLAGS} ' -+ fi - else - - if [ $CROSS = false ] ; then -@@ -4105,8 +4113,9 @@ if [ $CROSS = false ] ; then +@@ -4036,8 +4041,9 @@ if [ $CROSS = false ] ; then echol if [ "${with_dynamic_modules}" != no ]; then depends="full install-modules force" @@ -116,8 +155,18 @@ echotab "mkdir -p \$(DESTDIR)\$(lisplibdir)/dynmod" echotab "DESTDIR=\`cd \"\$(DESTDIR)\$(lisplibdir)\"; pwd\` CLISP='./clisp -q -norc' ./clisp-link install \$(MODULES)" echol ---- clisp-2.49.90/utils/modprep.lisp -+++ clisp-2.49.90/utils/modprep.lisp 2018-02-12 08:20:34.288915500 +0000 +--- clisp-2.49.93+git20240704.f5acef38/utils/ccmp2c.c ++++ clisp-2.49.93+git20240704.f5acef38/utils/ccmp2c.c 2024-08-29 09:03:44.413971085 +0000 +@@ -1042,6 +1042,7 @@ main (int argc, char *argv[]) + infilename = argv[1]; + + /* Emit prologue. */ ++ printf ("#include \n"); + printf ("#include \n"); + printf ("#include \n"); + printf ("#include \n"); +--- clisp-2.49.93+git20240704.f5acef38/utils/modprep.lisp ++++ clisp-2.49.93+git20240704.f5acef38/utils/modprep.lisp 2024-08-29 06:36:55.221117779 +0000 @@ -328,7 +328,7 @@ FOO(bar,baz,zot) ==> FOO; (bar baz zot); ((or (char= cc #\_) (char= cc #\-)) (write-char #\_ out)) (t (format out "_~2,'0x" (char-code cc)))))) diff --git a/clisp-2.49-gctoken.dif b/clisp-2.49-gctoken.dif index f798c8e..b0d94f8 100644 --- a/clisp-2.49-gctoken.dif +++ b/clisp-2.49-gctoken.dif @@ -3,7 +3,7 @@ diff --git a/utils/gctrigger.c b/utils/gctrigger.c --- a/utils/gctrigger.c +++ b/utils/gctrigger.c -@@ -601,6 +601,7 @@ static inline void VectorToken_delete (V +@@ -606,6 +606,7 @@ static inline void VectorToken_delete (V static Token nexttoken (boolean within_prep_directive) { Token token; diff --git a/clisp-2.49-rpath.dif b/clisp-2.49-rpath.dif deleted file mode 100644 index 4440ef6..0000000 --- a/clisp-2.49-rpath.dif +++ /dev/null @@ -1,16 +0,0 @@ ---- - src/aclocal.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/aclocal.m4 b/src/aclocal.m4 ---- a/src/aclocal.m4 -+++ b/src/aclocal.m4 -@@ -7723,7 +7723,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], - dnl When using libtool, the option that works for both libraries and - dnl executables is -R. The -R options are cumulative. - for found_dir in $ltrpathdirs; do -- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" -+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-Wl,-rpath-link$found_dir" - done - fi - popdef([P_A_C_K]) diff --git a/clisp-2.49.92.tar.bz2 b/clisp-2.49.92.tar.bz2 deleted file mode 100644 index 48b3ed6..0000000 --- a/clisp-2.49.92.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd443a94aa9b02da4c4abbcecfc04ffff1919c0a8b0e7e35649b86198cd6bb89 -size 8919616 diff --git a/clisp-2.49.93+git20240704.f5acef38.tar.xz b/clisp-2.49.93+git20240704.f5acef38.tar.xz new file mode 100644 index 0000000..28ae0dd --- /dev/null +++ b/clisp-2.49.93+git20240704.f5acef38.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b7d512b12653ea022cc461308ecd36a6aae66473ae797fbcd37ba7b663e4fa4 +size 7239936 diff --git a/clisp-gcc14.patch b/clisp-gcc14.patch index 4ed41f8..71c0873 100644 --- a/clisp-gcc14.patch +++ b/clisp-gcc14.patch @@ -1,13 +1,17 @@ --- - modules/berkeley-db/bdb.c | 8 ++++---- - modules/berkeley-db/configure | 2 +- - modules/berkeley-db/configure.in | 2 +- - modules/gdbm/gdbm.c | 4 ++-- - 4 files changed, 8 insertions(+), 8 deletions(-) + modules/berkeley-db/bdb.c | 11 ++++++----- + modules/berkeley-db/configure | 2 +- + modules/berkeley-db/configure.in | 2 +- + src/foreign.d | 2 +- + src/lispbibl.d | 2 +- + src/spvw_fault.d | 2 +- + src/spvw_language.d | 2 +- + src/spvw_sigsegv.d | 2 +- + 8 files changed, 13 insertions(+), 12 deletions(-) --- modules/berkeley-db/bdb.c -+++ modules/berkeley-db/bdb.c 2024-08-28 13:29:49.651861291 +0000 -@@ -365,7 +365,7 @@ DEFUN(BDB:DBE-CREATE,&key PASSWORD ENCRY ++++ modules/berkeley-db/bdb.c 2024-08-29 11:45:09.133249570 +0000 +@@ -364,7 +364,7 @@ DEFUN(BDB:DBE-CREATE,&key PASSWORD ENCRY dbe_set_encryption(dbe,&STACK_0,&STACK_1); skipSTACK(2); /* set error & message callbacks */ @@ -16,7 +20,7 @@ #if defined(HAVE_DB_ENV_SET_MSGCALL) dbe->set_msgcall(dbe,&message_callback); #endif -@@ -1213,7 +1213,7 @@ DEFUN(BDB:DB-CREATE, dbe) +@@ -1212,7 +1212,7 @@ DEFUN(BDB:DB-CREATE, dbe) SYSCALL(db_create,(&db,dbe,0)); if (!dbe) { /* set error callback */ begin_system_call(); @@ -25,7 +29,7 @@ end_system_call(); } wrap_finalize(db,STACK_0,`BDB::MKDB`,``BDB::DB-CLOSE``); -@@ -1515,9 +1515,9 @@ DEFUN(BDB:DB-STAT, db &key FAST-STAT TRA +@@ -1514,9 +1514,9 @@ DEFUN(BDB:DB-STAT, db &key FAST-STAT TRA { /* Return database statistics */ DB_TXN *txn = (DB_TXN*)bdb_handle(popSTACK(),`BDB::TXN`,BH_NIL_IS_NULL); #if defined(HAVE_DB_STAT_ACCEPT_TXN) @@ -37,19 +41,18 @@ #endif u_int32_t flags = missingp(STACK_0) ? 0 : DB_FAST_STAT; DB *db = (DB*)bdb_handle(STACK_1,`BDB::DB`,BH_VALID); ---- modules/berkeley-db/configure -+++ modules/berkeley-db/configure 2024-08-28 13:50:11.630365795 +0000 -@@ -5712,7 +5712,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ - int - main () - { --DB db; db.stat(&db,NULL,0,NULL); -+DB db; db.stat(&db,NULL,NULL,0); - ; - return 0; - } +@@ -2752,7 +2752,8 @@ DEFUN(BDB:TXN-RECOVER, dbe &key FIRST :N + DB_ENV *dbe = (DB_ENV*)bdb_handle(popSTACK(),`BDB::DBE`,BH_VALID); + u_int32_t tx_max; + DB_PREPLIST *preplist; +- int status, ii; ++ int status; ++ long ii; + u_int32_t retnum; + SYSCALL(dbe->get_tx_max,(dbe,&tx_max)); + preplist = (DB_PREPLIST*)clisp_malloc(tx_max * sizeof(DB_PREPLIST)); --- modules/berkeley-db/configure.in -+++ modules/berkeley-db/configure.in 2024-08-28 13:49:39.294928188 +0000 ++++ modules/berkeley-db/configure.in 2024-08-29 07:17:20.463971573 +0000 @@ -38,7 +38,7 @@ AC_CHECK_SIZEOF(db_recno_t,,[#include AC_CACHE_CHECK([whether DB->stat() accepts TXNid],ac_cv_db_stat_accept_txn,[ @@ -59,23 +62,69 @@ ac_cv_db_stat_accept_txn=yes,ac_cv_db_stat_accept_txn=no)]) if test "$ac_cv_db_stat_accept_txn" = "yes"; then AC_DEFINE(HAVE_DB_STAT_ACCEPT_TXN,1,[Define to 1 if DB->stat() accepts TXNid]) ---- modules/gdbm/gdbm.c -+++ modules/gdbm/gdbm.c 2024-08-28 11:55:51.720519565 +0000 -@@ -66,7 +66,7 @@ DEFCHECKER(check_gdbm_errno, prefix=GDBM - READER-CANT-REORGANIZE UNKNOWN-UPDATE ITEM-NOT-FOUND \ - REORGANIZE-FAILED CANNOT-REPLACE ILLEGAL-DATA OPT-ALREADY-SET \ - OPT-ILLEGAL) --static _Noreturn void error_gdbm (char *fatal_message) { -+static _Noreturn void error_gdbm (const char *fatal_message) { - end_blocking_system_call(); /* in case we are called from _gdbm_fatal() */ - pushSTACK(`GDBM::GDBM-ERROR`); - pushSTACK(`:MESSAGE`); -@@ -126,7 +126,7 @@ static object open_gdbm (object path, in - GDBM_FILE gdbm; - with_string_0(path, GLO(pathname_encoding), name, { - SYSCALL(gdbm = gdbm_open(name, bsize, rw, mode, -- (void (*)(void))error_gdbm)); -+ (void (*)(const char *))error_gdbm)); - }); - if (gdbm == NULL) error_gdbm(NULL); - return allocate_fpointer(gdbm); +--- modules/berkeley-db/configure ++++ modules/berkeley-db/configure 2024-08-29 07:17:20.463971573 +0000 +@@ -6241,7 +6241,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ + int + main (void) + { +-DB db; db.stat(&db,NULL,0,NULL); ++DB db; db.stat(&db,NULL,NULL,0); + ; + return 0; + } +--- src/foreign.d ++++ src/foreign.d 2024-08-29 07:24:17.508412215 +0000 +@@ -2417,7 +2417,7 @@ local void count_walk_post (object fvd, + { + unused(fvd); unused(obj); unused(walk); + } +-local maygc void convert_to_foreign_needs (object fvd, object obj, ++local maygc __attribute__((noinline)) void convert_to_foreign_needs (object fvd, object obj, + struct foreign_layout *sas) + { + struct walk_lisp walk +--- src/lispbibl.d ++++ src/lispbibl.d 2024-08-29 07:25:56.826610237 +0000 +@@ -11641,7 +11641,7 @@ All other long words on the LISP-Stack a + #define FAST_SP + #endif + #elif defined(GNU) && defined(SP_register) +- register __volatile__ aint __SP __asm__(SP_register); ++ register aint __SP __asm__(SP_register); + #ifdef SPARC64 + #define SP() (__SP+2048) + #else +--- src/spvw_fault.d ++++ src/spvw_fault.d 2024-08-29 07:20:02.297039630 +0000 +@@ -289,7 +289,7 @@ modexp bool handle_fault_range (int prot + + local void xmprotect (aint addr, uintM len, int prot) { + if (mprotect((void*)addr,len,prot) < 0) { +- fprintf(stderr,GETTEXTL("mprotect(0x%lx,%d,%d) failed."),addr,len,prot); ++ fprintf(stderr,GETTEXTL("mprotect(0x%lx,%lu,%d) failed."),addr,(unsigned long)len,prot); + errno_out(OS_errno); + abort(); + } +--- src/spvw_language.d ++++ src/spvw_language.d 2024-08-29 07:20:29.048554790 +0000 +@@ -172,7 +172,7 @@ global void init_language + { /* Invalidate the gettext internal caches. */ + char *td = textdomain(NULL); + if (NULL == td) { +- ANSIC_ERROR("textdomain",NULL); ++ ANSIC_ERROR("textdomain",""); + } + if (NULL == textdomain(td)) { + ANSIC_ERROR("textdomain",td); +--- src/spvw_sigsegv.d ++++ src/spvw_sigsegv.d 2024-08-29 07:21:09.115828518 +0000 +@@ -62,7 +62,7 @@ local void print_mem_stats (void) { + /* Put a breakpoint here if you want to catch CLISP just before it dies. */ + global void sigsegv_handler_failed (void* address) { + fprint(stderr,"\n"); +- fprintf(stderr,GETTEXTL("SIGSEGV cannot be cured. Fault address = 0x%lx."), ++ fprintf(stderr,GETTEXTL("SIGSEGV cannot be cured. Fault address = 0x%p."), + address); + fprint(stderr,"\n"); + print_mem_stats(); diff --git a/clisp-link.dif b/clisp-link.dif index ca822d2..867ec84 100644 --- a/clisp-link.dif +++ b/clisp-link.dif @@ -16,7 +16,7 @@ cp ${f} ${absdestdir}/${DYNMOD}/ --- src/lispbibl.d +++ src/lispbibl.d 2018-02-19 09:30:11.552748021 +0000 -@@ -1631,6 +1631,8 @@ typedef SLONG sint32; /* signed 32 bi +@@ -1610,6 +1610,8 @@ typedef SLONG sint32; /* signed 32 bi /* Emulate 64-Bit-numbers using two 32-Bit-numbers. */ typedef struct { sintL hi; uintL lo; } sintL2; /* signed 64 Bit integer */ typedef struct { uintL hi; uintL lo; } uintL2; /* unsigned 64 Bit integer */ @@ -25,7 +25,7 @@ #endif /* Use 'uintX' and 'sintX' for Integers with approximately given width and a minumum of storage space. */ -@@ -14397,7 +14399,7 @@ re-enters the corresponding top-level lo +@@ -14188,7 +14190,7 @@ re-enters the corresponding top-level lo #define pushSTACK(obj) (STACK_(-1) = (obj), STACK skipSTACKop -1) /* Almost equivalent with *--STACK = obj resp. *STACK++ = obj , but Careful: first enter the object into STACK_(-1), THEN modify the STACK! */ diff --git a/clisp.changes b/clisp.changes index 29c9d51..b9d38bc 100644 --- a/clisp.changes +++ b/clisp.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Thu Aug 29 12:15:45 UTC 2024 - Dr. Werner Fink + +- Update to latest commit f5acef38 of devel version 2.49.93+ from 20240704 +- Add modules libsvm and pari as well as feature ffcall +- Add source clhs.el as upstream has skipped this +- Drop patch + * clisp-2.49-rpath.dif + * clisp-2.49.92.tar.bz2 +- Port patches + * clisp-2.49-configure.dif + * clisp-2.49-gctoken.dif + * clisp-gcc14.patch + * clisp-link.dif + ------------------------------------------------------------------- Wed Aug 28 12:16:12 UTC 2024 - Dr. Werner Fink diff --git a/clisp.spec b/clisp.spec index 88853bc..5671c2e 100644 --- a/clisp.spec +++ b/clisp.spec @@ -16,15 +16,19 @@ # +%global commit f5acef38 +%global vdate 20240704 + Name: clisp -Version: 2.49.92 +Version: 2.49.93 Release: 0 Summary: A Common Lisp Interpreter # Included gllib is GPL-3.0-or-later License: GPL-2.0-or-later AND GPL-3.0-or-later Group: Development/Languages/Other URL: https://gitlab.com/gnu-clisp/clisp -Source: %name-%version.tar.bz2 +Source: %{name}-%{version}+git%{vdate}.%{commit}.tar.xz +Source2: clhs.el Source3: clisp-rpmlintrc Source4: README.SUSE # PATCH-EXTEND-OPENSUSE Set the process execution domain @@ -39,15 +43,12 @@ Patch5: clisp-2.49-gctoken.dif Patch6: clisp-2.49-clx_demos.dif # PATCH-EXTEND-OPENSUSE Enable postgresql SSL feature Patch7: clisp-2.49-postgresql.dif -# PATCH-FIX-OPENSUSE Do not use rpath but rpath-link -Patch8: clisp-2.49-rpath.dif # PATCH-FIX-OPENSUSE Correct path for header for System V IPC system calls Patch12: clisp-linux.patch Patch13: clisp-gcc14.patch Patch14: clisp-link.dif Patch16: clisp-db6.diff -BuildRoot: %{_tmppath}/%{name}-%{version}-build %global vimdir %{_datadir}/vim/site/after/syntax BuildRequires: FastCGI-devel BuildRequires: db-devel @@ -62,9 +63,12 @@ BuildRequires: glib2-devel BuildRequires: gtk2-devel BuildRequires: libglade2-devel BuildRequires: libsigsegv-devel +BuildRequires: libsvm-devel BuildRequires: ncurses-devel BuildRequires: net-tools BuildRequires: openssl-devel +BuildRequires: pari-devel +BuildRequires: pari-gp BuildRequires: pcre-devel BuildRequires: pcre2-devel BuildRequires: postgresql-devel @@ -130,14 +134,13 @@ with the file README. The subdirectory contains two nice applications. %prep -%setup -qT -b0 +%setup -qT -b0 -n %{name}-%{version}+git%{vdate}.%{commit} %patch -P 1 -p1 -b .sel %patch -P 2 -p1 -b .wooh %patch -P 4 -p1 -b .conf %patch -P 5 -p1 -b .gc %patch -P 6 -p1 -b .demos %patch -P 7 -p1 -b .psql -%patch -P 8 -p1 -b .rpath %patch -P 12 -p1 -b .p12 %patch -P 13 -p0 -b .p13 %patch -P 14 -p0 -b .p14 @@ -151,8 +154,8 @@ contains two nice applications. ulimit -Ss unlimited || true ulimit -Hs unlimited || true unset LC_CTYPE -LANG=POSIX -LC_ALL=POSIX +LANG=C.UTF-8 +LC_ALL=C.UTF-8 export LANG LC_ALL # # Current system @@ -271,6 +274,13 @@ fi find -name configure | xargs -r \ sed -ri "/ac_precious_vars='build_alias\$/ {N; s/build_alias\\n//; }" +# Runtime linker choose system libraries +sed -ri 's/(\$\{wl\})-rpath (\$\{wl\})/\1-rpath-link \2/g' src/build-aux/config.rpath +# Link libraries if really needed +sed -ri "s/CC='\\$\{CC\}'/CC='\\$\{CC\} -Wl,--as-needed'/g" src/makemake.in +#Default browser +sed -ri 's/;; (\(setq \*browser\* .*\))/\1/' src/cfgunix.lisp + # # The modules i18n, syscalls, regexp # are part of the base clisp system. @@ -286,6 +296,7 @@ tail -q -s 0.5 -f $SCREENLOG & pid=$! --fsstnd=suse \ --with-readline \ --with-dynamic-modules \ + --with-ffcall \ --with-gettext \ --with-module=asdf \ --with-module=dbus \ @@ -294,13 +305,20 @@ tail -q -s 0.5 -f $SCREENLOG & pid=$! --with-module=queens \ --with-module=gdbm \ --with-module=gtk2 \ + --with-module=pari \ --with-module=pcre \ --with-module=rawsock \ --with-module=zlib \ + --with-module=libsvm \ --with-module=bindings/glibc\ --with-module=clx/new-clx \ --with-module=berkeley-db \ - --with-module=postgresql + --with-module=postgresql \ + --config \ + build \ + CC="${CC}" \ + CFLAGS="%{build_cflags} ${MYCFLAGS} -Wa,--noexecstack" \ + LDFLAGS="-Wl,--as-needed -Wl,-z,relro -Wl,-z,noexecstack" %_make -C build lispbibl.h grep TYPECODES build/lispbibl.h || : @@ -342,11 +360,12 @@ find modules/clx/ -name '*.demos' | xargs --no-run-if-empty rm -vf # # Current system # +. ./version.sh SYSTEM=${RPM_ARCH}-suse-linux LSPDOC=%{_docdir}/clisp DOCDOC=${LSPDOC}/doc CLXDOC=${LSPDOC}/clx -LSPLIB=%{_libdir}/clisp-%{version} +LSPLIB=%{_libdir}/clisp-${VERSION_NUMBER} CLXLIB=${LSPLIB}/full # # Install the current system @@ -387,6 +406,7 @@ find %{buildroot}${LSPLIB}/ -name '*.run' | xargs -r chmod 0755 rm -rf %{buildroot}${LSPLIB}/new-clx/demos/ find %{buildroot} -type f | xargs -r chmod u+w chmod a+x %{buildroot}${LSPLIB}/build-aux/{config,depcomp}* +install -c -m 644 %{S:2} %{buildroot}%{_datadir}/emacs/site-lisp/clhs.el %fdupes %{buildroot}${LSPLIB}/ %find_lang clisp %find_lang clisplow clisp.lang @@ -395,7 +415,7 @@ chmod a+x %{buildroot}${LSPLIB}/build-aux/{config,depcomp}* %defattr(-,root,root,755) %{_bindir}/clisp %{_bindir}/clisp-link -%{_libdir}/clisp-%{version}/ +%{_libdir}/clisp-%{version}*/ %{_datadir}/aclocal/clisp.m4 %{_datadir}/emacs/site-lisp/ %doc %{_datadir}/man/man1/clisp*.1.gz