From owner-svn-ports-all@freebsd.org Thu Oct 6 19:51:21 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C239BD3FDC; Thu, 6 Oct 2016 19:51:21 +0000 (UTC) (envelope-from olivierd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1638822E; Thu, 6 Oct 2016 19:51:21 +0000 (UTC) (envelope-from olivierd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u96JpKFH045098; Thu, 6 Oct 2016 19:51:20 GMT (envelope-from olivierd@FreeBSD.org) Received: (from olivierd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u96JpJah045092; Thu, 6 Oct 2016 19:51:19 GMT (envelope-from olivierd@FreeBSD.org) Message-Id: <201610061951.u96JpJah045092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: olivierd set sender to olivierd@FreeBSD.org using -f From: Olivier Duchateau Date: Thu, 6 Oct 2016 19:51:19 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r423435 - in head/editors/mg: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 19:51:21 -0000 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: (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 ++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 + * + * 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 +#include +#include +#include + +/* + * 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/