diff --git a/ecl-16.1.3-format-directive-limit.patch b/ecl-16.1.3-format-directive-limit.patch new file mode 100644 index 0000000..73e3353 --- /dev/null +++ b/ecl-16.1.3-format-directive-limit.patch @@ -0,0 +1,77 @@ +--- src/lsp/format.lsp.orig 2016-12-19 03:25:00.000000000 -0700 ++++ src/lsp/format.lsp 2019-01-17 09:14:41.580994625 -0700 +@@ -308,11 +308,13 @@ + :start (format-directive-start struct) + :end (format-directive-end struct)))) + ++(defconstant +format-directive-limit+ (1+ (char-code #\~))) ++ + #+formatter + (defparameter *format-directive-expanders* +- (make-array char-code-limit :initial-element nil)) ++ (make-array +format-directive-limit+ :initial-element nil)) + (defparameter *format-directive-interpreters* +- (make-array char-code-limit :initial-element nil)) ++ (make-array +format-directive-limit+ :initial-element nil)) + + (defparameter *default-format-error-control-string* nil) + (defparameter *default-format-error-offset* nil) +@@ -545,24 +547,24 @@ + (write-string directive stream) + (interpret-directive-list stream (cdr directives) orig-args args)) + (#-ecl format-directive #+ecl vector ++ (multiple-value-bind ++ (new-directives new-args) ++ (let* ((code (char-code (format-directive-character directive))) ++ (function ++ (and (< code +format-directive-limit+) ++ (svref *format-directive-interpreters* code))) ++ (*default-format-error-offset* ++ (1- (format-directive-end directive)))) ++ (unless function ++ (error 'format-error ++ :complaint "Unknown format directive.")) + (multiple-value-bind + (new-directives new-args) +- (let ((function +- (svref *format-directive-interpreters* +- (char-code (format-directive-character +- directive)))) +- (*default-format-error-offset* +- (1- (format-directive-end directive)))) +- (unless function +- (error 'format-error +- :complaint "Unknown format directive.")) +- (multiple-value-bind +- (new-directives new-args) +- (funcall function stream directive +- (cdr directives) orig-args args) +- (values new-directives new-args))) +- (interpret-directive-list stream new-directives +- orig-args new-args))))) ++ (funcall function stream directive ++ (cdr directives) orig-args args) ++ (values new-directives new-args))) ++ (interpret-directive-list stream new-directives ++ orig-args new-args))))) + args)) + + +@@ -634,11 +636,12 @@ + (values `(write-string ,directive stream) + more-directives)) + (format-directive +- (let ((expander +- (aref *format-directive-expanders* +- (char-code (format-directive-character directive)))) +- (*default-format-error-offset* +- (1- (format-directive-end directive)))) ++ (let* ((code (char-code (format-directive-character directive))) ++ (expander ++ (and (< code +format-directive-limit+) ++ (svref *format-directive-expanders* code))) ++ (*default-format-error-offset* ++ (1- (format-directive-end directive)))) + (if expander + (funcall expander directive more-directives) + (error 'format-error diff --git a/ecl.spec b/ecl.spec index 9ce9076..6dd45ec 100644 --- a/ecl.spec +++ b/ecl.spec @@ -1,6 +1,6 @@ Name: ecl Version: 16.1.3 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Embeddable Common-Lisp License: LGPLv2+ and BSD and MIT and Public Domain @@ -38,6 +38,8 @@ Patch3: %{name}-16.1.3-end_of_line.patch Patch4: %{name}-16.1.3-sse-printer.patch # Upstream patch to fix maxima test failure with atan with signed zero Patch5: %{name}-16.1.3-atan.patch +# Upstream patch to work around https://trac.sagemath.org/ticket/23011 +Patch6: %{name}-16.1.3-format-directive-limit.patch BuildRequires: gcc BuildRequires: libX11-devel @@ -81,6 +83,7 @@ Gray streams. %patch3 %patch4 %patch5 +%patch6 # Remove spurious executable bits find src/c -type f -perm /0111 | xargs chmod a-x @@ -128,9 +131,6 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps -%ldconfig_scriptlets - - %files %{_bindir}/ecl %{_bindir}/ecl-config @@ -148,6 +148,9 @@ cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps %changelog +* Thu Jan 17 2019 Jerry James - 16.1.3-7 +- Add -format-directive-limit patch from sagemath + * Thu Jul 12 2018 Fedora Release Engineering - 16.1.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild