projects/guix·blob python-team · refs

58 lines · 2.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2013, 2018 Ludovic Courtès <[email protected]>
3;;; Copyright © 2017, 2024 Efraim Flashner <[email protected]>
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages libsigsegv)
21 #:use-module (guix licenses)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix utils)
25 #:use-module (guix build-system gnu))
26
27(define-public libsigsegv
28 (package
29 (name "libsigsegv")
30 (version "2.14")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append
34 "mirror://gnu/libsigsegv/libsigsegv-"
35 version ".tar.gz"))
36 (sha256
37 (base32 "15d2r831xz94s7540nvb1gbfl062g7mrnj88m60wyr1kh10kkb6d"))))
38 (build-system gnu-build-system)
39 (home-page "https://www.gnu.org/software/libsigsegv/")
40 (synopsis "Library for handling page faults")
41 (arguments
42 `(;; The shared library isn't built by default but some packages need it.
43 #:configure-flags '("--enable-shared")
44 ;; On some architectures 'struct sigcontext' gets redefined from
45 ;; %linux-libre-headers/include/asm/sigcontext.h
46 ,@(cond ((%current-target-system)
47 `(#:phases (modify-phases %standard-phases
48 (add-before 'configure 'patch-asm-sigcontext-h
49 (lambda _
50 (substitute* (find-files "src" "^fault-.*-old\\.h$")
51 (("#include <asm/sigcontext\\.h>") "")))))))
52 (else '()))))
53 (description
54 "GNU libsigsegv is a library to handle page faults, which occur when a
55program tries to access an unavailable region of memory, in user mode. By
56catching and handling page faults, the program can implement pageable virtual
57memory, stack overflow handlers, and so on.")
58 (license gpl2+)))