# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= less VERSION= 633 KEYWORDS= sysutils VARIANTS= standard color SDESC[standard]= Popular open-source file pager SDESC[color]= Popular file pager with color sequence support HOMEPAGE= http://www.greenwoodsoftware.com/less/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= http://www.greenwoodsoftware.com/less/ DISTFILE[1]= less-633.tar.gz:main DF_INDEX= 1 SPKGS[standard]= single SPKGS[color]= single OPTIONS_AVAILABLE= COLOR OPTIONS_STANDARD= none VOPTS[color]= COLOR=ON USES= cpe gmake ncurses:build LICENSE= GPLv3:single CUSTOM1:single LICENSE_TERMS= single:{{WRKDIR}}/TERMS LICENSE_NAME= CUSTOM1:"Less License" LICENSE_FILE= GPLv3:{{WRKSRC}}/COPYING CUSTOM1:{{WRKSRC}}/LICENSE LICENSE_SCHEME= dual CPE_VENDOR= gnu FPC_EQUIVALENT= sysutils/less MUST_CONFIGURE= yes CONFIGURE_ARGS= --prefix={{PREFIX}} VAR_OPSYS[sunos]= CONFIGURE_ENV=LIBS="-lrt -lsocket" [COLOR].DESCRIPTION= Color support via escape sequences [COLOR].CPPFLAGS_ON= -DCOLOR_LESS pre-configure: ${REINPLACE_CMD} -e 's|-lcurses|-lncurses -ltinfo|' ${WRKSRC}/configure ${HEAD} -n 18 ${WRKSRC}/README > ${WRKDIR}/TERMS post-extract: # support static linking ${RM} ${LOCALBASE}/lib/lib*.so [FILE:707:descriptions/desc.single] Less is a pager. A pager is a program that displays text files. Other pagers commonly in use are more and pg. Pagers are often used in command-line environments like the Unix shell and the MS-DOS command prompt to display files. Windowed environments like the Windows and Macintosh desktops don't need pagers as much, since they have other methods for viewing files. Less is not an editor. You can't change the contents of the file you're viewing. Less is not a windowing system. It doesn't have fancy scroll bars or other GUI (graphical user interface) elements. It was designed to work on simple text-only terminals. Less has been used by thousands of people around the world since its release in 1985. [FILE:94:distinfo] 2f201d64b828b88af36dfe6cfdba3e0819ece2e446ebe6224813209aaefed04f 375733 less-633.tar.gz [FILE:86:manifests/plist.single] bin/ less lessecho lesskey share/man/man1/ less.1.gz lessecho.1.gz lesskey.1.gz [FILE:938:patches/patch-charset.c] --- charset.c.orig 2023-05-03 18:43:01 UTC +++ charset.c @@ -525,6 +525,10 @@ public int binary_char(LWCHAR c) */ public int control_char(LWCHAR c) { +#ifdef COLOR_LESS + if (c == ESC) + return 0; +#endif c &= 0377; return (chardef[c] & IS_CONTROL_CHAR); } @@ -538,6 +542,20 @@ public char * prchar(LWCHAR c) /* {{ This buffer can be overrun if LESSBINFMT is a long string. }} */ static char buf[MAX_PRCHAR_LEN+1]; +#ifdef COLOR_LESS + if(c == ESC) + sprintf(buf, "%c", ESC); + else + { + c &= 0377; + if (!control_char(c)) + sprintf(buf, "%c", c); + else if (!control_char(c ^ 0100)) + sprintf(buf, "^%c", c ^ 0100); + else + sprintf(buf, binfmt, c); + } +#else c &= 0377; if ((c < 128 || !utf_mode) && !control_char(c)) SNPRINTF1(buf, sizeof(buf), "%c", (int) c); @@ -561,6 +579,7 @@ public char * prchar(LWCHAR c) #endif else SNPRINTF1(buf, sizeof(buf), binfmt, c); +#endif return (buf); } [FILE:184:patches/patch-edit.c] --- edit.c.orig 2023-05-03 18:43:01 UTC +++ edit.c @@ -16,9 +16,7 @@ #if HAVE_SYS_WAIT_H #include #endif -#if OS2 #include -#endif public int fd0 = 0;