gnu: glib: Update to 2.46.0.
[jackhill/guix/guix.git] / gnu / packages / gdb.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 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.10")
40 (source (origin
41 (method url-fetch)
42 (uri (string-append "mirror://gnu/gdb/gdb-"
43 version ".tar.xz"))
44 (sha256
45 (base32
46 "1a08c9svaihqmz2mm44il1gwa810gmwkckns8b0y0v3qz52amgby"))))
47 (build-system gnu-build-system)
48 (arguments
49 `(#:tests? #f ; FIXME "make check" fails on single-processor systems.
50
51 #:modules ((srfi srfi-1)
52 ,@%gnu-build-system-modules)
53
54 #:phases (modify-phases %standard-phases
55 (add-after
56 'configure 'post-configure
57 (lambda _
58 (for-each patch-makefile-SHELL
59 (find-files "." "Makefile\\.in"))))
60 (add-after
61 'install 'remove-libs-already-in-binutils
62 (lambda* (#:key inputs outputs #:allow-other-keys)
63 ;; Like Binutils, GDB installs libbfd, libopcodes, etc.
64 ;; However, this leads to collisions when both are
65 ;; installed, and really is none of its business,
66 ;; conceptually. So remove them.
67 (let* ((binutils (assoc-ref inputs "binutils"))
68 (out (assoc-ref outputs "out"))
69 (files1 (with-directory-excursion binutils
70 (append (find-files "lib")
71 (find-files "include"))))
72 (files2 (with-directory-excursion out
73 (append (find-files "lib")
74 (find-files "include"))))
75 (common (lset-intersection string=?
76 files1 files2)))
77 (with-directory-excursion out
78 (for-each delete-file common)
79 #t)))))))
80 (inputs
81 `(("expat" ,expat)
82 ("mpfr" ,mpfr)
83 ("gmp" ,gmp)
84 ("readline" ,readline)
85 ("ncurses" ,ncurses)
86 ("guile" ,guile-2.0)
87 ("python" ,python)
88 ("python-wrapper" ,python-wrapper)
89 ("dejagnu" ,dejagnu)
90
91 ;; Allow use of XML-formatted syscall information. This enables 'catch
92 ;; syscall' and similar commands.
93 ("libxml2" ,libxml2)))
94 (native-inputs
95 `(("texinfo" ,texinfo)
96 ("pkg-config" ,pkg-config)))
97 (home-page "http://www.gnu.org/software/gdb/")
98 (synopsis "The GNU debugger")
99 (description
100 "GDB is the GNU debugger. With it, you can monitor what a program is
101 doing while it runs or what it was doing just before a crash. It allows you
102 to specify the runtime conditions, to define breakpoints, and to change how
103 the program is running to try to fix bugs. It can be used to debug programs
104 written in C, C++, Ada, Objective-C, Pascal and more.")
105 (license gpl3+)))