unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#51067] [PATCH] gnu: Add traditional vi (ex-vi)
@ 2021-10-07  5:46 Foo Chuan Wei
  2021-10-07  8:37 ` Maxime Devos
  2021-10-12 20:50 ` [bug#51067] [PATCH v2] gnu: Add ex-vi Foo Chuan Wei
  0 siblings, 2 replies; 3+ messages in thread
From: Foo Chuan Wei @ 2021-10-07  5:46 UTC (permalink / raw)
  To: 51067

* gnu/packages/text-editors.scm (ex-vi): New public variable.
---
 gnu/packages/patches/ex-vi-makefile.patch | 53 +++++++++++++++++++++++
 gnu/packages/text-editors.scm             | 30 +++++++++++++
 2 files changed, 83 insertions(+)
 create mode 100644 gnu/packages/patches/ex-vi-makefile.patch

diff --git a/gnu/packages/patches/ex-vi-makefile.patch b/gnu/packages/patches/ex-vi-makefile.patch
new file mode 100644
index 0000000000..d835eb981d
--- /dev/null
+++ b/gnu/packages/patches/ex-vi-makefile.patch
@@ -0,0 +1,53 @@
+diff -ur ex-050325-orig/Makefile ex-050325/Makefile
+--- ex-050325-orig/Makefile
++++ ex-050325/Makefile
+@@ -75,11 +75,13 @@
+ #	@(#)Makefile	1.50 (gritter) 2/20/05
+ #
+ 
++CC = gcc
++
+ #
+ # Destinations for installation. $(PRESERVEDIR) is used for recovery files.
+ # It will get mode 1777.
+ #
+-PREFIX		= /usr/local
++PREFIX		= ${out}
+ BINDIR		= $(PREFIX)/bin
+ LIBEXECDIR	= $(PREFIX)/libexec
+ MANDIR		= $(PREFIX)/share/man
+@@ -94,7 +96,7 @@
+ #
+ # A BSD-like install program. GNU install will fit well here, too.
+ #
+-INSTALL		= /usr/ucb/install
++INSTALL		= install
+ 
+ #
+ # Compiler and linker flags.
+@@ -205,13 +207,13 @@
+ #
+ # You may also get terminfo access by using the ncurses library.
+ #
+-#TERMLIB	= ncurses
++TERMLIB	= ncurses
+ #
+ # The preferred choice for ex on Linux distributions, other systems that
+ # provide a good termcap file, or when setting the TERMCAP environment
+ # variable is deemed sufficient, is the included 2.11BSD termcap library.
+ #
+-TERMLIB	= termlib
++#TERMLIB	= termlib
+ 
+ #
+ # Since ex uses sbrk() internally, a conflict with the libc's version of
+@@ -330,8 +332,7 @@
+ 	ln -s ex $(DESTDIR)$(BINDIR)/vedit
+ 	ln -s ex $(DESTDIR)$(BINDIR)/vi
+ 	ln -s ex $(DESTDIR)$(BINDIR)/view
+-	test -d $(DESTDIR)$(PRESERVEDIR) || mkdir -p $(DESTDIR)$(PRESERVEDIR)
+-	chmod 1777 $(DESTDIR)$(PRESERVEDIR)
++
+ 
+ ex.o: config.h ex_argv.h ex.h ex_proto.h ex_temp.h ex_tty.h ex_tune.h
+ ex.o: ex_vars.h libterm/libterm.h
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 29b159f1a7..df4d4b045a 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -1195,3 +1195,33 @@ uncluttered user interface.  It supports a multitude of translation formats
 provided by the Translate Toolkit, including XLIFF and PO.")
     (home-page "https://virtaal.translatehouse.org/")
     (license license:gpl2+)))
