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,70 +62,64 @@
#:use-module (guix build-system qt)) #:use-module (guix build-system qt))
(define-public bcunit (define-public bcunit
(let ((commit "74021cc7cb20a4e177748dd2948173e1f9c270ae") (package
(revision "0")) (name "bcunit")
(package (version "5.3.57")
(name "bcunit") (source
(version (git-version "3.0.2" revision commit)) (origin
(source (method git-fetch)
(origin (uri (git-reference
(method git-fetch) (url "https://gitlab.linphone.org/BC/public/bcunit.git")
(uri (git-reference (commit version)))
(url "git://git.linphone.org/bcunit") (file-name (git-file-name name version))
(commit commit))) (sha256
(file-name (git-file-name name version)) (base32 "02aqc8052vidc8ylkwiv2rqddl58fccrjz561j8zfqlwm2irnsg3"))))
(sha256 (build-system cmake-build-system)
(base32 "0npdwvanjkfg9vrqs5yi8vh6wliv50ycdli8pzavir84nb31nq1b")))) (arguments
(build-system cmake-build-system) (list
(outputs '("out" "doc")) #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"
(arguments "-DENABLE_BCUNIT_CURSES=ON"
`(#:configure-flags (list "-DENABLE_STATIC=NO" "-DENABLE_BCUNIT_DOC=ON"
"-DENABLE_CURSES=ON" "-DENABLE_BCUNIT_EXAMPLES=ON"
"-DENABLE_DOC=ON" "-DENABLE_BCUNIT_TEST=ON"
"-DENABLE_EXAMPLES=ON" "-DENABLE_BCUNIT_MEMTRACE=ON")
"-DENABLE_TEST=ON" #:phases
"-DENABLE_MEMTRACE=ON") #~(modify-phases %standard-phases
#:phases (add-after 'unpack 'patch-source
(modify-phases %standard-phases (lambda _
(add-after 'unpack 'patch-source ;; Include BCunit headers for examples.
(lambda _ (substitute* "Examples/CMakeLists.txt"
;; Include BCunit headers for examples. (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}")
(substitute* "Examples/CMakeLists.txt" (string-append "${CMAKE_CURRENT_SOURCE_DIR} "
(("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}") "${PROJECT_SOURCE_DIR}/BCUnit/Headers "
(string-append "${CMAKE_CURRENT_SOURCE_DIR} " "${CMAKE_BINARY_DIR}/BCUnit/Headers")))
"${PROJECT_SOURCE_DIR}/BCUnit/Headers " ;; Link bcunit and bcunit_tests libraries.
"${CMAKE_BINARY_DIR}/BCUnit/Headers"))) (substitute* "BCUnit/Sources/CMakeLists.txt"
;; Link bcunit and bcunit_tests libraries. (("target_include_directories\\(bcunit_test PUBLIC Test\\)")
(substitute* "BCUnit/Sources/CMakeLists.txt" (string-append
(("target_include_directories\\(bcunit_test PUBLIC Test\\)") "target_include_directories(bcunit_test PUBLIC Test)\n"
(string-append "\ttarget_link_libraries(bcunit_test bcunit)")))))
"target_include_directories(bcunit_test PUBLIC Test)\n" (add-after 'install 'patch-BCUnitConfig.cmake
"target_link_libraries(bcunit_test bcunit)"))))) (lambda _
(replace 'check (substitute* (string-append
(lambda _ #$output "/share/BCUnit/cmake/BCUnitConfig.cmake")
(with-directory-excursion "BCUnit/Sources/Test" ;; This is only added for convenience when doing static builds.
(invoke "./test_bcunit")))) ;; Since this is not a common case, avoid the find_dependency on
(add-after 'install 'move-doc ;; ncurses, which would require propagating it.
(lambda* (#:key outputs #:allow-other-keys) (("find_dependency\\(Curses)")
(let ((out (assoc-ref outputs "out")) ""))))
(doc (assoc-ref outputs "doc"))) (replace 'check
(for-each mkdir-p (lambda* (#:key tests? #:allow-other-keys)
`(,(string-append doc "/share/doc") (when tests?
,(string-append doc "/share/BCUnit"))) (with-directory-excursion "BCUnit/Sources/Test"
(rename-file (invoke "./test_bcunit"))))))))
(string-append out "/share/doc/BCUnit") (inputs (list ncurses))
(string-append doc "/share/doc/BCUnit")) (synopsis "Belledonne Communications Unit Testing Framework")
(rename-file (description "BCUnit is a fork of the defunct project CUnit, with
(string-append out "/share/BCUnit/Examples")
(string-append doc "/share/BCUnit/Examples"))))))))
(inputs
(list ncurses))
(synopsis "Belledonne Communications Unit Testing Framework")
(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