gnu: itstool: Add python2-libxml2 to propagated-inputs.
[jackhill/guix/guix.git] / gnu / packages / gdb.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
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 gdb)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages ncurses)
23 #:use-module (gnu packages readline)
24 #:use-module (gnu packages dejagnu)
25 #:use-module (gnu packages texinfo)
26 #:use-module (gnu packages multiprecision)
27 #:use-module (gnu packages xml)
28 #:use-module (gnu packages guile)
29 #:use-module (gnu packages python)
30 #:use-module (gnu packages pkg-config)
31 #:use-module ((guix licenses) #:select (gpl3+))
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix build-system gnu))
35
36 (define-public gdb
37 (package
38 (name "gdb")
39 (version "7.9.1")
40 (source (origin
41 (method url-fetch)
42 (uri (string-append "mirror://gnu/gdb/gdb-"
43 version ".tar.xz"))
44 (sha256
45 (base32
46 "0h5sfg4ndhb8q4fxbq0hdxfjp35n6ih96f6x8yvb418s84x5976d"))))
47 (build-system gnu-build-system)
48 (arguments
49 '(#:tests? #f ; FIXME "make check" fails on single-processor systems.
50 #:phases (alist-cons-after
51 'configure 'post-configure
52 (lambda _
53 (for-each patch-makefile-SHELL
54 (find-files "." "Makefile\\.in")))
55 (alist-cons-after
56 'install 'post-install
57 (lambda* (#:key outputs #:allow-other-keys)
58 ;; Like Binutils, GDB installs libbfd and libopcodes.
59 ;; However, this leads to collisions when both are
60 ;; installed, and really is none of its business,
61 ;; conceptually. So remove them.
62 (for-each delete-file
63 (find-files (assoc-ref outputs "out")
64 "^lib(opcodes|bfd)\\.")))
65 %standard-phases))))
66 (inputs
67 `(("expat" ,expat)
68 ("mpfr" ,mpfr)
69 ("gmp" ,gmp)
70 ("readline" ,readline)
71 ("ncurses" ,ncurses)
72 ("guile" ,guile-2.0)
73 ("python" ,python)
74 ("python-wrapper" ,python-wrapper)
75 ("dejagnu" ,dejagnu)
76
77 ;; Allow use of XML-formatted syscall information. This enables 'catch
78 ;; syscall' and similar commands.
79 ("libxml2" ,libxml2)))
80 (native-inputs
81 `(("texinfo" ,texinfo)
82 ("pkg-config" ,pkg-config)))
83 (home-page "http://www.gnu.org/software/gdb/")
84 (synopsis "The GNU debugger")
85 (description
86 "GDB is the GNU debugger. With it, you can monitor what a program is
87 doing while it runs or what it was doing just before a crash. It allows you
88 to specify the runtime conditions, to define breakpoints, and to change how
89 the program is running to try to fix bugs. It can be used to debug programs
90 written in C, C++, Ada, Objective-C, Pascal and more.")
91 (license gpl3+)))