gnu: bcunit: Update to 5.3.57.

* gnu/packages/linphone.scm (bcunit): Update to 5.3.57.
[source]: Update origin URI.
[outputs]: Delete field.
[arguments] <configure-flags>: Update to reflect changes in version 5.
<phases> Use gexps.  Delete move-doc phases.
{check}: Honor #:tests?.

Change-Id: Ic7a67e1ef0841aec5a1ecce3c406ccd90010270f
This commit is contained in:
Maxim Cournoyer 2024-06-09 00:21:03 -04:00 committed by Maxim Cournoyer
parent e7a67eed78
commit 37ff509ce6
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -62,31 +62,29 @@
#:use-module (guix build-system qt)) #:use-module (guix build-system qt))
(define-public bcunit (define-public bcunit
(let ((commit "74021cc7cb20a4e177748dd2948173e1f9c270ae")
(revision "0"))
(package (package
(name "bcunit") (name "bcunit")
(version (git-version "3.0.2" revision commit)) (version "5.3.57")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "git://git.linphone.org/bcunit") (url "https://gitlab.linphone.org/BC/public/bcunit.git")
(commit commit))) (commit version)))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "0npdwvanjkfg9vrqs5yi8vh6wliv50ycdli8pzavir84nb31nq1b")))) (base32 "02aqc8052vidc8ylkwiv2rqddl58fccrjz561j8zfqlwm2irnsg3"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(outputs '("out" "doc"))
(arguments (arguments
`(#:configure-flags (list "-DENABLE_STATIC=NO" (list
"-DENABLE_CURSES=ON" #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"
"-DENABLE_DOC=ON" "-DENABLE_BCUNIT_CURSES=ON"
"-DENABLE_EXAMPLES=ON" "-DENABLE_BCUNIT_DOC=ON"
"-DENABLE_TEST=ON" "-DENABLE_BCUNIT_EXAMPLES=ON"
"-DENABLE_MEMTRACE=ON") "-DENABLE_BCUNIT_TEST=ON"
"-DENABLE_BCUNIT_MEMTRACE=ON")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'patch-source (add-after 'unpack 'patch-source
(lambda _ (lambda _
;; Include BCunit headers for examples. ;; Include BCunit headers for examples.
@ -100,32 +98,28 @@
(("target_include_directories\\(bcunit_test PUBLIC Test\\)") (("target_include_directories\\(bcunit_test PUBLIC Test\\)")
(string-append (string-append
"target_include_directories(bcunit_test PUBLIC Test)\n" "target_include_directories(bcunit_test PUBLIC Test)\n"
"target_link_libraries(bcunit_test bcunit)"))))) "\ttarget_link_libraries(bcunit_test bcunit)")))))
(replace 'check (add-after 'install 'patch-BCUnitConfig.cmake
(lambda _ (lambda _
(substitute* (string-append
#$output "/share/BCUnit/cmake/BCUnitConfig.cmake")
;; This is only added for convenience when doing static builds.
;; Since this is not a common case, avoid the find_dependency on
;; ncurses, which would require propagating it.
(("find_dependency\\(Curses)")
""))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(with-directory-excursion "BCUnit/Sources/Test" (with-directory-excursion "BCUnit/Sources/Test"
(invoke "./test_bcunit")))) (invoke "./test_bcunit"))))))))
(add-after 'install 'move-doc (inputs (list ncurses))
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(doc (assoc-ref outputs "doc")))
(for-each mkdir-p
`(,(string-append doc "/share/doc")
,(string-append doc "/share/BCUnit")))
(rename-file
(string-append out "/share/doc/BCUnit")
(string-append doc "/share/doc/BCUnit"))
(rename-file
(string-append out "/share/BCUnit/Examples")
(string-append doc "/share/BCUnit/Examples"))))))))
(inputs
(list ncurses))
(synopsis "Belledonne Communications Unit Testing Framework") (synopsis "Belledonne Communications Unit Testing Framework")
(description "BCUnit is a fork of the defunct project CUnit, with (description "BCUnit is a fork of the defunct project CUnit, with
several fixes and patches applied. It is a unit testing framework for several fixes and patches applied. It is a unit testing framework for
writing, administering, and running unit tests in C.") writing, administering, and running unit tests in C.")
(home-page "https://gitlab.linphone.org/BC/public/bcunit") (home-page "https://gitlab.linphone.org/BC/public/bcunit")
(license license:lgpl2.0+)))) (license license:lgpl2.0+)))
(define-public bctoolbox (define-public bctoolbox
(package (package