git: 69dc35aa3d57 - main - lang/sbcl: fix build on i386 and powerpc64*
Kirill Ponomarev <[email protected]> Sun, 02 Aug 2026 07:40:03 +0000
| Newsgroups | gmane.os.freebsd.devel.cvs.ports |
|---|---|
| Message-ID | <[email protected]> |
The branch main has been updated by krion: URL: https://cgit.FreeBSD.org/ports/commit/?id=69dc35aa3d5708ccce3a157db241cd21db220147 commit 69dc35aa3d5708ccce3a157db241cd21db220147 Author: Kirill Ponomarev <[email protected]> AuthorDate: 2026-08-02 07:39:09 +0000 Commit: Kirill Ponomarev <[email protected]> CommitDate: 2026-08-02 07:39:58 +0000 lang/sbcl: fix build on i386 and powerpc64* SB-ALIEN:ALIEN-FUNCALL-INTO is exported unconditionally and documented by the new SB-MANUAL contrib, but the function itself is #+(or x86-64 arm64), so generating the Texinfo sources dies with an undefined-function error on i386, powerpc64 and powerpc64le. Obtained from: https://github.com/sbcl/sbcl/commit/7ee531486117197e89c95507a5919ef08f36220b --- lang/sbcl/Makefile | 1 + .../files/patch-contrib_sb-manual_texinfo.lisp | 110 +++++++++++++++++++++ 2 files changed, 111 insertions(+) diff --git a/lang/sbcl/Makefile b/lang/sbcl/Makefile index bd8ce5b53ba2..ecc6f8bedcb9 100644 --- a/lang/sbcl/Makefile +++ b/lang/sbcl/Makefile @@ -5,6 +5,7 @@ PORTNAME= sbcl DISTVERSION= 2.6.7 DISTVERSIONSUFFIX= -source +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= lang lisp MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${DISTVERSION} \ diff --git a/lang/sbcl/files/patch-contrib_sb-manual_texinfo.lisp b/lang/sbcl/files/patch-contrib_sb-manual_texinfo.lisp new file mode 100644 index 000000000000..9a17e5e16074 --- /dev/null +++ b/lang/sbcl/files/patch-contrib_sb-manual_texinfo.lisp @@ -0,0 +1,110 @@ +--- contrib/sb-manual/texinfo.lisp.orig 2026-07-28 08:09:25 UTC ++++ contrib/sb-manual/texinfo.lisp +@@ -1,5 +1,30 @@ + (in-package :sb-manual) + ++(defun xref-defined-p (xref) ++ (let ((name (xref-name xref)) ++ (locative-type (xref-locative-type xref))) ++ (case locative-type ++ ((function generic-function) ++ (ignore-errors (fdefinition name))) ++ ((variable) ++ (member (sb-int:info :variable :kind name) ++ '(:global :special :constant))) ++ ((declaration) ++ (find name (sb-cltl2:declaration-information 'declaration))) ++ ((class structure condition) ++ (find-class name nil)) ++ ((type) ++ (sb-ext:defined-type-name-p name)) ++ (t ++ (cond ((eq locative-type (dummy 'macro)) ++ (ignore-errors (macro-function name))) ++ ((or (eq locative-type (dummy 'setf-function)) ++ (eq locative-type (dummy 'setf-generic-function))) ++ (ignore-errors (fdefinition name))) ++ (t ++ (assert nil () "Unexpected locative type in ~S." ++ xref))))))) ++ + ;;; We don't DEFINE-DUMMY DREF:ARGLIST and DREF:DOCSTRING because we + ;;; don't want USE-PAX to affect Texinfo output, which it would + ;;; because DREF:ARGLIST differs from the {incom,re}prehensible +@@ -179,40 +204,42 @@ + :depth (1+ depth)))))))))))) + + (defun emit-texinfo-for-definition (xref) +- (multiple-value-bind (docstring *package*) (%docstring xref) +- (multiple-value-bind (type index) +- (locative-type-to-texinfo (xref-locative-type xref)) +- (let* ((name (xref-name xref)) +- (*print-case* :downcase) +- ;; For e.g. #'print +- (*print-pretty* t) +- ;; The arglist must be on the @deffn line. +- (*print-right-margin* most-positive-fixnum)) +- (format t "@anchor{~A ~A ~A}~%" type +- (string-downcase (package-name (symbol-package name))) +- (string-downcase (symbol-name name))) +- ;; E.g. @vvindex @sortas{save-hooks* sb-ext} *save-hooks* [sb-ext] +- (let ((symbol-name (string-downcase (symbol-name name))) +- (symbol-package-name +- (string-downcase (package-name (symbol-package name))))) +- (format t "@~A @sortas{~A ~A} ~A [~A]~%" +- index +- (sort-as-name symbol-name) +- (sort-as-name symbol-package-name) +- symbol-name +- symbol-package-name)) +- ;; Since we took indexing into our own hands, we just use +- ;; @deffn for all definitions. We could also use @defblock and +- ;; @defline. +- (format t "@deffn{~A} ~A~{ ~A~}~%" +- ;; E.g. "Variable" +- type +- (let ((*package* (find-package :cl))) +- (prin1-to-string name)) +- (%arglist xref)) +- (when docstring +- (emit-texinfo-for-docstring docstring (%arglist xref))) +- (format t "@end deffn~%"))))) ++ (if (not (xref-defined-p xref)) ++ (warn "~@<Not documenting ~S because it is not defined.~:@>" xref) ++ (multiple-value-bind (docstring *package*) (%docstring xref) ++ (multiple-value-bind (type index) ++ (locative-type-to-texinfo (xref-locative-type xref)) ++ (let* ((name (xref-name xref)) ++ (*print-case* :downcase) ++ ;; For e.g. #'print ++ (*print-pretty* t) ++ ;; The arglist must be on the @deffn line. ++ (*print-right-margin* most-positive-fixnum)) ++ (format t "@anchor{~A ~A ~A}~%" type ++ (string-downcase (package-name (symbol-package name))) ++ (string-downcase (symbol-name name))) ++ ;; E.g. @vvindex @sortas{save-hooks* sb-ext} *save-hooks* [sb-ext] ++ (let ((symbol-name (string-downcase (symbol-name name))) ++ (symbol-package-name ++ (string-downcase (package-name (symbol-package name))))) ++ (format t "@~A @sortas{~A ~A} ~A [~A]~%" ++ index ++ (sort-as-name symbol-name) ++ (sort-as-name symbol-package-name) ++ symbol-name ++ symbol-package-name)) ++ ;; Since we took indexing into our own hands, we just use ++ ;; @deffn for all definitions. We could also use @defblock and ++ ;; @defline. ++ (format t "@deffn{~A} ~A~{ ~A~}~%" ++ ;; E.g. "Variable" ++ type ++ (let ((*package* (find-package :cl))) ++ (prin1-to-string name)) ++ (%arglist xref)) ++ (when docstring ++ (emit-texinfo-for-docstring docstring (%arglist xref))) ++ (format t "@end deffn~%")))))) + + ;;; Remove leading non-alphanumeric characters. They are not important + ;;; when sorting names into indices.