gnu: withershins: Use new "libiberty" package.

* gnu/packages/code.scm (withershins)[inputs]: Replace "gcc" with "libiberty".
   [arguments]: Simplify "find-libiberty" phase.
This commit is contained in:
Ricardo Wurmus 2015-06-28 10:22:45 +02:00
parent 2b6b6d13e7
commit 2573410865
1 changed files with 6 additions and 14 deletions

View File

@ -246,25 +246,17 @@ files, but compared to grep is much faster and respects files like .gitignore,
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
`(#:out-of-source? #f `(#:out-of-source? #f
#:modules ((guix build utils)
(guix build cmake-build-system)
(ice-9 popen)
(ice-9 rdelim))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after (add-after
'unpack 'find-libiberty 'unpack 'find-libiberty
(lambda _ (lambda _
(let ((plugin (let* ((port (open-input-pipe (let ((libiberty (assoc-ref %build-inputs "libiberty")))
"gcc -print-file-name=plugin"))
(str (read-line port)))
(close-pipe port)
str)))
(substitute* "cmake/FindIberty.cmake" (substitute* "cmake/FindIberty.cmake"
(("/usr/include") (string-append plugin "/include")) (("/usr/include") (string-append libiberty "/include"))
(("libiberty.a iberty") (string-append "NAMES libiberty.a iberty\nPATHS \"" (("libiberty.a iberty")
(assoc-ref %build-inputs "gcc") (string-append "NAMES libiberty.a iberty\nPATHS \""
"/lib" "\""))) libiberty "/lib" "\"")))
#t))) #t)))
(replace (replace
'install 'install
@ -279,7 +271,7 @@ files, but compared to grep is much faster and respects files like .gitignore,
#t))))) #t)))))
(home-page "https://github.com/cameronwhite/withershins") (home-page "https://github.com/cameronwhite/withershins")
(inputs (inputs
`(("gcc" ,gcc-4.8 "lib") ;for libiberty.a `(("libiberty" ,libiberty)
("binutils" ,binutils) ;for libbfd ("binutils" ,binutils) ;for libbfd
("zlib" ,zlib))) ("zlib" ,zlib)))
(synopsis "C++11 library for generating stack traces") (synopsis "C++11 library for generating stack traces")