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