Index: head/devel/rhtvision/Makefile =================================================================== --- head/devel/rhtvision/Makefile (revision 448595) +++ head/devel/rhtvision/Makefile (revision 448596) @@ -1,45 +1,48 @@ # Created by: Hye-Shik Chang # $FreeBSD$ PORTNAME= rhtvision PORTVERSION= 2.2.1.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= devel MASTER_SITES= SF/tvision/UNIX/${PORTVERSION:R}%20CVS20100714%20Source%20and%20Debian%205.0 DISTNAME= ${PORTNAME}_${PORTVERSION:R}-${PORTVERSION:E} MAINTAINER= ports@FreeBSD.org COMMENT= Complete C++ Text User Interface (TUI) library OPTIONS_DEFINE= NLS X11 OPTIONS_SUB= yes WRKSRC= ${WRKDIR}/tvision USES= gmake perl5 shebangfix SHEBANG_FILES= config.pl confignt.pl conflib.pl linux/compress USE_GCC= yes HAS_CONFIGURE= yes CONFIGURE_ARGS= --prefix=${STAGEDIR}${PREFIX} \ --real-prefix=${PREFIX} \ --no-libs-here USE_LDCONFIG= yes CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib + +# The port does not build with C++11 or later (bug 219275). +USE_CXXSTD= gnu++03 PLIST_SUB= VERSION="${PORTVERSION:R}" NLS_USES= gettext NLS_CONFIGURE_OFF= --no-intl X11_USE= XORG=x11,xmu X11_CONFIGURE_ON= --x-include=${LOCALBASE}/include \ --x-lib=${LOCALBASE}/lib X11_CONFIGURE_OFF= --X11lib=no post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/rhtv-config \ ${STAGEDIR}${PREFIX}/lib/librhtv.so .include Index: head/devel/rhtvision/files/patch-classes_tdesktop.cc =================================================================== --- head/devel/rhtvision/files/patch-classes_tdesktop.cc (nonexistent) +++ head/devel/rhtvision/files/patch-classes_tdesktop.cc (revision 448596) @@ -0,0 +1,23 @@ +--- classes/tdesktop.cc.orig 2017-08-18 14:40:03 UTC ++++ classes/tdesktop.cc +@@ -26,6 +26,11 @@ Modified cursor behavior while desktop locked by Salva + #define Uses_TVCodePage + #include + ++inline unsigned int absdiff(unsigned int a, unsigned int b) ++{ ++ return (a>=b)?a-b:b-a; ++} ++ + TDeskInit::TDeskInit( TBackground *(*cBackground)( TRect ) ) : + createBackground( cBackground ) + { +@@ -144,7 +149,7 @@ unsigned iSqr( unsigned i ) + { + unsigned res1 = 2; + unsigned res2 = i/res1; +- while( abs( res1 - res2 ) > 1 ) ++ while( absdiff(res1,res2) > 1 ) + { + res1 = (res1 + res2)/2; + res2 = i/res1; Property changes on: head/devel/rhtvision/files/patch-classes_tdesktop.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/rhtvision/files/patch-classes_tdisplay.cc =================================================================== --- head/devel/rhtvision/files/patch-classes_tdisplay.cc (nonexistent) +++ head/devel/rhtvision/files/patch-classes_tdisplay.cc (revision 448596) @@ -0,0 +1,41 @@ +--- classes/tdisplay.cc.orig 2017-08-18 14:39:55 UTC ++++ classes/tdisplay.cc +@@ -22,6 +22,11 @@ same used in original Turbo Vision for compatibility p + #define Uses_TVCodePage + #include + ++inline unsigned int absdiff(unsigned int a, unsigned int b) ++{ ++ return (a>=b)?a-b:b-a; ++} ++ + // Remove me please! + int TDisplay::dual_display=0; + +@@ -381,10 +386,10 @@ Boolean TDisplay::searchClosestRes(TScreenResolution * + if (firstXMatch!=-1) + {// Return the closest y that match x + i=indexMin=firstXMatch; +- minDif=abs(res[i].y-y); ++ minDif=absdiff(res[i].y,y); + while (++i