unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: cmake: Install man pages and docs in share/{man,doc}
@ 2014-03-22  3:47 Mark H Weaver
  2014-03-22 14:27 ` [PATCH] gnu: cmake: Install man pages and docs in share/{man, doc} Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Mark H Weaver @ 2014-03-22  3:47 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: [PATCH] gnu: cmake: Install man pages and docs in share/{man,doc} --]
[-- Type: text/x-patch, Size: 3327 bytes --]

From 2e1bf6d9489306d69f7876797651e91049eed6c7 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Fri, 21 Mar 2014 03:44:03 -0400
Subject: [PATCH] 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.
---
 gnu/packages/cmake.scm | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 84873f4..87a70de 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
+;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,7 +23,8 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
-  #:use-module (gnu packages file))
+  #:use-module (gnu packages file)
+  #:use-module (srfi srfi-1))
 
 (define-public cmake
   (package
@@ -32,15 +34,15 @@
              (method url-fetch)
              (uri (string-append
                    "http://www.cmake.org/files/v"
-                   (substring version 0
-                    (string-index version #\. (+ 1 (string-index version #\.))))
+                   (string-join (take (string-split version #\.) 2)
+                                ".")
                    "/cmake-" version ".tar.gz"))
              (sha256
               (base32 "11q21vyrr6c6smyjy81k2k07zmn96ggjia9im9cxwvj0n88bm1fq"))
              (patches (list (search-patch "cmake-fix-tests.patch")))))
     (build-system gnu-build-system)
     (arguments
-     '(#:test-target "test"
+     `(#:test-target "test"
        #:phases (alist-replace
                  'configure
                  (lambda* (#:key outputs #:allow-other-keys)
@@ -61,8 +63,20 @@
                          "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c"
                          "Tests/CMakeLists.txt")
                        (("/bin/sh") (which "sh")))
-                     (zero? (system* "./configure"
-                             (string-append "--prefix=" out)))))
+                     (zero? (system*
+                             "./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)))
     (inputs
      `(("file" ,file)))
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: cmake: Install man pages and docs in share/{man, doc}
  2014-03-22  3:47 [PATCH] gnu: cmake: Install man pages and docs in share/{man,doc} Mark H Weaver
@ 2014-03-22 14:27 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2014-03-22 14:27 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> skribis:

> From 2e1bf6d9489306d69f7876797651e91049eed6c7 Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <mhw@netris.org>
> Date: Fri, 21 Mar 2014 03:44:03 -0400
> Subject: [PATCH] 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.

OK for the branch of your choice.  :-)

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-22 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-22  3:47 [PATCH] gnu: cmake: Install man pages and docs in share/{man,doc} Mark H Weaver
2014-03-22 14:27 ` [PATCH] gnu: cmake: Install man pages and docs in share/{man, doc} Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).