summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2021-09-28 11:34:37 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2021-09-28 11:37:02 +0200
commit1623e6023b9b2cd3dbcb663404067717ba6445f1 (patch)
tree938750654b7aa030f980e3bdf69d1bf1fe2f9c9d /gnu
parent226ff4147abd53100664234888a286e4412815cd (diff)
downloadguix-1623e6023b9b2cd3dbcb663404067717ba6445f1.tar.gz
gnu: sbcl-burgled-batteries3: Fix compiling with sbcl >= 2.1.6.
* gnu/packages/patches/sbcl-burgled-batteries3-fix-signals.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/lisp-xyz.scm (sbcl-burgled-batteries3)[source]: Use it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/lisp-xyz.scm4
-rw-r--r--gnu/packages/patches/sbcl-burgled-batteries3-fix-signals.patch70
3 files changed, 74 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index d6286dfc48..d415b892e9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1741,6 +1741,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/rust-reproducible-builds.patch		 \
   %D%/packages/patches/rust-openssl-sys-no-vendor.patch	\
   %D%/packages/patches/sbc-fix-build-non-x86.patch		\
+  %D%/packages/patches/sbcl-burgled-batteries3-fix-signals.patch	\
   %D%/packages/patches/sbcl-clml-fix-types.patch		\
   %D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch	\
   %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch	\
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index fa10506637..76fbf9870a 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -5657,7 +5657,9 @@ high-level way.  This library provides such operators.")
          (file-name (git-file-name name version))
          (sha256
           (base32
-           "1nzn7jawrfajyzwfnzrg2cmn9xxadcqh4szbpg0jggkhdkdzz4wa"))))
+           "1nzn7jawrfajyzwfnzrg2cmn9xxadcqh4szbpg0jggkhdkdzz4wa"))
+         (patches
+          (search-patches "sbcl-burgled-batteries3-fix-signals.patch"))))
       (build-system asdf-build-system/sbcl)
       (arguments
        `(#:tests? #f
diff --git a/gnu/packages/patches/sbcl-burgled-batteries3-fix-signals.patch b/gnu/packages/patches/sbcl-burgled-batteries3-fix-signals.patch
new file mode 100644
index 0000000000..6a41cb0359
--- /dev/null
+++ b/gnu/packages/patches/sbcl-burgled-batteries3-fix-signals.patch
@@ -0,0 +1,70 @@
+commit 0854f21baa167da1ad19618daa331b1a46cbee07
+Author: Satoshi Imai <satoshi.imai@gmail.com>
+Date:   Tue Jun 15 03:46:57 2021 +0900
+
+    Fix to make it works with the current SBCL
+
+diff --git a/api.lisp b/api.lisp
+index 2d8c29b..aed38be 100644
+--- a/api.lisp
++++ b/api.lisp
+@@ -8,8 +8,8 @@
+ (defun startup-python ()
+   (.initialize)
+   (initialize-modules)
+-  #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
+-  (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler)
++  ;; #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
++  ;; (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler)
+   )
+ 
+ (defun shutdown-python ()
+@@ -35,8 +35,9 @@
+   (let ((cpython-initialized? (.is-initialized)))
+     (unless cpython-initialized?
+       (.initialize)
+-      #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
+-      (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler))
++      ;; #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
++      ;; (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler)
++      )
+     (unwind-protect
+          (funcall thunk)
+       (unless cpython-initialized?
+diff --git a/ffi-conditions.lisp b/ffi-conditions.lisp
+index ac03e80..ba1da33 100644
+--- a/ffi-conditions.lisp
++++ b/ffi-conditions.lisp
+@@ -3,8 +3,9 @@
+ ;; Python must have been initialized for our macroexpansions to work.
+ (eval-when (:compile-toplevel :load-toplevel)
+   (.initialize)
+-  #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
+-  (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler))
++  ;; #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
++  ;; (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler)
++  )
+ 
+ (defpyexception "BaseException" (python-condition)
+     (("args" :initarg :args)))
+diff --git a/grovel-include-dir.lisp b/grovel-include-dir.lisp
+index 6583084..62e07f3 100644
+--- a/grovel-include-dir.lisp
++++ b/grovel-include-dir.lisp
+@@ -23,13 +23,15 @@
+       (or (and (uiop:file-exists-p env-value) (cl:list env-value))
+           (error "DLL for PYTHON3 not correctly pointed to by BB_PYTHON3_DYLIB: ~A" env-value)))))
+ 
++(defvar *detected-library* nil)
++
+ (defun detect-python ()
+   (setf *detected-library* nil)
+   (or
+    (let ((env-value (uiop:getenv "BB_PYTHON3_INCLUDE_DIR")))
+      (when env-value
+        (or (uiop:directory-exists-p env-value)
+-           (error "BB_PYTHON3_INCLUDE_DIR is set, but does not point to an actual directory: %a" env-value))))
++           (error "BB_PYTHON3_INCLUDE_DIR is set, but does not point to an actual directory: ~A" env-value))))
+    (when *miniconda3*
+      (let ((path (if (pathnamep *miniconda3*)
+                      *miniconda3*