guix/gnu/packages/patches/erlang-man-path.patch
Igor Goryachev via Guix-patches via d6211bd0c1
gnu: erlang: Fix build.
* gnu/packages/patches/erlang-man-path.patch: Adjust patch.

Change-Id: I2531c92001a3b1c2a3363615a7a1542904fa98b7
Signed-off-by: Andrew Tropin <andrew@trop.in>
2024-09-24 15:51:12 +04:00

24 lines
847 B
Diff

Patch originally from https://sources.debian.net/patches/erlang/1:20.0.1%2Bdfsg-2/man.patch/
by Francois-Denis Gonthier <neumann@lostwebsite.net>.
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
@@ -728,8 +728,10 @@ int main(int argc, char **argv)
break;
}
}
- 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