+
+(define-public ex-vi
+  (package
+    (name "ex-vi")
+    (version "050325")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/ex-vi/ex-vi/"
+                                  version "/ex-" version ".tar.bz2"))
+              (sha256
+                (base32
+                  "0294cfxp91gyi0v3v4qdxcwlxp1nm986ir8r7d374ig9cz7yfjys"))
+              (patches (search-patches "ex-vi-makefile.patch"))))
+    (build-system gnu-build-system)
+    (inputs `(("ncurses" ,ncurses)))
+    (arguments '(#:phases (modify-phases %standard-phases
+                                         (delete 'configure))
+                 #:tests? #f))
+    (synopsis "The traditional vi")
+    (description
+      "The traditional vi editor, ported to modern Unix systems.
+
+This implementation is derived from ex/vi 3.7 of 6/7/85 and the BSD
+termcap library, originally from the 2.11BSD distribution. All of them
+were changed to compile and run on newer POSIX compatible Unix systems.
+Support for international character sets was added, including support
+for multibyte locales (based on UTF-8 or East Asian encodings), and some
+changes were made to get closer to the POSIX.2 guidelines for ex and vi.")
+    (home-page "http://ex-vi.sourceforge.net")
+    (license license:bsd-4)))

base-commit: ddec49858a27cf68fd39b2ff61514cca87329a5e
-- 
2.25.1





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

* [bug#51067] [PATCH] gnu: Add traditional vi (ex-vi)
  2021-10-07  5:46 [bug#51067] [PATCH] gnu: Add traditional vi (ex-vi) Foo Chuan Wei
@ 2021-10-07  8:37 ` Maxime Devos
  2021-10-12 20:50 ` [bug#51067] [PATCH v2] gnu: Add ex-vi Foo Chuan Wei
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Devos @ 2021-10-07  8:37 UTC (permalink / raw)
  To: Foo Chuan Wei, 51067

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

Foo Chuan Wei schreef op do 07-10-2021 om 05:46 [+0000]:
> * gnu/packages/text-editors.scm (ex-vi): New public variable.
> ---
>  gnu/packages/patches/ex-vi-makefile.patch | 53 +++++++++++++++++++++++
>  gnu/packages/text-editors.scm             | 30 +++++++++++++
>  2 files changed, 83 insertions(+)
>  create mode 100644 gnu/packages/patches/ex-vi-makefile.patch
> 
> diff --git a/gnu/packages/patches/ex-vi-makefile.patch b/gnu/packages/patches/ex-vi-makefile.patch
> new file mode 100644
> index 0000000000..d835eb981d
> --- /dev/null
> +++ b/gnu/packages/patches/ex-vi-makefile.patch
> @@ -0,0 +1,53 @@
> +diff -ur ex-050325-orig/Makefile ex-050325/Makefile
> +--- ex-050325-orig/Makefile
> ++++ ex-050325/Makefile
> +@@ -75,11 +75,13 @@
> + #	@(#)Makefile	1.50 (gritter) 2/20/05
> + #
> + 
> ++CC = gcc

That won't work when cross-compiling.  When cross-compiling, it
should be set to something like ARCHITECTURE-linux-gnu-gcc instead.
I'd suggest setting ,(string-append "CC=" (cc-for-target)) in #:make-flags
instead.

To test cross-compilation, you can try
‘make && ./pre-inst-env guix build ex-vi --target=aarch64-linux-gnu’.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* [bug#51067] [PATCH v2] gnu: Add ex-vi
  2021-10-07  5:46 [bug#51067] [PATCH] gnu: Add traditional vi (ex-vi) Foo Chuan Wei
  2021-10-07  8:37 ` Maxime Devos
@ 2021-10-12 20:50 ` Foo Chuan Wei
  1 sibling, 0 replies; 3+ messages in thread
From: Foo Chuan Wei @ 2021-10-12 20:50 UTC (permalink / raw)
  To: 51067

* gnu/packages/text-editors.scm (ex-vi): New variable.
---
 gnu/packages/text-editors.scm | 45 +++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index d73f32c64e..58152bfccb 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -1195,3 +1195,48 @@ uncluttered user interface.  It supports a multitude of translation formats
 provided by the Translate Toolkit, including XLIFF and PO.")
     (home-page "https://virtaal.translatehouse.org/")
     (license license:gpl2+)))
+
+(define-public ex-vi
+  (package
+    (name "ex-vi")
+    (version "050325")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/ex-vi/ex-vi/"
+                                  version "/ex-" version ".tar.bz2"))
+              (sha256
+                (base32
+                  "0294cfxp91gyi0v3v4qdxcwlxp1nm986ir8r7d374ig9cz7yfjys"))))
+    (build-system gnu-build-system)
+    (inputs `(("ncurses" ,ncurses)))
+    (arguments `(#:make-flags
+                 (list (string-append "CC=" ,(cc-for-target))
+                       (string-append "PREFIX=" %output)
+                       "INSTALL = install"
+                       "TERMLIB = ncurses")
+                 #:phases
+                 (modify-phases %standard-phases
+                   (delete 'configure)
+                   (add-after 'unpack 'fix-build
+                     (lambda _
+                       ;; No need to create /var/preserve/
+                       (substitute* "Makefile"
+                         (("test -d \\$\\(DESTDIR\\)\\$\\(PRESERVEDIR\\) \
+\\|\\| mkdir -p \\$\\(DESTDIR\\)\\$\\(PRESERVEDIR\\)")
+                          "")
+                         (("chmod 1777 \\$\\(DESTDIR\\)\\$\\(PRESERVEDIR\\)")
+                          ""))
+                       #t)))
+                 #:tests? #f))
+    (home-page "http://ex-vi.sourceforge.net")
+    (synopsis "The Traditional Vi")
+    (description
+      "The traditional vi editor, ported to modern Unix systems.
+
+This implementation is derived from ex/vi 3.7 of 6/7/85 and the BSD termcap
+library, originally from the 2.11BSD distribution. All of them were changed to
+compile and run on newer POSIX compatible Unix systems. Support for
+international character sets was added, including support for multibyte locales
+(based on UTF-8 or East Asian encodings), and some changes were made to get
+closer to the POSIX.2 guidelines for ex and vi.")
+    (license license:bsd-4)))

base-commit: 702bc2b89939165a3dc61096c21bb8b670a94713
-- 
2.25.1





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

end of thread, other threads:[~2021-10-12 20:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07  5:46 [bug#51067] [PATCH] gnu: Add traditional vi (ex-vi) Foo Chuan Wei
2021-10-07  8:37 ` Maxime Devos
2021-10-12 20:50 ` [bug#51067] [PATCH v2] gnu: Add ex-vi Foo Chuan Wei

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).