gnu: cmake: Install man pages and docs in share/{man,doc}.
* gnu/packages/cmake.scm (cmake): Pass --mandir and --docdir to configure. Rewrite the code that selects the first two components of the version.
This commit is contained in:
		
							parent
							
								
									c9a010db8a
								
							
						
					
					
						commit
						6212b8e5d3
					
				
					 1 changed files with 20 additions and 6 deletions
				
			
		| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
;;; GNU Guix --- Functional package management for GNU
 | 
					;;; GNU Guix --- Functional package management for GNU
 | 
				
			||||||
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
 | 
					;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
 | 
				
			||||||
 | 
					;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
;;; This file is part of GNU Guix.
 | 
					;;; This file is part of GNU Guix.
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
| 
						 | 
					@ -22,7 +23,8 @@
 | 
				
			||||||
  #:use-module (guix download)
 | 
					  #:use-module (guix download)
 | 
				
			||||||
  #:use-module (guix build-system gnu)
 | 
					  #:use-module (guix build-system gnu)
 | 
				
			||||||
  #:use-module (gnu packages)
 | 
					  #:use-module (gnu packages)
 | 
				
			||||||
  #:use-module (gnu packages file))
 | 
					  #:use-module (gnu packages file)
 | 
				
			||||||
 | 
					  #:use-module (srfi srfi-1))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define-public cmake
 | 
					(define-public cmake
 | 
				
			||||||
  (package
 | 
					  (package
 | 
				
			||||||
| 
						 | 
					@ -32,15 +34,15 @@
 | 
				
			||||||
             (method url-fetch)
 | 
					             (method url-fetch)
 | 
				
			||||||
             (uri (string-append
 | 
					             (uri (string-append
 | 
				
			||||||
                   "http://www.cmake.org/files/v"
 | 
					                   "http://www.cmake.org/files/v"
 | 
				
			||||||
                   (substring version 0
 | 
					                   (string-join (take (string-split version #\.) 2)
 | 
				
			||||||
                    (string-index version #\. (+ 1 (string-index version #\.))))
 | 
					                                ".")
 | 
				
			||||||
                   "/cmake-" version ".tar.gz"))
 | 
					                   "/cmake-" version ".tar.gz"))
 | 
				
			||||||
             (sha256
 | 
					             (sha256
 | 
				
			||||||
              (base32 "11q21vyrr6c6smyjy81k2k07zmn96ggjia9im9cxwvj0n88bm1fq"))
 | 
					              (base32 "11q21vyrr6c6smyjy81k2k07zmn96ggjia9im9cxwvj0n88bm1fq"))
 | 
				
			||||||
             (patches (list (search-patch "cmake-fix-tests.patch")))))
 | 
					             (patches (list (search-patch "cmake-fix-tests.patch")))))
 | 
				
			||||||
    (build-system gnu-build-system)
 | 
					    (build-system gnu-build-system)
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     '(#:test-target "test"
 | 
					     `(#:test-target "test"
 | 
				
			||||||
       #:phases (alist-replace
 | 
					       #:phases (alist-replace
 | 
				
			||||||
                 'configure
 | 
					                 'configure
 | 
				
			||||||
                 (lambda* (#:key outputs #:allow-other-keys)
 | 
					                 (lambda* (#:key outputs #:allow-other-keys)
 | 
				
			||||||
| 
						 | 
					@ -61,8 +63,20 @@
 | 
				
			||||||
                         "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c"
 | 
					                         "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c"
 | 
				
			||||||
                         "Tests/CMakeLists.txt")
 | 
					                         "Tests/CMakeLists.txt")
 | 
				
			||||||
                       (("/bin/sh") (which "sh")))
 | 
					                       (("/bin/sh") (which "sh")))
 | 
				
			||||||
                     (zero? (system* "./configure"
 | 
					                     (zero? (system*
 | 
				
			||||||
                             (string-append "--prefix=" out)))))
 | 
					                             "./configure"
 | 
				
			||||||
 | 
					                             (string-append "--prefix=" out)
 | 
				
			||||||
 | 
					                             ;; By default, the man pages and other docs land
 | 
				
			||||||
 | 
					                             ;; in PREFIX/man and PREFIX/doc, but we want them
 | 
				
			||||||
 | 
					                             ;; in share/{man,doc}.  Note that unlike
 | 
				
			||||||
 | 
					                             ;; autoconf-generated configure scripts, cmake's
 | 
				
			||||||
 | 
					                             ;; configure prepends "PREFIX/" to what we pass
 | 
				
			||||||
 | 
					                             ;; to --mandir and --docdir.
 | 
				
			||||||
 | 
					                             "--mandir=share/man"
 | 
				
			||||||
 | 
					                             ,(string-append
 | 
				
			||||||
 | 
					                               "--docdir=share/doc/cmake-"
 | 
				
			||||||
 | 
					                               (string-join (take (string-split version #\.) 2)
 | 
				
			||||||
 | 
					                                            "."))))))
 | 
				
			||||||
                 %standard-phases)))
 | 
					                 %standard-phases)))
 | 
				
			||||||
    (inputs
 | 
					    (inputs
 | 
				
			||||||
     `(("file" ,file)))
 | 
					     `(("file" ,file)))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue