gnu: gdb: Patch references to /bin/sh and add debug output.
* gnu/packages/gdb.scm (gdb-10)[outputs]: Add a debug output. [phases]{patch-paths}: New phase. [inputs]: Add bash. (gdb-9.2)[phases]{patch-paths}: Override phase.
This commit is contained in:
parent
472da854f1
commit
41f058d10d
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
(define-module (gnu packages gdb)
|
(define-module (gnu packages gdb)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu packages bash)
|
||||||
#:use-module (gnu packages hurd)
|
#:use-module (gnu packages hurd)
|
||||||
#:use-module (gnu packages ncurses)
|
#:use-module (gnu packages ncurses)
|
||||||
#:use-module (gnu packages readline)
|
#:use-module (gnu packages readline)
|
||||||
@ -35,9 +36,10 @@
|
|||||||
#:use-module (gnu packages pretty-print)
|
#:use-module (gnu packages pretty-print)
|
||||||
#:use-module (gnu packages python)
|
#:use-module (gnu packages python)
|
||||||
#:use-module (gnu packages pkg-config)
|
#:use-module (gnu packages pkg-config)
|
||||||
|
#:use-module (guix download)
|
||||||
#:use-module ((guix licenses) #:select (gpl3+))
|
#:use-module ((guix licenses) #:select (gpl3+))
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix download)
|
#:use-module (guix utils)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module ((guix build utils) #:select (alist-replace))
|
#:use-module ((guix build utils) #:select (alist-replace))
|
||||||
#:use-module (srfi srfi-1))
|
#:use-module (srfi srfi-1))
|
||||||
@ -57,6 +59,7 @@
|
|||||||
(search-patches "gdb-hurd.patch"))))
|
(search-patches "gdb-hurd.patch"))))
|
||||||
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
|
(outputs '("out" "debug"))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; FIXME "make check" fails on single-processor systems.
|
`(#:tests? #f ; FIXME "make check" fails on single-processor systems.
|
||||||
|
|
||||||
@ -66,6 +69,14 @@
|
|||||||
,@%gnu-build-system-modules)
|
,@%gnu-build-system-modules)
|
||||||
|
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases (modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'patch-paths
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((sh (string-append (assoc-ref inputs "bash")
|
||||||
|
"/bin/sh")))
|
||||||
|
(substitute* '("gdb/ser-pipe.c"
|
||||||
|
"gdbsupport/pathstuff.cc")
|
||||||
|
(("\"/bin/sh\"")
|
||||||
|
(format #f "~s" sh))))))
|
||||||
(add-after
|
(add-after
|
||||||
'configure 'post-configure
|
'configure 'post-configure
|
||||||
(lambda _
|
(lambda _
|
||||||
@ -95,7 +106,8 @@
|
|||||||
(for-each delete-file common)
|
(for-each delete-file common)
|
||||||
#t)))))))
|
#t)))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("expat" ,expat)
|
`(("bash" ,bash)
|
||||||
|
("expat" ,expat)
|
||||||
("mpfr" ,mpfr)
|
("mpfr" ,mpfr)
|
||||||
("gmp" ,gmp)
|
("gmp" ,gmp)
|
||||||
("readline" ,readline)
|
("readline" ,readline)
|
||||||
@ -151,6 +163,20 @@ written in C, C++, Ada, Objective-C, Pascal and more.")
|
|||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0mf5fn8v937qwnal4ykn3ji1y2sxk0fa1yfqi679hxmpg6pdf31n"))))
|
"0mf5fn8v937qwnal4ykn3ji1y2sxk0fa1yfqi679hxmpg6pdf31n"))))
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments gdb-11)
|
||||||
|
((#:phases phases)
|
||||||
|
;; Override the patch-paths phase as the pathstuff.c file was later
|
||||||
|
;; renamed.
|
||||||
|
`(modify-phases ,phases
|
||||||
|
(replace 'patch-paths
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((sh (string-append (assoc-ref inputs "bash")
|
||||||
|
"/bin/sh")))
|
||||||
|
(substitute* '("gdb/gdbsupport/pathstuff.c"
|
||||||
|
"gdb/ser-pipe.c")
|
||||||
|
(("\"/bin/sh\"")
|
||||||
|
(format #f "~s" sh))))))))))
|
||||||
(inputs
|
(inputs
|
||||||
(alist-replace "guile" (list guile-2.0)
|
(alist-replace "guile" (list guile-2.0)
|
||||||
(package-inputs gdb-10)))))
|
(package-inputs gdb-10)))))
|
||||||
|
Loading…
Reference in New Issue
Block a user