guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: nvi: Fix cross-compilation.


From: guix-commits
Subject: branch master updated: gnu: nvi: Fix cross-compilation.
Date: Tue, 27 Oct 2020 08:11:48 -0400

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new a01f329  gnu: nvi: Fix cross-compilation.
a01f329 is described below

commit a01f32924423c45a0ffa50f6c1727be2a25ef75c
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Tue Oct 27 13:11:15 2020 +0100

    gnu: nvi: Fix cross-compilation.
    
    * gnu/packages/nvi.scm (nvi)[arguments]: Add "vi_cv_sprintf_count=yes" to
    configure flags when cross-compiling. Also add 'fix-configure phase.
    [native-inputs]: Add "automake" that is required by the new phase.
---
 gnu/packages/nvi.scm | 34 +++++++++++++++++++++++++++++-----
 1 file changed, 29 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/nvi.scm b/gnu/packages/nvi.scm
index c34b1ca..eea6093 100644
--- a/gnu/packages/nvi.scm
+++ b/gnu/packages/nvi.scm
@@ -64,17 +64,41 @@
     (build-system gnu-build-system)
     (arguments
       `(#:out-of-source? #t
-        #:configure-flags '("--enable-widechar")))
+        #:configure-flags
+        '("--enable-widechar"
+          ,@(if (%current-target-system)
+                '("vi_cv_sprintf_count=yes")
+                '()))
+        #:phases
+        (modify-phases %standard-phases
+          (add-before 'configure 'fix-configure
+            (lambda* (#:key inputs native-inputs #:allow-other-keys)
+              ;; Replace outdated config.sub and config.guess:
+              (with-directory-excursion "dist"
+                (for-each (lambda (file)
+                            (chmod file #o755)
+                            (install-file
+                             (string-append
+                              (assoc-ref
+                               (or native-inputs inputs) "automake")
+                              "/share/automake-"
+                              ,(version-major+minor
+                                (package-version automake))
+                              "/" file) "."))
+                          '("config.sub")))
+              #t)))))
     (inputs
       `(("bdb" ,bdb)
         ("ncurses" ,ncurses)))
+    (native-inputs
+     `(("automake" ,automake))) ;Up to date 'config.guess' and 'config.sub'.
     (synopsis "The Berkeley Vi Editor")
     (description
       "Vi is the original screen based text editor for Unix systems.  It is
 considered the standard text editor, and is available on almost all Unix
-systems.  Nvi is intended as a \"bug-for-bug compatible\" clone of the original
-BSD vi editor.  As such, it doesn't have a lot of snazzy features as do some
-of the other vi clones such as elvis and vim.  However, if all you want is vi,
-this is the one to get.")
+systems.  Nvi is intended as a \"bug-for-bug compatible\" clone of the
+original BSD vi editor.  As such, it doesn't have a lot of snazzy features as
+do some of the other vi clones such as elvis and vim.  However, if all you
+want is vi, this is the one to get.")
     (home-page "https://sites.google.com/a/bostic.com/keithbostic/vi";)
     (license bsd-3)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]