gnu: tomlc99: Install pkg-config file.
* gnu/packages/c.scm (tomlc99) <arguments>: Add phase to install pkg-config file. Change-Id: Id09f22912fe7e4dcac6a0377e4a78d3d34346106 Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
		
							parent
							
								
									104ac4eea6
								
							
						
					
					
						commit
						91647ba87b
					
				
					 1 changed files with 23 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -265,16 +265,29 @@ standard.")
 | 
			
		|||
                                                 #$(cc-for-target))
 | 
			
		||||
                                  (string-append "prefix="
 | 
			
		||||
                                                 #$output))
 | 
			
		||||
             #:phases #~(modify-phases %standard-phases
 | 
			
		||||
                          (delete 'configure)
 | 
			
		||||
                          (replace 'check
 | 
			
		||||
                            (lambda* (#:key tests? make-flags
 | 
			
		||||
                                      #:allow-other-keys)
 | 
			
		||||
                              (when tests?
 | 
			
		||||
                                (apply invoke
 | 
			
		||||
                                       `("make" "-C" "unittest"
 | 
			
		||||
                                         ,@make-flags))
 | 
			
		||||
                                (invoke "./unittest/t1")))))))
 | 
			
		||||
             #:phases
 | 
			
		||||
             #~(modify-phases %standard-phases
 | 
			
		||||
                 (delete 'configure)
 | 
			
		||||
                 (replace 'check
 | 
			
		||||
                   (lambda* (#:key tests? make-flags
 | 
			
		||||
                             #:allow-other-keys)
 | 
			
		||||
                     (when tests?
 | 
			
		||||
                       (apply invoke
 | 
			
		||||
                              `("make" "-C" "unittest"
 | 
			
		||||
                                ,@make-flags))
 | 
			
		||||
                       (invoke "./unittest/t1"))))
 | 
			
		||||
                 ;; The Makefile checks for libtoml.pc and only installs if
 | 
			
		||||
                 ;; the prefix is /usr/local.
 | 
			
		||||
                 (add-after 'install 'install-pkg-config
 | 
			
		||||
                   (lambda _
 | 
			
		||||
                     (rename-file "libtoml.pc.sample" "libtoml.pc")
 | 
			
		||||
                     (substitute* "libtoml.pc"
 | 
			
		||||
                       (("^prefix=.*")
 | 
			
		||||
                        (string-append "prefix=" #$output "\n")))
 | 
			
		||||
 | 
			
		||||
                     (let ((pc (string-append #$output "/lib/pkgconfig")))
 | 
			
		||||
                       (mkdir-p pc)
 | 
			
		||||
                       (install-file "libtoml.pc" pc)))))))
 | 
			
		||||
      (home-page "https://github.com/cktan/tomlc99")
 | 
			
		||||
      (synopsis "TOML library for C")
 | 
			
		||||
      (description
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue