all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#27856] [PATCH] gnu: erlang: Fix install-doc phase.
@ 2017-07-28  0:10 Peter Mikkelsen
  2017-07-28 20:56 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Mikkelsen @ 2017-07-28  0:10 UTC (permalink / raw)
  To: 27856

* gnu/packages/erlang.scm (erlang): Install
  the man-pages to the correct directory.
---
 gnu/packages/erlang.scm | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index 07f117e28..6c702a2ba 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -153,16 +153,15 @@
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (manpages (assoc-ref inputs "erlang-manpages"))
-                    (share (string-append out "/share/")))
-             (mkdir-p share)
-             (mkdir-p (string-append share "/misc/erlang"))
-             (with-directory-excursion share
+                    (release-dir (string-append out "/lib/erlang")))
+             (with-directory-excursion release-dir
                (and
                  (zero? (system* "tar" "xvf" manpages))
                  (rename-file "COPYRIGHT"
-                              (string-append share "/misc/erlang/COPYRIGHT"))
-                 ;; Delete superfluous file.
-                 (delete-file "PR.template")))))))))
+                              (string-append release-dir "/misc/COPYRIGHT"))
+                 ;; Delete superfluous files.
+                 (delete-file "PR.template")
+                 (delete-file "README.md")))))))))
     (home-page "http://erlang.org/")
     (synopsis "The Erlang programming language")
     (description
-- 
2.13.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#27856] [PATCH] gnu: erlang: Fix install-doc phase.
  2017-07-28  0:10 [bug#27856] [PATCH] gnu: erlang: Fix install-doc phase Peter Mikkelsen
@ 2017-07-28 20:56 ` Ludovic Courtès
  2017-07-28 21:02   ` Peter Mikkelsen
  2017-07-29  9:35   ` [bug#27856] " Peter Mikkelsen
  0 siblings, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2017-07-28 20:56 UTC (permalink / raw)
  To: Peter Mikkelsen; +Cc: 27856

Hi,

Peter Mikkelsen <petermikkelsen10@gmail.com> skribis:

> * gnu/packages/erlang.scm (erlang): Install
>   the man-pages to the correct directory.
> ---
>  gnu/packages/erlang.scm | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
> index 07f117e28..6c702a2ba 100644
> --- a/gnu/packages/erlang.scm
> +++ b/gnu/packages/erlang.scm
> @@ -153,16 +153,15 @@
>             (lambda* (#:key inputs outputs #:allow-other-keys)
>               (let* ((out (assoc-ref outputs "out"))
>                      (manpages (assoc-ref inputs "erlang-manpages"))
> -                    (share (string-append out "/share/")))
> -             (mkdir-p share)
> -             (mkdir-p (string-append share "/misc/erlang"))
> -             (with-directory-excursion share
> +                    (release-dir (string-append out "/lib/erlang")))
> +             (with-directory-excursion release-dir
>                 (and
>                   (zero? (system* "tar" "xvf" manpages))
>                   (rename-file "COPYRIGHT"
> -                              (string-append share "/misc/erlang/COPYRIGHT"))
> -                 ;; Delete superfluous file.
> -                 (delete-file "PR.template")))))))))
> +                              (string-append release-dir "/misc/COPYRIGHT"))

IIUC, this installs man pages and ‘COPYRIGHT’ to OUT/lib/erlang, right?
Shouldn’t it go to OUT/share/erlang instead?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#27856] [PATCH] gnu: erlang: Fix install-doc phase.
  2017-07-28 20:56 ` Ludovic Courtès
@ 2017-07-28 21:02   ` Peter Mikkelsen
  2017-07-29 12:12     ` Ludovic Courtès
  2017-07-29  9:35   ` [bug#27856] " Peter Mikkelsen
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Mikkelsen @ 2017-07-28 21:02 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 27856

[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]

Den 28. jul. 2017 22.57 skrev "Ludovic Courtès" <ludo@gnu.org>:

Hi,

Peter Mikkelsen <petermikkelsen10@gmail.com> skribis:

> * gnu/packages/erlang.scm (erlang): Install
>   the man-pages to the correct directory.
> ---
>  gnu/packages/erlang.scm | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
> index 07f117e28..6c702a2ba 100644
> --- a/gnu/packages/erlang.scm
> +++ b/gnu/packages/erlang.scm
> @@ -153,16 +153,15 @@
>             (lambda* (#:key inputs outputs #:allow-other-keys)
>               (let* ((out (assoc-ref outputs "out"))
>                      (manpages (assoc-ref inputs "erlang-manpages"))
> -                    (share (string-append out "/share/")))
> -             (mkdir-p share)
> -             (mkdir-p (string-append share "/misc/erlang"))
> -             (with-directory-excursion share
> +                    (release-dir (string-append out "/lib/erlang")))
> +             (with-directory-excursion release-dir
>                 (and
>                   (zero? (system* "tar" "xvf" manpages))
>                   (rename-file "COPYRIGHT"
> -                              (string-append share
"/misc/erlang/COPYRIGHT"))
> -                 ;; Delete superfluous file.
> -                 (delete-file "PR.template")))))))))
> +                              (string-append release-dir
"/misc/COPYRIGHT"))

IIUC, this installs man pages and ‘COPYRIGHT’ to OUT/lib/erlang, right?
Shouldn’t it go to OUT/share/erlang instead?

Thanks,
Ludo’.

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 :)

[-- Attachment #2: Type: text/html, Size: 2974 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#27856] [PATCH] gnu: erlang: Fix install-doc phase.
  2017-07-28 20:56 ` Ludovic Courtès
  2017-07-28 21:02   ` Peter Mikkelsen
@ 2017-07-29  9:35   ` Peter Mikkelsen
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Mikkelsen @ 2017-07-29  9:35 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 27856

[-- Attachment #1: Type: text/plain, Size: 1831 bytes --]

Den 28. jul. 2017 22.57 skrev "Ludovic Courtès" <ludo@gnu.org>:

Hi,

Peter Mikkelsen <petermikkelsen10@gmail.com> skribis:

> * gnu/packages/erlang.scm (erlang): Install
>   the man-pages to the correct directory.
> ---
>  gnu/packages/erlang.scm | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
> index 07f117e28..6c702a2ba 100644
> --- a/gnu/packages/erlang.scm
> +++ b/gnu/packages/erlang.scm
> @@ -153,16 +153,15 @@
>             (lambda* (#:key inputs outputs #:allow-other-keys)
>               (let* ((out (assoc-ref outputs "out"))
>                      (manpages (assoc-ref inputs "erlang-manpages"))
> -                    (share (string-append out "/share/")))
> -             (mkdir-p share)
> -             (mkdir-p (string-append share "/misc/erlang"))
> -             (with-directory-excursion share
> +                    (release-dir (string-append out "/lib/erlang")))
> +             (with-directory-excursion release-dir
>                 (and
>                   (zero? (system* "tar" "xvf" manpages))
>                   (rename-file "COPYRIGHT"
> -                              (string-append share
"/misc/erlang/COPYRIGHT"))
> -                 ;; Delete superfluous file.
> -                 (delete-file "PR.template")))))))))
> +                              (string-append release-dir
"/misc/COPYRIGHT"))

