--- math/sage/Makefile (revision 539562) +++ math/sage/Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= sage PORTVERSION= 9.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= math MASTER_SITES= https://mirrors.xmission.com/sage/src/ \ http://mirrors.xmission.com/sage/src/ \ --- math/sage/files/patch-src_sage_libs_ecl.pxd (nonexistent) +++ math/sage/files/patch-src_sage_libs_ecl.pxd (working copy) @@ -0,0 +1,18 @@ +--- src/sage/libs/ecl.pxd.orig 2020-06-18 17:03:16 UTC ++++ src/sage/libs/ecl.pxd +@@ -39,7 +39,6 @@ cdef extern from "ecl/ecl.h": + ECL_OPT_TRAP_SIGINT, + ECL_OPT_TRAP_SIGILL, + ECL_OPT_TRAP_SIGBUS, +- ECL_OPT_TRAP_SIGCHLD, + ECL_OPT_TRAP_SIGPIPE, + ECL_OPT_TRAP_INTERRUPT_SIGNAL, + ECL_OPT_SIGNAL_HANDLING_THREAD, +@@ -53,7 +52,6 @@ cdef extern from "ecl/ecl.h": + ECL_OPT_LISP_STACK_SAFETY_AREA, + ECL_OPT_C_STACK_SIZE, + ECL_OPT_C_STACK_SAFETY_AREA, +- ECL_OPT_SIGALTSTACK_SIZE, + ECL_OPT_HEAP_SIZE, + ECL_OPT_HEAP_SAFETY_AREA, + ECL_OPT_THREAD_INTERRUPT_SIGNAL, --- math/sage/files/patch-src_sage_libs_ecl.pyx (revision 539532) +++ math/sage/files/patch-src_sage_libs_ecl.pyx (working copy) @@ -1,4 +1,4 @@ ---- src/sage/libs/ecl.pyx.orig 2020-05-22 13:21:27 UTC +--- src/sage/libs/ecl.pyx.orig 2020-06-18 17:03:16 UTC +++ src/sage/libs/ecl.pyx @@ -15,7 +15,7 @@ Library interface to Embeddable Common Lisp (ECL) #adapted to work with pure Python types. @@ -5,7 +5,7 @@ from libc.stdlib cimport abort -from libc.signal cimport SIGINT, SIGBUS, SIGSEGV, SIGCHLD -+from libc.signal cimport SIGINT, SIGBUS, SIGSEGV, SIGCHLD, SIGFPE ++from libc.signal cimport SIGINT, SIGBUS, SIGSEGV, SIGFPE from libc.signal cimport raise_ as signal_raise from posix.signal cimport sigaction, sigaction_t cimport cysignals.signals @@ -24,7 +24,41 @@ cdef cl_object string_to_object(char * s): return ecl_read_from_cstring(s) -@@ -238,6 +243,7 @@ def init_ecl(): +@@ -139,7 +144,6 @@ def test_ecl_options(): + ECL_OPT_TRAP_SIGINT = 1 + ECL_OPT_TRAP_SIGILL = 1 + ECL_OPT_TRAP_SIGBUS = 1 +- ECL_OPT_TRAP_SIGCHLD = 0 + ECL_OPT_TRAP_SIGPIPE = 1 + ECL_OPT_TRAP_INTERRUPT_SIGNAL = 1 + ECL_OPT_SIGNAL_HANDLING_THREAD = 0 +@@ -153,7 +157,6 @@ def test_ecl_options(): + ECL_OPT_LISP_STACK_SAFETY_AREA = ... + ECL_OPT_C_STACK_SIZE = ... + ECL_OPT_C_STACK_SAFETY_AREA = ... +- ECL_OPT_SIGALTSTACK_SIZE = 1 + ECL_OPT_HEAP_SIZE = ... + ECL_OPT_HEAP_SAFETY_AREA = ... + ECL_OPT_THREAD_INTERRUPT_SIGNAL = ... +@@ -171,8 +174,6 @@ def test_ecl_options(): + ecl_get_option(ECL_OPT_TRAP_SIGILL))) + print('ECL_OPT_TRAP_SIGBUS = {0}'.format( + ecl_get_option(ECL_OPT_TRAP_SIGBUS))) +- print('ECL_OPT_TRAP_SIGCHLD = {0}'.format( +- ecl_get_option(ECL_OPT_TRAP_SIGCHLD))) + print('ECL_OPT_TRAP_SIGPIPE = {0}'.format( + ecl_get_option(ECL_OPT_TRAP_SIGPIPE))) + print('ECL_OPT_TRAP_INTERRUPT_SIGNAL = {0}'.format( +@@ -199,8 +200,6 @@ def test_ecl_options(): + ecl_get_option(ECL_OPT_C_STACK_SIZE))) + print('ECL_OPT_C_STACK_SAFETY_AREA = {0}'.format( + ecl_get_option(ECL_OPT_C_STACK_SAFETY_AREA))) +- print('ECL_OPT_SIGALTSTACK_SIZE = {0}'.format( +- ecl_get_option(ECL_OPT_SIGALTSTACK_SIZE))) + print('ECL_OPT_HEAP_SIZE = {0}'.format( + ecl_get_option(ECL_OPT_HEAP_SIZE))) + print('ECL_OPT_HEAP_SAFETY_AREA = {0}'.format( +@@ -238,14 +237,12 @@ def init_ecl(): global ecl_has_booted cdef char *argv[1] cdef sigaction_t sage_action[32] @@ -32,7 +66,15 @@ cdef int i if ecl_has_booted: -@@ -257,6 +263,8 @@ def init_ecl(): + raise RuntimeError("ECL is already initialized") + +- # we need it to stop handling SIGCHLD +- ecl_set_option(ECL_OPT_TRAP_SIGCHLD, 0); +- + #we keep our own GMP memory functions. ECL should not claim them + ecl_set_option(ECL_OPT_SET_GMP_MEMORY_FUNCTIONS,0); + +@@ -257,6 +254,8 @@ def init_ecl(): for i in range(1,32): sigaction(i, NULL, &sage_action[i]) @@ -41,7 +83,7 @@ #initialize ECL ecl_set_option(ECL_OPT_SIGNAL_HANDLING_THREAD, 0) cl_boot(1, argv) -@@ -264,8 +272,12 @@ def init_ecl(): +@@ -264,18 +263,19 @@ def init_ecl(): #save signal handler from ECL sigaction(SIGINT, NULL, &ecl_sigint_handler) sigaction(SIGBUS, NULL, &ecl_sigbus_handler) @@ -48,13 +90,15 @@ + sigaction(SIGFPE, NULL, &ecl_sigfpe_handler) sigaction(SIGSEGV, NULL, &ecl_sigsegv_handler) +- #verify that no SIGCHLD handler was installed +- cdef sigaction_t sig_test +- sigaction(SIGCHLD, NULL, &sig_test) +- assert sage_action[SIGCHLD].sa_handler == NULL # Sage does not set SIGCHLD handler +- assert sig_test.sa_handler == NULL # And ECL bootup did not set one + #save ECL's floating point exception flags + ecl_feflags = fegetexcept() -+ - #verify that no SIGCHLD handler was installed - cdef sigaction_t sig_test - sigaction(SIGCHLD, NULL, &sig_test) -@@ -276,6 +288,9 @@ def init_ecl(): + + #and put the Sage signal handlers back for i in range(1,32): sigaction(i, &sage_action[i], NULL) @@ -64,7 +108,7 @@ #initialise list of objects and bind to global variable # *SAGE-LIST-OF-OBJECTS* to make it rooted in the reachable tree for the GC list_of_objects=cl_cons(Cnil,cl_cons(Cnil,Cnil)) -@@ -319,7 +334,6 @@ def init_ecl(): +@@ -319,7 +319,6 @@ def init_ecl(): (values nil (princ-to-string cnd))))) """)) safe_funcall_clobj=cl_eval(string_to_object(b"(symbol-function 'sage-safe-funcall)"))