FreeBSD Bugzilla – Attachment 245761 Details for
Bug 274611
editors/mg: Update to 20231016
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Git format-patch
mg-20231016.patch (text/plain), 6.77 KB, created by
Mark Willson
on 2023-10-20 15:19:24 UTC
(
hide
)
Description:
Git format-patch
Filename:
MIME Type:
Creator:
Mark Willson
Created:
2023-10-20 15:19:24 UTC
Size:
6.77 KB
patch
obsolete
>From 1230d471697eed908669566df20b3ec81e604f67 Mon Sep 17 00:00:00 2001 >From: Mark Willson <cdr.nil@gmail.com> >Date: Fri, 20 Oct 2023 15:58:20 +0100 >Subject: [PATCH] Update to OpenBSD 7.4 version of mg; modify location of > source tarball > >--- > editors/mg/Makefile | 9 ++-- > editors/mg/distinfo | 6 +-- > editors/mg/files/patch-Makefile | 29 +++---------- > editors/mg/files/patch-def.h | 10 +++++ > editors/mg/files/patch-fileio.c | 19 +++++++++ > editors/mg/files/patch-main.c | 75 +++++++++++++++++++++++++++++++++ > editors/mg/files/patch-tags.c | 11 +++++ > 7 files changed, 127 insertions(+), 32 deletions(-) > create mode 100644 editors/mg/files/patch-def.h > create mode 100644 editors/mg/files/patch-fileio.c > create mode 100644 editors/mg/files/patch-main.c > create mode 100644 editors/mg/files/patch-tags.c > >diff --git a/editors/mg/Makefile b/editors/mg/Makefile >index 4af7f55602e2..431172f5c0ed 100644 >--- a/editors/mg/Makefile >+++ b/editors/mg/Makefile >@@ -1,17 +1,16 @@ > PORTNAME= mg >-DISTVERSION= 20230501 >+DISTVERSION= 20231016 > PORTEPOCH= 1 > CATEGORIES= editors >+MASTER_SITES= https://hydrus.org.uk/downloads/ > > MAINTAINER= cdr.nil@gmail.com > COMMENT= Small, fast Emacs-like editor >-WWW= https://github.com/hboetes/mg >+WWW= https://man.openbsd.org/mg > > LICENSE= PD > > USES= ncurses >-USE_GITHUB= yes >-GH_ACCOUNT= hboetes > STAGEOWN= ${USER} > STAGEGRP!= id -gn > MAKE_ARGS+= BINOWN=${STAGEOWN} BINGRP=${STAGEGRP} MANOWN=${STAGEOWN} \ >@@ -28,7 +27,7 @@ PLIST_FILES= /rescue/mg > .else > PLIST_FILES= bin/mg \ > man/man1/mg.1.gz >-PORTDOCS= README README.md tutorial >+PORTDOCS= README tutorial > OPTIONS_DEFINE= DOCS > .endif > >diff --git a/editors/mg/distinfo b/editors/mg/distinfo >index fdf6bb07b3f1..79fdb400e4db 100644 >--- a/editors/mg/distinfo >+++ b/editors/mg/distinfo >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1683455356 >-SHA256 (hboetes-mg-20230501_GH0.tar.gz) = e2878feca64067a0c524e456ffba68d8cb69bcdce0943d2f2b69cad06174462e >-SIZE (hboetes-mg-20230501_GH0.tar.gz) = 158315 >+TIMESTAMP = 1697806665 >+SHA256 (mg-20231016.tar.gz) = ef16fb32aae1dc132d4250039eb0a057826c7e888beb39bdf4748c0a4b0179e9 >+SIZE (mg-20231016.tar.gz) = 154296 >diff --git a/editors/mg/files/patch-Makefile b/editors/mg/files/patch-Makefile >index 72f4d7baf3e4..c53961526df6 100644 >--- a/editors/mg/files/patch-Makefile >+++ b/editors/mg/files/patch-Makefile >@@ -1,31 +1,12 @@ >---- Makefile.orig 2023-05-01 15:27:50 UTC >-+++ Makefile >-@@ -2,7 +2,7 @@ >- >- PROG= mg >- >--LDADD+= `pkg-config --libs ncurses` -lutil >-+LDADD+= -L${NCURSESLIB} -lncurses -lutil >- DPADD+= ${LIBUTIL} >- >- # (Common) compile-time options: >-@@ -11,7 +11,7 @@ DPADD+= ${LIBUTIL} >- # STARTUPFILE -- look for and handle initialization file. >- # MGLOG -- debug mg internals to a log file. >- # >--CFLAGS+=-Wall -DREGEX `pkg-config --cflags-only-I ncurses` >-+CFLAGS+=-Wall -DREGEX -L${NCURSESINC} >- >- SRCS= autoexec.c basic.c bell.c buffer.c cinfo.c dir.c display.c \ >- echo.c extend.c file.c fileio.c funmap.c help.c kbd.c keymap.c \ >-@@ -28,10 +28,5 @@ SRCS+= cmode.c cscope.c dired.c grep.c interpreter.c t >- # -DMGLOG source file. >+--- Makefile.a 2023-10-20 14:05:25.021462000 +0100 >++++ Makefile 2023-10-20 14:01:52.198650000 +0100 >+@@ -29,9 +29,4 @@ > # > #SRCS+= log.c >-- >+ > -afterinstall: > - ${INSTALL} -d -o root -g wheel ${DESTDIR}${DOCDIR}/mg > - ${INSTALL} ${INSTALL_COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \ > - ${.CURDIR}/tutorial ${DESTDIR}${DOCDIR}/mg >- >+- > .include <bsd.prog.mk> >diff --git a/editors/mg/files/patch-def.h b/editors/mg/files/patch-def.h >new file mode 100644 >index 000000000000..5d8ba403eecc >--- /dev/null >+++ b/editors/mg/files/patch-def.h >@@ -0,0 +1,10 @@ >+--- def.h.a 2023-10-20 12:52:54.643672000 +0100 >++++ def.h 2023-10-20 12:53:19.357901000 +0100 >+@@ -10,6 +10,7 @@ >+ * per-terminal definitions are in special header files. >+ */ >+ >++#include <unistd.h> >+ #include "chrdef.h" >+ >+ typedef int (*PF)(int, int); /* generally useful type */ >diff --git a/editors/mg/files/patch-fileio.c b/editors/mg/files/patch-fileio.c >new file mode 100644 >index 000000000000..c7e9161f434a >--- /dev/null >+++ b/editors/mg/files/patch-fileio.c >@@ -0,0 +1,19 @@ >+--- fileio.c.a 2023-10-20 12:57:03.765132000 +0100 >++++ fileio.c 2023-10-20 13:47:56.128185000 +0100 >+@@ -22,6 +22,7 @@ >+ #include <stdlib.h> >+ #include <string.h> >+ #include <unistd.h> >++#include <sys/param.h> >+ >+ #include "def.h" >+ #include "kbd.h" >+@@ -705,7 +706,7 @@ >+ struct passwd *pw; >+ struct stat statbuf; >+ const char *cp; >+- char user[LOGIN_NAME_MAX], path[NFILEN]; >++ char user[MAXLOGNAME], path[NFILEN]; >+ char *ret; >+ size_t ulen, plen; >+ >diff --git a/editors/mg/files/patch-main.c b/editors/mg/files/patch-main.c >new file mode 100644 >index 000000000000..2a2a5458f652 >--- /dev/null >+++ b/editors/mg/files/patch-main.c >@@ -0,0 +1,75 @@ >+--- main.c.a 2023-10-20 13:03:34.124206000 +0100 >++++ main.c 2023-10-20 13:41:51.634877000 +0100 >+@@ -16,7 +16,6 @@ >+ #include <string.h> >+ #include <termios.h> >+ #include <unistd.h> >+-#include <util.h> >+ >+ #include "def.h" >+ #include "kbd.h" >+@@ -27,6 +26,10 @@ >+ #include "log.h" >+ #endif >+ >++#ifndef __dead >++#define __dead __attribute__ ((__noreturn__)) >++#endif >++ >+ int thisflag; /* flags, this command */ >+ int lastflag; /* flags, last command */ >+ int curgoal; /* goal column */ >+@@ -44,7 +47,6 @@ >+ char pat[NPAT]; /* pattern */ >+ >+ static void edinit(struct buffer *); >+-static void pty_init(void); >+ static __dead void usage(void); >+ >+ extern char *__progname; >+@@ -71,10 +73,6 @@ >+ int nobackups = 0; >+ struct buffer *bp = NULL; >+ >+- if (pledge("stdio rpath wpath cpath fattr chown getpw tty proc exec", >+- NULL) == -1) >+- err(1, "pledge"); >+- >+ while ((o = getopt(argc, argv, "nRb:f:u:")) != -1) >+ switch (o) { >+ case 'b': >+@@ -106,7 +104,6 @@ >+ exit(1); >+ } >+ if (batch) { >+- pty_init(); >+ conffile = batchfile; >+ } >+ if ((ffp = startupfile(NULL, conffile, file, sizeof(file))) == NULL && >+@@ -283,26 +280,6 @@ >+ wp->w_linep = wp->w_dotp = bp->b_headp; >+ wp->w_ntrows = nrow - 2; /* 2 = mode, echo. */ >+ wp->w_rflag = WFMODE | WFFULL; /* Full. */ >+-} >+- >+-/* >+- * Create pty for batch mode. >+- */ >+-static void >+-pty_init(void) >+-{ >+- struct winsize ws; >+- int master; >+- int slave; >+- >+- memset(&ws, 0, sizeof(ws)); >+- ws.ws_col = 80, >+- ws.ws_row = 24; >+- >+- openpty(&master, &slave, NULL, NULL, &ws); >+- login_tty(slave); >+- >+- return; >+ } >+ >+ /* >diff --git a/editors/mg/files/patch-tags.c b/editors/mg/files/patch-tags.c >new file mode 100644 >index 000000000000..f81a8e44caa0 >--- /dev/null >+++ b/editors/mg/files/patch-tags.c >@@ -0,0 +1,11 @@ >+--- tags.c.a 2023-10-20 13:12:16.619213000 +0100 >++++ tags.c 2023-10-20 13:48:57.247238000 +0100 >+@@ -18,7 +18,7 @@ >+ #include <stdlib.h> >+ #include <string.h> >+ #include <unistd.h> >+-#include <util.h> >++#include <libutil.h> >+ >+ #include "def.h" >+ >-- >2.42.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 274611
:
245761
|
245817