gnu: calibre: Wrap QTWEBENGINEPROCESS_PATH.
[jackhill/guix/guix.git] / gnu / packages / valgrind.scm
CommitLineData
e78a0ae5 1;;; GNU Guix --- Functional package management for GNU
5f36ea03 2;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
43640a33 3;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
1d6c8db5 4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
cd8c4197 5;;; Copyright © 2016, 2020 Efraim Flashner <efraim@flashner.co.il>
2cdf16c8 6;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
e78a0ae5
LC
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages valgrind)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix licenses)
28 #:use-module (gnu packages gdb)
29 #:use-module (gnu packages perl)
30 #:use-module (gnu packages))
31
32(define-public valgrind
33 (package
34 (name "valgrind")
dc80b28d 35 (version "3.15.0")
e78a0ae5 36 (source (origin
2cdf16c8 37 (method url-fetch)
cd8c4197 38 (uri (list (string-append "https://sourceware.org/pub/valgrind"
a9eeda20
MB
39 "/valgrind-" version ".tar.bz2")
40 (string-append "ftp://sourceware.org/pub/valgrind"
41 "/valgrind-" version ".tar.bz2")))
42 (sha256
43 (base32
dc80b28d 44 "1ccawxrni8brcvwhygy12iprkvz409hbr9xkk1bd03gnm2fplz21"))
350b7f8a 45 (patches (search-patches "valgrind-enable-arm.patch"))))
e78a0ae5 46 (build-system gnu-build-system)
84bf845a
DL
47 (outputs '("doc" ;16 MB
48 "out"))
e78a0ae5 49 (arguments
d74ea9e5
EF
50 `(,@(if (string-prefix? "powerpc" (or (%current-target-system)
51 (%current-system)))
52 `(#:make-flags '("CFLAGS+=-maltivec"))
53 '())
54 #:phases
5fd84e28
EF
55 (modify-phases %standard-phases
56 (add-after 'install 'patch-suppression-files
57 (lambda* (#:key outputs #:allow-other-keys)
58 ;; Don't assume the FHS.
59 (let* ((out (assoc-ref outputs "out"))
60 (dir (string-append out "/lib/valgrind")))
61 (substitute* (find-files dir "\\.supp$")
62 (("obj:/lib") "obj:*/lib")
63 (("obj:/usr/X11R6/lib") "obj:*/lib")
64 (("obj:/usr/lib") "obj:*/lib"))
84bf845a
DL
65 #t)))
66 (add-after 'install 'install-doc
67 (lambda* (#:key outputs #:allow-other-keys)
68 (let ((orig (format #f "~a/share/doc" (assoc-ref outputs "out")))
69 (dest (format #f "~a/share" (assoc-ref outputs "doc"))))
70 (mkdir-p dest)
71 (rename-file orig dest)
5fd84e28 72 #t))))))
2cdf16c8
TGR
73 (inputs
74 ;; GDB is needed to provide a sane default for `--db-command'.
75 `(("gdb" ,gdb)))
76 (native-inputs
77 `(("perl" ,perl)))
cd8c4197 78 (home-page "https://www.valgrind.org/")
e78a0ae5
LC
79 (synopsis "Debugging and profiling tool suite")
80 (description
81 "Valgrind is an instrumentation framework for building dynamic analysis
82tools. There are Valgrind tools that can automatically detect many memory
35b9e423 83management and threading bugs, and profile your programs in detail. You can
e78a0ae5 84also use Valgrind to build new tools.")
350b7f8a 85 (license gpl2+)))