Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
f03e7115 | 2 | ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> |
0c1a9438 | 3 | ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> |
c44899a2 | 4 | ;;; |
233e7676 | 5 | ;;; This file is part of GNU Guix. |
c44899a2 | 6 | ;;; |
233e7676 | 7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
c44899a2 LC |
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 | ;;; | |
233e7676 | 12 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
c44899a2 LC |
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 | |
233e7676 | 18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
c44899a2 | 19 | |
1ffa7090 | 20 | (define-module (gnu packages libsigsegv) |
4a44e743 | 21 | #:use-module (guix licenses) |
c44899a2 | 22 | #:use-module (guix packages) |
87f5d366 | 23 | #:use-module (guix download) |
c44899a2 LC |
24 | #:use-module (guix build-system gnu)) |
25 | ||
26 | (define-public libsigsegv | |
27 | (package | |
28 | (name "libsigsegv") | |
3b1b5042 | 29 | (version "2.12") |
c44899a2 | 30 | (source (origin |
87f5d366 | 31 | (method url-fetch) |
c44899a2 | 32 | (uri (string-append |
0db342a5 | 33 | "mirror://gnu/libsigsegv/libsigsegv-" |
c44899a2 LC |
34 | version ".tar.gz")) |
35 | (sha256 | |
3b1b5042 | 36 | (base32 "1dlhqf4igzpqayms25lkhycjq1ccavisx8cnb3y4zapbkqsszq9s")))) |
c44899a2 | 37 | (build-system gnu-build-system) |
6fd52309 | 38 | (home-page "https://www.gnu.org/software/libsigsegv/") |
f50d2669 | 39 | (synopsis "Library for handling page faults") |
9aa949a4 LC |
40 | (arguments |
41 | ;; On MIPS, work around this error: | |
42 | ;; | |
43 | ;; In file included from fault-linux-mips-old.h:18:0, | |
44 | ;; [...] | |
45 | ;; linux-libre-headers-cross-mips64el-linux-gnu-3.3.8/include/asm/sigcontext.h:57:8: error: redefinition of 'struct sigcontext' | |
46 | (if (string-contains (or (%current-target-system) (%current-system)) | |
47 | "mips64el") | |
0c1a9438 EF |
48 | `(#:phases (modify-phases %standard-phases |
49 | (add-before 'configure 'patch-mips-old-h | |
50 | (lambda _ | |
51 | (substitute* "src/fault-linux-mips-old.h" | |
52 | (("#include <asm/sigcontext\\.h>") "")) | |
53 | #t)))) | |
9aa949a4 | 54 | '())) |
c44899a2 | 55 | (description |
79c311b8 | 56 | "GNU libsigsegv is a library to handle page faults, which occur when a |
a22dc0c4 LC |
57 | program tries to access an unavailable region of memory, in user mode. By |
58 | catching and handling page faults, the program can implement pageable virtual | |
59 | memory, stack overflow handlers, and so on.") | |
4a44e743 | 60 | (license gpl2+))) |