[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/10: gnu: readline: support mingw.
From: |
Ludovic Courtès |
Subject: |
08/10: gnu: readline: support mingw. |
Date: |
Wed, 7 Dec 2016 09:23:37 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit ae12d586275cdd96db23fb01bf840b2055b5b979
Author: Jan Nieuwenhuizen <address@hidden>
Date: Tue Apr 12 15:49:17 2016 +0200
gnu: readline: support mingw.
* gnu/packages/patches/readline-7.0-mingw.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/readline.scm (readline): Support MinGW.
---
gnu/local.mk | 1 +
gnu/packages/patches/readline-7.0-mingw.patch | 28 +++++++++++++++++++++++++
gnu/packages/readline.scm | 14 ++++++++++++-
3 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 3197cfb..1f98513 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -845,6 +845,7 @@ dist_patch_DATA =
\
%D%/packages/patches/ratpoison-shell.patch \
%D%/packages/patches/readline-link-ncurses.patch \
%D%/packages/patches/readline-6.2-CVE-2014-2524.patch \
+ %D%/packages/patches/readline-7.0-mingw.patch \
%D%/packages/patches/ripperx-missing-file.patch \
%D%/packages/patches/rpm-CVE-2014-8118.patch \
%D%/packages/patches/rsem-makefile.patch \
diff --git a/gnu/packages/patches/readline-7.0-mingw.patch
b/gnu/packages/patches/readline-7.0-mingw.patch
new file mode 100644
index 0000000..1dc491d
--- /dev/null
+++ b/gnu/packages/patches/readline-7.0-mingw.patch
@@ -0,0 +1,28 @@
+Configure checks for chown; add missing shields in code.
+
+Upstream status: not yet presented upstream.
+
+--- readline-7.0/histfile.c.orig 2016-12-06 20:04:10.058901731 +0100
++++ readline-7.0/histfile.c 2016-12-06 20:05:09.220083801 +0100
+@@ -610,8 +610,10 @@
+ user is running this, it's a no-op. If the shell is running after sudo
+ with a shared history file, we don't want to leave the history file
+ owned by root. */
++#if HAVE_CHOWN
+ if (rv == 0 && exists)
+ r = chown (filename, finfo.st_uid, finfo.st_gid);
++#endif
+
+ xfree (filename);
+ FREE (tempname);
+@@ -757,8 +759,10 @@
+ user is running this, it's a no-op. If the shell is running after sudo
+ with a shared history file, we don't want to leave the history file
+ owned by root. */
++#if HAVE_CHOWN
+ if (rv == 0 && exists)
+ mode = chown (histname, finfo.st_uid, finfo.st_gid);
++#endif
+
+ FREE (histname);
+ FREE (tempname);
diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm
index 4381779..16a31af 100644
--- a/gnu/packages/readline.scm
+++ b/gnu/packages/readline.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <address@hidden>
;;; Copyright © 2016 Efraim Flashner <address@hidden>
+;;; Copyright © 2016 Jan Nieuwenhuizen <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,7 +25,8 @@
#:use-module (gnu packages perl)
#:use-module (guix packages)
#:use-module (guix download)
- #:use-module (guix build-system gnu))
+ #:use-module (guix build-system gnu)
+ #:use-module (guix utils))
(define-public readline
(let ((post-install-phase
@@ -61,8 +63,18 @@
;; cross-compiling, so provide the correct answer.
,@(if (%current-target-system)
'("bash_cv_wcwidth_broken=no")
+ '())
+ ;; MinGW: ncurses provides the termcap api.
+ ,@(if (target-mingw?)
+ '("bash_cv_termcap_lib=ncurses")
'()))
+ ,@(if (target-mingw?)
+ ;; MinGW: termcap in ncurses
+ ;; some SIG_* #defined in _POSIX
+ '(#:make-flags '("TERMCAP_LIB=-lncurses"
+ "CPPFLAGS=-D_POSIX
-D'chown(f,o,g)=0'"))
+ '())
#:phases (alist-cons-after
'install 'post-install
,post-install-phase
- branch master updated (4908ae4 -> dea9110), Ludovic Courtès, 2016/12/07
- 05/10: gnu: libunistring: support mingw: propagate libiconv if needed., Ludovic Courtès, 2016/12/07
- 10/10: hydra: Add "i686-w64-mingw32" as a cross-compilation target., Ludovic Courtès, 2016/12/07
- 04/10: gnu: Add function libiconv-if-needed., Ludovic Courtès, 2016/12/07
- 01/10: doc: Correct example for 'wpa-supplicant-service-type'., Ludovic Courtès, 2016/12/07
- 06/10: gnu: gmp: build shared library for mingw., Ludovic Courtès, 2016/12/07
- 09/10: gnu: guile-2.0: support mingw., Ludovic Courtès, 2016/12/07
- 08/10: gnu: readline: support mingw.,
Ludovic Courtès <=
- 07/10: gnu: ncurses: support mingw., Ludovic Courtès, 2016/12/07
- 03/10: gnu: cross-base: Add i686-w64-mingw32 target., Ludovic Courtès, 2016/12/07
- 02/10: gnu: Add mingw-w64., Ludovic Courtès, 2016/12/07