summaryrefslogtreecommitdiff
path: root/community/mg
diff options
context:
space:
mode:
Diffstat (limited to 'community/mg')
-rw-r--r--community/mg/PKGBUILD34
-rw-r--r--community/mg/README74
-rw-r--r--community/mg/cleanup.patch163
3 files changed, 271 insertions, 0 deletions
diff --git a/community/mg/PKGBUILD b/community/mg/PKGBUILD
new file mode 100644
index 000000000..be271595b
--- /dev/null
+++ b/community/mg/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 62917 2012-01-29 07:15:53Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Hannes Rist <hrist@phreeknet.org>
+
+pkgname=mg
+pkgver=20110905
+pkgrel=1
+pkgdesc="mg is Micro GNU/emacs, this is a portable version of the mg maintained by the OpenBSD team."
+arch=('i686' 'x86_64')
+url="http://homepage.boetes.org/software/mg/"
+depends=('ncurses')
+license=('custom')
+options=(!libtool)
+source=(http://homepage.boetes.org/software/mg/mg-$pkgver.tar.gz
+ README
+ cleanup.patch)
+md5sums=('2de35316fa8ebafe6003efaae70b723e'
+ '8cc5195ad4fabcf7c6782764f9617748'
+ 'e009afe0d249593f3436b2fea110f72e')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ unset CFLAGS
+ patch -p1 <$srcdir/cleanup.patch
+ ./configure
+ make prefix=/usr
+
+ mkdir -p $pkgdir/usr/bin
+ make install INSTALL=/bin/install prefix=$pkgdir/usr
+
+ mkdir -p $pkgdir/usr/share/
+ mv $pkgdir/usr/man $pkgdir/usr/share/
+ install -D -m0644 $srcdir/README $pkgdir/usr/share/licenses/$pkgname/README
+}
diff --git a/community/mg/README b/community/mg/README
new file mode 100644
index 000000000..cf2d78917
--- /dev/null
+++ b/community/mg/README
@@ -0,0 +1,74 @@
+[This is an edited version of the original mg README, updated slightly to
+reflect changes in the last 20 years.]
+
+
+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.
+
+
+Beyond the work of Dave Conroy, author of the original public domain
+v30, the current version contains the work of:
+
+ blarson@ecla.usc.edu Bob Larson
+ mic@emx.utexas.edu Mic Kaczmarczik
+ mwm@violet.berkeley.edu Mike Meyer
+ sandra@cs.utah.edu Sandra Loosemore
+ mp1u+@andrew.cmu.edu Michael Portuesi
+ RCKG01M@CALSTATE.BITNET Stephen Walton
+ hakanson@mist.cs.orst.edu Marion Hakanson
+
+People who have worked on previous versions of Mg:
+
+ rtech!daveb@sun.com Dave Brower
+
+Currently maintained in the OpenBSD src tree, with contributions from
+many others.
+
+----------------------------------------------------------------------
+
+Known limitations:
+
+Recursive bindings may cause help and key rebinding code to go into
+an infinite loop, aborting with a stack overflow.
+
+Overwrite mode does not work in macros. (Characters are inserted
+rather than overwriting.)
+
+Dired mode has some problems: Rename does not update the buffer.
+Doing a dired again will update the buffer (whether it needs it or
+not) and will lose any marks for deletion. .. and . are not
+recognized as special cases.
+
+On systems with 16 bit integers, the kill buffer cannot exceed 32767
+bytes.
+
+
+
+New implementation oddities:
+
+insert and define-key are new commands corresponding to the mocklisp
+functions in Gnu Emacs. (Mg does not have non-command functions.)
+(Mg's insert will only insert one string.)
+
+The display wrap code does not work at all like that of GNU emacs.
+
+
diff --git a/community/mg/cleanup.patch b/community/mg/cleanup.patch
new file mode 100644
index 000000000..5a8e761cb
--- /dev/null
+++ b/community/mg/cleanup.patch
@@ -0,0 +1,163 @@
+Only in mg-20110120.my: autoexec.o
+Only in mg-20110120.my: basename.o
+Only in mg-20110120.my: basic.o
+Only in mg-20110120.my: buffer.o
+Only in mg-20110120.my: cinfo.o
+diff -wbBur mg-20110120/cmode.c mg-20110120.my/cmode.c
+--- mg-20110120/cmode.c 2011-01-20 07:36:13.000000000 +0300
++++ mg-20110120.my/cmode.c 2011-11-21 15:40:11.000000000 +0400
+@@ -158,7 +158,7 @@
+ cc_indent(int f, int n)
+ {
+ int pi, mi; /* Previous indents */
+- int ci, dci; /* current indent, don't care */
++ int ci; /* current indent, don't care */
+ struct line *lp;
+ int ret;
+
+@@ -181,7 +181,7 @@
+ /* Strip leading space on current line */
+ delleadwhite(FFRAND, 1);
+ /* current indent is computed only to current position */
+- dci = getindent(curwp->w_dotp, &ci);
++ getindent(curwp->w_dotp, &ci);
+
+ if (pi + ci < 0)
+ ret = indent(FFOTHARG, 0);
+@@ -217,7 +217,6 @@
+ {
+ int lo, co; /* leading space, current offset*/
+ int nicol = 0; /* position count */
+- int ccol = 0; /* current column */
+ int c = '\0'; /* current char */
+ int newind = 0; /* new index value */
+ int stringp = FALSE; /* in string? */
+@@ -226,7 +225,6 @@
+ int nparen = 0; /* paren count */
+ int obrace = 0; /* open brace count */
+ int cbrace = 0; /* close brace count */
+- int contp = FALSE; /* Continue? */
+ int firstnwsp = FALSE; /* First nonspace encountered? */
+ int colonp = FALSE; /* Did we see a colon? */
+ int questionp = FALSE; /* Did we see a question mark? */
+@@ -256,13 +254,11 @@
+ nicol = 0;
+
+ newind = 0;
+- ccol = nicol; /* current column */
+ /* Compute modifiers */
+ for (co = lo; co < llength(lp); co++) {
+ c = lgetc(lp, co);
+ /* We have a non-whitespace char */
+ if (!firstnwsp && !isspace(c)) {
+- contp = TRUE;
+ if (c == '#')
+ cppp = TRUE;
+ firstnwsp = TRUE;
+@@ -285,7 +281,6 @@
+ } else if (c == '{') {
+ obrace++;
+ firstnwsp = FALSE;
+- contp = FALSE;
+ } else if (c == '}') {
+ cbrace++;
+ } else if (c == '?') {
+@@ -294,9 +289,6 @@
+ /* ignore (foo ? bar : baz) construct */
+ if (!questionp)
+ colonp = TRUE;
+- } else if (c == ';') {
+- if (nparen > 0)
+- contp = FALSE;
+ } else if (c == '/') {
+ /* first nonwhitespace? -> indent */
+ if (firstnwsp) {
+Only in mg-20110120.my: cmode.o
+diff -wbBur mg-20110120/config.h mg-20110120.my/config.h
+--- mg-20110120/config.h 2011-01-20 07:37:40.000000000 +0300
++++ mg-20110120.my/config.h 2011-11-21 15:39:43.000000000 +0400
+@@ -7,4 +7,8 @@
+ #ifndef MAXLOGNAME
+ #define MAXLOGNAME LOGIN_NAME_MAX
+ #endif
+-#define HAVE_ARC4RANDOM
++#define HAVE_NOSTRTONUM
++#define HAVE_NOSTRLCPY
++#define HAVE_NOSTRLCAT
++#define HAVE_NOFGETLN
++#define GNU_LS
+Only in mg-20110120.my: config.log
+Only in mg-20110120.my: dired.o
+Only in mg-20110120.my: dirname.o
+Only in mg-20110120.my: dir.o
+Only in mg-20110120.my: display.o
+Only in mg-20110120.my: echo.o
+Only in mg-20110120.my: extend.o
+Only in mg-20110120.my: fgetln.o
+diff -wbBur mg-20110120/fileio.c mg-20110120.my/fileio.c
+--- mg-20110120/fileio.c 2008-12-30 19:04:23.000000000 +0300
++++ mg-20110120.my/fileio.c 2011-11-21 15:43:12.000000000 +0400
+@@ -121,10 +121,8 @@
+ * future writes will do the same thing.
+ */
+ if (bp && bp->b_fi.fi_mode) {
+- int ret;
+-
+ fchmod(fd, bp->b_fi.fi_mode & 07777);
+- ret = fchown(fd, bp->b_fi.fi_uid, bp->b_fi.fi_gid);
++ (void)fchown(fd, bp->b_fi.fi_uid, bp->b_fi.fi_gid);
+ }
+ return (FIOSUC);
+ }
+Only in mg-20110120.my: fileio.o
+Only in mg-20110120.my: file.o
+Only in mg-20110120.my: funmap.o
+Only in mg-20110120.my: grep.o
+Only in mg-20110120.my: help.o
+Only in mg-20110120.my: kbd.o
+Only in mg-20110120.my: keymap.o
+Only in mg-20110120.my: line.o
+Only in mg-20110120.my: macro.o
+Only in mg-20110120.my: main.o
+Only in mg-20110120.my: Makefile
+Only in mg-20110120.my: match.o
+Only in mg-20110120.my: mg
+Only in mg-20110120.my: modes.o
+Only in mg-20110120.my: paragraph.o
+Only in mg-20110120.my: random.o
+Only in mg-20110120.my: region.o
+Only in mg-20110120.my: re_search.o
+Only in mg-20110120.my: search.o
+Only in mg-20110120.my: spawn.o
+Only in mg-20110120.my: strlcat.o
+Only in mg-20110120.my: strlcpy.o
+Only in mg-20110120.my: strtonum.o
+Only in mg-20110120.my: theo.o
+Only in mg-20110120.my: ttyio.o
+Only in mg-20110120.my: ttykbd.o
+Only in mg-20110120.my: tty.o
+diff -wbBur mg-20110120/undo.c mg-20110120.my/undo.c
+--- mg-20110120/undo.c 2011-01-03 01:57:57.000000000 +0300
++++ mg-20110120.my/undo.c 2011-11-21 15:41:05.000000000 +0400
+@@ -464,14 +464,14 @@
+ struct undo_rec *ptr, *nptr;
+ int done, rval;
+ struct line *lp;
+- int offset, save, dot;
++ int offset, save;
+ static int nulled = FALSE;
+ int lineno;
+
+ if (n < 0)
+ return (FALSE);
+
+- dot = find_dot(curwp->w_dotp, curwp->w_doto);
++ find_dot(curwp->w_dotp, curwp->w_doto);
+
+ ptr = curbp->b_undoptr;
+
+Only in mg-20110120.my: undo.o
+Only in mg-20110120.my: version.o
+Only in mg-20110120.my: window.o
+Only in mg-20110120.my: word.o
+Only in mg-20110120.my: yank.o