From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbRZJ-0007kR-3m for guix-patches@gnu.org; Sat, 29 Jul 2017 09:14:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dbRZF-0007Xu-U6 for guix-patches@gnu.org; Sat, 29 Jul 2017 09:14:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:58083) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dbRZF-0007SD-Pa for guix-patches@gnu.org; Sat, 29 Jul 2017 09:14:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dbRZC-00006U-4P for guix-patches@gnu.org; Sat, 29 Jul 2017 09:14:02 -0400 Subject: [bug#27856] [PATCH] gnu: erlang: Fix install-doc phase. Resent-Message-ID: From: Peter Mikkelsen References: <20170728001051.1778-1-petermikkelsen10@gmail.com> <874ltwl1pn.fsf@gnu.org> <87o9s3igrz.fsf@gnu.org> Date: Sat, 29 Jul 2017 17:13:11 +0200 In-Reply-To: <87o9s3igrz.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 29 Jul 2017 14:12:00 +0200") Message-ID: <87wp6r2s54.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 27856@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludovic, >> Yes it does, and I found out that Erlang looks for man pages in /gnu/sto= re/.....erlang../lib/erlang/man >> >> This can be verified by the output of running "erl -man -w" >> >> You are right it seems a bit odd, but to my understanding that is just h= ow it is :) > > Indeed, odd, since /lib is for architecture-dependent bits. > > How difficult would it be to patch =E2=80=98erl -man=E2=80=99 to look for= man pages in > /share/man? I wouldn=E2=80=99t be surprised if other distros like Debian > already have a patch doing this. > > WDYT? > > Ludo=E2=80=99. It turned out Debian did have a patch, which I rewrote a little bit. Here comes patch v2. Peter. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-erlang-Fix-man-pages-search-path.patch Content-Description: patch v2 >From 51a099c66217d1018815d1226c59228aa49024fe Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Sat, 29 Jul 2017 17:06:55 +0200 Subject: [PATCH] gnu: erlang: Fix man-pages search path. * gnu/packages/patches/erlang-man-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/erlang.scm (erlang)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/erlang.scm | 4 +++- gnu/packages/patches/erlang-man-path.patch | 25 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/erlang-man-path.patch diff --git a/gnu/local.mk b/gnu/local.mk index 29dee73c4..9f0915ff6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -579,6 +579,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ %D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \ %D%/packages/patches/emacs-source-date-epoch.patch \ + %D%/packages/patches/erlang-man-path.patch \ %D%/packages/patches/eudev-rules-directory.patch \ %D%/packages/patches/eudev-conflicting-declaration.patch \ %D%/packages/patches/evilwm-lost-focus-bug.patch \ diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm index 07f117e28..9658061f2 100644 --- a/gnu/packages/erlang.scm +++ b/gnu/packages/erlang.scm @@ -23,6 +23,7 @@ #:use-module (guix build-system gnu) #:use-module (guix download) #:use-module (guix packages) + #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages fontutils) #:use-module (gnu packages gl) @@ -45,7 +46,8 @@ (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1b47jh549yywyp8fbs8a8j4ydr3zn982navzyqvlms6rg8vwb0pw")))) + "1b47jh549yywyp8fbs8a8j4ydr3zn982navzyqvlms6rg8vwb0pw")) + (patches (search-patches "erlang-man-path.patch")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl) diff --git a/gnu/packages/patches/erlang-man-path.patch b/gnu/packages/patches/erlang-man-path.patch new file mode 100644 index 000000000..3cb4fddb1 --- /dev/null +++ b/gnu/packages/patches/erlang-man-path.patch @@ -0,1 +1,25 @@ +Patch originally from https://sources.debian.net/patches/erlang/1:20.0.1%2Bdfsg-2/man.patch/ + +patch by Francois-Denis Gonthier + +Patch description rewritten for guix. + +This patch allows to use standard man path with erl -man command. +(Erlang manual pages are placed to /gnu/store/..erlang../share/man/ hierarchy +as other man pages) + +--- a/erts/etc/common/erlexec.c ++++ b/erts/etc/common/erlexec.c +@@ -709,8 +709,10 @@ + error("-man not supported on Windows"); + #else + argv[i] = "man"; +- erts_snprintf(tmpStr, sizeof(tmpStr), "%s/man", rootdir); +- set_env("MANPATH", tmpStr); ++ /* ++ * Conform to erlang-manpages content. ++ */ ++ putenv(strsave("MANSECT=1:3:5:7")); + execvp("man", argv+i); + error("Could not execute the 'man' command."); + #endif -- 2.13.3 --=-=-=--