Commit | Line | Data |
---|---|---|
fbbb1c0f | 1 | ;;; GNU Guix --- Functional package management for GNU |
a8e7ba75 | 2 | ;;; Copyright © 2013, 2014, 2015, 2019 Ludovic Courtès <ludo@gnu.org> |
5245251e | 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
4d70a8fe | 4 | ;;; Copyright © 2015, 2016, 2019 Efraim Flashner <efraim@flashner.co.il> |
fbbb1c0f LC |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
9 | ;;; under the terms of the GNU General Public License as published by | |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
13 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
1ffa7090 | 21 | (define-module (gnu packages gdb) |
b20441f2 | 22 | #:use-module (gnu packages) |
1ffa7090 LC |
23 | #:use-module (gnu packages ncurses) |
24 | #:use-module (gnu packages readline) | |
25 | #:use-module (gnu packages dejagnu) | |
26 | #:use-module (gnu packages texinfo) | |
27 | #:use-module (gnu packages multiprecision) | |
28 | #:use-module (gnu packages xml) | |
684a2f59 | 29 | #:use-module (gnu packages guile) |
1ffa7090 | 30 | #:use-module (gnu packages python) |
684a2f59 | 31 | #:use-module (gnu packages pkg-config) |
183c9a89 | 32 | #:use-module ((guix licenses) #:select (gpl3+)) |
fbbb1c0f LC |
33 | #:use-module (guix packages) |
34 | #:use-module (guix download) | |
35 | #:use-module (guix build-system gnu)) | |
36 | ||
4a38ec9e | 37 | (define-public gdb-8.3 |
fbbb1c0f LC |
38 | (package |
39 | (name "gdb") | |
4a38ec9e | 40 | (version "8.3.1") |
fbbb1c0f LC |
41 | (source (origin |
42 | (method url-fetch) | |
43 | (uri (string-append "mirror://gnu/gdb/gdb-" | |
684a2f59 | 44 | version ".tar.xz")) |
fbbb1c0f LC |
45 | (sha256 |
46 | (base32 | |
4a38ec9e | 47 | "1i2pjwaafrlz7wqm40b4znr77ai32rjsxkpl2az38yyarpbv8m8y")))) |
fbbb1c0f LC |
48 | (build-system gnu-build-system) |
49 | (arguments | |
2fecbdbd LC |
50 | `(#:tests? #f ; FIXME "make check" fails on single-processor systems. |
51 | ||
52 | #:modules ((srfi srfi-1) | |
53 | ,@%gnu-build-system-modules) | |
54 | ||
f19b9b96 LC |
55 | #:phases (modify-phases %standard-phases |
56 | (add-after | |
57 | 'configure 'post-configure | |
58 | (lambda _ | |
59 | (for-each patch-makefile-SHELL | |
a3401d64 MW |
60 | (find-files "." "Makefile\\.in")) |
61 | #t)) | |
f19b9b96 | 62 | (add-after |
2fecbdbd LC |
63 | 'install 'remove-libs-already-in-binutils |
64 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
65 | ;; Like Binutils, GDB installs libbfd, libopcodes, etc. | |
f19b9b96 LC |
66 | ;; However, this leads to collisions when both are |
67 | ;; installed, and really is none of its business, | |
68 | ;; conceptually. So remove them. | |
2fecbdbd LC |
69 | (let* ((binutils (assoc-ref inputs "binutils")) |
70 | (out (assoc-ref outputs "out")) | |
71 | (files1 (with-directory-excursion binutils | |
72 | (append (find-files "lib") | |
73 | (find-files "include")))) | |
74 | (files2 (with-directory-excursion out | |
75 | (append (find-files "lib") | |
76 | (find-files "include")))) | |
77 | (common (lset-intersection string=? | |
78 | files1 files2))) | |
79 | (with-directory-excursion out | |
80 | (for-each delete-file common) | |
81 | #t))))))) | |
fbbb1c0f | 82 | (inputs |
183c9a89 | 83 | `(("expat" ,expat) |
fbbb1c0f LC |
84 | ("mpfr" ,mpfr) |
85 | ("gmp" ,gmp) | |
86 | ("readline" ,readline) | |
87 | ("ncurses" ,ncurses) | |
684a2f59 MW |
88 | ("guile" ,guile-2.0) |
89 | ("python" ,python) | |
90 | ("python-wrapper" ,python-wrapper) | |
03f45001 LC |
91 | ("dejagnu" ,dejagnu) |
92 | ||
93 | ;; Allow use of XML-formatted syscall information. This enables 'catch | |
94 | ;; syscall' and similar commands. | |
95 | ("libxml2" ,libxml2))) | |
c4c4cc05 | 96 | (native-inputs |
684a2f59 MW |
97 | `(("texinfo" ,texinfo) |
98 | ("pkg-config" ,pkg-config))) | |
caaa715d | 99 | (home-page "https://www.gnu.org/software/gdb/") |
f50d2669 | 100 | (synopsis "The GNU debugger") |
fbbb1c0f | 101 | (description |
a22dc0c4 LC |
102 | "GDB is the GNU debugger. With it, you can monitor what a program is |
103 | doing while it runs or what it was doing just before a crash. It allows you | |
104 | to specify the runtime conditions, to define breakpoints, and to change how | |
105 | the program is running to try to fix bugs. It can be used to debug programs | |
106 | written in C, C++, Ada, Objective-C, Pascal and more.") | |
fbbb1c0f | 107 | (license gpl3+))) |
a8e7ba75 | 108 | |
47dda6e0 MB |
109 | (define-public gdb-8.2 |
110 | (package/inherit | |
111 | gdb-8.3 | |
112 | (version "8.2.1") | |
113 | (source (origin | |
114 | (method url-fetch) | |
115 | (uri (string-append "mirror://gnu/gdb/gdb-" | |
116 | version ".tar.xz")) | |
117 | (sha256 | |
118 | (base32 | |
119 | "00i27xqawjv282a07i73lp1l02n0a3ywzhykma75qg500wll6sha")))))) | |
120 | ||
a8e7ba75 LC |
121 | (define-public gdb |
122 | ;; This is the fixed version that packages depend on. Update it rarely | |
123 | ;; enough to avoid massive rebuilds. | |
4a38ec9e | 124 | gdb-8.3) |