Fri Feb 13 11:04:15 2009 UTC ()
Added editors/mg version 20090107

This is the portable version of the OpenBSD mg editor

Mg (mg) is a Public Domain EMACS style editor.  It is "broadly"
compatible with GNU Emacs, the latest creation of Richard M.
Stallman, Chief GNUisance and inventor of Emacs.  GNU Emacs (and other
portions of GNU as they are released) are essentially free, (there are
handling charges for obtaining it) and so is Mg.  You may never have
to learn another editor.  (But probably will, at least long enough to
port Mg...)  Mg was formerly named MicroGnuEmacs, the name change was
done at the request of Richard Stallman.

Mg is not associated with the GNU project, and most of it does not
have the copyright restrictions present in GNU Emacs.  (However, some
of the system dependent modules and the regular expression module do
have copyright notices.  Look at the source code for exact
copyright restrictions.)  The Mg authors individually may or may not
agree with the opinions expressed by Richard Stallman in "The GNU
Manifesto".

This program is intended to be a small, fast, and portable editor for
people who can't (or don't want to) run real Emacs for one reason
or another.  It is compatible with GNU because there shouldn't be
any reason to learn more than one Emacs flavor.

Status:

Vendor Tag:	TNF
Release Tags:	pkgsrc-base


(abs)
diff -r0 -r1.1.1.1 pkgsrc/editors/mg/Makefile
diff -r0 -r1.1.1.1 pkgsrc/editors/mg/PLIST
diff -r0 -r1.1.1.1 pkgsrc/editors/mg/distinfo
diff -r0 -r1.1.1.1 pkgsrc/editors/mg/DESCR
diff -r0 -r1.1.1.1 pkgsrc/editors/mg/patches/patch-aa
diff -r0 -r1.1.1.1 pkgsrc/editors/mg/patches/patch-ab
diff -r0 -r1.1.1.1 pkgsrc/editors/mg/patches/patch-ac
diff -r0 -r1.1.1.1 pkgsrc/editors/mg/patches/patch-ad
diff -r0 -r1.1.1.1 pkgsrc/editors/mg/patches/patch-ae
diff -r0 -r1.1.1.1 pkgsrc/editors/mg/patches/patch-af
diff -r0 -r1.1.1.1 pkgsrc/editors/mg/patches/patch-ag

File Added: pkgsrc/editors/mg/Makefile
# $NetBSD: Makefile,v 1.1.1.1 2009/02/13 11:04:14 abs Exp $
#

DISTNAME=	mg-20090107
CATEGORIES=	editors
MASTER_SITES=	http://www.xs4all.nl/~hanb/software/mg/

MAINTAINER=	abs@NetBSD.org
HOMEPAGE=	http://www.xs4all.nl/~hanb/software/mg/
COMMENT=	Small, fast, public domain EMACS style editor

HAS_CONFIGURE=	yes
USE_NCURSES=	yes # Uses NCURSES internals
PKG_DESTDIR_SUPPORT=   user-destdir
MAKE_ENV+=	prefix=${PREFIX:Q}

INSTALLATION_DIRS = bin ${PKGMANDIR}/man1

.include "../../devel/ncurses/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/editors/mg/PLIST
@comment $NetBSD: PLIST,v 1.1.1.1 2009/02/13 11:04:14 abs Exp $
bin/mg
man/man1/mg.1

File Added: pkgsrc/editors/mg/distinfo
$NetBSD: distinfo,v 1.1.1.1 2009/02/13 11:04:14 abs Exp $

SHA1 (mg-20090107.tar.gz) = 3191c6dea4996347b6d40b34fa4c88a57e5ef42e
RMD160 (mg-20090107.tar.gz) = d35cc894d2be7bfafb1943fefb5529c2dcbc2002
Size (mg-20090107.tar.gz) = 136530 bytes
SHA1 (patch-aa) = 0999dd117883459d73b410e3e7ebd14e6890f611
SHA1 (patch-ab) = a5d9864a49c83c4851266b24bea62534859acccc
SHA1 (patch-ac) = 26252dd655b70e8ec6aa6d3b24f432ab3f117704
SHA1 (patch-ad) = f71bed38dc38ca107dd8aade779a75b5597aab0d
SHA1 (patch-ae) = da7cba79351e954e495b1542b74ec5784a771501
SHA1 (patch-af) = e305ea6c7189b51467c5f46fec42d88c0f54c107
SHA1 (patch-ag) = 5d973ea998cca712e39a8b207820aea7e2739316

File Added: pkgsrc/editors/mg/DESCR
This is the portable version of the OpenBSD mg editor

Mg (mg) is a Public Domain EMACS style editor.  It is "broadly"
compatible with GNU Emacs, the latest creation of Richard M.
Stallman, Chief GNUisance and inventor of Emacs.  GNU Emacs (and other
portions of GNU as they are released) are essentially free, (there are
handling charges for obtaining it) and so is Mg.  You may never have
to learn another editor.  (But probably will, at least long enough to
port Mg...)  Mg was formerly named MicroGnuEmacs, the name change was
done at the request of Richard Stallman.

Mg is not associated with the GNU project, and most of it does not
have the copyright restrictions present in GNU Emacs.  (However, some
of the system dependent modules and the regular expression module do
have copyright notices.  Look at the source code for exact
copyright restrictions.)  The Mg authors individually may or may not
agree with the opinions expressed by Richard Stallman in "The GNU
Manifesto".

This program is intended to be a small, fast, and portable editor for
people who can't (or don't want to) run real Emacs for one reason
or another.  It is compatible with GNU because there shouldn't be
any reason to learn more than one Emacs flavor.

