diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile index fb3a16072faa..d79a5f3608e8 100644 --- a/sysutils/screen/Makefile +++ b/sysutils/screen/Makefile @@ -7,7 +7,7 @@ PORTNAME= screen PORTVERSION= 4.0.3 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= sysutils MASTER_SITES= ftp://ftp.uni-erlangen.de/pub/utilities/screen/ \ http://komquats.com/distfiles/ \ @@ -23,7 +23,8 @@ OPTIONS= CJK "Treat CJK ambiguous characters as full width" OFF \ MAN "Build and install man pages" ON \ NETHACK "Enable nethack-style messages" ON \ XTERM_256 "Enable support for 256 colour xterm" OFF \ - HOSTINLOCKED "Print user@host in locked message" OFF + HOSTINLOCKED "Print user@host in locked message" OFF \ + SHOWENC "Show encoding on the status line" OFF NO_PACKAGE= Tends to loop using 100% CPU when used from package - perhaps it hard-codes information about the build host @@ -67,6 +68,11 @@ EXTRA_PATCHES+= ${FILESDIR}/opt-cjkwidth EXTRA_PATCHES+= ${FILESDIR}/opt-hostinlocked .endif +# show encoding on the status line via option "showenc" +.if defined(WITH_SHOWENC) +EXTRA_PATCHES+= ${FILESDIR}/opt-showencoding +.endif + post-patch: @${RM} ${WRKSRC}/doc/screen.info* @${REINPLACE_CMD} -e 's|/dev/ptmx|/nonexistent|' ${WRKSRC}/configure diff --git a/sysutils/screen/files/opt-showencoding b/sysutils/screen/files/opt-showencoding new file mode 100644 index 000000000000..dfc2ed4f25cb --- /dev/null +++ b/sysutils/screen/files/opt-showencoding @@ -0,0 +1,31 @@ +--- process.c.orig 2008-05-08 02:37:33.000000000 +0800 ++++ process.c 2008-05-08 02:37:49.000000000 +0800 +@@ -3422,6 +3422,7 @@ + { + WinSwitchEncoding(fore, n); + ResetCharsets(fore); ++ RedisplayDisplays(0); + } + else if (i && display) + D_encoding = n; +--- screen.c.orig 2008-05-08 02:37:22.000000000 +0800 ++++ screen.c 2008-05-20 20:34:37.000000000 +0800 +@@ -2584,6 +2584,18 @@ + } + p += strlen(p) - 1; + break; ++#ifdef ENCODINGS ++ case 'e': ++ *p = 0; ++ D_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0; ++ if (win && win->w_encoding) ++ { ++ *p++ = ' '; ++ strcpy(p, EncodingName(win->w_encoding)); ++ } ++ p += strlen(p) - 1; ++ break; ++#endif + case '{': + { + char rbuf[128];