Archived
1
0
Fork 0

gnu: belle-sip: Update to 5.2.49.

* gnu/packages/linphone.scm (belle-sip): Update to 5.2.49.
[arguments]: Use G-expression; disable strict mode; disable unescape test; run
tests conditionally.
[inputs]: Add belr.
This commit is contained in:
Ricardo Wurmus 2023-04-06 21:44:03 +02:00
parent 142899cd69
commit 337f3941d8
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -478,7 +478,7 @@ including both ARM and x86.")
(define-public belle-sip (define-public belle-sip
(package (package
(name "belle-sip") (name "belle-sip")
(version "4.4.34") (version "5.2.49")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
@ -487,65 +487,78 @@ including both ARM and x86.")
(commit version))) (commit version)))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "1kknnlczq7dpqaj1dwxvy092dzrqjy11ndkv90rqwmdryigkjk6z")))) (base32 "0yx1qvzp11ysh24hxrvz7dm69j8zswa0xcx9m42vcv95z72166cq"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(outputs '("out" "tester")) (outputs '("out" "tester"))
(arguments (arguments
`(#:configure-flags (list "-DENABLE_STATIC=NO" (list
"-DENABLE_MDNS=ON") #:configure-flags '(list "-DENABLE_STATIC=NO"
"-DENABLE_MDNS=ON"
;; We skip a test and thus have an unused
;; procedure, so we need to disable -Werror.
"-DENABLE_STRICT=OFF")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'patch (add-after 'unpack 'patch
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; Fix mDNS dependency. ;; Fix mDNS dependency.
(let* ((avahi (assoc-ref inputs "avahi"))) (let* ((avahi (assoc-ref inputs "avahi")))
(substitute* (find-files "." "CMakeLists.txt") (substitute* (find-files "." "CMakeLists.txt")
(("find_package\\(DNSSD REQUIRED\\)") (("find_package\\(DNSSD REQUIRED\\)")
"set(DNSSD_FOUND 1)") "set(DNSSD_FOUND 1)")
(("\\$\\{DNSSD_INCLUDE_DIRS\\}") (("\\$\\{DNSSD_INCLUDE_DIRS\\}")
(string-append avahi "/include/avahi-compat-libdns_sd")) (string-append avahi "/include/avahi-compat-libdns_sd"))
(("\\$\\{DNSSD_LIBRARIES\\}") (("\\$\\{DNSSD_LIBRARIES\\}")
"dns_sd"))) "dns_sd")))
(substitute* "src/CMakeLists.txt" ;; Disable broken test. This test uses
;; ANTLR would use multithreaded DFA generation otherwise, ;; bctbx_unescaped_string_only_chars_in_rules from bctoolbox,
;; which would not be reproducible. ;; which unescapes too much.
(("-Xmultithreaded ") "")))) (substitute* "tester/belle_sip_base_uri_tester.c"
(delete 'check) ;move after install (("[ \t]*TEST_NO_TAG.*test_unescaping_good_chars\\),")
(add-after 'install 'separate-outputs ""))
(lambda* (#:key outputs #:allow-other-keys) (substitute* "src/sdp/parser.cc"
(let* ((out (assoc-ref outputs "out")) (("load\\(\"sdp_grammar\"\\)")
(tester (assoc-ref outputs "tester")) (string-append "load(\"" #$output
(tester-name "belle_sip_tester")) "/share/belr/grammars/sdp_grammar\")")))
(for-each mkdir-p (list (string-append tester "/bin") (substitute* "src/CMakeLists.txt"
(string-append tester "/share"))) ;; ANTLR would use multithreaded DFA generation otherwise,
(rename-file (string-append out "/bin") ;; which would not be reproducible.
(string-append tester "/bin")) (("-Xmultithreaded ") ""))))
(rename-file (string-append out "/share/" tester-name) (delete 'check) ;move after install
(string-append tester "/share/" tester-name))))) (add-after 'install 'separate-outputs
(add-after 'separate-outputs 'check (lambda _
(lambda* (#:key outputs #:allow-other-keys) (let ((tester-name "belle_sip_tester"))
(let ((tester (string-append (assoc-ref outputs "tester") (for-each mkdir-p (list (string-append #$output:tester "/bin")
"/bin/belle_sip_tester"))) (string-append #$output:tester "/share")))
(for-each (lambda (suite-name) (rename-file (string-append #$output "/bin")
(invoke tester "--suite" suite-name)) (string-append #$output:tester "/bin"))
(list "Object inheritance" (rename-file (string-append #$output "/share/" tester-name)
"SIP URI" (string-append #$output:tester "/share/" tester-name)))))
"FAST SIP URI" (add-after 'separate-outputs 'check
"FAST SIP URI 2" (lambda* (#:key tests? #:allow-other-keys)
"Generic uri" (when tests?
"Headers" (let ((tester (string-append #$output:tester
"Core" "/bin/belle_sip_tester")))
"SDP" (for-each (lambda (suite-name)
;;"Resolver" (invoke tester "--suite" suite-name))
"Message" (list "Object inheritance"
"Authentication helper" "SIP URI"
;;"Register" "FAST SIP URI"
;;"Dialog" "FAST SIP URI 2"
"Refresher" "Generic uri"
;;"HTTP stack" "Headers"
"Object")))))))) "Core"
"SDP"
;;"Resolver"
"Message"
"Authentication helper"
;;"Register"
;;"Dialog"
"Refresher"
;;"HTTP stack"
"Object")))))))))
(inputs (inputs
(list avahi bctoolbox zlib)) (list avahi bctoolbox belr zlib))
(synopsis "Belledonne Communications SIP Library") (synopsis "Belledonne Communications SIP Library")
(description "Belle-sip is a modern library implementing SIP transport, (description "Belle-sip is a modern library implementing SIP transport,
transaction and dialog layers. It is written in C, with an object-oriented transaction and dialog layers. It is written in C, with an object-oriented