diff --git a/devel/newt/Makefile b/devel/newt/Makefile index 83b24b8618c9..24157f025f46 100644 --- a/devel/newt/Makefile +++ b/devel/newt/Makefile @@ -1,75 +1,74 @@ PORTNAME= newt -PORTVERSION= 0.52.22 -PORTREVISION= 1 +PORTVERSION= 0.52.24 CATEGORIES= devel MASTER_SITES= https://releases.pagure.org/newt/ MAINTAINER= ports@FreeBSD.org COMMENT= Not Eriks Windowing Toolkit: console I/O handling library WWW= https://pagure.io/newt LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libpopt.so:devel/popt \ libslang.so:devel/libslang2 USES= autoreconf gmake localbase ncurses pathfix USE_LDCONFIG= yes GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX=${PREFIX}/share MAKE_ENV= PCFLAGS="${CFLAGS}" MAKE_JOBS_UNSAFE= yes CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -lncurses SUB_FILES= pkgIndex.tcl SUB_LIST= VERSION="${PORTVERSION}" PLIST_SUB= SOVERSION="${SOVERSION}" \ VERSION="${PORTVERSION}" OPTIONS_DEFINE= NLS PYTHON TCL OPTIONS_DEFAULT= PYTHON OPTIONS_SUB= yes NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls PYTHON_USES= python PYTHON_CONFIGURE_WITH= python=${PYTHON_VERSION} PYTHON_VARS= BINARY_ALIAS=python3=${PYTHON_VERSION} TCL_USES= tcl TCL_CONFIGURE_WITH= tcl TCL_CONFIGURE_ENV= ac_cv_c_tclconfig=${TCL_LIBDIR:Q} TCL_CPPFLAGS= -I${TCL_INCLUDEDIR:Q} SOVERSION= ${PORTVERSION:R:E} post-patch: @${REINPLACE_CMD} -e \ 's|@CPP@|@CC@ -E| ; \ s|-D_GNU_SOURCE|| ; \ s| -g | |g ; \ /make -C/s|^|#| ; \ /whiptcl.$$(SOEXT)/s|install|${TRUE}|' ${WRKSRC}/Makefile.in post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/whiptail @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libnewt.so post-install-NLS-on: @(cd ${WRKSRC}/po && ${DO_MAKE_BUILD} ${MAKE_ARGS} \ datadir=${STAGEDIR}${PREFIX}/share ${INSTALL_TARGET}) post-install-PYTHON-on: @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_snack.so post-install-TCL-on: @${MKDIR} ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION} (cd ${WRKSRC} && ${INSTALL_LIB} whiptcl.so \ ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION}) (cd ${WRKDIR} && ${INSTALL_DATA} pkgIndex.tcl \ ${STAGEDIR}${PREFIX}/lib/whip${PORTVERSION}) .include diff --git a/devel/newt/distinfo b/devel/newt/distinfo index ab0613fd89e5..9f14252e7a37 100644 --- a/devel/newt/distinfo +++ b/devel/newt/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1669133240 -SHA256 (newt-0.52.22.tar.gz) = a15efa37e86610b68a942b19a138b44ccb501c234e4c82dab2f5a9b19f7c9e79 -SIZE (newt-0.52.22.tar.gz) = 176269 +TIMESTAMP = 1721747769 +SHA256 (newt-0.52.24.tar.gz) = 5ded7e221f85f642521c49b1826c8de19845aa372baf5d630a51774b544fbdbb +SIZE (newt-0.52.24.tar.gz) = 176693 diff --git a/devel/newt/files/patch-newt.c b/devel/newt/files/patch-newt.c index 88c7f33566ca..a048e3331d6c 100644 --- a/devel/newt/files/patch-newt.c +++ b/devel/newt/files/patch-newt.c @@ -1,11 +1,11 @@ ---- newt.c.orig 2014-10-23 08:34:37 UTC +--- newt.c.orig 2023-10-25 10:21:25 UTC +++ newt.c -@@ -98,6 +98,8 @@ static const struct keymap keymap[] = { +@@ -100,6 +100,8 @@ static const struct keymap keymap[] = { { "\033[6~", NEWT_KEY_PGDN, "kN" }, { "\033V", NEWT_KEY_PGUP, NULL }, { "\033v", NEWT_KEY_PGUP, NULL }, + { "\033[G", NEWT_KEY_PGDN, NULL }, + { "\033[I", NEWT_KEY_PGUP, NULL }, { "\026", NEWT_KEY_PGDN, NULL }, { "\033[[A", NEWT_KEY_F1, NULL }, diff --git a/devel/newt/files/patch-whiptcl.c b/devel/newt/files/patch-whiptcl.c index 866aeb9a788a..506cb9a14a71 100644 --- a/devel/newt/files/patch-whiptcl.c +++ b/devel/newt/files/patch-whiptcl.c @@ -1,106 +1,67 @@ ---- whiptcl.c.orig 2016-03-23 15:46:24 UTC +--- whiptcl.c.orig 2023-10-25 10:21:25 UTC +++ whiptcl.c -@@ -137,45 +137,45 @@ static int wtCmd(ClientData clientData, +@@ -138,45 +138,45 @@ static int wtCmd(ClientData clientData, Tcl_Interp * i if (arg < -1) { /* this could buffer oveflow, bug we're not setuid so I don't care */ - interp->result = malloc(200); - interp->freeProc = TCL_DYNAMIC; - sprintf(interp->result, "%s: %s\n", + char *tmp = malloc(200); + sprintf(tmp, "%s: %s\n", poptBadOption(optCon, POPT_BADOPTION_NOALIAS), poptStrerror(arg)); + Tcl_SetResult(interp, tmp, TCL_DYNAMIC); return TCL_ERROR; } if (mode == MODE_NONE) { - interp->result = "no dialog mode was specified"; + Tcl_SetResult(interp, "no dialog mode was specified", TCL_STATIC); return TCL_ERROR; } else if (rc) { - interp->result = "multiple modes were specified"; + Tcl_SetResult(interp, "multiple modes were specified", TCL_STATIC); return TCL_ERROR; } if (!(text = poptGetArg(optCon))) { - interp->result = "missing text parameter"; + Tcl_SetResult(interp, "missing text parameter", TCL_STATIC); return TCL_ERROR; } if (!(nextArg = poptGetArg(optCon))) { - interp->result = "height missing"; + Tcl_SetResult(interp, "height missing", TCL_STATIC); return TCL_ERROR; } height = strtoul(nextArg, &end, 10); if (*end) { - interp->result = "height is not a number"; + Tcl_SetResult(interp, "height is not a number", TCL_STATIC); return TCL_ERROR; } if (!(nextArg = poptGetArg(optCon))) { - interp->result = "width missing"; + Tcl_SetResult(interp, "width missing", TCL_STATIC); return TCL_ERROR; } width = strtoul(nextArg, &end, 10); if (*end) { - interp->result = "width is not a number"; + Tcl_SetResult(interp, "width is not a number", TCL_STATIC); return TCL_ERROR; } -@@ -196,33 +196,30 @@ static int wtCmd(ClientData clientData, - case MODE_YESNO: - rc = messageBox(text, height, width, MSGBOX_YESNO, flags); - if (rc == DLG_OKAY) -- interp->result = "yes"; -+ Tcl_SetResult(interp, "yes", TCL_STATIC); - else -- interp->result = "no"; -+ Tcl_SetResult(interp, "no", TCL_STATIC); - if (rc == DLG_ERROR) rc = 0; - break; - - case MODE_INPUTBOX: - rc = inputBox(text, height, width, optCon, flags, &result); - if (rc ==DLG_OKAY) { -- interp->result = result; -- interp->freeProc = TCL_DYNAMIC; -+ Tcl_SetResult(interp, strdup(result), TCL_DYNAMIC); - } - break; - - case MODE_MENU: - rc = listBox(text, height, width, optCon, flags, default_item, &result); - if (rc==DLG_OKAY) { -- interp->result = result; -- interp->freeProc = TCL_DYNAMIC; -+ Tcl_SetResult(interp, strdup(result), TCL_DYNAMIC); - } - break; - - case MODE_RADIOLIST: - rc = checkList(text, height, width, optCon, 1, flags, &selections); - if (rc==DLG_OKAY) { -- interp->result = selections[0]; -- interp->freeProc = TCL_DYNAMIC; -+ Tcl_SetResult(interp, strdup(selections[0]), TCL_DYNAMIC); - - free(selections); - } -@@ -247,7 +244,7 @@ static int wtCmd(ClientData clientData, +@@ -267,7 +267,7 @@ static int wtCmd(ClientData clientData, Tcl_Interp * i newtPopWindow(); if (rc == DLG_ERROR) { - interp->result = "bad paramter for whiptcl dialog box"; + Tcl_SetResult(interp, "bad paramter for whiptcl dialog box", TCL_STATIC); return TCL_ERROR; }