me
/
guix
Archived
1
0
Fork 0

gnu: mediastreamer2: Use G-expression.

* gnu/packages/linphone.scm (mediastreamer2)[arguments]: Rewrite with
G-expression.
master
Ricardo Wurmus 2023-04-08 14:46:59 +02:00
parent 291b787461
commit 9ff2f971cc
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 54 additions and 56 deletions

View File

@ -591,68 +591,66 @@ API. It also comprises a simple HTTP/HTTPS client implementation.")
(outputs '("out" "doc" "tester")) (outputs '("out" "doc" "tester"))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
`(#:configure-flags (list "-DENABLE_STATIC=NO" (list
#:configure-flags '(list "-DENABLE_STATIC=NO"
"-DENABLE_PCAP=YES" "-DENABLE_PCAP=YES"
;; Do not fail on compile warnings. ;; Do not fail on compile warnings.
"-DENABLE_STRICT=NO" "-DENABLE_STRICT=NO"
"-DENABLE_PORTAUDIO=YES" "-DENABLE_PORTAUDIO=YES"
"-DENABLE_G729B_CNG=YES") "-DENABLE_G729B_CNG=YES")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'fix-version (add-after 'unpack 'fix-version
(lambda _ (lambda _
(substitute* "CMakeLists.txt" (substitute* "CMakeLists.txt"
(("VERSION [0-9]+\\.[0-9]+\\.[0-9]+") (("VERSION [0-9]+\\.[0-9]+\\.[0-9]+")
(string-append "VERSION " ,version))))) (string-append "VERSION " #$version)))))
(add-after 'unpack 'patch-source (add-after 'unpack 'patch-source
(lambda _ (lambda _
(substitute* "src/otherfilters/mspcapfileplayer.c" (substitute* "src/otherfilters/mspcapfileplayer.c"
(("O_BINARY") "L_INCR")))) (("O_BINARY") "L_INCR"))))
(add-before 'check 'pre-check (add-before 'check 'pre-check
(lambda _ (lambda _
;; Tests require a running X server. ;; Tests require a running X server.
(system "Xvfb :1 +extension GLX &") (system "Xvfb :1 +extension GLX &")
(setenv "DISPLAY" ":1") (setenv "DISPLAY" ":1")
;; Tests write to $HOME. ;; Tests write to $HOME.
(setenv "HOME" (getenv "TEMP")))) (setenv "HOME" (getenv "TEMP"))))
(delete 'check) ;move after install (delete 'check) ;move after install
(add-after 'install 'separate-outputs (add-after 'install 'separate-outputs
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let* ((out (assoc-ref outputs "out")) (let ((tester-name (string-append #$name "_tester"))
(tester (assoc-ref outputs "tester")) (doc-name (string-append #$name "-" #$version)))
(tester-name (string-append ,name "_tester")) (for-each mkdir-p
(doc (assoc-ref outputs "doc")) (list (string-append #$output:tester "/bin")
(doc-name (string-append ,name "-" ,version))) (string-append #$output:tester "/share")
(for-each mkdir-p (string-append #$output:doc "/share/doc")))
(list (string-append tester "/bin") ;; Move the tester executable.
(string-append tester "/share") (rename-file (string-append #$output "/bin/" tester-name)
(string-append doc "/share/doc"))) (string-append #$output:tester "/bin/" tester-name))
;; Move the tester executable. ;; Move the tester data files.
(rename-file (string-append out "/bin/" tester-name) (rename-file (string-append #$output "/share/" tester-name)
(string-append tester "/bin/" tester-name)) (string-append #$output:tester "/share/" tester-name))
;; Move the tester data files. ;; Move the HTML documentation.
(rename-file (string-append out "/share/" tester-name) (rename-file (string-append #$output "/share/doc/" doc-name)
(string-append tester "/share/" tester-name)) (string-append #$output:doc "/share/doc/" doc-name)))))
;; Move the HTML documentation. (add-after 'separate-outputs 'check
(rename-file (string-append out "/share/doc/" doc-name) (lambda _
(string-append doc "/share/doc/" doc-name))))) (let ((tester (string-append #$output:tester
(add-after 'separate-outputs 'check
(lambda* (#:key outputs #:allow-other-keys)
(let ((tester (string-append (assoc-ref outputs "tester")
"/bin/mediastreamer2_tester"))) "/bin/mediastreamer2_tester")))
(for-each (lambda (suite-name) (for-each (lambda (suite-name)
(invoke tester "--suite" suite-name)) (invoke tester "--suite" suite-name))
;; Some tests fail, due to requiring access to the ;; Some tests fail, due to requiring access to the
;; sound card or the network. ;; sound card or the network.
(list "Basic Audio" (list "Basic Audio"
;; "Sound Card" ;; "Sound Card"
;; "AdaptiveAlgorithm" ;; "AdaptiveAlgorithm"
;; "AudioStream" ;; "AudioStream"
;; "VideoStream" ;; "VideoStream"
"H26x Tools" "H26x Tools"
"Framework" "Framework"
;; "Player" ;; "Player"
"TextStream")))))))) "TextStream"))))))))
(native-inputs (native-inputs
`(("dot" ,graphviz) `(("dot" ,graphviz)
("doxygen" ,doxygen) ("doxygen" ,doxygen)