summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2020-03-07 11:30:44 -0500
committerJan Nieuwenhuizen <janneke@gnu.org>2020-03-26 12:59:34 +0100
commit3da54cc3180ce175b1820dd4e366abdbbffcb45d (patch)
tree72a456ab0e19ecef4be14bae9ae6d636f217d861 /gnu/packages
parent3d3ca76f1cde964aa61433cdd40dd701c39e60e7 (diff)
downloadguix-3da54cc3180ce175b1820dd4e366abdbbffcb45d.tar.gz
gnu: screen: Build fix for the Hurd.
* gnu/packages/patches/screen-hurd-path-max.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/screen.scm (screen): Use it.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/patches/screen-hurd-path-max.patch42
-rw-r--r--gnu/packages/screen.scm2
2 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/patches/screen-hurd-path-max.patch b/gnu/packages/patches/screen-hurd-path-max.patch
new file mode 100644
index 0000000000..e906f154f3
--- /dev/null
+++ b/gnu/packages/patches/screen-hurd-path-max.patch
@@ -0,0 +1,42 @@
+Workaround for PATH_MAX usage on the Hurd.
+
+Taken from https://salsa.debian.org/debian/screen/-/blob/master/debian/patches/61-default-PATH_MAX-if-undefined-for-hurd.patch
+
+Description: Set PATH_MAX to 4096 if undefined
+ Fixes FTBFS since 4.4.0 on GNU/Hurd. Updated to add one more occurrence for 4.5.0.
+Author: Axel Beckert <abe@debian.org>
+Bug: https://savannah.gnu.org/bugs/?50089
+Last-Updated: 2017-01-18
+
+--- a/tty.sh
++++ b/tty.sh
+@@ -1478,6 +1478,13 @@
+   return 0;
+ }
+ 
++/*
++ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
++ */
++
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
+ 
+ int CheckTtyname (char *tty)
+ {
+--- a/screen.h
++++ b/screen.h
+@@ -109,6 +109,13 @@
+ # define DEFAULT_BUFFERFILE	"/tmp/screen-exchange"
+ #endif
+ 
++/*
++ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
++ */
++
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
+ 
+ #if defined(hpux) && !(defined(VSUSP) && defined(VDSUSP) && defined(VWERASE) && defined(VLNEXT))
+ # define HPUX_LTCHARS_HACK
diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index 51168903a9..c03e2e5e5e 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -29,6 +29,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
+  #:use-module (gnu packages hurd)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
@@ -43,6 +44,7 @@
              (method url-fetch)
              (uri (string-append "mirror://gnu/screen/screen-"
                                  version ".tar.gz"))
+             (patches (search-patches "screen-hurd-path-max.patch"))
              (sha256
               (base32 "18ascpjzsy70h6hk7wpg8zmzjwgdyrdr7c6z4pg5z4l9hhyv24bf"))))
     (build-system gnu-build-system)