From c5a357ca444dad0cc39fa50377ac244d52792e4d Mon Sep 17 00:00:00 2001 From: John Marino Date: Wed, 26 Feb 2014 14:52:04 +0000 Subject: [PATCH] editors/joe: Fix jmacs mode segfault (fix from pkgsrc) Fix segfault per PR (pkgsrc fix verified). Relocate license to please portlint, reset maintainer. PR: ports/182373 Submitted by: Sergey Kandaurov Approved by: maintainer timeout (5 months) --- editors/joe/Makefile | 7 ++++--- editors/joe/files/patch-main.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 editors/joe/files/patch-main.c diff --git a/editors/joe/Makefile b/editors/joe/Makefile index 46e4ae69703e..beb6a10a850e 100644 --- a/editors/joe/Makefile +++ b/editors/joe/Makefile @@ -3,14 +3,16 @@ PORTNAME= joe PORTVERSION= 3.7 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES?= editors MASTER_SITES= SF/joe-editor/JOE%20sources/joe-${PORTVERSION} -MAINTAINER= sylvio@FreeBSD.org +MAINTAINER= ports@FreeBSD.org COMMENT= Joe's Own Editor +LICENSE= GPLv1 + BUILD_DEPENDS= aspell:${PORTSDIR}/textproc/aspell RUN_DEPENDS= aspell:${PORTSDIR}/textproc/aspell @@ -18,7 +20,6 @@ OPTIONS_DEFINE= DOCS CONFLICTS= joe-2.* -LICENSE= GPLv1 USES= gmake iconv ncurses GNU_CONFIGURE= yes CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib ${ICONV_LIB}" diff --git a/editors/joe/files/patch-main.c b/editors/joe/files/patch-main.c new file mode 100644 index 000000000000..9646f53d6e85 --- /dev/null +++ b/editors/joe/files/patch-main.c @@ -0,0 +1,18 @@ +$NetBSD: patch-main.c,v 1.1 2011/04/01 13:12:24 wiz Exp $ + +Fix for crash with a segv if called as jmacs with more then +one file as an argument on the command line from upstream. + +http://joe-editor.cvs.sourceforge.net/viewvc/joe-editor/joe-current/main/main.c?r1=1.5&r2=1.6 + +--- main.c.orig 2008-10-27 03:01:11.000000000 +0000 ++++ main.c +@@ -431,7 +431,7 @@ int main(int argc, char **real_argv, cha + b->orphan = 1; + b->oldcur = pdup(b->bof, USTR "main"); + pline(b->oldcur, get_file_pos(b->name)); +- p_goto_bol(bw->cursor); ++ p_goto_bol(b->oldcur); + line = b->oldcur->line - (maint->h - 1) / 2; + if (line < 0) + line = 0;