Add patch which includes <sys/uio.h> to fix build on OpenBSD. Defuzz patchset.diff -r1.36 -r1.37 pkgsrc/misc/screen/distinfo
(rodent)
@@ -1,17 +1,18 @@ | @@ -1,17 +1,18 @@ | |||
1 | $NetBSD: distinfo,v 1.36 2015/01/13 08:27:28 he Exp $ | 1 | $NetBSD: distinfo,v 1.37 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | SHA1 (screen-4.2.1.tar.gz) = 21eadf5f1d64120649f3390346253c6bc8a5103c | 3 | SHA1 (screen-4.2.1.tar.gz) = 21eadf5f1d64120649f3390346253c6bc8a5103c | |
4 | RMD160 (screen-4.2.1.tar.gz) = 20ddf4a33f91e60a42a31f02aa2a30a9c5cba9b5 | 4 | RMD160 (screen-4.2.1.tar.gz) = 20ddf4a33f91e60a42a31f02aa2a30a9c5cba9b5 | |
5 | Size (screen-4.2.1.tar.gz) = 1062485 bytes | 5 | Size (screen-4.2.1.tar.gz) = 1062485 bytes | |
6 | SHA1 (patch-aa) = 776eafabda01f8bc7a748e7d8dc1ffa706cd4c9d | 6 | SHA1 (patch-aa) = 39c6fa5bda62b2891cecf4a5e9598b179ea8b4dc | |
7 | SHA1 (patch-ab) = bbbdb1494beb1fcde9388f8e0ab628a841a076e8 | 7 | SHA1 (patch-ab) = 40911979a540645db2a17861328292add22898d3 | |
8 | SHA1 (patch-ae) = fbdd06a56bfeaa6d02f13075c8a0363c8d0fbf93 | 8 | SHA1 (patch-ae) = 8792f7877c0a29701d7d0643e93360813ed7db0f | |
9 | SHA1 (patch-ai) = f8615e11bdfa8a7882a7c1feb75ac1a40d6c7ab7 | 9 | SHA1 (patch-ai) = a6aafe822d7222398494e5733106b3d78c5836fc | |
10 | SHA1 (patch-aj) = 4b2ec0f3d7a275a17d535fe31e0bccb297b5bc49 | 10 | SHA1 (patch-aj) = 00cf67ceedb8ab48a554c9b5ce855ae5d7fd7474 | |
11 | SHA1 (patch-ak) = 28fb1de315b9622de4babd065eda06c516f786c2 | 11 | SHA1 (patch-ak) = 8e54df7a6bd648e60f2b6cfd6f01ed34040f1932 | |
12 | SHA1 (patch-al) = d06f52323c7f8343fdea1296e9942391cbbde75e | 12 | SHA1 (patch-al) = f49e179dd814c826e283949c40497067e56398c4 | |
13 | SHA1 (patch-am) = 5fdc32f33ebbb5385292919f6cd01bedc30491d9 | 13 | SHA1 (patch-am) = a721e311e7dde7938de0e9546a7892bfd104ebd1 | |
14 | SHA1 (patch-an) = 2984db4597a1b09450a6632d0b9b7fb05a0ccb06 | 14 | SHA1 (patch-an) = 98cbcbff81af04a171348e851a393b74d9be5e19 | |
15 | SHA1 (patch-ao) = d5d0eca07045b83ec06ee284e754c24ae90b405c | 15 | SHA1 (patch-ao) = d234091ca54162b47017bf690af5fb86a8d6ba08 | |
16 | SHA1 (patch-ap) = 5082cf450f4cfa85570540504f1691ee2676dec4 | 16 | SHA1 (patch-ap) = 80ea5287e4e74962c37b0b9bc6983179eed705ac | |
17 | SHA1 (patch-socket.c) = b82504e75afa7a18f3335692848794a65f3b242f | |||
17 | SHA1 (patch-tty.sh) = f93a3e2063df25c2610c6e84a623f3dc2046761b | 18 | SHA1 (patch-tty.sh) = f93a3e2063df25c2610c6e84a623f3dc2046761b |
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | $NetBSD: patch-aa,v 1.12 2014/08/25 20:02:32 kim Exp $ | 1 | $NetBSD: patch-aa,v 1.13 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | --- pty.c.orig 2014-04-26 10:58:35.000000000 +0000 | 3 | --- pty.c.orig 2014-04-26 10:58:35.000000000 +0000 | |
4 | +++ pty.c 2014-08-25 17:55:13.000000000 +0000 | 4 | +++ pty.c | |
5 | @@ -318,6 +318,45 @@ | 5 | @@ -318,6 +318,45 @@ char **ttyn; | |
6 | 6 | |||
7 | /***************************************************************/ | 7 | /***************************************************************/ | |
8 | 8 | |||
9 | +#if defined(__NetBSD__) && !defined(PTY_DONE) | 9 | +#if defined(__NetBSD__) && !defined(PTY_DONE) | |
10 | +#define PTY_DONE | 10 | +#define PTY_DONE | |
11 | + | 11 | + | |
12 | +#include <sys/param.h> | 12 | +#include <sys/param.h> | |
13 | +#include <string.h> | 13 | +#include <string.h> | |
14 | + | 14 | + | |
15 | +int | 15 | +int | |
16 | +OpenPTY(ttyn) | 16 | +OpenPTY(ttyn) | |
17 | +char **ttyn; | 17 | +char **ttyn; | |
18 | +{ | 18 | +{ |
@@ -1,19 +1,19 @@ | @@ -1,19 +1,19 @@ | |||
1 | $NetBSD: patch-ab,v 1.12 2014/08/25 20:02:32 kim Exp $ | 1 | $NetBSD: patch-ab,v 1.13 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | Always use varargs on NetBSD | 3 | Always use varargs on NetBSD | |
4 | 4 | |||
5 | --- config.h.in.orig 2014-04-26 10:58:46.000000000 +0000 | 5 | --- config.h.in.orig 2014-04-26 10:58:46.000000000 +0000 | |
6 | +++ config.h.in 2014-08-25 18:07:27.000000000 +0000 | 6 | +++ config.h.in | |
7 | @@ -498,6 +498,15 @@ | 7 | @@ -498,6 +498,15 @@ | |
8 | */ | 8 | */ | |
9 | #undef USEVARARGS | 9 | #undef USEVARARGS | |
10 | 10 | |||
11 | +#ifdef __NetBSD__ | 11 | +#ifdef __NetBSD__ | |
12 | +/* | 12 | +/* | |
13 | + * XXX gcc 3.3 on some NetBSD platforms fails the configure test for this | 13 | + * XXX gcc 3.3 on some NetBSD platforms fails the configure test for this | |
14 | + * so force it on anyway. | 14 | + * so force it on anyway. | |
15 | + */ | 15 | + */ | |
16 | +#undef USEVARARGS | 16 | +#undef USEVARARGS | |
17 | +#define USEVARARGS 1 | 17 | +#define USEVARARGS 1 | |
18 | +#endif | 18 | +#endif | |
19 | + | 19 | + |
@@ -1,27 +1,27 @@ | @@ -1,27 +1,27 @@ | |||
1 | $NetBSD: patch-ae,v 1.5 2014/08/25 20:02:32 kim Exp $ | 1 | $NetBSD: patch-ae,v 1.6 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | Don't pollute G1 to allow 8-bit encondings. | 3 | Don't pollute G1 to allow 8-bit encondings. | |
4 | 4 | |||
5 | The original code made the TERMCAP env var longer than 1023 bytes, | 5 | The original code made the TERMCAP env var longer than 1023 bytes, | |
6 | which causes problems. This is a quick hack but works with our termcap. | 6 | which causes problems. This is a quick hack but works with our termcap. | |
7 | 7 | |||
8 | --- termcap.c.orig 2014-04-26 10:58:35.000000000 +0000 | 8 | --- termcap.c.orig 2014-04-26 10:58:35.000000000 +0000 | |
9 | +++ termcap.c 2014-08-25 17:55:13.000000000 +0000 | 9 | +++ termcap.c | |
10 | @@ -80,7 +80,7 @@ | 10 | @@ -80,7 +80,7 @@ static const char TermcapConst[] = "\\\n | |
11 | \t:DO=\\E[%dB:LE=\\E[%dD:RI=\\E[%dC:UP=\\E[%dA:bs:bt=\\E[Z:\\\n\ | 11 | \t:DO=\\E[%dB:LE=\\E[%dD:RI=\\E[%dC:UP=\\E[%dA:bs:bt=\\E[Z:\\\n\ | |
12 | \t:cd=\\E[J:ce=\\E[K:cl=\\E[H\\E[J:cm=\\E[%i%d;%dH:ct=\\E[3g:\\\n\ | 12 | \t:cd=\\E[J:ce=\\E[K:cl=\\E[H\\E[J:cm=\\E[%i%d;%dH:ct=\\E[3g:\\\n\ | |
13 | \t:do=^J:nd=\\E[C:pt:rc=\\E8:rs=\\Ec:sc=\\E7:st=\\EH:up=\\EM:\\\n\ | 13 | \t:do=^J:nd=\\E[C:pt:rc=\\E8:rs=\\Ec:sc=\\E7:st=\\EH:up=\\EM:\\\n\ | |
14 | -\t:le=^H:bl=^G:cr=^M:it#8:ho=\\E[H:nw=\\EE:ta=^I:is=\\E)0:"; | 14 | -\t:le=^H:bl=^G:cr=^M:it#8:ho=\\E[H:nw=\\EE:ta=^I:is=\\E)0:"; | |
15 | +\t:le=^H:bl=^G:cr=^M:it#8:ho=\\E[H:nw=\\EE:ta=^I:is=\\E(B:"; | 15 | +\t:le=^H:bl=^G:cr=^M:it#8:ho=\\E[H:nw=\\EE:ta=^I:is=\\E(B:"; | |
16 | 16 | |||
17 | char * | 17 | char * | |
18 | gettermcapstring(s) | 18 | gettermcapstring(s) | |
19 | @@ -826,7 +826,7 @@ | 19 | @@ -826,7 +826,7 @@ char *s; | |
20 | { | 20 | { | |
21 | register int n; | 21 | register int n; | |
22 | 22 | |||
23 | - if (tcLineLen + (n = strlen(s)) > 55 && Termcaplen < TERMCAP_BUFSIZE - 4 - 1) | 23 | - if (tcLineLen + (n = strlen(s)) > 55 && Termcaplen < TERMCAP_BUFSIZE - 4 - 1) | |
24 | + if (tcLineLen + (n = strlen(s)) > 69 && Termcaplen < TERMCAP_BUFSIZE - 4 - 1) | 24 | + if (tcLineLen + (n = strlen(s)) > 69 && Termcaplen < TERMCAP_BUFSIZE - 4 - 1) | |
25 | { | 25 | { | |
26 | strcpy(Termcap + Termcaplen, "\\\n\t:"); | 26 | strcpy(Termcap + Termcaplen, "\\\n\t:"); | |
27 | Termcaplen += 4; | 27 | Termcaplen += 4; |
@@ -1,30 +1,30 @@ | @@ -1,30 +1,30 @@ | |||
1 | $NetBSD: patch-ai,v 1.4 2014/08/25 20:02:32 kim Exp $ | 1 | $NetBSD: patch-ai,v 1.5 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | This glues in the code from patch-am (see also path-al and patch-an). | 3 | This glues in the code from patch-am (see also path-al and patch-an). | |
4 | 4 | |||
5 | --- os.h.orig 2014-04-26 10:58:35.000000000 +0000 | 5 | --- os.h.orig 2014-04-26 10:58:35.000000000 +0000 | |
6 | +++ os.h 2014-08-25 17:55:13.000000000 +0000 | 6 | +++ os.h | |
7 | @@ -71,9 +71,6 @@ | 7 | @@ -71,9 +71,6 @@ | |
8 | # undef exit | 8 | # undef exit | |
9 | #endif /* sun */ | 9 | #endif /* sun */ | |
10 | 10 | |||
11 | -#ifndef linux /* all done in <errno.h> */ | 11 | -#ifndef linux /* all done in <errno.h> */ | |
12 | -extern int errno; | 12 | -extern int errno; | |
13 | -#endif /* linux */ | 13 | -#endif /* linux */ | |
14 | #ifndef HAVE_STRERROR | 14 | #ifndef HAVE_STRERROR | |
15 | /* No macros, please */ | 15 | /* No macros, please */ | |
16 | #undef strerror | 16 | #undef strerror | |
17 | @@ -250,9 +247,18 @@ | 17 | @@ -250,9 +247,18 @@ extern int errno; | |
18 | #endif | 18 | #endif | |
19 | 19 | |||
20 | #if defined(UTMPOK) || defined(BUGGYGETLOGIN) | 20 | #if defined(UTMPOK) || defined(BUGGYGETLOGIN) | |
21 | -# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux) | 21 | -# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux) | |
22 | +# if (defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)) \ | 22 | +# if (defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)) \ | |
23 | + || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \ | 23 | + || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \ | |
24 | + || (defined(__DragonFly__) && (__DragonFly_version >= 200902)) | 24 | + || (defined(__DragonFly__) && (__DragonFly_version >= 200902)) | |
25 | # include <utmpx.h> | 25 | # include <utmpx.h> | |
26 | -# define UTMPFILE UTMPX_FILE | 26 | -# define UTMPFILE UTMPX_FILE | |
27 | +# if defined(__NetBSD__) | 27 | +# if defined(__NetBSD__) | |
28 | +# define UTMPFILE _PATH_UTMPX | 28 | +# define UTMPFILE _PATH_UTMPX | |
29 | +# define NetBSD_UTMP | 29 | +# define NetBSD_UTMP | |
30 | +# elif defined(__DragonFly__) | 30 | +# elif defined(__DragonFly__) |
@@ -1,47 +1,47 @@ | @@ -1,47 +1,47 @@ | |||
1 | $NetBSD: patch-an,v 1.4 2014/08/25 20:02:32 kim Exp $ | 1 | $NetBSD: patch-an,v 1.5 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | Remove GNU Make conditional. @ETCSCREENRC@ appears to get | 3 | Remove GNU Make conditional. @ETCSCREENRC@ appears to get | |
4 | replaced always. If it doesn't in some cases, please fix | 4 | replaced always. If it doesn't in some cases, please fix | |
5 | configure.in instead (and regen patch for configure as well). | 5 | configure.in instead (and regen patch for configure as well). | |
6 | 6 | |||
7 | Add utmp-netbsd.c (created in patch-am) and utmp-netbsd.o. | 7 | Add utmp-netbsd.c (created in patch-am) and utmp-netbsd.o. | |
8 | Setting the setuid bit is handled by the package Makefile. | 8 | Setting the setuid bit is handled by the package Makefile. | |
9 | Don't try to leave "screen.old" behind on install. | 9 | Don't try to leave "screen.old" behind on install. | |
10 | 10 | |||
11 | --- Makefile.in.orig 2014-04-26 10:58:35.000000000 +0000 | 11 | --- Makefile.in.orig 2014-04-26 10:58:35.000000000 +0000 | |
12 | +++ Makefile.in 2014-08-25 19:05:49.000000000 +0000 | 12 | +++ Makefile.in | |
13 | @@ -26,9 +26,6 @@ | 13 | @@ -26,9 +26,6 @@ GIT_REV = "`git describe --always 2>/dev | |
14 | DEFS = @DEFS@ -DGIT_REV=\"$(GIT_REV)\" | 14 | DEFS = @DEFS@ -DGIT_REV=\"$(GIT_REV)\" | |
15 | 15 | |||
16 | ETCSCREENRC = @ETCSCREENRC@ | 16 | ETCSCREENRC = @ETCSCREENRC@ | |
17 | -ifeq (${ETCSCREENRC}, ) | 17 | -ifeq (${ETCSCREENRC}, ) | |
18 | -ETCSCREENRC=$(prefix)/etc/screenrc | 18 | -ETCSCREENRC=$(prefix)/etc/screenrc | |
19 | -endif | 19 | -endif | |
20 | SCREENENCODINGS = $(datadir)/screen/utf8encodings | 20 | SCREENENCODINGS = $(datadir)/screen/utf8encodings | |
21 | 21 | |||
22 | CC = @CC@ | 22 | CC = @CC@ | |
23 | @@ -65,12 +62,12 @@ | 23 | @@ -65,12 +62,12 @@ CFILES= screen.c ansi.c fileio.c mark.c | |
24 | termcap.c input.c attacher.c pty.c process.c display.c comm.c \ | 24 | termcap.c input.c attacher.c pty.c process.c display.c comm.c \ | |
25 | kmapdef.c acls.c braille.c braille_tsi.c logfile.c layer.c \ | 25 | kmapdef.c acls.c braille.c braille_tsi.c logfile.c layer.c \ | |
26 | sched.c teln.c nethack.c encoding.c canvas.c layout.c viewport.c \ | 26 | sched.c teln.c nethack.c encoding.c canvas.c layout.c viewport.c \ | |
27 | - list_display.c list_generic.c list_window.c | 27 | - list_display.c list_generic.c list_window.c | |
28 | + list_display.c list_generic.c list_window.c utmp-netbsd.c | 28 | + list_display.c list_generic.c list_window.c utmp-netbsd.c | |
29 | OFILES= screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o \ | 29 | OFILES= screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o \ | |
30 | search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o \ | 30 | search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o \ | |
31 | termcap.o input.o attacher.o pty.o process.o display.o comm.o \ | 31 | termcap.o input.o attacher.o pty.o process.o display.o comm.o \ | |
32 | kmapdef.o acls.o braille.o braille_tsi.o logfile.o layer.o \ | 32 | kmapdef.o acls.o braille.o braille_tsi.o logfile.o layer.o \ | |
33 | - list_generic.o list_display.o list_window.o \ | 33 | - list_generic.o list_display.o list_window.o \ | |
34 | + list_generic.o list_display.o list_window.o utmp-netbsd.o \ | 34 | + list_generic.o list_display.o list_window.o utmp-netbsd.o \ | |
35 | sched.o teln.o nethack.o encoding.o canvas.o layout.o viewport.o | 35 | sched.o teln.o nethack.o encoding.o canvas.o layout.o viewport.o | |
36 | 36 | |||
37 | all: screen | 37 | all: screen | |
38 | @@ -86,9 +83,6 @@ | 38 | @@ -86,9 +83,6 @@ install_bin: .version screen | |
39 | -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \ | 39 | -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \ | |
40 | then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi | 40 | then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi | |
41 | $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN) | 41 | $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN) | |
42 | - -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN) | 42 | - -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN) | |
43 | -# This doesn't work if $(bindir)/screen is a symlink | 43 | -# This doesn't work if $(bindir)/screen is a symlink | |
44 | - -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi | 44 | - -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi | |
45 | rm -f $(DESTDIR)$(bindir)/screen | 45 | rm -f $(DESTDIR)$(bindir)/screen | |
46 | (cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen) | 46 | (cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen) | |
47 | cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS) | 47 | cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS) |
@@ -1,32 +1,32 @@ | @@ -1,32 +1,32 @@ | |||
1 | $NetBSD: patch-aj,v 1.7 2014/08/25 20:02:32 kim Exp $ | 1 | $NetBSD: patch-aj,v 1.8 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | Include curses header when testing tgetent in order to prevent | 3 | Include curses header when testing tgetent in order to prevent | |
4 | crash on 64-bit architectures. | 4 | crash on 64-bit architectures. | |
5 | 5 | |||
6 | Detect getutent correctly on NetBSD with utmpx. | 6 | Detect getutent correctly on NetBSD with utmpx. | |
7 | 7 | |||
8 | --- configure.in.orig 2014-04-26 10:58:35.000000000 +0000 | 8 | --- configure.in.orig 2014-04-26 10:58:35.000000000 +0000 | |
9 | +++ configure.in 2014-08-25 18:20:27.000000000 +0000 | 9 | +++ configure.in | |
10 | @@ -686,6 +686,8 @@ | 10 | @@ -686,6 +686,8 @@ AC_TRY_LINK(,tgetent((char *)0, (char *) | |
11 | AC_MSG_ERROR(!!! no tgetent - no screen))))))))) | 11 | AC_MSG_ERROR(!!! no tgetent - no screen))))))))) | |
12 | 12 | |||
13 | AC_TRY_RUN([ | 13 | AC_TRY_RUN([ | |
14 | +#include <curses.h> | 14 | +#include <curses.h> | |
15 | + | 15 | + | |
16 | main() | 16 | main() | |
17 | { | 17 | { | |
18 | exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); | 18 | exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); | |
19 | @@ -837,9 +839,16 @@ | 19 | @@ -837,9 +839,16 @@ AC_CHECKING(getutent) | |
20 | AC_TRY_LINK([ | 20 | AC_TRY_LINK([ | |
21 | #include <time.h> /* to get time_t on SCO */ | 21 | #include <time.h> /* to get time_t on SCO */ | |
22 | #include <sys/types.h> | 22 | #include <sys/types.h> | |
23 | -#if defined(SVR4) && !defined(DGUX) | 23 | -#if defined(SVR4) && !defined(DGUX) | |
24 | +#include <sys/param.h> | 24 | +#include <sys/param.h> | |
25 | +#if (defined(SVR4) && !defined(DGUX)) \ | 25 | +#if (defined(SVR4) && !defined(DGUX)) \ | |
26 | + || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \ | 26 | + || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \ | |
27 | + || (defined(__DragonFly__) && (__DragonFly_version >= 200902)) | 27 | + || (defined(__DragonFly__) && (__DragonFly_version >= 200902)) | |
28 | #include <utmpx.h> | 28 | #include <utmpx.h> | |
29 | #define utmp utmpx | 29 | #define utmp utmpx | |
30 | +# if defined(__NetBSD__) || defined(__DragonFly__) | 30 | +# if defined(__NetBSD__) || defined(__DragonFly__) | |
31 | +# define pututline pututxline | 31 | +# define pututline pututxline | |
32 | +# define getutent getutxent | 32 | +# define getutent getutxent |
@@ -1,34 +1,34 @@ | @@ -1,34 +1,34 @@ | |||
1 | $NetBSD: patch-ak,v 1.6 2014/08/25 20:02:32 kim Exp $ | 1 | $NetBSD: patch-ak,v 1.7 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | Patch configure after configure.in (see patch-aj). | 3 | Patch configure after configure.in (see patch-aj). | |
4 | 4 | |||
5 | Include curses header when testing tgetent in order to prevent | 5 | Include curses header when testing tgetent in order to prevent | |
6 | crash on 64-bit architectures. | 6 | crash on 64-bit architectures. | |
7 | 7 | |||
8 | Detect getutent correctly on NetBSD with utmpx. | 8 | Detect getutent correctly on NetBSD with utmpx. | |
9 | 9 | |||
10 | --- configure.orig 2014-04-26 10:58:46.000000000 +0000 | 10 | --- configure.orig 2014-04-26 10:58:46.000000000 +0000 | |
11 | +++ configure 2014-08-25 18:24:13.000000000 +0000 | 11 | +++ configure | |
12 | @@ -5017,6 +5017,8 @@ | 12 | @@ -5017,6 +5017,8 @@ else | |
13 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 13 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14 | /* end confdefs.h. */ | 14 | /* end confdefs.h. */ | |
15 | 15 | |||
16 | +#include <curses.h> | 16 | +#include <curses.h> | |
17 | + | 17 | + | |
18 | main() | 18 | main() | |
19 | { | 19 | { | |
20 | exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); | 20 | exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); | |
21 | @@ -5413,9 +5415,16 @@ | 21 | @@ -5413,9 +5415,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ | |
22 | 22 | |||
23 | #include <time.h> /* to get time_t on SCO */ | 23 | #include <time.h> /* to get time_t on SCO */ | |
24 | #include <sys/types.h> | 24 | #include <sys/types.h> | |
25 | -#if defined(SVR4) && !defined(DGUX) | 25 | -#if defined(SVR4) && !defined(DGUX) | |
26 | +#include <sys/param.h> | 26 | +#include <sys/param.h> | |
27 | +#if (defined(SVR4) && !defined(DGUX)) \ | 27 | +#if (defined(SVR4) && !defined(DGUX)) \ | |
28 | + || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \ | 28 | + || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \ | |
29 | + || (defined(__DragonFly__) && (__DragonFly_version >= 200902)) | 29 | + || (defined(__DragonFly__) && (__DragonFly_version >= 200902)) | |
30 | #include <utmpx.h> | 30 | #include <utmpx.h> | |
31 | #define utmp utmpx | 31 | #define utmp utmpx | |
32 | +# if defined(__NetBSD__) || defined(__DragonFly__) | 32 | +# if defined(__NetBSD__) || defined(__DragonFly__) | |
33 | +# define pututline pututxline | 33 | +# define pututline pututxline | |
34 | +# define getutent getutxent | 34 | +# define getutent getutxent |
@@ -1,41 +1,41 @@ | @@ -1,41 +1,41 @@ | |||
1 | $NetBSD: patch-al,v 1.3 2014/08/25 20:02:32 kim Exp $ | 1 | $NetBSD: patch-al,v 1.4 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | Make extra calls to remove utmp entries when utmpx is used. | 3 | Make extra calls to remove utmp entries when utmpx is used. | |
4 | For non-login entries we only update utmpx, as it stores | 4 | For non-login entries we only update utmpx, as it stores | |
5 | more information, and utilities are reading both. | 5 | more information, and utilities are reading both. | |
6 | 6 | |||
7 | --- utmp.c.orig 2014-04-26 16:22:09.000000000 +0000 | 7 | --- utmp.c.orig 2014-04-26 16:22:09.000000000 +0000 | |
8 | +++ utmp.c 2014-08-25 17:55:13.000000000 +0000 | 8 | +++ utmp.c | |
9 | @@ -48,6 +48,12 @@ | 9 | @@ -48,6 +48,12 @@ extern char *LoginName; | |
10 | extern int real_uid, eff_uid; | 10 | extern int real_uid, eff_uid; | |
11 | 11 | |||
12 | 12 | |||
13 | +#ifdef NetBSD_UTMP | 13 | +#ifdef NetBSD_UTMP | |
14 | +extern void utmp_login __P((char *)); | 14 | +extern void utmp_login __P((char *)); | |
15 | +extern void utmp_logout __P((char *)); | 15 | +extern void utmp_logout __P((char *)); | |
16 | +#endif | 16 | +#endif | |
17 | + | 17 | + | |
18 | + | 18 | + | |
19 | /* | 19 | /* | |
20 | * UTNOKEEP: A (ugly) hack for apollo that does two things: | 20 | * UTNOKEEP: A (ugly) hack for apollo that does two things: | |
21 | * 1) Always close and reopen the utmp file descriptor. (I don't know | 21 | * 1) Always close and reopen the utmp file descriptor. (I don't know | |
22 | @@ -315,6 +321,9 @@ | 22 | @@ -315,6 +321,9 @@ RemoveLoginSlot() | |
23 | 23 | |||
24 | ASSERT(display); | 24 | ASSERT(display); | |
25 | debug("RemoveLoginSlot: removing your logintty\n"); | 25 | debug("RemoveLoginSlot: removing your logintty\n"); | |
26 | +#ifdef NetBSD_UTMP | 26 | +#ifdef NetBSD_UTMP | |
27 | + utmp_logout(stripdev(D_usertty)); | 27 | + utmp_logout(stripdev(D_usertty)); | |
28 | +#endif | 28 | +#endif | |
29 | D_loginslot = TtyNameSlot(D_usertty); | 29 | D_loginslot = TtyNameSlot(D_usertty); | |
30 | if (D_loginslot == (slot_t)0 || D_loginslot == (slot_t)-1) | 30 | if (D_loginslot == (slot_t)0 || D_loginslot == (slot_t)-1) | |
31 | return; | 31 | return; | |
32 | @@ -379,6 +388,9 @@ | 32 | @@ -379,6 +388,9 @@ RestoreLoginSlot() | |
33 | 33 | |||
34 | debug("RestoreLoginSlot()\n"); | 34 | debug("RestoreLoginSlot()\n"); | |
35 | ASSERT(display); | 35 | ASSERT(display); | |
36 | +#ifdef NetBSD_UTMP | 36 | +#ifdef NetBSD_UTMP | |
37 | + utmp_login(stripdev(D_usertty)); | 37 | + utmp_login(stripdev(D_usertty)); | |
38 | +#endif | 38 | +#endif | |
39 | if (utmpok && D_loginslot != (slot_t)0 && D_loginslot != (slot_t)-1) | 39 | if (utmpok && D_loginslot != (slot_t)0 && D_loginslot != (slot_t)-1) | |
40 | { | 40 | { | |
41 | debug1(" logging you in again (slot %#x)\n", (int)D_loginslot); | 41 | debug1(" logging you in again (slot %#x)\n", (int)D_loginslot); |
@@ -1,51 +1,51 @@ | @@ -1,51 +1,51 @@ | |||
1 | $NetBSD: patch-ap,v 1.3 2014/08/25 20:02:32 kim Exp $ | 1 | $NetBSD: patch-ap,v 1.4 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | Replace configurable paths with tags. | 3 | Replace configurable paths with tags. | |
4 | 4 | |||
5 | --- doc/screen.1.orig 2014-04-27 22:10:01.000000000 +0000 | 5 | --- doc/screen.1.orig 2014-04-27 22:10:01.000000000 +0000 | |
6 | +++ doc/screen.1 2014-08-25 18:42:29.000000000 +0000 | 6 | +++ doc/screen.1 | |
7 | @@ -625,7 +625,7 @@ | 7 | @@ -625,7 +625,7 @@ Show a listing of all currently attached | |
8 | 8 | |||
9 | .SH CUSTOMIZATION | 9 | .SH CUSTOMIZATION | |
10 | The \*Qsocket directory\*U defaults either to $HOME/.screen or simply to | 10 | The \*Qsocket directory\*U defaults either to $HOME/.screen or simply to | |
11 | -/tmp/screens or preferably to /usr/local/screens chosen at compile-time. If | 11 | -/tmp/screens or preferably to /usr/local/screens chosen at compile-time. If | |
12 | +/tmp/screens. This is chosen at compile-time. If | 12 | +/tmp/screens. This is chosen at compile-time. If | |
13 | .I screen | 13 | .I screen | |
14 | is installed setuid-root, then the administrator | 14 | is installed setuid-root, then the administrator | |
15 | should compile | 15 | should compile | |
16 | @@ -638,7 +638,7 @@ | 16 | @@ -638,7 +638,7 @@ in the environment variable $SCREENDIR. | |
17 | When | 17 | When | |
18 | .I screen | 18 | .I screen | |
19 | is invoked, it executes initialization commands from the files | 19 | is invoked, it executes initialization commands from the files | |
20 | -\*Q/usr/local/etc/screenrc\*U and | 20 | -\*Q/usr/local/etc/screenrc\*U and | |
21 | +\*Q@PKG_SYSCONFDIR@/screenrc\*U and | 21 | +\*Q/usr/pkgsrc/pkg/etc/screenrc\*U and | |
22 | \*Q.screenrc\*U in the user's home directory. These are the \*Qprogrammer's | 22 | \*Q.screenrc\*U in the user's home directory. These are the \*Qprogrammer's | |
23 | defaults\*U that can be overridden in the following ways: for the | 23 | defaults\*U that can be overridden in the following ways: for the | |
24 | global screenrc file | 24 | global screenrc file | |
25 | @@ -668,7 +668,7 @@ | 25 | @@ -668,7 +668,7 @@ variable substitution shall be performed | |
26 | protected from variable substitution. | 26 | protected from variable substitution. | |
27 | .PP | 27 | .PP | |
28 | Two configuration files are shipped as examples with your screen distribution: | 28 | Two configuration files are shipped as examples with your screen distribution: | |
29 | -\*Qetc/screenrc\*U and \*Qetc/etcscreenrc\*U. They contain a number of | 29 | -\*Qetc/screenrc\*U and \*Qetc/etcscreenrc\*U. They contain a number of | |
30 | +\*Q@EXAMPLES@/screenrc\*U and \*Q@EXAMPLES@/etcscreenrc\*U. They contain a number of | 30 | +\*Q/usr/pkgsrc/pkg/share/examples/screen/screenrc\*U and \*Q/usr/pkgsrc/pkg/share/examples/screen/etcscreenrc\*U. They contain a number of | |
31 | useful examples for various commands. | 31 | useful examples for various commands. | |
32 | .PP | 32 | .PP | |
33 | Customization can also be done 'on-line'. To enter the command mode type | 33 | Customization can also be done 'on-line'. To enter the command mode type | |
34 | @@ -4857,14 +4857,14 @@ | 34 | @@ -4857,14 +4857,14 @@ Examples in the | |
35 | .I screen | 35 | .I screen | |
36 | distribution package for private and global initialization files. | 36 | distribution package for private and global initialization files. | |
37 | .IP $SYSSCREENRC | 37 | .IP $SYSSCREENRC | |
38 | -.IP /usr/local/etc/screenrc | 38 | -.IP /usr/local/etc/screenrc | |
39 | +.IP @PKG_SYSCONFDIR@/screenrc | 39 | +.IP /usr/pkgsrc/pkg/etc/screenrc | |
40 | .I screen | 40 | .I screen | |
41 | initialization commands | 41 | initialization commands | |
42 | .IP $SCREENRC | 42 | .IP $SCREENRC | |
43 | .IP $HOME/.screenrc | 43 | .IP $HOME/.screenrc | |
44 | -Read in after /usr/local/etc/screenrc | 44 | -Read in after /usr/local/etc/screenrc | |
45 | +Read in after @PKG_SYSCONFDIR@/screenrc | 45 | +Read in after /usr/pkgsrc/pkg/etc/screenrc | |
46 | .IP $SCREENDIR/S\-<login> | 46 | .IP $SCREENDIR/S\-<login> | |
47 | -.IP /local/screens/S\-<login> | 47 | -.IP /local/screens/S\-<login> | |
48 | +.IP /tmp/screens/S\-<login> | 48 | +.IP /tmp/screens/S\-<login> | |
49 | Socket directories (default) | 49 | Socket directories (default) | |
50 | .IP /usr/tmp/screens/S\-<login> | 50 | .IP /usr/tmp/screens/S\-<login> | |
51 | Alternate socket directories. | 51 | Alternate socket directories. |
@@ -1,21 +1,21 @@ | @@ -1,21 +1,21 @@ | |||
1 | $NetBSD: patch-am,v 1.1 2002/09/15 06:51:39 kim Exp $ | 1 | $NetBSD: patch-am,v 1.2 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | Code to handle the login slot in utmp when utmpx is available. | 3 | Code to handle the login slot in utmp when utmpx is available. | |
4 | Daemons shipped with NetBSD tend to write to both, while 3rd | 4 | Daemons shipped with NetBSD tend to write to both, while 3rd | |
5 | party software might write to only one. | 5 | party software might write to only one. | |
6 | 6 | |||
7 | --- /dev/null Sun Sep 15 02:36:51 2002 | 7 | --- utmp-netbsd.c.orig 2015-02-13 04:30:05.000000000 +0000 | |
8 | +++ utmp-netbsd.c Sun Sep 15 02:38:27 2002 | 8 | +++ utmp-netbsd.c | |
9 | @@ -0,0 +1,79 @@ | 9 | @@ -0,0 +1,79 @@ | |
10 | +#include <sys/param.h> | 10 | +#include <sys/param.h> | |
11 | +#if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000) | 11 | +#if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000) | |
12 | + | 12 | + | |
13 | +#include <sys/types.h> | 13 | +#include <sys/types.h> | |
14 | +#include <sys/time.h> | 14 | +#include <sys/time.h> | |
15 | +#include <sys/wait.h> | 15 | +#include <sys/wait.h> | |
16 | + | 16 | + | |
17 | +#include <errno.h> | 17 | +#include <errno.h> | |
18 | +#include <fcntl.h> | 18 | +#include <fcntl.h> | |
19 | +#include <stdio.h> | 19 | +#include <stdio.h> | |
20 | +#include <stdlib.h> | 20 | +#include <stdlib.h> | |
21 | +#include <string.h> | 21 | +#include <string.h> |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: patch-ao,v 1.2 2014/08/25 20:02:32 kim Exp $ | 1 | $NetBSD: patch-ao,v 1.3 2015/02/13 04:44:40 rodent Exp $ | |
2 | 2 | |||
3 | Replace configurable paths with tags. | 3 | Replace configurable paths with tags. | |
4 | 4 | |||
5 | --- etc/etcscreenrc.orig Sun Apr 29 01:25:34 2001 | 5 | --- etc/etcscreenrc.orig 2014-04-25 19:08:40.000000000 +0000 | |
6 | +++ etc/etcscreenrc | 6 | +++ etc/etcscreenrc | |
7 | @@ -1,6 +1,6 @@ | 7 | @@ -1,6 +1,6 @@ | |
8 | # | 8 | # | |
9 | # This is an example for the global screenrc file. | 9 | # This is an example for the global screenrc file. | |
10 | -# You may want to install this file as /usr/local/etc/screenrc. | 10 | -# You may want to install this file as /usr/local/etc/screenrc. | |
11 | +# You may want to install this file as @PKG_SYSCONFDIR@/screenrc. | 11 | +# You may want to install this file as /usr/pkgsrc/pkg/etc/screenrc. | |
12 | # Check config.h for the exact location. | 12 | # Check config.h for the exact location. | |
13 | # | 13 | # | |
14 | # Flaws of termcap and standard settings are done here. | 14 | # Flaws of termcap and standard settings are done here. |
$NetBSD: patch-socket.c,v 1.1 2015/02/13 04:44:40 rodent Exp $
--- socket.c.orig 2014-04-26 16:22:43.000000000 +0000
+++ socket.c
@@ -30,6 +30,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <sys/uio.h>
#if !defined(NAMEDPIPE)
#include <sys/socket.h>
#include <sys/un.h>