gnu: libffi: Leave a copy of headers where libffi.pc expects them.
Suggested by Sree Harsha Totakura <sreeharsha@totakura.in>. * gnu/packages/libffi.scm (libffi): Symlink header files instead of moving them.
This commit is contained in:
		
							parent
							
								
									ecb1b610d2
								
							
						
					
					
						commit
						d43547f12d
					
				
					 1 changed files with 6 additions and 14 deletions
				
			
		| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
;;; GNU Guix --- Functional package management for GNU
 | 
					;;; GNU Guix --- Functional package management for GNU
 | 
				
			||||||
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
 | 
					;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
;;; This file is part of GNU Guix.
 | 
					;;; This file is part of GNU Guix.
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
| 
						 | 
					@ -25,18 +25,12 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define-public libffi
 | 
					(define-public libffi
 | 
				
			||||||
  (let ((post-install-phase
 | 
					  (let ((post-install-phase
 | 
				
			||||||
         ;; Install headers in the right place.
 | 
					         ;; Keep headers where libffi.pc expects them, but also make them
 | 
				
			||||||
 | 
					         ;; available in $includedir where some users expect them.
 | 
				
			||||||
         '(lambda* (#:key outputs #:allow-other-keys)
 | 
					         '(lambda* (#:key outputs #:allow-other-keys)
 | 
				
			||||||
            (define out (assoc-ref outputs "out"))
 | 
					            (define out (assoc-ref outputs "out"))
 | 
				
			||||||
            (mkdir (string-append out "/include"))
 | 
					            (symlink (string-append out "/lib/libffi-3.0.13/include")
 | 
				
			||||||
            (with-directory-excursion
 | 
					                     (string-append out "/include")))))
 | 
				
			||||||
                (string-append out "/lib/libffi-3.0.13/include")
 | 
					 | 
				
			||||||
              (for-each (lambda (h)
 | 
					 | 
				
			||||||
                          (format #t "moving `~a' to includedir~%" h)
 | 
					 | 
				
			||||||
                          (rename-file h (string-append out "/include/" h)))
 | 
					 | 
				
			||||||
                        (scandir "."
 | 
					 | 
				
			||||||
                                 (lambda (x)
 | 
					 | 
				
			||||||
                                   (not (member x '("." ".."))))))))))
 | 
					 | 
				
			||||||
   (package
 | 
					   (package
 | 
				
			||||||
    (name "libffi")
 | 
					    (name "libffi")
 | 
				
			||||||
    (version "3.0.13")
 | 
					    (version "3.0.13")
 | 
				
			||||||
| 
						 | 
					@ -50,9 +44,7 @@
 | 
				
			||||||
               "077ibkf84bvcd6rw1m6jb107br63i2pp301rkmsbgg6300adxp8x"))
 | 
					               "077ibkf84bvcd6rw1m6jb107br63i2pp301rkmsbgg6300adxp8x"))
 | 
				
			||||||
             (patches (list (search-patch "libffi-mips-n32-fix.patch")))))
 | 
					             (patches (list (search-patch "libffi-mips-n32-fix.patch")))))
 | 
				
			||||||
    (build-system gnu-build-system)
 | 
					    (build-system gnu-build-system)
 | 
				
			||||||
    (arguments `(#:modules ((guix build utils) (guix build gnu-build-system)
 | 
					    (arguments `(#:phases (alist-cons-after 'install 'post-install
 | 
				
			||||||
                            (ice-9 ftw) (srfi srfi-26))
 | 
					 | 
				
			||||||
                 #:phases (alist-cons-after 'install 'post-install
 | 
					 | 
				
			||||||
                                            ,post-install-phase
 | 
					                                            ,post-install-phase
 | 
				
			||||||
                                            %standard-phases)))
 | 
					                                            %standard-phases)))
 | 
				
			||||||
    (outputs '("out" "debug"))
 | 
					    (outputs '("out" "debug"))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue