| 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 "http://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 for handling page faults in user mode. A page |
| 56 | fault occurs when a program tries to access to a region of memory that is |
| 57 | currently not available. Catching and handling a page fault is a useful |
| 58 | technique for implementing pageable virtual memory, memory-mapped access to |
| 59 | persistent databases, generational garbage collectors, stack overflow |
| 60 | handlers, distributed shared memory, and more.") |
| 61 | (license gpl2+))) |