From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: [PATCH] gnu: cmake: Install man pages and docs in share/{man,doc} Date: Fri, 21 Mar 2014 23:47:19 -0400 Message-ID: <87ior6nbco.fsf@yeeloong.lan> Mime-Version: 1.0 Content-Type: text/x-patch; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRCuk-00035u-7E for guix-devel@gnu.org; Fri, 21 Mar 2014 23:48:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRCue-0004uV-RR for guix-devel@gnu.org; Fri, 21 Mar 2014 23:48:05 -0400 Received: from world.peace.net ([96.39.62.75]:57744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRCue-0004sb-J3 for guix-devel@gnu.org; Fri, 21 Mar 2014 23:48:00 -0400 Content-Disposition: inline; filename=0001-gnu-cmake-Install-man-pages-and-docs-in-share-man-do.patch Content-Description: [PATCH] gnu: cmake: Install man pages and docs in share/{man,doc} List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org >From 2e1bf6d9489306d69f7876797651e91049eed6c7 Mon Sep 17 00:00:00 2001 From: Mark H Weaver 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 =C2=A9 2013 Cyril Roelandt +;;; Copyright =C2=A9 2014 Mark H Weaver ;;; ;;; 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)) =20 (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 "11q21vyrr6c6smyjy81k2k07zmn96ggjia9im9cxwvj0n88bm1f= q")) (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=3D" out))))) + (zero? (system* + "./configure" + (string-append "--prefix=3D" out) + ;; By default, the man pages and other docs l= and + ;; in PREFIX/man and PREFIX/doc, but we want = them + ;; in share/{man,doc}. Note that unlike + ;; autoconf-generated configure scripts, cmak= e's + ;; configure prepends "PREFIX/" to what we pa= ss + ;; to --mandir and --docdir. + "--mandir=3Dshare/man" + ,(string-append + "--docdir=3Dshare/doc/cmake-" + (string-join (take (string-split version #\= .) 2) + ".")))))) %standard-phases))) (inputs `(("file" ,file))) --=20 1.8.4