Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Oct 2016 19:51:19 +0000 (UTC)
From:      Olivier Duchateau <olivierd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r423435 - in head/editors/mg: . files
Message-ID:  <201610061951.u96JpJah045092@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: olivierd
Date: Thu Oct  6 19:51:19 2016
New Revision: 423435
URL: https://svnweb.freebsd.org/changeset/ports/423435

Log:
  - Update to 20160912 snapshot
  - Remove GNUmakefile patch, port doesn't use gmake
  - Replace patches by another, when reallocarray(3) is missing
  - Pass maintainership to submitter
  - Add LICENSE
  - Update pkg-descr
  
  PR:		212634
  Submitted by:	Tobias Kortkamp
  Approved by:	<darcsis@gmail.com> (previous maintainer, timeout > 3 weeks)

Added:
  head/editors/mg/files/extra-patch-def.h
     - copied, changed from r423434, head/editors/mg/files/patch-def.h
  head/editors/mg/files/reallocarray.c   (contents, props changed)
Deleted:
  head/editors/mg/files/patch-GNUmakefile
  head/editors/mg/files/patch-autoexec.c
  head/editors/mg/files/patch-def.h
  head/editors/mg/files/patch-display.c
Modified:
  head/editors/mg/Makefile
  head/editors/mg/distinfo
  head/editors/mg/files/patch-Makefile
  head/editors/mg/pkg-descr

Modified: head/editors/mg/Makefile
==============================================================================
--- head/editors/mg/Makefile	Thu Oct  6 19:38:48 2016	(r423434)
+++ head/editors/mg/Makefile	Thu Oct  6 19:51:19 2016	(r423435)
@@ -2,14 +2,15 @@
 # $FreeBSD$
 
 PORTNAME=	mg
-PORTVERSION=	20160421
-PORTREVISION=	1
+PORTVERSION=	20160912
 CATEGORIES=	editors
 MASTER_SITES=	http://homepage.boetes.org/software/mg/
 
-MAINTAINER=	darcsis@gmail.com
+MAINTAINER=	t@tobik.me
 COMMENT=	Small, fast Emacs-like editor
 
+LICENSE=	PD
+
 USES=		ncurses
 PLIST_FILES=	bin/mg man/man1/mg.1.gz
 PORTDOCS=	README tutorial
@@ -22,6 +23,14 @@ OPTIONS_DEFINE=	DOCS
 BROKEN=	does not build, requires futimens system call
 .endif
 
+.if ${OSVERSION} >= 1002506 && ${OSVERSION} < 1100072
+EXTRA_PATCHES=	${FILESDIR}/extra-patch-def.h
+
+post-patch:
+	${CP} ${FILESDIR}/reallocarray.c ${WRKSRC}
+	@${REINPLACE_CMD} -e 's| theo.c| theo.c reallocarray.c|' ${WRKSRC}/Makefile
+.endif
+
 pre-configure:
 	@${REINPLACE_CMD} -e 's|__dead|__dead2|' ${WRKSRC}/main.c
 

Modified: head/editors/mg/distinfo
==============================================================================
--- head/editors/mg/distinfo	Thu Oct  6 19:38:48 2016	(r423434)
+++ head/editors/mg/distinfo	Thu Oct  6 19:51:19 2016	(r423435)
@@ -1,2 +1,3 @@
-SHA256 (mg-20160421.tar.gz) = b5dd8fbecb8a0ff0f32588c448f22f25fafcbfb297857e76d2883598a3e63a9a
-SIZE (mg-20160421.tar.gz) = 145187
+TIMESTAMP = 1473715513
+SHA256 (mg-20160912.tar.gz) = 0b050456b78d767d13839486e01705de6acf407f27052c204505e166eb698176
+SIZE (mg-20160912.tar.gz) = 145176

Copied and modified: head/editors/mg/files/extra-patch-def.h (from r423434, head/editors/mg/files/patch-def.h)
==============================================================================
--- head/editors/mg/files/patch-def.h	Thu Oct  6 19:38:48 2016	(r423434, copy source)
+++ head/editors/mg/files/extra-patch-def.h	Thu Oct  6 19:51:19 2016	(r423435)
@@ -1,11 +1,11 @@
---- def.h.orig	2015-03-23 11:23:30 UTC
+--- def.h.orig	2016-09-01 15:30:59 UTC
 +++ def.h
-@@ -13,6 +13,8 @@
- #include        "chrdef.h"
- #include        "ttydef.h"
+@@ -328,6 +328,8 @@ struct undo_rec {
+  * Prototypes.
+  */
  
-+#include        <sys/types.h>
++void		*reallocarray(void*, size_t, size_t);
 +
- 
- /* necesarry to get asprintf & friends with glibc XXX doesn't work for some
-  * mysterious reason! */
+ /* tty.c X */
+ void		 ttinit(void);
+ void		 ttreinit(void);

Modified: head/editors/mg/files/patch-Makefile
==============================================================================
--- head/editors/mg/files/patch-Makefile	Thu Oct  6 19:38:48 2016	(r423434)
+++ head/editors/mg/files/patch-Makefile	Thu Oct  6 19:51:19 2016	(r423435)
@@ -1,4 +1,4 @@
---- Makefile.orig	2016-01-07 18:55:54 UTC
+--- Makefile.orig	2016-09-12 16:36:25 UTC
 +++ Makefile
 @@ -2,7 +2,7 @@
  

Added: head/editors/mg/files/reallocarray.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/mg/files/reallocarray.c	Thu Oct  6 19:51:19 2016	(r423435)
@@ -0,0 +1,39 @@
+/*	$OpenBSD: reallocarray.c,v 1.3 2015/09/13 08:31:47 guenther Exp $	*/
+/*
+ * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/types.h>
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+/*
+ * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
+ * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW
+ */
+#define MUL_NO_OVERFLOW	((size_t)1 << (sizeof(size_t) * 4))
+
+void *
+reallocarray(void *optr, size_t nmemb, size_t size)
+{
+	if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) &&
+	    nmemb > 0 && SIZE_MAX / nmemb < size) {
+		errno = ENOMEM;
+		return NULL;
+	}
+	return realloc(optr, size * nmemb);
+}
+

Modified: head/editors/mg/pkg-descr
==============================================================================
--- head/editors/mg/pkg-descr	Thu Oct  6 19:38:48 2016	(r423434)
+++ head/editors/mg/pkg-descr	Thu Oct  6 19:51:19 2016	(r423435)
@@ -3,17 +3,4 @@ editor maintained by the OpenBSD Project
 who can't, or don't want to, run the real GNU Emacs, or are not
 familiar with the vi(1) editor.
 
-Although it is intended to be largely compatible with GNU Emacs, Mg
-doesn't have special modes for tasks other than editing plain text.
-Moreover, since it is written entirely in C, there is no language in
-which to write extensions in (read: no builtin Lisp interpreter).
-
-If you are looking for something that looks like Emacs (don't want to
-learn another editor) but don't have the resources to run the latter,
-this may be what you're looking for.
-
-Enjoy!
-
-					Dima Dorfman
-					dima@unixfreak.org
-					14 May 2001
+WWW: http://homepage.boetes.org/software/mg/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610061951.u96JpJah045092>