IIUC, this installs man pages and ‘COPYRIGHT’ to OUT/lib/erlang, right?
Shouldn’t it go to OUT/share/erlang instead?

Thanks,
Ludo’.


Oh sorry, my mistake. The way it was before made it possible to use the
normal man tool instead of erl -man, which is great, but I didnt notice
before now. You can ignorere this patch.

Sorry for the inconvenience!

[-- Attachment #2: Type: text/html, Size: 2813 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#27856] [PATCH] gnu: erlang: Fix install-doc phase.
  2017-07-28 21:02   ` Peter Mikkelsen
@ 2017-07-29 12:12     ` Ludovic Courtès
  2017-07-29 15:13       ` Peter Mikkelsen
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2017-07-29 12:12 UTC (permalink / raw)
  To: Peter Mikkelsen; +Cc: 27856

Hi Peter,

Peter Mikkelsen <petermikkelsen10@gmail.com> skribis:

> 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’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#27856] [PATCH] gnu: erlang: Fix install-doc phase.
  2017-07-29 12:12     ` Ludovic Courtès
@ 2017-07-29 15:13       ` Peter Mikkelsen
  2017-07-29 20:31         ` bug#27856: " Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Mikkelsen @ 2017-07-29 15:13 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 27856

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch v2 --]
[-- Type: text/x-patch, Size: 3153 bytes --]

From 51a099c66217d1018815d1226c59228aa49024fe Mon Sep 17 00:00:00 2001
From: Peter Mikkelsen <petermikkelsen10@gmail.com>
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 <neumann@lostwebsite.net>
+
+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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#27856: [PATCH] gnu: erlang: Fix install-doc phase.
  2017-07-29 15:13       ` Peter Mikkelsen
@ 2017-07-29 20:31         ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2017-07-29 20:31 UTC (permalink / raw)
  To: Peter Mikkelsen; +Cc: 27856-done

Peter Mikkelsen <petermikkelsen10@gmail.com> skribis:

> From 51a099c66217d1018815d1226c59228aa49024fe Mon Sep 17 00:00:00 2001
> From: Peter Mikkelsen <petermikkelsen10@gmail.com>
> 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.

Great, applied.  Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-29 20:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-28  0:10 [bug#27856] [PATCH] gnu: erlang: Fix install-doc phase Peter Mikkelsen
2017-07-28 20:56 ` Ludovic Courtès
2017-07-28 21:02   ` Peter Mikkelsen
2017-07-29 12:12     ` Ludovic Courtès
2017-07-29 15:13       ` Peter Mikkelsen
2017-07-29 20:31         ` bug#27856: " Ludovic Courtès
2017-07-29  9:35   ` [bug#27856] " Peter Mikkelsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.