diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-misc/screen | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-misc/screen')
23 files changed, 2378 insertions, 0 deletions
diff --git a/app-misc/screen/Manifest b/app-misc/screen/Manifest new file mode 100644 index 000000000000..fa65084d3b8a --- /dev/null +++ b/app-misc/screen/Manifest @@ -0,0 +1,3 @@ +DIST screen-4.0.3.tar.gz 840602 SHA256 78f0d5b1496084a5902586304d4a73954b2bfe33ea13edceecf21615c39e6c77 SHA512 24c1f598972f3dc9ed49cd2c05852190a0190d22fa01401eee8484627c8dd2815f0a422d9b2697faa8aaa0b3efc6730a94e2d5aa787dbe5e9ec719143176c338 WHIRLPOOL 6774786126eb05749d432593bc2c1febdc57896959220a609feb138bdc16b8da278aea63af1ccfd5c7d38ccaa9e7d28980e9e14d0009d36a54cdbd9e4cb0fca7 +DIST screen-4.2.1.tar.gz 1062485 SHA256 5468545047e301d2b3579f9d9ce00466d14a7eec95ce806e3834a3d6b0b9b080 SHA512 30826b2a2fc436483276b90cc4c6679470f7ccb7098c9bb8457d0e534998cd12da02882cf80678465f6540cade170c3fdc6bdfa31b07359ff0d3ffe2d6063710 WHIRLPOOL 7d4209651a016a9ab91aec385532c6ebd7a6d96a60342721f3a53752924c3fb72aa3d648ad665b67fab0a78d6019396abe13e04f556c7e5e9f71bf3238e64cc5 +DIST screen-4.3.1.tar.gz 845958 SHA256 fa4049f8aee283de62e283d427f2cfd35d6c369b40f7f45f947dbfd915699d63 SHA512 8e8a25b23330a7d8e00fc9e6cc430f0eb3937ccf4183efbd6fd24e4dc04cc09b3acae45bfc24892faee433b18fa79b1cfe0211fd75c0d74ecf908f916bf774aa WHIRLPOOL b47f7538351028cc3a2ec7f69a9373e152fa7655c6ae9feb75ba46db3cdc9b7d58ce78043993b7f134da3a04754c5e52d1a77da4c30a8decda21c79cf5c50f51 diff --git a/app-misc/screen/files/4.0.2-64bit-time.patch b/app-misc/screen/files/4.0.2-64bit-time.patch new file mode 100644 index 000000000000..645b37f9b098 --- /dev/null +++ b/app-misc/screen/files/4.0.2-64bit-time.patch @@ -0,0 +1,11 @@ +--- utmp.c.orig 2004-11-14 23:15:28.000000000 +0100 ++++ utmp.c 2004-11-14 23:15:39.000000000 +0100 +@@ -618,7 +618,7 @@ + #endif /* sgi */ + strncpy(u->ut_line, line, sizeof(u->ut_line)); + u->ut_pid = pid; +- (void)time((time_t *)&u->ut_time); ++ u->ut_time = time(NULL); + } + + static slot_t diff --git a/app-misc/screen/files/4.0.2-no-libelf.patch b/app-misc/screen/files/4.0.2-no-libelf.patch new file mode 100644 index 000000000000..df06383c9d86 --- /dev/null +++ b/app-misc/screen/files/4.0.2-no-libelf.patch @@ -0,0 +1,18 @@ +--- screen-4.0.2/configure.in 2005-05-22 19:55:06.559874997 +0000 ++++ screen-4.0.2-no-libelf/configure.in 2005-05-22 19:56:05.895801017 +0000 +@@ -195,15 +195,6 @@ + #endif + ], LIBS="$LIBS -lsocket -linet";seqptx=1) + +-oldlibs="$LIBS" +-LIBS="$LIBS -lelf" +-AC_CHECKING(SVR4) +-AC_TRY_LINK([#include <utmpx.h> +-],, +-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), +-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])] +-,LIBS="$oldlibs") +- + AC_CHECKING(for Solaris 2.x) + AC_EGREP_CPP(yes, + [#if defined(SVR4) && defined(sun) diff --git a/app-misc/screen/files/4.0.2-no-pty.patch b/app-misc/screen/files/4.0.2-no-pty.patch new file mode 100644 index 000000000000..7b7b7984fff9 --- /dev/null +++ b/app-misc/screen/files/4.0.2-no-pty.patch @@ -0,0 +1,14 @@ +--- screen-4.0.2/pty.c.orig 2004-07-29 23:53:45.313533536 -0400 ++++ screen-4.0.2/pty.c 2004-07-29 23:53:59.011451136 -0400 +@@ -33,11 +33,6 @@ + # include <sys/ioctl.h> + #endif + +-/* for solaris 2.1, Unixware (SVR4.2) and possibly others */ +-#ifdef HAVE_SVR4_PTYS +-# include <sys/stropts.h> +-#endif +- + #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL) + # include <sys/ttold.h> + #endif diff --git a/app-misc/screen/files/4.0.2-no-utempter.patch b/app-misc/screen/files/4.0.2-no-utempter.patch new file mode 100644 index 000000000000..2a06119bf4b5 --- /dev/null +++ b/app-misc/screen/files/4.0.2-no-utempter.patch @@ -0,0 +1,14 @@ +--- screen-4.0.2/configure.in.orig 2004-12-17 19:55:45.314670411 +0100 ++++ screen-4.0.2/configure.in 2004-12-17 19:55:50.575941541 +0100 +@@ -855,11 +855,6 @@ + #include <utmp.h> + #endif + ],[struct utmp u; u.ut_host[0] = 0;], AC_DEFINE(UTHOST)) +-AC_CHECK_HEADER(utempter.h, have_utempter=yes, have_utempter=no) +-if test "$have_utempter" = yes; then +- AC_DEFINE(HAVE_UTEMPTER) +- LIBS="$LIBS -lutempter" +-fi + + dnl + dnl **** loadav **** diff --git a/app-misc/screen/files/4.0.2-nonblock.patch b/app-misc/screen/files/4.0.2-nonblock.patch new file mode 100644 index 000000000000..f27c903a8dd9 --- /dev/null +++ b/app-misc/screen/files/4.0.2-nonblock.patch @@ -0,0 +1,11 @@ +--- screen.c.orig 2006-04-02 17:05:28.000000000 +0200 ++++ screen.c 2006-04-02 17:05:39.000000000 +0200 +@@ -1197,7 +1197,7 @@ char **av; + if (!detached) + { + /* reopen tty. must do this, because fd 0 may be RDONLY */ +- if ((n = secopen(attach_tty, O_RDWR, 0)) < 0) ++ if ((n = secopen(attach_tty, O_RDWR | O_NONBLOCK, 0)) < 0) + Panic(0, "Cannot reopen '%s' - please check.", attach_tty); + } + else diff --git a/app-misc/screen/files/4.0.2-windowlist-multiuser-fix.patch b/app-misc/screen/files/4.0.2-windowlist-multiuser-fix.patch new file mode 100644 index 000000000000..09848e93ef2e --- /dev/null +++ b/app-misc/screen/files/4.0.2-windowlist-multiuser-fix.patch @@ -0,0 +1,12 @@ +diff -Nur screen-4.0.2.orig/process.c screen-4.0.2/process.c +--- screen-4.0.2.orig/process.c 2003-09-18 14:53:54.000000000 +0200 ++++ screen-4.0.2/process.c 2005-07-06 19:55:08.370772955 +0200 +@@ -4841,7 +4841,7 @@ + s = buf; + for (display = displays; display; display = display->d_next) + { +- if (D_user == olddisplay->d_user) ++ if (olddisplay && D_user == olddisplay->d_user) + continue; + for (cv = D_cvlist; cv; cv = cv->c_next) + if (Layer2Window(cv->c_layer) == p) diff --git a/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch b/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch new file mode 100644 index 000000000000..21b11080dfa0 --- /dev/null +++ b/app-misc/screen/files/4.0.3-extend-d_termname-ng2.patch @@ -0,0 +1,203 @@ +diff --git a/acls.c b/acls.c +index 0f98df2..5f26d70 100644 +--- a/acls.c ++++ b/acls.c +@@ -178,7 +178,7 @@ struct acluser **up; + #endif + (*up)->u_Esc = DefaultEsc; + (*up)->u_MetaEsc = DefaultMetaEsc; +- strncpy((*up)->u_name, name, 20); ++ strncpy((*up)->u_name, name, MAXSTR); + (*up)->u_password = NULL; + if (pass) + (*up)->u_password = SaveStr(pass); +@@ -314,8 +314,8 @@ struct acluser **up; + return UserAdd(name, pass, up); + if (!strcmp(name, "nobody")) /* he remains without password */ + return -1; +- strncpy((*up)->u_password, pass ? pass : "", 20); +- (*up)->u_password[20] = '\0'; ++ strncpy((*up)->u_password, pass ? pass : "", MAXSTR); ++ (*up)->u_password[MAXSTR] = '\0'; + return 0; + } + #endif +diff --git a/acls.h b/acls.h +index c41b714..7f20f55 100644 +--- a/acls.h ++++ b/acls.h +@@ -36,6 +36,16 @@ + #define ACLBYTE(data, w) ((data)[(w) >> 3]) + #define ACLBIT(w) (0x80 >> ((w) & 7)) + ++#include <limits.h> ++ ++#ifndef NAME_MAX ++# ifndef MAXNAMELEN ++# define NAME_MAX 255 ++# else ++# define NAME_MAX MAXNAMELEN ++# endif ++#endif ++ + typedef unsigned char * AclBits; + + /* +@@ -73,7 +83,7 @@ struct plop + typedef struct acluser + { + struct acluser *u_next; /* continue the main user list */ +- char u_name[20+1]; /* login name how he showed up */ ++ char u_name[NAME_MAX+1]; /* login name how he showed up */ + char *u_password; /* his password (may be NullStr). */ + int u_checkpassword; /* nonzero if this u_password is valid */ + int u_detachwin; /* the window where he last detached */ +diff --git a/display.h b/display.h +index ef99954..563fcd0 100644 +--- a/display.h ++++ b/display.h +@@ -22,6 +22,16 @@ + * $Id: display.h,v 1.9 1994/05/31 12:31:54 mlschroe Exp $ FAU + */ + ++#include <limits.h> ++ ++#ifndef NAME_MAX ++# ifndef MAXNAMELEN ++# define NAME_MAX 255 ++# else ++# define NAME_MAX MAXNAMELEN ++# endif ++#endif ++ + #ifdef MAPKEYS + + #define KMAP_KEYS (T_OCAPS-T_CAPS) +@@ -85,7 +95,7 @@ struct display + struct win *d_other; /* pointer to other window */ + int d_nonblock; /* -1 don't block if obufmax reached */ + /* >0: block after nonblock secs */ +- char d_termname[20 + 1]; /* $TERM */ ++ char d_termname[NAME_MAX + 1]; /* $TERM */ + char *d_tentry; /* buffer for tgetstr */ + char d_tcinited; /* termcap inited flag */ + int d_width, d_height; /* width/height of the screen */ +diff --git a/screen.c b/screen.c +index 70741df..6f45b60 100644 +--- a/screen.c ++++ b/screen.c +@@ -106,6 +106,16 @@ FILE *dfp; + #endif + + ++#include <limits.h> ++ ++#ifndef NAME_MAX ++# ifndef MAXNAMELEN ++# define NAME_MAX 255 ++# else ++# define NAME_MAX MAXNAMELEN ++# endif ++#endif ++ + extern char Term[], screenterm[], **environ, Termcap[]; + int force_vt = 1; + int VBellWait, MsgWait, MsgMinWait, SilenceWait; +@@ -877,13 +887,13 @@ char **av; + + if (home == 0 || *home == '\0') + home = ppp->pw_dir; +- if (strlen(LoginName) > 20) ++ if (strlen(LoginName) > NAME_MAX) + Panic(0, "LoginName too long - sorry."); + #ifdef MULTIUSER +- if (multi && strlen(multi) > 20) ++ if (multi && strlen(multi) > NAME_MAX) + Panic(0, "Screen owner name too long - sorry."); + #endif +- if (strlen(home) > MAXPATHLEN - 25) ++ if (strlen(home) > MAXPATHLEN - NAME_MAX) + Panic(0, "$HOME too long - sorry."); + + attach_tty = ""; +diff --git a/screen.h b/screen.h +index 4f9f354..bcaaaf6 100644 +--- a/screen.h ++++ b/screen.h +@@ -43,6 +43,15 @@ + #include "comm.h" + #include "layer.h" + #include "term.h" ++#include <limits.h> ++ ++#ifndef NAME_MAX ++# ifndef MAXNAMELEN ++# define NAME_MAX 255 ++# else ++# define NAME_MAX MAXNAMELEN ++# endif ++#endif + + + #ifdef DEBUG +@@ -195,26 +204,26 @@ struct msg + create; + struct + { +- char auser[20 + 1]; /* username */ ++ char auser[NAME_MAX + 1]; /* username */ + int apid; /* pid of frontend */ + int adaptflag; /* adapt window size? */ + int lines, columns; /* display size */ + char preselect[20]; + int esc; /* his new escape character unless -1 */ + int meta_esc; /* his new meta esc character unless -1 */ +- char envterm[20 + 1]; /* terminal type */ ++ char envterm[NAME_MAX + 1]; /* terminal type */ + int encoding; /* encoding of display */ + } + attach; + struct + { +- char duser[20 + 1]; /* username */ ++ char duser[NAME_MAX + 1]; /* username */ + int dpid; /* pid of frontend */ + } + detach; + struct + { +- char auser[20 + 1]; /* username */ ++ char auser[NAME_MAX + 1]; /* username */ + int nargs; + char cmd[MAXPATHLEN]; /* command */ + int apid; /* pid of frontend */ +diff --git a/socket.c b/socket.c +index 62a73af..1cc9c27 100644 +--- a/socket.c ++++ b/socket.c +@@ -45,6 +45,16 @@ + + #include "extern.h" + ++#include <limits.h> ++ ++#ifndef NAME_MAX ++# ifndef MAXNAMELEN ++# define NAME_MAX 255 ++# else ++# define NAME_MAX MAXNAMELEN ++# endif ++#endif ++ + static int CheckPid __P((int)); + static void ExecCreate __P((struct msg *)); + static void DoCommandMsg __P((struct msg *)); +@@ -1248,7 +1258,7 @@ static void PasswordProcessInput __P((char *, int)); + + struct pwdata { + int l; +- char buf[20 + 1]; ++ char buf[NAME_MAX + 1]; + struct msg m; + }; + diff --git a/app-misc/screen/files/screen-4.0.1-int-overflow-fix.patch b/app-misc/screen/files/screen-4.0.1-int-overflow-fix.patch new file mode 100644 index 000000000000..4a40c8dd2c7c --- /dev/null +++ b/app-misc/screen/files/screen-4.0.1-int-overflow-fix.patch @@ -0,0 +1,31 @@ +--- ansi.c.orig 2003-09-08 10:24:44.000000000 -0400 ++++ ansi.c 2003-11-29 10:41:15.000000000 -0500 +@@ -559,7 +559,7 @@ + { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': +- if (curr->w_NumArgs < MAXARGS) ++ if (curr->w_NumArgs >= 0 && curr->w_NumArgs < MAXARGS) + { + if (curr->w_args[curr->w_NumArgs] < 100000000) + curr->w_args[curr->w_NumArgs] = +--- resize.c.orig 2003-09-08 10:26:31.000000000 -0400 ++++ resize.c 2003-11-29 10:41:50.000000000 -0500 +@@ -682,6 +682,17 @@ + if (wi == 0) + he = hi = 0; + ++ if (wi > 1000) ++ { ++ Msg(0, "Window width too large, truncated"); ++ wi = 1000; ++ } ++ if (he > 1000) ++ { ++ Msg(0, "Window height too large, truncated"); ++ he = 1000; ++ } ++ + if (p->w_width == wi && p->w_height == he && p->w_histheight == hi) + { + debug("ChangeWindowSize: No change.\n"); diff --git a/app-misc/screen/files/screen-4.0.1-vsprintf.patch b/app-misc/screen/files/screen-4.0.1-vsprintf.patch new file mode 100644 index 000000000000..b2f7a20f9e92 --- /dev/null +++ b/app-misc/screen/files/screen-4.0.1-vsprintf.patch @@ -0,0 +1,13 @@ +--- screen-4.0.1/configure.in 2003-06-03 07:58:24.000000000 -0400 ++++ screen-4.0.1/configure.in.agriffis 2004-01-13 12:07:37.000000000 -0500 +@@ -1206,7 +1206,9 @@ + rm -f /tmp/conftest* + + AC_MSG_CHECKING(for vsprintf) +-AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) ++AC_TRY_LINK([#include <stdarg.h>],[va_list valist; vsprintf(0,0,valist);], ++ [AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS)], ++ [AC_MSG_RESULT(no)]) + + AC_HEADER_DIRENT + diff --git a/app-misc/screen/files/screen-4.0.3-config.h-autoconf-2.62.patch b/app-misc/screen/files/screen-4.0.3-config.h-autoconf-2.62.patch new file mode 100644 index 000000000000..5605fdac7414 --- /dev/null +++ b/app-misc/screen/files/screen-4.0.3-config.h-autoconf-2.62.patch @@ -0,0 +1,14 @@ +compability for sys-devel/autoconf-2.62 + +https://bugs.gentoo.org/show_bug.cgi?id=217311 + +--- screen/config.h.in ++++ screen/config.h.in +@@ -563,7 +563,6 @@ + * If you are on a SYS V machine that restricts filename length to 14 + * characters, you may need to enforce that by setting NAME_MAX to 14 + */ +-#undef NAME_MAX /* KEEP_UNDEF_HERE override system value */ + #undef NAME_MAX + + /* diff --git a/app-misc/screen/files/screen-4.0.3-cppflags.patch b/app-misc/screen/files/screen-4.0.3-cppflags.patch new file mode 100644 index 000000000000..ee3455ff92f6 --- /dev/null +++ b/app-misc/screen/files/screen-4.0.3-cppflags.patch @@ -0,0 +1,20 @@ +--- screen-4.0.3/Makefile.in ++++ screen-4.0.3/Makefile.in +@@ -68,7 +68,7 @@ + $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS) + + .c.o: +- $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $< ++ $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CPPFLAGS) $(CFLAGS) $< + + install_bin: .version screen + -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \ +@@ -122,7 +122,7 @@ + sh $(srcdir)/tty.sh tty.c + + comm.h: comm.c comm.sh config.h +- AWK=$(AWK) CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/comm.sh ++ AWK=$(AWK) CC="$(CC) $(CFLAGS) $(CPPFLAGS)" srcdir=${srcdir} sh $(srcdir)/comm.sh + + osdef.h: osdef.sh config.h osdef.h.in + CPP="$(CPP) $(CPPFLAGS)" srcdir=${srcdir} sh $(srcdir)/osdef.sh diff --git a/app-misc/screen/files/screen-4.0.3-crosscompile.patch b/app-misc/screen/files/screen-4.0.3-crosscompile.patch new file mode 100644 index 000000000000..6e6bb948b919 --- /dev/null +++ b/app-misc/screen/files/screen-4.0.3-crosscompile.patch @@ -0,0 +1,598 @@ +--- configure.in~ 2008-11-23 17:43:48.000000000 +0000 ++++ configure.in 2008-11-23 17:43:48.000000000 +0000 +@@ -46,6 +46,7 @@ + AC_PROG_GCC_TRADITIONAL + AC_ISC_POSIX + ++AC_MSG_CHECKING([for compiler sanity]) + AC_TRY_RUN(main(){exit(0);},,[ + if test $CC != cc ; then + AC_NOTE(Your $CC failed - restarting with CC=cc) +@@ -54,22 +55,17 @@ + export CC + exec $0 $configure_args + fi +-]) +- +-AC_TRY_RUN(main(){exit(0);},, +-exec 5>&2 +-eval $ac_link +-AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;) +-AC_NOTE($ac_compile) +-AC_MSG_ERROR(Can't run the compiler - sorry)) ++],AC_MSG_WARN([skipping test due to crosscompilation])) + ++AC_MSG_CHECKING([if compiler sets exit status]) + AC_TRY_RUN([ + main() + { + int __something_strange_(); + __something_strange_(0); + } +-],AC_MSG_ERROR(Your compiler does not set the exit status - sorry)) ++],AC_MSG_ERROR(Your compiler does not set the exit status - sorry),, ++AC_MSG_WARN(skipping test due to crosscompilation)) + + AC_PROG_AWK + +@@ -103,6 +99,7 @@ + dnl + dnl **** special unix variants **** + dnl ++AH_TEMPLATE(ISC,[]) + if test -n "$ISC"; then + AC_DEFINE(ISC) LIBS="$LIBS -linet" + fi +@@ -114,11 +111,13 @@ + dnl fi + dnl fi + ++AH_TEMPLATE([sysV68],[]) + if test -f /sysV68 ; then + AC_DEFINE(sysV68) + fi + + AC_CHECKING(for MIPS) ++AH_TEMPLATE([MIPS],[]) + if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then + oldlibs="$LIBS" + test -f /bin/mx || LIBS="$LIBS -lmld" # for nlist. But not on alpha. +@@ -132,6 +131,8 @@ + AC_CHECKING(wait3) + AC_TRY_LINK(,[wait3();], , + AC_CHECKING(wait2) ++AH_TEMPLATE([USE_WAIT2],[On RISCOS we prefer wait2() over wait3(). rouilj@sni-usa.com]) ++dnl TODO(Hannes) shipped config.h.in wraps the define in #ifdef BSDWAIT + AC_TRY_LINK(,[wait2();], + dnl John Rouillard (rouilj@sni-usa.com): + dnl need -I/usr/include/bsd in RISCOS otherwise sockets are broken, no +@@ -154,9 +155,11 @@ + oldlibs="$LIBS" + LIBS="$LIBS -lpyr" + AC_CHECKING(Pyramid OSX) ++AH_TEMPLATE([OSX], [Pyramid OSX]) + AC_TRY_LINK(,[open_controlling_pty("")], AC_DEFINE(OSX), LIBS="$oldlibs") + fi + ++AH_TEMPLATE([POSIX],[Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX).]) + dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi): + dnl BBN butterfly is not POSIX, but a MACH BSD system. + dnl Do not define POSIX and TERMIO. +@@ -183,6 +186,7 @@ + fi + + AC_CHECKING(for System V) ++AH_TEMPLATE([SYSV], [Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX)]) + AC_TRY_COMPILE( + [#include <sys/types.h> + #include <signal.h> +@@ -226,6 +230,9 @@ + dnl + + AC_CHECKING(BSD job jontrol) ++AH_TEMPLATE([BSDJOBS], ++[Define BSDJOBS if you have BSD-style job control (both process ++ groups and a tty that deals correctly with them)]) + AC_TRY_LINK( + [#include <sys/types.h> + #include <sys/ioctl.h> +@@ -246,6 +253,10 @@ + dnl **** setreuid(), seteuid() **** + dnl + AC_CHECKING(setreuid) ++AH_TEMPLATE([HAVE_SETREUID], ++[If your system has the calls setreuid() and setregid(), ++ define HAVE_SETREUID. Otherwise screen will use a forked process to ++ safely create output files without retaining any special privileges.]) + AC_TRY_LINK(,[ + #ifdef __hpux + setresuid(0, 0, 0); +@@ -260,6 +271,9 @@ + dnl Solaris seteuid doesn't change the saved uid, bad for + dnl multiuser screen sessions + AC_CHECKING(seteuid) ++AH_TEMPLATE([HAVE_SETEUID], ++[If your system supports BSD4.4's seteuid() and setegid(), define ++ HAVE_SETEUID.]) + AC_TRY_LINK(,[ + #if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news) + seteuid_is_broken(0); +@@ -284,6 +298,8 @@ + dnl + + AC_CHECKING(fifos) ++AC_CACHE_CHECK([usable fifos], ++ [screen_cv_sys_fifo_usable], + AC_TRY_RUN([ + #include <sys/types.h> + #include <sys/stat.h> +@@ -348,12 +364,15 @@ + exit(1); + exit(0); + } +-], AC_NOTE(- your fifos are usable) fifo=1, +-AC_NOTE(- your fifos are not usable)) ++], screen_cv_sys_fifo_usable=yes, screen_cv_sys_fifo_usable=no)) + rm -f /tmp/conftest* + +-if test -n "$fifo"; then +-AC_CHECKING(for broken fifo implementation) ++if test X"$screen_cv_sys_fifo_usable" = Xyes; then ++AH_TEMPLATE([BROKEN_PIPE], ++[Define this if your system exits select() immediatly if a pipe is ++ opened read-only and no writer has opened it.]) ++AC_CACHE_CHECK([broken fifo implementation], ++ [screen_cv_sys_fifo_broken_impl], + AC_TRY_RUN([ + #include <sys/types.h> + #include <fcntl.h> +@@ -398,9 +416,12 @@ + exit(1); + exit(0); + } +-], AC_NOTE(- your implementation is ok), +-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1) ++], screen_cv_sys_fifo_broken_impl=no, ++screen_cv_sys_fifo_broken_impl=yes)) ++if test X"$screen_cv_sys_fifo_broken_impl" = Xyes; then ++ AC_DEFINE(BROKEN_PIPE) ++fi + rm -f /tmp/conftest* + fi + + dnl +@@ -410,6 +430,8 @@ + dnl + + AC_CHECKING(sockets) ++AC_CACHE_CHECK([sockets are usable], ++ [screen_cv_sys_sockets_usable], + AC_TRY_RUN([ + #include <sys/types.h> + #include <sys/socket.h> +@@ -460,12 +482,16 @@ + exit(1); + exit(0); + } +-], AC_NOTE(- your sockets are usable) sock=1, +-AC_NOTE(- your sockets are not usable)) +-rm -f /tmp/conftest* ++], screen_cv_sys_sockets_usable=yes, ++screen_cv_sys_sockets_usable=no)) + +-if test -n "$sock"; then ++if test X"$screen_cv_sys_sockets_usable" = Xyes; then + AC_CHECKING(socket implementation) ++AH_TEMPLATE([SOCK_NOT_IN_FS], ++[Define this if the unix-domain socket implementation doesn't ++ create a socket in the filesystem.]) ++AC_CACHE_CHECK([if sockets are not stored in the filesystem], ++ [screen_cv_sys_sockets_nofs], + AC_TRY_RUN([ + #include <sys/types.h> + #include <sys/stat.h> +@@ -491,22 +517,25 @@ + close(s); + exit(0); + } +-],AC_NOTE(- you are normal), +-AC_NOTE(- unix domain sockets are not kept in the filesystem) +-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1) +-rm -f /tmp/conftest* ++], screen_cv_sys_sockets_nofs=no, ++screen_cv_sys_sockets_nofs=yes)) ++ ++if test X"$screen_cv_sys_sockets_nofs" = Xyes; then ++ AC_DEFINE(SOCK_NOT_IN_FS) ++fi + fi + + + dnl + dnl **** choose sockets or fifos **** + dnl +-if test -n "$fifo"; then +- if test -n "$sock"; then +- if test -n "$nore"; then ++AH_TEMPLATE([NAMEDPIPE], [Define this if your system supports named pipes.]) ++if test X"$screen_cv_sys_fifo_usable" = Xyes; then ++ if test X"$screen_cv_sys_sockets_usable" = Xyes; then ++ if test X"$screen_cv_sys_sockets_nofs" = Xyes; then + AC_NOTE(- hmmm... better take the fifos) + AC_DEFINE(NAMEDPIPE) +- elif test -n "$fifobr"; then ++ elif test X"$screen_cv_sys_fifo_broken_impl" = Xyes; then + AC_NOTE(- as your fifos are broken lets use the sockets.) + else + AC_NOTE(- both sockets and fifos usable. let's take fifos.) +@@ -516,7 +545,7 @@ + AC_NOTE(- using named pipes, of course) + AC_DEFINE(NAMEDPIPE) + fi +-elif test -n "$sock"; then ++elif test X"$screen_cv_sys_sockets_usable" = Xyes; then + AC_NOTE(- using unix-domain sockets, of course) + else + AC_MSG_ERROR(you have neither usable sockets nor usable pipes -> no screen) +@@ -526,7 +555,11 @@ + dnl **** check the select implementation **** + dnl + +-AC_CHECKING(select return value) ++AH_TEMPLATE([SELECT_BROKEN], ++[If the select return value doesn't treat a descriptor that is ++ usable for reading and writing as two hits, define SELECT_BROKEN.]) ++AC_CACHE_CHECK([for broken select return value], ++ [screen_cv_sys_select_broken_retval], + AC_TRY_RUN([ + #include <sys/types.h> + #include <sys/stat.h> +@@ -625,17 +658,26 @@ + exit(1); + exit(0); + } +-],AC_NOTE(- select is ok), +-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN)) ++], screen_cv_sys_select_broken_retval=no, ++screen_cv_sys_select_broken_retval=yes)) ++if test X"$screen_cv_sys_select_broken_retval" = Xyes; then ++ AC_DEFINE(SELECT_BROKEN) ++fi + + dnl + dnl **** termcap or terminfo **** + dnl ++AH_TEMPLATE([TERMINFO], ++[Define TERMINFO if your machine emulates the termcap routines ++ with the terminfo database. ++ Thus the .screenrc file is parsed for ++ the command 'terminfo' and not 'termcap']) ++ + AC_CHECKING(for tgetent) + AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, + olibs="$LIBS" +-LIBS="-lcurses $olibs" + AC_CHECKING(libcurses) ++AC_CHECK_LIB(ncursesw,tgetent) + AC_TRY_LINK(,[ + #ifdef __hpux + __sorry_hpux_libcurses_is_totally_broken_in_10_10(); +@@ -654,24 +696,39 @@ + AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, + AC_MSG_ERROR(!!! no tgetent - no screen)))))) + +-AC_TRY_RUN([ ++AC_CACHE_CHECK([using terminfo database],[screen_cv_sys_terminfo_used], ++ AC_TRY_RUN([ + main() + { + exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); +-}], AC_NOTE(- you use the termcap database), +-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO)) ++} ++ ], screen_cv_sys_terminfo_used=no, ++ screen_cv_sys_terminfo_used=yes) ++) ++ ++if test X"$screen_cv_sys_terminfo_used" = Xyes; then ++ AC_DEFINE(TERMINFO) ++fi ++ + AC_CHECKING(ospeed) ++AH_TEMPLATE([NEED_OSPEED],[If your library does not define ospeed, define this.]) + AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED)) + + dnl + dnl **** PTY specific things **** + dnl ++AH_TEMPLATE([HAVE_DEV_PTC], ++[define HAVE_DEV_PTC if you have a /dev/ptc character special ++ device.]) + AC_CHECKING(for /dev/ptc) + if test -r /dev/ptc; then + AC_DEFINE(HAVE_DEV_PTC) + fi + + AC_CHECKING(for SVR4 ptys) ++AH_TEMPLATE([HAVE_SVR4_PTYS], ++[define HAVE_SVR4_PTYS if you have a /dev/ptmx character special ++ device and support the ptsname(), grantpt(), unlockpt() functions.]) + sysvr4ptys= + if test -c /dev/ptmx ; then + AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS) +@@ -687,6 +744,13 @@ + fi + + AC_CHECKING(for ptyranges) ++AH_TEMPLATE([PTYRANGE0], ++[define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen ++ to unusual environments. E.g. For SunOs the defaults are "qpr" and ++ "0123456789abcdef". For SunOs 4.1.2 ++ #define PTYRANGE0 "pqrstuvwxyzPQRST" ++ is recommended by Dan Jacobson.]) ++AH_TEMPLATE([PTYRANGE1],[]) + if test -d /dev/ptym ; then + pdir='/dev/ptym' + else +@@ -850,20 +914,39 @@ + dnl + dnl **** loadav **** + dnl ++ ++AH_TEMPLATE([LOADAV], ++[If you want the "time" command to display the current load average ++ define LOADAV. Maybe you must install screen with the needed ++ privileges to read /dev/kmem. ++ Note that NLIST_ stuff is only checked, when getloadavg() is not available. ++]) ++AH_TEMPLATE([LOADAV_NUM]) ++AH_TEMPLATE([LOADAV_TYPE]) ++AH_TEMPLATE([LOADAV_SCALE]) ++AH_TEMPLATE([LOADAV_GETLOADAVG]) ++AH_TEMPLATE([LOADAV_UNIX]) ++AH_TEMPLATE([LOADAV_AVENRUN]) ++AH_TEMPLATE([LOADAV_USE_NLIST64]) ++ ++AH_TEMPLATE([NLIST_DECLARED]) ++AH_TEMPLATE([NLIST_STRUCT]) ++AH_TEMPLATE([NLIST_NAME_UNION]) ++ + AC_CHECKING(for libutil(s)) +-test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" +-test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" ++dnl I have no idea whether "login" is an appropriate symbol to check for here - Hannes ++AC_CHECK_LIB(utils,login) ++AC_CHECK_LIB(util,login) + + AC_CHECKING(getloadavg) + AC_TRY_LINK(,[getloadavg((double *)0, 0);], + AC_DEFINE(LOADAV_GETLOADAVG) load=1, +-if test -f /usr/lib/libkvm.a ; then + olibs="$LIBS" +-LIBS="$LIBS -lkvm" ++AC_CHECK_LIB(kvm,kvm_open, + AC_CHECKING(getloadavg with -lkvm) + AC_TRY_LINK(,[getloadavg((double *)0, 0);], + AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs") +-fi ++) + ) + + if test -z "$load" ; then +@@ -1005,6 +1088,11 @@ + dnl + dnl **** signal handling **** + dnl ++ ++AH_TEMPLATE([SIGVOID], ++[Define SIGVOID if your signal handlers return void. On older ++ systems, signal returns int, but on newer ones, it returns void.]) ++ + if test -n "$posix" ; then + + dnl POSIX has reliable signals with void return type. +@@ -1014,6 +1102,7 @@ + else + + AC_CHECKING(return type of signal handlers) ++AH_TEMPLATE([USESIGSET], [Define USESIGSET if you have sigset for BSD 4.1 reliable signals.]) + AC_TRY_COMPILE( + [#include <sys/types.h> + #include <signal.h> +@@ -1033,6 +1122,9 @@ + #endif + ], AC_DEFINE(USESIGSET)) + AC_CHECKING(signal implementation) ++AH_TEMPLATE([SYSVSIGS], ++[Define SYSVSIGS if signal handlers must be reinstalled after ++ they have been called.]) + AC_TRY_RUN([ + #include <sys/types.h> + #include <signal.h> +@@ -1075,13 +1167,14 @@ + dnl + + AC_CHECKING(for crypt and sec libraries) +-test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d" ++dnl I have no idea whether "crypt" is an appropriate symbol to check for here - Hannes ++AC_CHECK_LIB(crypt_d,crypt) + oldlibs="$LIBS" +-LIBS="$LIBS -lcrypt" + AC_CHECKING(crypt) + AC_TRY_LINK(,,,LIBS="$oldlibs") +-test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" +-test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" ++AC_CHECK_LIB(crypt,crypt) ++AC_CHECK_LIB(sec,crypt) ++AC_CHECK_LIB(shadow,getspnam) + oldlibs="$LIBS" + LIBS="$LIBS -lsun" + AC_CHECKING(IRIX sun library) +@@ -1104,6 +1197,13 @@ + dnl **** misc things **** + dnl + AC_CHECKING(wait union) ++AH_TEMPLATE([BSDWAIT], ++[Define BSDWAIT if your system defines a 'union wait' in <sys/wait.h> ++ ++ Only allow BSDWAIT i.e. wait3 on nonposix systems, since ++ posix implies wait(3) and waitpid(3). vdlinden@fwi.uva.nl ++ TODO(Hannes) shipped config.h.in does that with a #ifdef ++]) + AC_TRY_COMPILE([#include <sys/types.h> + #include <sys/wait.h> + ],[ +@@ -1114,6 +1214,13 @@ + #endif + ],AC_DEFINE(BSDWAIT)) + ++AH_TEMPLATE([TERMIO], ++[Define TERMIO if you have struct termio instead of struct sgttyb. ++ This is usually the case for SVID systems, where BSD uses sgttyb. ++ POSIX systems should define this anyway, even though they use ++ struct termios.]) ++ ++ + if test -z "$butterfly"; then + AC_CHECKING(for termio or termios) + AC_TRY_CPP([#include <termio.h>], AC_DEFINE(TERMIO), +@@ -1123,17 +1230,35 @@ + ) + fi + ++AH_TEMPLATE([CYTERMIO], [Define CYTERMIO if you have cyrillic termio modes.]) ++ + dnl AC_CHECK_HEADER(shadow.h, AC_DEFINE(SHADOWPW)) + AC_CHECKING(getspnam) ++AH_TEMPLATE([SHADOWPW], ++[If the passwords are stored in a shadow file and you want the ++ builtin lock to work properly, define SHADOWPW.]) + AC_TRY_LINK([#include <shadow.h>], [getspnam("x");],AC_DEFINE(SHADOWPW)) + + AC_CHECKING(getttyent) ++AH_TEMPLATE([GETTTYENT], ++[If your system has the new format /etc/ttys (like 4.3 BSD) and the ++ getttyent(3) library functions, define GETTTYENT.]) + AC_TRY_LINK(,[getttyent();], AC_DEFINE(GETTTYENT)) + + AC_CHECKING(fdwalk) ++AH_TEMPLATE([HAVE_FDWALK], ++[Newer versions of Solaris include fdwalk, which can greatly improve ++ the startup time of screen; otherwise screen spends a lot of time ++ closing file descriptors.]) + AC_TRY_LINK([#include <stdlib.h>], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK)) + +-AC_CHECKING(whether memcpy/memmove/bcopy handles overlapping arguments) ++AH_TEMPLATE([USEBCOPY], ++[Define USEBCOPY if the bcopy/memcpy from your system's C library ++ supports the overlapping of source and destination blocks. When ++ undefined, screen uses its own (probably slower) version of bcopy().]) ++ ++AC_CACHE_CHECK([if bcopy handles overlap], ++ [screen_cv_sys_bcopy_overlap], + AC_TRY_RUN([ + main() { + char buf[10]; +@@ -1146,7 +1271,21 @@ + if (strncmp(buf, "cdedef", 6)) + exit(1); + exit(0); /* libc version works properly. */ +-}], AC_DEFINE(USEBCOPY)) ++}], screen_cv_sys_bcopy_overlap=yes, ++screen_cv_sys_bcopy_overlap=no)) ++if test X"$screen_cv_sys_bcopy_overlap" = Xyes; then ++ AC_DEFINE(USEBCOPY) ++fi ++ ++AH_TEMPLATE([USEMEMMOVE], ++[SYSV machines may have a working memcpy() -- Oh, this is ++ quite unlikely. Tell me if you see one. ++ "But then, memmove() should work, if at all available" he thought... ++ Boing, never say "works everywhere" unless you checked SCO UNIX. ++ Their memove fails the test in the configure script. Sigh. (Juergen) ++]) ++AC_CACHE_CHECK([if memmove handles overlap], ++ [screen_cv_sys_memmove_overlap], + + AC_TRY_RUN([ + #define bcopy(s,d,l) memmove(d,s,l) +@@ -1161,9 +1300,15 @@ + if (strncmp(buf, "cdedef", 6)) + exit(1); + exit(0); /* libc version works properly. */ +-}], AC_DEFINE(USEMEMMOVE)) +- ++}], screen_cv_sys_memmove_overlap=yes, ++screen_cv_sys_memmove_overlap=no)) ++if test X"$screen_cv_sys_memmove_overlap" = Xyes; then ++ AC_DEFINE(USEMEMMOVE) ++fi + ++AH_TEMPLATE([USEMEMCPY],[]) ++AC_CACHE_CHECK([if memcpy handles overlap], ++ [screen_cv_sys_memcpy_overlap], + AC_TRY_RUN([ + #define bcopy(s,d,l) memcpy(d,s,l) + main() { +@@ -1177,9 +1322,19 @@ + if (strncmp(buf, "cdedef", 6)) + exit(1); + exit(0); /* libc version works properly. */ +-}], AC_DEFINE(USEMEMCPY)) ++}], screen_cv_sys_memcpy_overlap=yes, ++screen_cv_sys_memcpy_overlap=no)) ++if test X"$screen_cv_sys_memcpy_overlap" = Xyes; then ++ AC_DEFINE(USEMEMCPY) ++fi + + AC_MSG_CHECKING(long file names) ++AH_TEMPLATE([NAME_MAX], ++[If you are on a SYS V machine that restricts filename length to 14 ++ characters, you may need to enforce that by setting NAME_MAX to 14]) ++dnl TODO(Hannes) shipped config.h.in has ++dnl #undef NAME_MAX /* KEEP_UNDEF_HERE override system value */ ++dnl ahead of this + (echo 1 > /tmp/conftest9012345) 2>/dev/null + (echo 2 > /tmp/conftest9012346) 2>/dev/null + val=`cat /tmp/conftest9012345 2>/dev/null` +@@ -1192,6 +1347,10 @@ + rm -f /tmp/conftest* + + AC_MSG_CHECKING(for vsprintf) ++AH_TEMPLATE([USEVARARGS], ++[If your system has vsprintf() and requires the use of the macros in ++ "varargs.h" to use functions with variable arguments, ++ define USEVARARGS.]) + AC_TRY_LINK([#include <stdarg.h>],[va_list valist; vsprintf(0,0,valist);], + [AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS)], + [AC_MSG_RESULT(no)]) +@@ -1199,12 +1358,19 @@ + AC_HEADER_DIRENT + + AC_MSG_CHECKING(for setenv) ++AH_TEMPLATE([USESETENV], [If your system has setenv() and unsetenv() define USESETENV]) + AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes);AC_DEFINE(USESETENV), + AC_MSG_RESULT(no) + AC_MSG_CHECKING(for putenv) ++AH_TEMPLATE([NEEDPUTENV], ++[If your system does not come with a setenv()/putenv()/getenv() ++ functions, you may bring in our own code by defining NEEDPUTENV.]) + AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) , AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV) + )) + AC_MSG_CHECKING([for nl_langinfo(CODESET)]) ++AH_TEMPLATE([HAVE_NL_LANGINFO], ++[define HAVE_NL_LANGINFO if your system has the nl_langinfo() call ++ and <langinfo.h> defines CODESET.]) + AC_TRY_LINK([ + #include <langinfo.h> + ],[nl_langinfo(CODESET);], AC_MSG_RESULT(yes);AC_DEFINE(HAVE_NL_LANGINFO), AC_MSG_RESULT(no)) +@@ -1254,7 +1420,8 @@ + dnl Ptx bug workaround -- insert -lc after -ltermcap + test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq" + +-AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.)) ++AC_MSG_CHECKING(compiler sanity) ++AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.), AC_MSG_WARN(Skipping test due to crosscompilation)) + + ETCSCREENRC="\"/usr/local/etc/screenrc\"" + if test -n "$prefix"; then diff --git a/app-misc/screen/files/screen-4.0.3-setenv_autoconf.patch b/app-misc/screen/files/screen-4.0.3-setenv_autoconf.patch new file mode 100644 index 000000000000..e47a15d66c23 --- /dev/null +++ b/app-misc/screen/files/screen-4.0.3-setenv_autoconf.patch @@ -0,0 +1,79 @@ +--- configure.in.DIST 2006-10-31 21:39:07.010473000 -0800 ++++ configure.in 2006-10-31 21:43:05.630162000 -0800 +@@ -1211,15 +1211,32 @@ + AC_HEADER_DIRENT + + AC_MSG_CHECKING(for setenv) +-AH_TEMPLATE([USESETENV], [If your system has setenv() and unsetenv() define USESETENV]) +-AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes);AC_DEFINE(USESETENV), +-AC_MSG_RESULT(no) +-AC_MSG_CHECKING(for putenv) +-AH_TEMPLATE([NEEDPUTENV], +-[If your system does not come with a setenv()/putenv()/getenv() +- functions, you may bring in our own code by defining NEEDPUTENV.]) +-AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) , AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV) +-)) ++if test -z "$ac_setenv_args"; then ++ AC_TRY_LINK( ++ [#include <stdlib.h>], ++ [ ++ setenv((char *) 0, (char *) 0, 0); ++ ], ac_setenv_args=3) ++fi ++if test -z "$ac_setenv_args"; then ++ AC_TRY_LINK( ++ [#include <stdlib.h>], ++ [ ++ setenv((char *) 0, (char *) 0); ++ ], ac_setenv_args=2) ++fi ++if test -n "$ac_setenv_args"; then ++ AC_DEFINE(USESETENV) ++ if test "$ac_setenv_args" = 3; then ++ AC_DEFINE(HAVE_SETENV_3) ++ elif test "$ac_setenv_args" = 2; then ++ AC_DEFINE(HAVE_SETENV_2) ++ fi ++else ++ AC_MSG_RESULT(no) ++ AC_MSG_CHECKING(for putenv) ++ AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) , AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV)) ++fi + AC_MSG_CHECKING([for nl_langinfo(CODESET)]) + AH_TEMPLATE([HAVE_NL_LANGINFO], + [define HAVE_NL_LANGINFO if your system has the nl_langinfo() call +--- config.h.in.DIST 2006-10-31 21:43:23.233714000 -0800 ++++ config.h.in 2006-10-31 21:44:27.346275000 -0800 +@@ -548,6 +548,16 @@ + #undef USESETENV + + /* ++ * If setenv() takes 3 arguments define HAVE_SETENV_3 ++ */ ++#undef HAVE_SETENV_3 ++ ++/* ++ * If setenv() takes 2 arguments define HAVE_SETENV_2 ++ */ ++#undef HAVE_SETENV_2 ++ ++/* + * If your system does not come with a setenv()/putenv()/getenv() + * functions, you may bring in our own code by defining NEEDPUTENV. + */ +--- misc.c.DIST 2006-10-31 20:55:42.481760000 -0800 ++++ misc.c 2006-10-31 21:53:24.143551000 -0800 +@@ -613,11 +613,11 @@ + */ + # endif /* NEEDSETENV */ + #else /* USESETENV */ +-# if defined(linux) || defined(__convex__) || (BSD >= 199103) ++# if HAVE_SETENV_3 + setenv(var, value, 1); + # else + setenv(var, value); +-# endif /* linux || convex || BSD >= 199103 */ ++# endif /* HAVE_SETENV_3 */ + #endif /* USESETENV */ + } + diff --git a/app-misc/screen/files/screen-4.3.0-no-utempter.patch b/app-misc/screen/files/screen-4.3.0-no-utempter.patch new file mode 100644 index 000000000000..9a830a252b41 --- /dev/null +++ b/app-misc/screen/files/screen-4.3.0-no-utempter.patch @@ -0,0 +1,14 @@ +--- screen-4.3.0/configure.ac ++++ screen-4.3.0/configure.ac +@@ -878,11 +878,6 @@ + #include <utmp.h> + #endif + ],[struct utmp u; u.ut_host[0] = 0;], AC_DEFINE(UTHOST)) +-AC_CHECK_HEADER(utempter.h, have_utempter=yes, have_utempter=no) +-if test "$have_utempter" = yes; then +- AC_DEFINE(HAVE_UTEMPTER) +- LIBS="$LIBS -lutempter" +-fi + + dnl + dnl **** loadav **** diff --git a/app-misc/screen/files/screenrc b/app-misc/screen/files/screenrc new file mode 100644 index 000000000000..11f2f551b0bc --- /dev/null +++ b/app-misc/screen/files/screenrc @@ -0,0 +1,356 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# +# /etc/screenrc +# +# This is the system wide screenrc. +# +# You can use this file to change the default behavior of screen system wide +# or copy it to ~/.screenrc and use it as a starting point for your own +# settings. +# +# Commands in this file are used to set options, bind screen functions to +# keys, redefine terminal capabilities, and to automatically establish one or +# more windows at the beginning of your screen session. +# +# This is not a comprehensive list of options, look at the screen manual for +# details on everything that you can put in this file. +# +# + +# ============================================================================== +# SCREEN SETTINGS +# ============================================================================== + +# ESCAPE - the COMMAND CHARACTER +# =============================================================== +# escape ^aa # default +# escape ^^^^ # suggested binding (Control-^) for Emacs users + + +# PASSWORD +# =============================================================== +# This commands sets the *internal* password for the screen session. +# WARNING!! If this is set then a "lock" command will only let you in to the +# session after you enter the user's account password and then *also* +# the internal password for that session. This gives additional safety but, +# if you forget the internal password then you cannot resume your session. +# Use :password to generate a password +# password ODSJQf.4IJN7E # "1234" + + +# VARIABLES +# =============================================================== +# No annoying audible bell, using "visual bell" +# vbell on # default: off +# vbell_msg " -- Bell,Bell!! -- " # default: "Wuff,Wuff!!" + +# Automatically detach on hangup. + autodetach on # default: on + +# Don't display the copyright page + startup_message off # default: on + +# Uses nethack-style messages +# nethack on # default: off + +# Affects the copying of text regions + crlf off # default: off + +# Enable/disable multiuser mode. Standard screen operation is singleuser. +# In multiuser mode the commands acladd, aclchg, aclgrp and acldel can be used +# to enable (and disable) other user accessing this screen session. +# Requires suid-root. + multiuser off + +# Change default scrollback value for new windows + defscrollback 1000 # default: 100 + +# Define the time that all windows monitored for silence should +# wait before displaying a message. Default 30 seconds. + silencewait 15 # default: 30 + +# bufferfile: The file to use for commands +# "readbuf" ('<') and "writebuf" ('>'): + bufferfile $HOME/.screen_exchange +# +# hardcopydir: The directory which contains all hardcopies. +# hardcopydir ~/.hardcopy +# hardcopydir ~/.screen +# +# shell: Default process started in screen's windows. +# Makes it possible to use a different shell inside screen +# than is set as the default login shell. +# If begins with a '-' character, the shell will be started as a login shell. +# shell zsh +# shell bash +# shell ksh + shell -$SHELL + +# shellaka '> |tcsh' +# shelltitle '$ |bash' + +# emulate .logout message + pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." + +# caption always " %w --- %c:%s" +# caption always "%3n %t%? @%u%?%? [%h]%?%=%c" + +# advertise hardstatus support to $TERMCAP +# termcapinfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\' + +# set every new windows hardstatus line to somenthing descriptive +# defhstatus "screen: ^En (^Et)" + +# don't kill window after the process died +# zombie "^[" + +# ignore displays that block on output +defnonblock on + +# XTERM TWEAKS +# =============================================================== + +# xterm understands both im/ic and doesn't have a status line. +# Note: Do not specify im and ic in the real termcap/info file as +# some programs (e.g. vi) will not work anymore. + termcap xterm* hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l + terminfo xterm* hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l + +# 80/132 column switching must be enabled for ^AW to work +# change init sequence to not switch width + termcapinfo xterm* Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l + +# Make the output buffer large for (fast) xterms. +# termcapinfo xterm* OL=10000 + termcapinfo xterm* OL=100 + +# tell screen that xterm can switch to dark background and has function +# keys. + termcapinfo xterm* 'VR=\E[?5h:VN=\E[?5l' + termcapinfo xterm* 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' + termcapinfo xterm* 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~' + +# special xterm hardstatus: use the window title. + termcapinfo xterm* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' + +#terminfo xterm 'vb=\E[?5h$<200/>\E[?5l' + termcapinfo xterm* 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' + +# emulate part of the 'K' charset + termcapinfo xterm* 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337' + +# xterm-52 tweaks: +# - uses background color for delete operations + termcapinfo xterm* be + +# Do not use xterm's alternative window buffer, it breaks scrollback (see bug #61195) + termcapinfo xterm*|xs ti@:te=\E[2J + +# WYSE TERMINALS +# =============================================================== + +#wyse-75-42 must have flow control (xo = "terminal uses xon/xoff") +#essential to have it here, as this is a slow terminal. + termcapinfo wy75-42 xo:hs@ + +# New termcap sequences for cursor application mode. + termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J + + +# OTHER TERMINALS +# =============================================================== + +# make hp700 termcap/info better + termcapinfo hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@' + +# Extend the vt100 desciption by some sequences. + termcap vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC + terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC + termcapinfo linux C8 +# old rxvt versions also need this +# termcapinfo rxvt C8 + + +# KEYBINDINGS +# ============================================================== +# The "bind" command assign keys to (internal) commands +# SCREEN checks all the keys you type; you type the key +# which is known as the "command character" then SCREEN +# eats this key, too, and checks whether this key is +# "bound" to a command. If so then SCREEN will execute it. +# +# The command "bind" allows you to chose which keys +# will be assigned to the commands. +# +# Some commands are bound to several keys - +# usually to both some letter and its corresponding +# control key combination, eg the command +# "(create) screen" is bound to both 'c' and '^C'. +# +# The following list shows the default bindings: +# +# break ^B b +# clear C +# colon : +# copy ^[ [ +# detach ^D d +# digraph ^V +# displays * +# dumptermcap . +# fit F +# flow ^F f +# focus ^I +# hardcopy h +# help ? +# history { } +# info i +# kill K k +# lastmsg ^M m +# license , +# log H +# login L +# meta x +# monitor M +# next ^@ ^N sp n +# number N +# only Q +# other ^X +# pow_break B +# pow_detach D +# prev ^H ^P p ^? +# quit \ +# readbuf < +# redisplay ^L l +# remove X +# removebuf = +# reset Z +# screen ^C c +# select " ' +# silence _ +# split S +# suspend ^Z z +# time ^T t +# title A +# vbell ^G +# version v +# width W +# windows ^W w +# wrap ^R r +# writebuf > +# xoff ^S s +# xon ^Q q +# ^] paste . +# - select - +# 0 select 0 +# 1 select 1 +# 2 select 2 +# 3 select 3 +# 4 select 4 +# 5 select 5 +# 6 select 6 +# 7 select 7 +# 8 select 8 +# 9 select 9 +# I login on +# O login off +# ] paste . +# + +# And here are the default bind commands if you need them: +# +# bind A title +# bind C clear +# bind D pow_detach +# bind F fit +# bind H log +# bind I login on +# bind K kill +# bind L login +# bind M monitor +# bind N number +# bind O login off +# bind Q only +# bind S split +# bind W width +# bind X remove +# bind Z reset + +# Let's remove some dangerous key bindings ... + bind k + bind ^k +# bind . dumptermcap # default + bind . +# bind ^\ quit # default + bind ^\ +# bind \\ quit # default + bind \\ +# bind ^h ??? # default + bind ^h +# bind h hardcopy # default + bind h + +# ... and make them better. + bind 'K' kill + bind 'I' login on + bind 'O' login off + bind '}' history + +# Yet another hack: +# Prepend/append register [/] to the paste if ^a^] is pressed. +# This lets me have autoindent mode in vi. + register [ "\033:se noai\015a" + register ] "\033:se ai\015a" + bind ^] paste [.] + + +# hardstatus alwaysignore +# hardstatus alwayslastline "%Lw" + +# Resize the current region. The space will be removed from or added to +# the region below or if there's not enough space from the region above. + bind = resize = + bind + resize +3 + bind - resize -3 +# bind _ resize max +# +# attrcolor u "-u b" +# attrcolor b "R" + +# STARTUP SCREENS +# =============================================================== +# Defines the time screen delays a new message when one message +# is currently displayed. The default is 1 second. +# msgminwait 2 + +# Time a message is displayed if screen is not disturbed by +# other activity. The dafault is 5 seconds: +# msgwait 2 + +# Briefly show the version number of this starting +# screen session - but only for *one* second: +# msgwait 1 +# version + +# Welcome the user: +# echo "welcome :-)" +# echo "I love you today." + +# Uncomment one/some following lines to automatically let +# SCREEN start some programs in the given window numbers: +# screen -t MAIL 0 mutt +# screen -t EDIT 1 vim +# screen -t GOOGLE 2 links http://www.google.com +# screen -t NEWS 3 slrn +# screen -t WWW 4 links http://www.math.fu-berlin.de/~guckes/ +# screen 5 +# screen 6 + +# Set the environment variable var to value string. If only var is specified, +# you'll be prompted to enter a value. If no parameters are specified, +# you'll be prompted for both variable and value. The environment is +# inherited by all subsequently forked shells. +# setenv PROMPT_COMMAND 'echo -n -e "\033k\033\134"' + +# Don't you want to start programs which need a DISPLAY ? +# setenv DISPLAY '' diff --git a/app-misc/screen/metadata.xml b/app-misc/screen/metadata.xml new file mode 100644 index 000000000000..87bfb0b9eb6b --- /dev/null +++ b/app-misc/screen/metadata.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>shell-tools</herd> + <maintainer> + <email>swegener@gentoo.org</email> + <description>Primary Maintainer</description> + </maintainer> + <longdescription> +Screen is a full-screen window manager that multiplexes a physical terminal +between several processes, typically interactive shells. Each virtual terminal +provides the functions of the DEC VT100 terminal and, in addition, several +control functions from the ANSI X3.64 (ISO 6429) and ISO 2022 standards (e.g., +insert/delete line and support for multiple character sets). There is a +scrollback history buffer for each virtual terminal and a copy-and-paste +mechanism that allows the user to move text regions between windows. When screen +is called, it creates a single window with a shell in it (or the specified +command) and then gets out of your way so that you can use the program as you +normally would. Then, at any time, you can create new (full-screen) windows with +other programs in them (including more shells), kill the current window, view a +list of the active windows, turn output logging on and off, copy text between +windows, view the scrollback history, switch between windows, etc. All windows +run their programs completely independent of each other. Programs continue to +run when their window is currently not visible and even when the whole screen +session is detached from the users terminal. +</longdescription> + <use> + <flag name="multiuser">Enable multiuser support (by setting correct + permissions)</flag> + <flag name="nethack">Express error messages in nethack style</flag> + </use> +</pkgmetadata> diff --git a/app-misc/screen/screen-4.0.3-r6.ebuild b/app-misc/screen/screen-4.0.3-r6.ebuild new file mode 100644 index 000000000000..a3fde6f6968b --- /dev/null +++ b/app-misc/screen/screen-4.0.3-r6.ebuild @@ -0,0 +1,163 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +WANT_AUTOCONF="2.5" + +inherit eutils flag-o-matic toolchain-funcs pam autotools user + +DESCRIPTION="Full-screen window manager that multiplexes physical terminals between several processes" +HOMEPAGE="http://www.gnu.org/software/screen/" +SRC_URI="ftp://ftp.uni-erlangen.de/pub/utilities/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug nethack pam selinux multiuser" + +DEPEND=">=sys-libs/ncurses-5.2 + pam? ( virtual/pam )" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-screen )" + +pkg_setup() { + # Make sure utmp group exists, as it's used later on. + enewgroup utmp 406 +} + +src_prepare() { + # Bug 34599: integer overflow in 4.0.1 + # (Nov 29 2003 -solar) + epatch "${FILESDIR}"/screen-4.0.1-int-overflow-fix.patch + + # Bug 31070: configure problem which affects alpha + # (13 Jan 2004 agriffis) + epatch "${FILESDIR}"/screen-4.0.1-vsprintf.patch + + # uclibc doesnt have sys/stropts.h + if ! (echo '#include <sys/stropts.h>' | $(tc-getCC) -E - &>/dev/null) ; then + epatch "${FILESDIR}"/4.0.2-no-pty.patch + fi + + # Don't use utempter even if it is found on the system + epatch "${FILESDIR}"/4.0.2-no-utempter.patch + + # Don't link against libelf even if it is found on the system + epatch "${FILESDIR}"/4.0.2-no-libelf.patch + + # Patch for time function on 64bit systems + epatch "${FILESDIR}"/4.0.2-64bit-time.patch + + # Patch that makes %u work for windowlist -b formats + epatch "${FILESDIR}"/4.0.2-windowlist-multiuser-fix.patch + + # Open tty in non-blocking mode + epatch "${FILESDIR}"/4.0.2-nonblock.patch + + # compability for sys-devel/autoconf-2.62 + epatch "${FILESDIR}"/screen-4.0.3-config.h-autoconf-2.62.patch + + # crosscompile patch + epatch "${FILESDIR}"/"${P}"-crosscompile.patch + + # sched.h is a system header and causes problems with some C libraries + mv sched.h _sched.h || die + sed -i '/include/s:sched.h:_sched.h:' screen.h || die + + # Allow for more rendition (color/attribute) changes in status bars + sed -i \ + -e "s:#define MAX_WINMSG_REND 16:#define MAX_WINMSG_REND 64:" \ + screen.c \ + || die "sed screen.c failed" + + # Fix manpage. + sed -i \ + -e "s:/usr/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/usr/local/screens:${EPREFIX}/var/run/screen:g" \ + -e "s:/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/etc/utmp:${EPREFIX}/var/run/utmp:g" \ + -e "s:/local/screens/S-:${EPREFIX}/var/run/screen/S-:g" \ + doc/screen.1 \ + || die "sed doc/screen.1 failed" + + # proper setenv detection for Solaris + epatch "${FILESDIR}"/${P}-setenv_autoconf.patch + + # Allow TERM string large enough to use with rxvt-unicode-256color + # Allow usernames up to 32 chars + epatch "${FILESDIR}"/${PV}-extend-d_termname-ng2.patch + + # support CPPFLAGS + epatch "${FILESDIR}"/${P}-cppflags.patch + + sed \ + -e 's:termlib:tinfo:g' \ + -i configure.in || die + + # reconfigure + eautoconf +} + +src_configure() { + append-cppflags "-DMAXWIN=${MAX_SCREEN_WINDOWS:-100}" + + [[ ${CHOST} == *-solaris* ]] && append-libs -lsocket -lnsl + + use nethack || append-cppflags "-DNONETHACK" + use debug && append-cppflags "-DDEBUG" + + econf \ + --with-socket-dir="${EPREFIX}/var/run/screen" \ + --with-sys-screenrc="${EPREFIX}/etc/screenrc" \ + --with-pty-mode=0620 \ + --with-pty-group=5 \ + --enable-rxvt_osc \ + --enable-telnet \ + --enable-colors256 \ + $(use_enable pam) \ + $(use multiuser || echo --disable-socket-dir) + + # Second try to fix bug 12683, this time without changing term.h + # The last try seemed to break screen at run-time. + # (16 Jan 2003 agriffis) + LC_ALL=POSIX make term.h || die "Failed making term.h" +} + +src_install() { + dobin screen + + if use multiuser || use prefix + then + fperms 4755 /usr/bin/screen + else + fowners root:utmp /usr/bin/screen + fperms 2755 /usr/bin/screen + fi + + insinto /usr/share/screen + doins terminfo/{screencap,screeninfo.src} + insinto /usr/share/screen/utf8encodings + doins utf8encodings/?? + insinto /etc + doins "${FILESDIR}"/screenrc + + pamd_mimic_system screen auth + + dodoc \ + README ChangeLog INSTALL TODO NEWS* patchlevel.h \ + doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps} + + doman doc/screen.1 + doinfo doc/screen.info* +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] + then + elog "Some dangerous key bindings have been removed or changed to more safe values." + elog "We enable some xterm hacks in our default screenrc, which might break some" + elog "applications. Please check /etc/screenrc for information on these changes." + fi +} diff --git a/app-misc/screen/screen-4.0.3-r7.ebuild b/app-misc/screen/screen-4.0.3-r7.ebuild new file mode 100644 index 000000000000..050e5e3ab9ea --- /dev/null +++ b/app-misc/screen/screen-4.0.3-r7.ebuild @@ -0,0 +1,163 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +WANT_AUTOCONF="2.5" + +inherit eutils flag-o-matic toolchain-funcs pam autotools user + +DESCRIPTION="Full-screen window manager that multiplexes physical terminals between several processes" +HOMEPAGE="http://www.gnu.org/software/screen/" +SRC_URI="ftp://ftp.uni-erlangen.de/pub/utilities/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug nethack pam selinux multiuser" + +DEPEND=">=sys-libs/ncurses-5.2 + pam? ( virtual/pam )" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-screen )" + +pkg_setup() { + # Make sure utmp group exists, as it's used later on. + enewgroup utmp 406 +} + +src_prepare() { + # Bug 34599: integer overflow in 4.0.1 + # (Nov 29 2003 -solar) + epatch "${FILESDIR}"/screen-4.0.1-int-overflow-fix.patch + + # Bug 31070: configure problem which affects alpha + # (13 Jan 2004 agriffis) + epatch "${FILESDIR}"/screen-4.0.1-vsprintf.patch + + # uclibc doesnt have sys/stropts.h + if ! (echo '#include <sys/stropts.h>' | $(tc-getCC) -E - &>/dev/null) ; then + epatch "${FILESDIR}"/4.0.2-no-pty.patch + fi + + # Don't use utempter even if it is found on the system + epatch "${FILESDIR}"/4.0.2-no-utempter.patch + + # Don't link against libelf even if it is found on the system + epatch "${FILESDIR}"/4.0.2-no-libelf.patch + + # Patch for time function on 64bit systems + epatch "${FILESDIR}"/4.0.2-64bit-time.patch + + # Patch that makes %u work for windowlist -b formats + epatch "${FILESDIR}"/4.0.2-windowlist-multiuser-fix.patch + + # Open tty in non-blocking mode + epatch "${FILESDIR}"/4.0.2-nonblock.patch + + # compability for sys-devel/autoconf-2.62 + epatch "${FILESDIR}"/screen-4.0.3-config.h-autoconf-2.62.patch + + # crosscompile patch + epatch "${FILESDIR}"/"${P}"-crosscompile.patch + + # sched.h is a system header and causes problems with some C libraries + mv sched.h _sched.h || die + sed -i '/include/s:sched.h:_sched.h:' screen.h || die + + # Allow for more rendition (color/attribute) changes in status bars + sed -i \ + -e "s:#define MAX_WINMSG_REND 16:#define MAX_WINMSG_REND 64:" \ + screen.c \ + || die "sed screen.c failed" + + # Fix manpage. + sed -i \ + -e "s:/usr/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/usr/local/screens:${EPREFIX}/var/run/screen:g" \ + -e "s:/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/etc/utmp:${EPREFIX}/var/run/utmp:g" \ + -e "s:/local/screens/S-:${EPREFIX}/var/run/screen/S-:g" \ + doc/screen.1 \ + || die "sed doc/screen.1 failed" + + # proper setenv detection for Solaris + epatch "${FILESDIR}"/${P}-setenv_autoconf.patch + + # Allow TERM string large enough to use with rxvt-unicode-256color + # Allow usernames up to 32 chars + epatch "${FILESDIR}"/${PV}-extend-d_termname-ng2.patch + + # support CPPFLAGS + epatch "${FILESDIR}"/${P}-cppflags.patch + + sed \ + -e 's:termlib:tinfo:g' \ + -i configure.in || die + + # reconfigure + eautoconf +} + +src_configure() { + append-cppflags "-DMAXWIN=${MAX_SCREEN_WINDOWS:-100}" + + [[ ${CHOST} == *-solaris* ]] && append-libs -lsocket -lnsl + + use nethack || append-cppflags "-DNONETHACK" + use debug && append-cppflags "-DDEBUG" + + econf \ + --with-socket-dir="${EPREFIX}/var/run/screen" \ + --with-sys-screenrc="${EPREFIX}/etc/screenrc" \ + --with-pty-mode=0620 \ + --with-pty-group=5 \ + --enable-rxvt_osc \ + --enable-telnet \ + --enable-colors256 \ + $(use_enable pam) \ + $(use multiuser || echo --disable-socket-dir) + + # Second try to fix bug 12683, this time without changing term.h + # The last try seemed to break screen at run-time. + # (16 Jan 2003 agriffis) + LC_ALL=POSIX make term.h || die "Failed making term.h" +} + +src_install() { + dobin screen + + if use multiuser || use prefix + then + fperms 4755 /usr/bin/screen + else + fowners root:utmp /usr/bin/screen + fperms 2755 /usr/bin/screen + fi + + insinto /usr/share/screen + doins terminfo/{screencap,screeninfo.src} + insinto /usr/share/screen/utf8encodings + doins utf8encodings/?? + insinto /etc + doins "${FILESDIR}"/screenrc + + pamd_mimic_system screen auth + + dodoc \ + README ChangeLog INSTALL TODO NEWS* patchlevel.h \ + doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps} + + doman doc/screen.1 + doinfo doc/screen.info* +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] + then + elog "Some dangerous key bindings have been removed or changed to more safe values." + elog "We enable some xterm hacks in our default screenrc, which might break some" + elog "applications. Please check /etc/screenrc for information on these changes." + fi +} diff --git a/app-misc/screen/screen-4.0.3-r8.ebuild b/app-misc/screen/screen-4.0.3-r8.ebuild new file mode 100644 index 000000000000..528eb5ac4231 --- /dev/null +++ b/app-misc/screen/screen-4.0.3-r8.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +WANT_AUTOCONF="2.5" + +inherit eutils flag-o-matic toolchain-funcs pam autotools user + +DESCRIPTION="Full-screen window manager that multiplexes physical terminals between several processes" +HOMEPAGE="http://www.gnu.org/software/screen/" +SRC_URI="ftp://ftp.uni-erlangen.de/pub/utilities/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug nethack pam selinux multiuser" + +DEPEND=">=sys-libs/ncurses-5.2 + pam? ( virtual/pam )" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-screen ) + !<sys-apps/openrc-0.11.6" + +pkg_setup() { + # Make sure utmp group exists, as it's used later on. + enewgroup utmp 406 +} + +src_prepare() { + # Bug 34599: integer overflow in 4.0.1 + # (Nov 29 2003 -solar) + epatch "${FILESDIR}"/screen-4.0.1-int-overflow-fix.patch + + # Bug 31070: configure problem which affects alpha + # (13 Jan 2004 agriffis) + epatch "${FILESDIR}"/screen-4.0.1-vsprintf.patch + + # uclibc doesnt have sys/stropts.h + if ! (echo '#include <sys/stropts.h>' | $(tc-getCC) -E - &>/dev/null) ; then + epatch "${FILESDIR}"/4.0.2-no-pty.patch + fi + + # Don't use utempter even if it is found on the system + epatch "${FILESDIR}"/4.0.2-no-utempter.patch + + # Don't link against libelf even if it is found on the system + epatch "${FILESDIR}"/4.0.2-no-libelf.patch + + # Patch for time function on 64bit systems + epatch "${FILESDIR}"/4.0.2-64bit-time.patch + + # Patch that makes %u work for windowlist -b formats + epatch "${FILESDIR}"/4.0.2-windowlist-multiuser-fix.patch + + # Open tty in non-blocking mode + epatch "${FILESDIR}"/4.0.2-nonblock.patch + + # compability for sys-devel/autoconf-2.62 + epatch "${FILESDIR}"/screen-4.0.3-config.h-autoconf-2.62.patch + + # crosscompile patch + epatch "${FILESDIR}"/"${P}"-crosscompile.patch + + # sched.h is a system header and causes problems with some C libraries + mv sched.h _sched.h || die + sed -i '/include/s:sched.h:_sched.h:' screen.h || die + + # Allow for more rendition (color/attribute) changes in status bars + sed -i \ + -e "s:#define MAX_WINMSG_REND 16:#define MAX_WINMSG_REND 64:" \ + screen.c \ + || die "sed screen.c failed" + + # Fix manpage. + sed -i \ + -e "s:/usr/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/usr/local/screens:${EPREFIX}/run/screen:g" \ + -e "s:/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/etc/utmp:${EPREFIX}/var/run/utmp:g" \ + -e "s:/local/screens/S-:${EPREFIX}/run/screen/S-:g" \ + doc/screen.1 \ + || die "sed doc/screen.1 failed" + + # proper setenv detection for Solaris + epatch "${FILESDIR}"/${P}-setenv_autoconf.patch + + # Allow TERM string large enough to use with rxvt-unicode-256color + # Allow usernames up to 32 chars + epatch "${FILESDIR}"/${PV}-extend-d_termname-ng2.patch + + # support CPPFLAGS + epatch "${FILESDIR}"/${P}-cppflags.patch + + sed \ + -e 's:termlib:tinfo:g' \ + -i configure.in || die + + # reconfigure + eautoconf +} + +src_configure() { + append-cppflags "-DMAXWIN=${MAX_SCREEN_WINDOWS:-100}" + + [[ ${CHOST} == *-solaris* ]] && append-libs -lsocket -lnsl + + use nethack || append-cppflags "-DNONETHACK" + use debug && append-cppflags "-DDEBUG" + + econf \ + --with-socket-dir="${EPREFIX}/run/screen" \ + --with-sys-screenrc="${EPREFIX}/etc/screenrc" \ + --with-pty-mode=0620 \ + --with-pty-group=5 \ + --enable-rxvt_osc \ + --enable-telnet \ + --enable-colors256 \ + $(use_enable pam) + + # Second try to fix bug 12683, this time without changing term.h + # The last try seemed to break screen at run-time. + # (16 Jan 2003 agriffis) + LC_ALL=POSIX make term.h || die "Failed making term.h" +} + +src_install() { + local tmpfiles_perms tmpfiles_group + + dobin screen + + if use multiuser ; then + use prefix || fperms 4755 /usr/bin/screen + tmpfiles_perms="0755" + tmpfiles_group="root" + else + fowners root:utmp /usr/bin/screen + fperms 2755 /usr/bin/screen + tmpfiles_perms="0775" + tmpfiles_group="utmp" + fi + + dodir /etc/tmpfiles.d + echo "d /run/screen ${tmpfiles_perms} root ${tmpfiles_group}" >"${ED}"/etc/tmpfiles.d/screen.conf + + insinto /usr/share/screen + doins terminfo/{screencap,screeninfo.src} + insinto /usr/share/screen/utf8encodings + doins utf8encodings/?? + insinto /etc + doins "${FILESDIR}"/screenrc + + pamd_mimic_system screen auth + + dodoc \ + README ChangeLog INSTALL TODO NEWS* patchlevel.h \ + doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps} + + doman doc/screen.1 + doinfo doc/screen.info* +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] + then + elog "Some dangerous key bindings have been removed or changed to more safe values." + elog "We enable some xterm hacks in our default screenrc, which might break some" + elog "applications. Please check /etc/screenrc for information on these changes." + fi + + ewarn "This revision changes the screen socket location to /run/screen." +} diff --git a/app-misc/screen/screen-4.2.1-r2.ebuild b/app-misc/screen/screen-4.2.1-r2.ebuild new file mode 100644 index 000000000000..c5d04d19bb35 --- /dev/null +++ b/app-misc/screen/screen-4.2.1-r2.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic pam toolchain-funcs user + +DESCRIPTION="Full-screen window manager that multiplexes physical terminals between several processes" +HOMEPAGE="http://www.gnu.org/software/screen/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS=" ~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug nethack pam selinux multiuser" + +CDEPEND=">=sys-libs/ncurses-5.2 + pam? ( virtual/pam )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-screen )" +DEPEND="${CDEPEND} + sys-apps/texinfo" + +pkg_setup() { + # Make sure utmp group exists, as it's used later on. + enewgroup utmp 406 +} + +src_prepare() { + # Don't use utempter even if it is found on the system + epatch "${FILESDIR}"/4.0.2-no-utempter.patch + + # sched.h is a system header and causes problems with some C libraries + mv sched.h _sched.h || die + sed -i '/include/ s:sched.h:_sched.h:' screen.h || die + + # Fix manpage. + sed -i \ + -e "s:/usr/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/usr/local/screens:${EPREFIX}/tmp/screen:g" \ + -e "s:/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/etc/utmp:${EPREFIX}/var/run/utmp:g" \ + -e "s:/local/screens/S-:${EPREFIX}/tmp/screen/S-:g" \ + doc/screen.1 \ + || die + + # reconfigure + eautoreconf +} + +src_configure() { + append-cppflags "-DMAXWIN=${MAX_SCREEN_WINDOWS:-100}" + + if [[ ${CHOST} == *-solaris* ]] ; then + # https://lists.gnu.org/archive/html/screen-devel/2014-04/msg00095.html + append-cppflags -D_XOPEN_SOURCE \ + -D_XOPEN_SOURCE_EXTENDED=1 \ + -D__EXTENSIONS__ + append-libs -lsocket -lnsl + fi + + use nethack || append-cppflags "-DNONETHACK" + use debug && append-cppflags "-DDEBUG" + + econf \ + --with-socket-dir="${EPREFIX}/tmp/screen" \ + --with-sys-screenrc="${EPREFIX}/etc/screenrc" \ + --with-pty-mode=0620 \ + --with-pty-group=5 \ + --enable-rxvt_osc \ + --enable-telnet \ + --enable-colors256 \ + $(use_enable pam) +} + +src_compile() { + LC_ALL=POSIX emake comm.h term.h + emake osdef.h + + emake -C doc screen.info + default +} + +src_install() { + local tmpfiles_perms tmpfiles_group + + dobin screen + + if use multiuser || use prefix + then + fperms 4755 /usr/bin/screen + tmpfiles_perms="0755" + tmpfiles_group="root" + else + fowners root:utmp /usr/bin/screen + fperms 2755 /usr/bin/screen + tmpfiles_perms="0775" + tmpfiles_group="utmp" + fi + + dodir /etc/tmpfiles.d + echo "d /tmp/screen ${tmpfiles_perms} root ${tmpfiles_group}" \ + > "${ED}"/etc/tmpfiles.d/screen.conf + + insinto /usr/share/screen + doins terminfo/{screencap,screeninfo.src} + insinto /usr/share/screen/utf8encodings + doins utf8encodings/?? + insinto /etc + doins "${FILESDIR}"/screenrc + + pamd_mimic_system screen auth + + dodoc \ + README ChangeLog INSTALL TODO NEWS* patchlevel.h \ + doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps} + + doman doc/screen.1 + doinfo doc/screen.info +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] + then + elog "Some dangerous key bindings have been removed or changed to more safe values." + elog "We enable some xterm hacks in our default screenrc, which might break some" + elog "applications. Please check /etc/screenrc for information on these changes." + fi + + # Add /tmp/screen in case it doesn't exist yet. This should solve + # problems like bug #508634 where tmpfiles.d isn't in effect. + local rundir="${EROOT%/}/tmp/screen" + if [[ ! -d ${rundir} ]] ; then + if use multiuser || use prefix ; then + tmpfiles_group="root" + else + tmpfiles_group="utmp" + fi + mkdir -m 0775 "${rundir}" + chgrp ${tmpfiles_group} "${rundir}" + fi + + ewarn "This revision changes the screen socket location to ${rundir}" +} diff --git a/app-misc/screen/screen-4.3.1.ebuild b/app-misc/screen/screen-4.3.1.ebuild new file mode 100644 index 000000000000..b46e4b57e241 --- /dev/null +++ b/app-misc/screen/screen-4.3.1.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic pam toolchain-funcs user + +DESCRIPTION="Full-screen window manager that multiplexes physical terminals between several processes" +HOMEPAGE="http://www.gnu.org/software/screen/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS=" ~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug nethack pam selinux multiuser" + +CDEPEND=">=sys-libs/ncurses-5.2 + pam? ( virtual/pam )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-screen )" +DEPEND="${CDEPEND} + sys-apps/texinfo" + +pkg_setup() { + # Make sure utmp group exists, as it's used later on. + enewgroup utmp 406 +} + +src_prepare() { + # Don't use utempter even if it is found on the system + epatch "${FILESDIR}"/${PN}-4.3.0-no-utempter.patch + + # sched.h is a system header and causes problems with some C libraries + mv sched.h _sched.h || die + sed -i '/include/ s:sched.h:_sched.h:' screen.h || die + + # Fix manpage. + sed -i \ + -e "s:/usr/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/usr/local/screens:${EPREFIX}/tmp/screen:g" \ + -e "s:/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/etc/utmp:${EPREFIX}/var/run/utmp:g" \ + -e "s:/local/screens/S-:${EPREFIX}/tmp/screen/S-:g" \ + doc/screen.1 \ + || die + + # reconfigure + eautoreconf +} + +src_configure() { + append-cppflags "-DMAXWIN=${MAX_SCREEN_WINDOWS:-100}" + + if [[ ${CHOST} == *-solaris* ]] ; then + # https://lists.gnu.org/archive/html/screen-devel/2014-04/msg00095.html + append-cppflags -D_XOPEN_SOURCE \ + -D_XOPEN_SOURCE_EXTENDED=1 \ + -D__EXTENSIONS__ + append-libs -lsocket -lnsl + fi + + use nethack || append-cppflags "-DNONETHACK" + use debug && append-cppflags "-DDEBUG" + + econf \ + --with-socket-dir="${EPREFIX}/tmp/screen" \ + --with-sys-screenrc="${EPREFIX}/etc/screenrc" \ + --with-pty-mode=0620 \ + --with-pty-group=5 \ + --enable-rxvt_osc \ + --enable-telnet \ + --enable-colors256 \ + $(use_enable pam) +} + +src_compile() { + LC_ALL=POSIX emake comm.h term.h + emake osdef.h + + emake -C doc screen.info + default +} + +src_install() { + local tmpfiles_perms tmpfiles_group + + dobin screen + + if use multiuser || use prefix + then + fperms 4755 /usr/bin/screen + tmpfiles_perms="0755" + tmpfiles_group="root" + else + fowners root:utmp /usr/bin/screen + fperms 2755 /usr/bin/screen + tmpfiles_perms="0775" + tmpfiles_group="utmp" + fi + + dodir /etc/tmpfiles.d + echo "d /tmp/screen ${tmpfiles_perms} root ${tmpfiles_group}" \ + > "${ED}"/etc/tmpfiles.d/screen.conf + + insinto /usr/share/screen + doins terminfo/{screencap,screeninfo.src} + insinto /usr/share/screen/utf8encodings + doins utf8encodings/?? + insinto /etc + doins "${FILESDIR}"/screenrc + + pamd_mimic_system screen auth + + dodoc \ + README ChangeLog INSTALL TODO NEWS* patchlevel.h \ + doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps} + + doman doc/screen.1 + doinfo doc/screen.info +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] + then + elog "Some dangerous key bindings have been removed or changed to more safe values." + elog "We enable some xterm hacks in our default screenrc, which might break some" + elog "applications. Please check /etc/screenrc for information on these changes." + fi + + # Add /tmp/screen in case it doesn't exist yet. This should solve + # problems like bug #508634 where tmpfiles.d isn't in effect. + local rundir="${EROOT%/}/tmp/screen" + if [[ ! -d ${rundir} ]] ; then + if use multiuser || use prefix ; then + tmpfiles_group="root" + else + tmpfiles_group="utmp" + fi + mkdir -m 0775 "${rundir}" + chgrp ${tmpfiles_group} "${rundir}" + fi + + ewarn "This revision changes the screen socket location to ${rundir}" +} diff --git a/app-misc/screen/screen-9999.ebuild b/app-misc/screen/screen-9999.ebuild new file mode 100644 index 000000000000..2b211a10782d --- /dev/null +++ b/app-misc/screen/screen-9999.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +EGIT_REPO_URI="git://git.savannah.gnu.org/screen.git" +EGIT_BOOTSTRAP="cd src; ./autogen.sh" +EGIT_SOURCEDIR="${WORKDIR}/${P}" # needed for setting S later on + +WANT_AUTOCONF="2.5" + +inherit eutils flag-o-matic toolchain-funcs pam autotools user git-2 + +DESCRIPTION="Full-screen window manager that multiplexes physical terminals between several processes" +HOMEPAGE="http://www.gnu.org/software/screen/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="debug nethack pam selinux multiuser" + +CDEPEND=">=sys-libs/ncurses-5.2 + pam? ( virtual/pam )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-screen )" +DEPEND="${CDEPEND} + sys-apps/texinfo" + +S="${WORKDIR}"/${P}/src + +pkg_setup() { + # Make sure utmp group exists, as it's used later on. + enewgroup utmp 406 +} + +src_prepare() { + # Don't use utempter even if it is found on the system + epatch "${FILESDIR}"/4.0.2-no-utempter.patch + + # sched.h is a system header and causes problems with some C libraries + mv sched.h _sched.h || die + sed -i '/include/ s:sched.h:_sched.h:' screen.h || die + + # Fix manpage. + sed -i \ + -e "s:/usr/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/usr/local/screens:${EPREFIX}/tmp/screen:g" \ + -e "s:/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ + -e "s:/etc/utmp:${EPREFIX}/var/run/utmp:g" \ + -e "s:/local/screens/S-:${EPREFIX}/tmp/screen/S-:g" \ + doc/screen.1 \ + || die + + # reconfigure + eautoreconf +} + +src_configure() { + append-cppflags "-DMAXWIN=${MAX_SCREEN_WINDOWS:-100}" + + [[ ${CHOST} == *-solaris* ]] && append-libs -lsocket -lnsl + + use nethack || append-cppflags "-DNONETHACK" + use debug && append-cppflags "-DDEBUG" + + econf \ + --with-socket-dir="${EPREFIX}/tmp/screen" \ + --with-sys-screenrc="${EPREFIX}/etc/screenrc" \ + --with-pty-mode=0620 \ + --with-pty-group=5 \ + --enable-rxvt_osc \ + --enable-telnet \ + --enable-colors256 \ + $(use_enable pam) +} + +src_compile() { + LC_ALL=POSIX emake comm.h term.h + emake osdef.h + + emake -C doc screen.info + default +} + +src_install() { + local tmpfiles_perms tmpfiles_group + + dobin screen + + if use multiuser || use prefix + then + fperms 4755 /usr/bin/screen + tmpfiles_perms="0755" + tmpfiles_group="root" + else + fowners root:utmp /usr/bin/screen + fperms 2755 /usr/bin/screen + tmpfiles_perms="0775" + tmpfiles_group="utmp" + fi + + dodir /etc/tmpfiles.d + echo "d /tmp/screen ${tmpfiles_perms} root ${tmpfiles_group}" \ + >"${ED}"/etc/tmpfiles.d/screen.conf + + insinto /usr/share/screen + doins terminfo/{screencap,screeninfo.src} + insinto /usr/share/screen/utf8encodings + doins utf8encodings/?? + insinto /etc + doins "${FILESDIR}"/screenrc + + pamd_mimic_system screen auth + + dodoc \ + README ChangeLog INSTALL TODO NEWS* patchlevel.h \ + doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps} + + doman doc/screen.1 + doinfo doc/screen.info +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] + then + elog "Some dangerous key bindings have been removed or changed to more safe values." + elog "We enable some xterm hacks in our default screenrc, which might break some" + elog "applications. Please check /etc/screenrc for information on these changes." + fi + + # Add /tmp/screen in case it doesn't exist yet. This should solve + # problems like bug #508634 where tmpfiles.d isn't in effect. + local rundir="${EROOT%/}/tmp/screen" + if [[ ! -d ${rundir} ]] ; then + if use multiuser || use prefix ; then + tmpfiles_group="root" + else + tmpfiles_group="utmp" + fi + mkdir -m 0775 "${rundir}" + chgrp ${tmpfiles_group} "${rundir}" + fi + + ewarn "This revision changes the screen socket location to /run/screen." +} |