Revert "gnu: inetutils: Update to 2.0."
[jackhill/guix/guix.git] / gnu / packages / patches / erlang-man-path.patch
CommitLineData
a4078acf
PM
1Patch originally from https://sources.debian.net/patches/erlang/1:20.0.1%2Bdfsg-2/man.patch/
2by Francois-Denis Gonthier <neumann@lostwebsite.net>.
3
4Patch description rewritten for Guix.
5
6This patch allows access to the man page with the 'erl -man' command
7(Erlang manual pages are placed to /gnu/store/..erlang../share/man/ hierarchy
8as other man pages.)
9
10--- a/erts/etc/common/erlexec.c
11+++ b/erts/etc/common/erlexec.c
12@@ -709,8 +709,10 @@
13 error("-man not supported on Windows");
14 #else
15 argv[i] = "man";
16- erts_snprintf(tmpStr, sizeof(tmpStr), "%s/man", rootdir);
17- set_env("MANPATH", tmpStr);
18+ /*
19+ * Conform to erlang-manpages content.
20+ */
21+ putenv(strsave("MANSECT=1:3:5:7"));
22 execvp("man", argv+i);
23 error("Could not execute the 'man' command.");
24 #endif