summaryrefslogtreecommitdiff
path: root/gnu/packages/code.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-05-08 17:15:01 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-05-11 00:18:17 -0400
commitd8ccff833d8d6e90b92f8656c6fa3c0238e693ce (patch)
tree151e78a81c2a96aef25d287bce89c6b90157a444 /gnu/packages/code.scm
parente23e5db39b5c917b182610db4610c8c35fad4581 (diff)
gnu: lcov: Update to commit 40580cd659.
* gnu/packages/code.scm (lcov): Update to commit 40580cd659. (arguments): Enable tests and specify the test target. [phases]{patch-pwd, wrap}: Add phases. [inputs]: Add perl-json and perl-perlio-gzip.
Diffstat (limited to 'gnu/packages/code.scm')
-rw-r--r--gnu/packages/code.scm76
1 files changed, 51 insertions, 25 deletions
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index fcf0e07db76..ee47582ec87 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -12,6 +12,7 @@
12;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> 12;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
13;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> 13;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
14;;; Copyright © 2019 Hartmut Goebel <h.goebel@goebel-consult.de> 14;;; Copyright © 2019 Hartmut Goebel <h.goebel@goebel-consult.de>
15;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
15;;; 16;;;
16;;; This file is part of GNU Guix. 17;;; This file is part of GNU Guix.
17;;; 18;;;
@@ -49,6 +50,7 @@
49 #:use-module (gnu packages graphviz) 50 #:use-module (gnu packages graphviz)
50 #:use-module (gnu packages pcre) 51 #:use-module (gnu packages pcre)
51 #:use-module (gnu packages perl) 52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages perl-compression)
52 #:use-module (gnu packages pkg-config) 54 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages python) 55 #:use-module (gnu packages python)
54 #:use-module (gnu packages sqlite) 56 #:use-module (gnu packages sqlite)
@@ -375,36 +377,60 @@ stack traces.")
375 (license license:gpl3+))) 377 (license license:gpl3+)))
376 378
377(define-public lcov 379(define-public lcov
378 (package 380 ;; Use a recent commit from upstream since the latest official release
379 (name "lcov") 381 ;; (1.14) doesn't support GCC 9 (see:
380 (version "1.14") 382 ;; https://github.com/linux-test-project/lcov/issues/58).
381 (source (origin 383 (let* ((commit "40580cd65909bc8324ae09b36bca2e178652ff3f")
382 (method url-fetch) 384 (revision "0")
383 (uri (string-append "mirror://sourceforge/ltp/Coverage%20Analysis" 385 (version (git-version "1.14" revision commit)))
384 "/LCOV-" version "/lcov-" version ".tar.gz")) 386 (package
385 (sha256 387 (name "lcov")
386 (base32 388 (version "1.14")
387 "06h7ixyznf6vz1qvksjgy5f3q2nw9akf6zx59npf0h3l32cmd68l")))) 389 (source (origin
388 (build-system gnu-build-system) 390 (method git-fetch)
389 (arguments 391 (uri (git-reference
390 '(#:make-flags 392 (url "https://github.com/linux-test-project/lcov.git")
391 (let ((out (assoc-ref %outputs "out"))) 393 (commit commit)))
392 (list (string-append "PREFIX=" out))) 394 (file-name (git-file-name name version))
393 #:phases 395 (sha256
394 (modify-phases %standard-phases 396 (base32
395 (delete 'configure)) ; no configure script 397 "0shgmh6fzhnj1qfdl90jgjmlbb1ih1qh879dca8hc58yggy3hqgb"))))
396 #:tests? #f)) ; no 'check' target 398 (build-system gnu-build-system)
397 (inputs `(("perl" ,perl))) 399 (arguments
398 (home-page "http://ltp.sourceforge.net/coverage/lcov.php") 400 '(#:test-target "test"
399 (synopsis "Code coverage tool that enhances GNU gcov") 401 #:make-flags (list (string-append "PREFIX="
400 (description 402 (assoc-ref %outputs "out")))
401 "LCOV is an extension of @command{gcov}, a tool part of the 403 #:phases
404 (modify-phases %standard-phases
405 (add-after 'unpack 'patch-pwd
406 ;; Lift the requirement of having a shell in PATH.
407 (lambda _
408 (substitute* "bin/geninfo"
409 (("qw/abs_path/")
410 "qw/abs_path getcwd/"))
411 (substitute* '("bin/lcov" "bin/geninfo")
412 (("`pwd`")
413 "getcwd()"))
414 #t))
415 (delete 'configure) ;no configure script
416 (add-after 'install 'wrap
417 (lambda* (#:key outputs #:allow-other-keys)
418 (let ((out (assoc-ref outputs "out")))
419 (wrap-program (string-append out "/bin/geninfo")
420 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
421 #t)))))
422 (inputs `(("perl" ,perl)
423 ("perl-json" ,perl-json)
424 ("perl-perlio-gzip" ,perl-perlio-gzip)))
425 (home-page "http://ltp.sourceforge.net/coverage/lcov.php")
426 (synopsis "Code coverage tool that enhances GNU gcov")
427 (description "LCOV is an extension of @command{gcov}, a tool part of the
402GNU@tie{}Binutils, which provides information about what parts of a program 428GNU@tie{}Binutils, which provides information about what parts of a program
403are actually executed (i.e., \"covered\") while running a particular test 429are actually executed (i.e., \"covered\") while running a particular test
404case. The extension consists of a set of Perl scripts which build on the 430case. The extension consists of a set of Perl scripts which build on the
405textual @command{gcov} output to implement the following enhanced 431textual @command{gcov} output to implement the following enhanced
406functionality such as HTML output.") 432functionality such as HTML output.")
407 (license license:gpl2+))) 433 (license license:gpl2+))))
408 434
409(define-public rtags 435(define-public rtags
410 (package 436 (package