File Added: pkgsrc/editors/mg/patches/Attic/patch-aa
$NetBSD: patch-aa,v 1.1.1.1 2009/02/13 11:04:14 abs Exp $

--- dired.c.orig	2008-12-30 12:40:28.000000000 +0000
+++ dired.c
@@ -570,11 +570,11 @@ d_makename(struct line *lp, char *fn, si
 	ep = lp->l_text + llength(lp);
 	p++; /* skip action letter, if any */
 	for (i = 0; i < NAME_FIELD; i++) {
-		while (p < ep && isspace(*p))
+		while (p < ep && isspace((unsigned char)*p))
 			p++;
-		while (p < ep && !isspace(*p))
+		while (p < ep && !isspace((unsigned char)*p))
 			p++;
-		while (p < ep && isspace(*p))
+		while (p < ep && isspace((unsigned char)*p))
 			p++;
 		if (p == ep)
 			return (ABORT);

File Added: pkgsrc/editors/mg/patches/Attic/patch-ab
$NetBSD: patch-ab,v 1.1.1.1 2009/02/13 11:04:14 abs Exp $

--- sysdef.h.orig	2008-12-11 09:38:10.000000000 +0000
+++ sysdef.h
@@ -31,6 +31,7 @@
 #include <string.h>
 #include <errno.h>
 #include <signal.h>
+#include <time.h>
 
 
 #define	KBLOCK		8192	/* Kill grow.			 */

File Added: pkgsrc/editors/mg/patches/Attic/patch-ac
$NetBSD: patch-ac,v 1.1.1.1 2009/02/13 11:04:14 abs Exp $

--- configure.orig	2008-12-12 08:40:04.000000000 +0000
+++ configure
@@ -187,6 +187,7 @@ if [ ! -r /usr/include/term.h ]; then
 	    exit 1
 	}
     fi
+    add_inc NCURSES
 fi
 
 note 'base and dirname'

File Added: pkgsrc/editors/mg/patches/Attic/patch-ad
$NetBSD: patch-ad,v 1.1.1.1 2009/02/13 11:04:14 abs Exp $

--- extend.c.orig	2007-01-12 17:24:48.000000000 +0000
+++ extend.c
@@ -445,7 +445,7 @@ dobindkey(KEYMAP *map, const char *func,
 	for (i = 0; *str && i < MAXKEY; i++) {
 		/* XXX - convert numbers w/ strol()? */
 		if (*str == '^' && *(str + 1) !=  '\0') {
-			key.k_chars[i] = CCHR(toupper(*++str));
+			key.k_chars[i] = CCHR(toupper((unsigned char)*++str));
 		} else if (*str == '\\' && *(str + 1) != '\0') {
 			switch (*++str) {
 			case '^':

File Added: pkgsrc/editors/mg/patches/Attic/patch-ae
$NetBSD: patch-ae,v 1.1.1.1 2009/02/13 11:04:14 abs Exp $

--- ttydef.h.orig	2006-04-27 03:28:14.000000000 +0100
+++ ttydef.h
@@ -10,7 +10,9 @@
  *	enough for windowing systems.
  */
 
-#define STANDOUT_GLITCH			/* possible standout glitch	 */
+#ifdef NCURSES
+# define STANDOUT_GLITCH		/* possible standout glitch	 */
+#endif
 #define TERMCAP				/* for possible use in ttyio.c	 */
 
 #ifdef undef

File Added: pkgsrc/editors/mg/patches/patch-af
$NetBSD: patch-af,v 1.1.1.1 2009/02/13 11:04:14 abs Exp $

--- grep.c.orig	2008-12-30 12:39:43.000000000 +0000
+++ grep.c
@@ -152,7 +152,7 @@ gid(int f, int n)
 	/* Skip backwards over delimiters we are currently on */
 	while (i > 0) {
 		c = lgetc(curwp->w_dotp, i);
-		if (isalnum(c) || c == '_')
+		if (isalnum((unsigned char)c) || c == '_')
 			break;
 
 		i--;
@@ -161,14 +161,14 @@ gid(int f, int n)
 	/* Skip the symbol itself */
 	for (; i > 0; i--) {
 		c = lgetc(curwp->w_dotp, i - 1);
-		if (!isalnum(c) && c != '_')
+		if (!isalnum((unsigned char)c) && c != '_')
 			break;
 	}
 	/* Fill the symbol in cprompt[] */
 	for (j = 0; j < sizeof(cprompt) - 1 && i < llength(curwp->w_dotp);
 	    j++, i++) {
 		c = lgetc(curwp->w_dotp, i);
-		if (!isalnum(c) && c != '_')
+		if (!isalnum((unsigned char)c) && c != '_')
 			break;
 		cprompt[j] = c;
 	}

File Added: pkgsrc/editors/mg/patches/Attic/patch-ag
$NetBSD: patch-ag,v 1.1.1.1 2009/02/13 11:04:14 abs Exp $

--- Makefile.in.orig	2008-12-11 09:11:05.000000000 +0000
+++ Makefile.in
@@ -7,7 +7,7 @@
 
 name=		mg
 
-prefix=		/usr/local
+prefix?=	/usr/local
 bindir=		$(prefix)/bin
 libdir=		$(prefix)/lib
 includedir=	$(prefix)/include
@@ -17,7 +17,7 @@ mandir=		$(prefix)/man
 CC=		gcc
 CFLAGS?=	-O2 -pipe
 CFLAGS+=	-g -Wall -Werror
-LDFLAGS= 	-lncurses
+LDFLAGS+= 	-lncurses
 
 INSTALL=	/usr/bin/install
 STRIP=		/usr/bin/strip