[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/04: gnu: erlang: Fix man-pages search path of 'erl -man'.
From: |
Ludovic Courtès |
Subject: |
02/04: gnu: erlang: Fix man-pages search path of 'erl -man'. |
Date: |
Sat, 29 Jul 2017 17:03:54 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit a4078acf4ab7d694e86ffcaef2073d71e58508f1
Author: Peter Mikkelsen <address@hidden>
Date: Sat Jul 29 17:06:55 2017 +0200
gnu: erlang: Fix man-pages search path of 'erl -man'.
* 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.
Signed-off-by: Ludovic Courtès <address@hidden>
---
gnu/local.mk | 1 +
gnu/packages/erlang.scm | 4 +++-
gnu/packages/patches/erlang-man-path.patch | 24 ++++++++++++++++++++++++
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 29dee73..9f0915f 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 07f117e..9658061 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 0000000..68fc9f4
--- /dev/null
+++ b/gnu/packages/patches/erlang-man-path.patch
@@ -0,0 +1,24 @@
+Patch originally from
https://sources.debian.net/patches/erlang/1:20.0.1%2Bdfsg-2/man.patch/
+by Francois-Denis Gonthier <address@hidden>.
+
+Patch description rewritten for Guix.
+
+This patch allows access to the man page with the '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