[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#27856] [PATCH] gnu: erlang: Fix install-doc phase.
From: |
Peter Mikkelsen |
Subject: |
[bug#27856] [PATCH] gnu: erlang: Fix install-doc phase. |
Date: |
Sat, 29 Jul 2017 17:13:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hi Ludovic,
>> Yes it does, and I found out that Erlang looks for man pages in
>> /gnu/store/.....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 how
>> it is :)
>
> Indeed, odd, since /lib is for architecture-dependent bits.
>
> How difficult would it be to patch ‘erl -man’ to look for man pages in
> /share/man? I wouldn’t be surprised if other distros like Debian
> already have a patch doing this.
>
> WDYT?
>
> Ludo’.
It turned out Debian did have a patch, which I rewrote a little bit.
Here comes patch v2.
Peter.
>From 51a099c66217d1018815d1226c59228aa49024fe Mon Sep 17 00:00:00 2001
From: Peter Mikkelsen <address@hidden>
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 <address@hidden>
+
+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