From 019329536ce79d261eae4e9ea1ac1710c9cd2487 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Tue, 16 Mar 2021 14:28:56 -0400 Subject: [PATCH 28/50] gnu: belle-sip: Enable mDNS support. * gnu/packages/linphone.scm (belle-sip) [arguments]<#:configure-flags> [-DENABLE_MDNS]: New flag. <#:phases>['patch]: Modify. --- gnu/packages/linphone.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm index e3d8febae9..9b04ec90ef 100644 --- a/gnu/packages/linphone.scm +++ b/gnu/packages/linphone.scm @@ -23,6 +23,7 @@ #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages audio) + #:use-module (gnu packages avahi) #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages crypto) @@ -486,11 +487,22 @@ including both ARM and x86.") (outputs '("out" "test")) (arguments `(#:configure-flags - (list "-DENABLE_STATIC=NO") ; Not required + (list + "-DENABLE_STATIC=NO" + "-DENABLE_MDNS=ON") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch - (lambda _ + (lambda* (#:key inputs #:allow-other-keys) + ;; Fix mDNS dependency. + (let* ((avahi (assoc-ref inputs "avahi"))) + (substitute* (find-files "." "CMakeLists.txt") + (("find_package\\(DNSSD REQUIRED\\)") + "set(DNSSD_FOUND 1)") + (("\\$\\{DNSSD_INCLUDE_DIRS\\}") + (string-append avahi "/include/avahi-compat-libdns_sd")) + (("\\$\\{DNSSD_LIBRARIES\\}") + "dns_sd"))) (substitute* "src/CMakeLists.txt" ;; ANTLR would use multithreaded DFA generation otherwise, ;; which would not be reproducible. @@ -543,6 +555,7 @@ including both ARM and x86.") (inputs `(("antlr3" ,antlr3-3.3) ("antlr3c" ,libantlr3c) + ("avahi" ,avahi) ("bctoolbox" ,bctoolbox) ("java" ,icedtea) ("zlib" ,zlib))) -- 2.31.0