gnu: belcard: Simplify by using G-expression.
* gnu/packages/linphone.scm (belcard)[arguments]: Rewrite as G-expression and remove all output lookups.
This commit is contained in:
		
							parent
							
								
									15227aa81c
								
							
						
					
					
						commit
						142899cd69
					
				
					 1 changed files with 28 additions and 31 deletions
				
			
		| 
						 | 
					@ -258,37 +258,34 @@ IETF.")
 | 
				
			||||||
    (build-system cmake-build-system)
 | 
					    (build-system cmake-build-system)
 | 
				
			||||||
    (outputs '("out" "debug" "tester"))
 | 
					    (outputs '("out" "debug" "tester"))
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     `(#:configure-flags '("-DENABLE_STATIC=OFF")
 | 
					     (list
 | 
				
			||||||
       #:phases
 | 
					      #:configure-flags '(list "-DENABLE_STATIC=OFF")
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					      #:phases
 | 
				
			||||||
         (add-after 'unpack 'patch-vcard-grammar-location
 | 
					      #~(modify-phases %standard-phases
 | 
				
			||||||
           (lambda* (#:key outputs #:allow-other-keys)
 | 
					          (add-after 'unpack 'patch-vcard-grammar-location
 | 
				
			||||||
             (let* ((out (assoc-ref outputs "out"))
 | 
					            (lambda _
 | 
				
			||||||
                    (vcard-grammar
 | 
					              (let ((vcard-grammar
 | 
				
			||||||
                     (string-append out "/share/belr/grammars/vcard_grammar")))
 | 
					                     (string-append #$output
 | 
				
			||||||
               (substitute* "include/belcard/vcard_grammar.hpp"
 | 
					                                    "/share/belr/grammars/vcard_grammar")))
 | 
				
			||||||
                 (("define VCARD_GRAMMAR \"vcard_grammar\"")
 | 
					                (substitute* "include/belcard/vcard_grammar.hpp"
 | 
				
			||||||
                  (format #f "define VCARD_GRAMMAR ~s" vcard-grammar))))))
 | 
					                  (("define VCARD_GRAMMAR \"vcard_grammar\"")
 | 
				
			||||||
         (add-after 'install 'install-tester
 | 
					                   (format #f "define VCARD_GRAMMAR ~s" vcard-grammar))))))
 | 
				
			||||||
           (lambda* (#:key inputs outputs #:allow-other-keys)
 | 
					          (add-after 'install 'install-tester
 | 
				
			||||||
             (let ((out (assoc-ref outputs "out"))
 | 
					            (lambda _
 | 
				
			||||||
                   (tester (assoc-ref outputs "tester"))
 | 
					              (let ((test-name (string-append #$name "_tester")))
 | 
				
			||||||
                   (test-name (string-append ,name "_tester")))
 | 
					                (for-each mkdir-p
 | 
				
			||||||
               (for-each mkdir-p
 | 
					                          (list (string-append #$output:tester "/bin")
 | 
				
			||||||
                         (list (string-append tester "/bin")
 | 
					                                (string-append #$output:tester "/share")))
 | 
				
			||||||
                               (string-append tester "/share")))
 | 
					                (rename-file (string-append #$output "/bin/" test-name)
 | 
				
			||||||
               (rename-file (string-append out "/bin/" test-name)
 | 
					                             (string-append #$output:tester "/bin/" test-name))
 | 
				
			||||||
                            (string-append tester "/bin/" test-name))
 | 
					                (rename-file (string-append #$output "/share/" test-name)
 | 
				
			||||||
               (rename-file (string-append out "/share/" test-name)
 | 
					                             (string-append #$output:tester "/share/" test-name)))))
 | 
				
			||||||
                            (string-append tester "/share/" test-name)))))
 | 
					          (delete 'check)
 | 
				
			||||||
         (delete 'check)
 | 
					          (add-after 'install-tester 'check
 | 
				
			||||||
         (add-after 'install-tester 'check
 | 
					            (lambda* (#:key tests? #:allow-other-keys)
 | 
				
			||||||
           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
 | 
					              (when tests?
 | 
				
			||||||
             (when tests?
 | 
					                (invoke (string-append #$output:tester
 | 
				
			||||||
               (let* ((tester (assoc-ref outputs "tester"))
 | 
					                                       "/bin/belcard_tester"))))))))
 | 
				
			||||||
                      (belcard_tester (string-append tester
 | 
					 | 
				
			||||||
                                                     "/bin/belcard_tester")))
 | 
					 | 
				
			||||||
                 (invoke belcard_tester))))))))
 | 
					 | 
				
			||||||
    (inputs
 | 
					    (inputs
 | 
				
			||||||
     (list bctoolbox belr))
 | 
					     (list bctoolbox belr))
 | 
				
			||||||
    (synopsis "Belledonne Communications VCard Library")
 | 
					    (synopsis "Belledonne Communications VCard Library")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue