From 11c606a6888dc269ef018359469a7276c3ad8f67 Mon Sep 17 00:00:00 2001 From: kx Date: Tue, 11 Apr 2023 01:18:34 +0300 Subject: Version 0.2.1 --- doc/autogen-examples/auto-clean.sh | 27 ++ doc/autogen-examples/bootstrap-cross.sh | 6 + doc/autogen-examples/bootstrap.sh | 4 + doc/autogen-examples/configure-cross.sh | 22 ++ doc/autogen-examples/configure.sh | 9 + doc/dialog/dialog-1.3-20190211.patch | 453 +++++++++++++++++++++++++++++++ doc/dialog/dialog-1.3-20190724.patch | 467 ++++++++++++++++++++++++++++++++ doc/dialog/dialog-1.3-20190728.patch | 467 ++++++++++++++++++++++++++++++++ doc/dialog/dialog-1.3-20190808.patch | 460 +++++++++++++++++++++++++++++++ doc/dialog/dialog-1.3-20201126.patch | 462 +++++++++++++++++++++++++++++++ doc/dialog/dialog-1.3-20210117.patch | 462 +++++++++++++++++++++++++++++++ doc/dialog/dialog-1.3-20210621.patch | 454 +++++++++++++++++++++++++++++++ 12 files changed, 3293 insertions(+) create mode 100755 doc/autogen-examples/auto-clean.sh create mode 100755 doc/autogen-examples/bootstrap-cross.sh create mode 100755 doc/autogen-examples/bootstrap.sh create mode 100755 doc/autogen-examples/configure-cross.sh create mode 100755 doc/autogen-examples/configure.sh create mode 100644 doc/dialog/dialog-1.3-20190211.patch create mode 100644 doc/dialog/dialog-1.3-20190724.patch create mode 100644 doc/dialog/dialog-1.3-20190728.patch create mode 100644 doc/dialog/dialog-1.3-20190808.patch create mode 100644 doc/dialog/dialog-1.3-20201126.patch create mode 100644 doc/dialog/dialog-1.3-20210117.patch create mode 100644 doc/dialog/dialog-1.3-20210621.patch (limited to 'doc') diff --git a/doc/autogen-examples/auto-clean.sh b/doc/autogen-examples/auto-clean.sh new file mode 100755 index 0000000..079b699 --- /dev/null +++ b/doc/autogen-examples/auto-clean.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +cd ../.. + +if [ -f "Makefile" ] ; then + make distclean +fi + +rm -rf autom4te.cache m4 + +rm -f Makefile +rm -f Makefile.in +rm -f config.h +rm -f config.h.in +rm -f config.log +rm -f config.status +rm -f compile config.guess config.sub +rm -f configure +rm -f install-sh +rm -f missing +rm -f stamp-h1 +rm -f aclocal.m4 +rm -f depcomp + +rm -rf src/.deps +rm -f src/Makefile +rm -f src/Makefile.in diff --git a/doc/autogen-examples/bootstrap-cross.sh b/doc/autogen-examples/bootstrap-cross.sh new file mode 100755 index 0000000..aa5e3f6 --- /dev/null +++ b/doc/autogen-examples/bootstrap-cross.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +TARGET_DEST_DIR=/home/kx/prog/scm/svn/platform/trunk-672/dist/.s9xx-glibc/enybox-x2 + +cd ../.. +./bootstrap --target-dest-dir=${TARGET_DEST_DIR} diff --git a/doc/autogen-examples/bootstrap.sh b/doc/autogen-examples/bootstrap.sh new file mode 100755 index 0000000..59b68f5 --- /dev/null +++ b/doc/autogen-examples/bootstrap.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd ../.. +./bootstrap diff --git a/doc/autogen-examples/configure-cross.sh b/doc/autogen-examples/configure-cross.sh new file mode 100755 index 0000000..9c74ac8 --- /dev/null +++ b/doc/autogen-examples/configure-cross.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +cd ../.. + +TARGET_DEST_DIR=/home/kx/prog/scm/svn/platform/trunk-672/dist/.s9xx-glibc/enybox-x2 +TOOLCHAIN_PATH=/opt/toolchain/aarch64-S9XX-linux-glibc/1.1.4/bin +TARGET=aarch64-s9xx-linux-gnu + +TARGET_INCPATH="-L${TARGET_DEST_DIR}/usr/include" +CFLAGS="${TARGET_INCPATH}" +CPPFLAGS="${TARGET_INCPATH}" +LDFLAGS="-L${TARGET_DEST_DIR}/lib -L${TARGET_DEST_DIR}/usr/lib" + + +DIALOG_CONFIG=${TARGET_DEST_DIR}/usr/bin/dialog-config \ +STRIP="${TOOLCHAIN_PATH}/${TARGET}-strip" \ +CC="${TOOLCHAIN_PATH}/${TARGET}-gcc --sysroot=${TARGET_DEST_DIR}" \ +./configure --prefix=/usr \ + --build=x86_64-pc-linux-gnu --host=${TARGET} \ + --with-gpg2=${TARGET_DEST_DIR}/usr \ + --with-dialog=${TARGET_DEST_DIR}/usr \ + --with-dialog-test=yes diff --git a/doc/autogen-examples/configure.sh b/doc/autogen-examples/configure.sh new file mode 100755 index 0000000..7c743fd --- /dev/null +++ b/doc/autogen-examples/configure.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +cd ../.. + +./configure --prefix=/usr \ + --with-distro-name=radix \ + --with-distro-version=1.1 \ + --with-gpg2=yes \ + --with-dialog=yes diff --git a/doc/dialog/dialog-1.3-20190211.patch b/doc/dialog/dialog-1.3-20190211.patch new file mode 100644 index 0000000..3a5ce88 --- /dev/null +++ b/doc/dialog/dialog-1.3-20190211.patch @@ -0,0 +1,453 @@ +diff -b --unified -Nr dialog-1.3-20190211-orig/checklist.c dialog-1.3-20190211/checklist.c +--- dialog-1.3-20190211-orig/checklist.c 2018-06-20 01:57:01.000000000 +0300 ++++ dialog-1.3-20190211/checklist.c 2019-07-20 15:48:25.753332500 +0300 +@@ -29,7 +29,7 @@ + #include + #include + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + typedef struct { + /* the outer-window */ +diff -b --unified -Nr dialog-1.3-20190211-orig/dialog-config.in dialog-1.3-20190211/dialog-config.in +--- dialog-1.3-20190211-orig/dialog-config.in 2012-10-06 18:29:45.000000000 +0400 ++++ dialog-1.3-20190211/dialog-config.in 2019-07-20 15:48:25.753332500 +0300 +@@ -73,12 +73,17 @@ + INCS="-I${prefix}/include" + fi + sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO +- $INCS ++ @CFLAGS@ $INCS ++ENDECHO ++ ;; ++ --ldflags) ++ sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO ++ -L@libdir@ + ENDECHO + ;; + --libs) + sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO +- -L${exec_prefix}/lib -l${THIS} @LIBS@ ++ -l${THIS} @LIBS@ + ENDECHO + ;; + # identification +@@ -113,6 +118,7 @@ + --exec-prefix=ARG sets the executable-prefix of ${THIS} + + --cflags echos the C compiler flags needed to compile with ${THIS} ++ --ldflags echos the linker flags needed to link with ${THIS} + --libs echos the libraries needed to link with ${THIS} + + --version echos the release+patchdate version of ${THIS} +diff -b --unified -Nr dialog-1.3-20190211-orig/dialog.m4 dialog-1.3-20190211/dialog.m4 +--- dialog-1.3-20190211-orig/dialog.m4 1970-01-01 03:00:00.000000000 +0300 ++++ dialog-1.3-20190211/dialog.m4 2019-07-20 15:48:25.749332413 +0300 +@@ -0,0 +1,333 @@ ++dnl # ++dnl # /usr/share/aclocal/dialog.m4 ++dnl # ++dnl # Configure paths for dialog ++dnl # Andrew V.Kosteltsev ++ ++dnl ============================================================ ++dnl ++dnl Synopsis: ++dnl AC_CHECK_DIALOG([MIN-VERSION [, # minimum dialog version, e.g. 1.3-20190211 ++dnl DEFAULT-WITH-DIALOG [, # default value for --with-dialog option ++dnl DEFAULT-WITH-DIALOG-TEST [,# default value for --with-dialog-test option ++dnl EXTEND-VARS [, # whether CFLAGS/LDFLAGS/etc are extended ++dnl ACTION-IF-FOUND [, # action to perform if dialog was found ++dnl ACTION-IF-NOT-FOUND # action to perform if dialog was not found ++dnl ]]]]]]) ++dnl Examples: ++dnl AC_CHECK_DIALOG(1.3-20190211) ++dnl AC_CHECK_DIALOG(1.3-20190211,,,no,CFLAGS="$CFLAGS -DHAVE_DIALOG $DIALOG_CFLAGS") ++dnl AC_CHECK_DIALOG(1.3-20190211,yes,yes,yes,CFLAGS="$CFLAGS -DHAVE_DIALOG") ++dnl ++dnl ++dnl If you have to change prefix returned by dialog-config script or change ++dnl location of dialog-config, you may set environment variable DIALOG_CONFIG, ++dnl for example: ++dnl ++dnl # export DIALOG_CONFIG="dialog-config --prefix=/usr/local" ++dnl # export DIALOG_CONFIG="/usr/bin/dialog-config --prefix=/usr/local" ++dnl ++dnl ============================================================ ++dnl ++dnl ============================================================ ++dnl auxilliary macros ++dnl ============================================================ ++AC_DEFUN([_AC_DIALOG_ERROR], [dnl ++AC_MSG_RESULT([*FAILED*]) ++cat <>/ /' 1>&2 ++$1 ++EOT ++exit 1 ++]) ++ ++AC_DEFUN([_AC_DIALOG_VERBOSE], [dnl ++if test ".$verbose" = .yes; then ++ AC_MSG_RESULT([ $1]) ++fi ++]) ++ ++dnl ============================================================ ++dnl the user macro ++dnl ============================================================ ++AC_DEFUN([AC_CHECK_DIALOG], [dnl ++dnl ++dnl ============================================================ ++dnl prerequisites ++dnl ============================================================ ++AC_REQUIRE([AC_PROG_CC])dnl ++AC_REQUIRE([AC_PROG_CPP])dnl ++dnl ++dnl ============================================================ ++dnl set DIALOG_CONFIG variable ++dnl ============================================================ ++if test -z "$DIALOG_CONFIG"; then ++ DIALOG_CONFIG='dialog-config' ++fi ++dnl ++DIALOG_CFLAGS='' ++DIALOG_LDFLAGS='' ++DIALOG_LIBS='' ++AC_SUBST(DIALOG_CFLAGS) ++AC_SUBST(DIALOG_LDFLAGS) ++AC_SUBST(DIALOG_LIBS) ++dnl ++dnl ============================================================ ++dnl command line options ++dnl ============================================================ ++_AC_DIALOG_VERBOSE([]) ++AC_ARG_WITH(dialog,dnl ++[ --with-dialog[=ARG] Build with dialog Library (default=]ifelse([$2],,yes,$2)[)],dnl ++,dnl ++with_dialog="ifelse([$2],,yes,$2)" ++)dnl ++AC_ARG_WITH(dialog-test,dnl ++[ --with-dialog-test Perform dialog Sanity Test (default=]ifelse([$3],,yes,$3)[)],dnl ++,dnl ++with_dialog_test="ifelse([$3],,yes,$3)" ++)dnl ++_AC_DIALOG_VERBOSE([+ Command Line Options:]) ++_AC_DIALOG_VERBOSE([ o --with-dialog=$with_dialog]) ++_AC_DIALOG_VERBOSE([ o --with-dialog-test=$with_dialog_test]) ++dnl ++dnl ============================================================ ++dnl configuration ++dnl ============================================================ ++if test ".$with_dialog" != .no; then ++ dialog_subdir=no ++ dialog_subdir_opts='' ++ case "$with_dialog" in ++ subdir:* ) ++ dialog_subdir=yes ++ changequote(, )dnl ++ dialog_subdir_opts=`echo $with_dialog | sed -e 's/^subdir:[^ ]*[ ]*//'` ++ with_dialog=`echo $with_dialog | sed -e 's/^subdir:\([^ ]*\).*$/\1/'` ++ changequote([, ])dnl ++ ;; ++ esac ++ dialog_version="" ++ dialog_location="" ++ dialog_type="" ++ dialog_cflags="" ++ dialog_ldflags="" ++ dialog_libs="" ++ if test ".$with_dialog" = .yes; then ++ # via config script in $PATH ++ changequote(, )dnl ++ dialog_version=`($DIALOG_CONFIG --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[-][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$DIALOG_CONFIG --prefix` ++ dialog_type='installed' ++ dialog_cflags=`$DIALOG_CONFIG --cflags` ++ dialog_ldflags=`$DIALOG_CONFIG --ldflags` ++ dialog_libs=`$DIALOG_CONFIG --libs` ++ fi ++ elif test -d "$with_dialog"; then ++ with_dialog=`echo $with_dialog | sed -e 's;/*$;;'` ++ dialog_found=no ++ # via config script under a specified directory ++ # (a standard installation, but not a source tree) ++ if test ".$dialog_found" = .no; then ++ for _dir in $with_dialog/bin $with_dialog; do ++ if test -f "$_dir/dialog-config"; then ++ test -f "$_dir/dialog-config.in" && continue # dialog-config in source tree! ++ changequote(, )dnl ++ dialog_version=`($_dir/dialog-config --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[.][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$_dir/dialog-config --prefix` ++ dialog_type="installed" ++ dialog_cflags=`$_dir/dialog-config --cflags` ++ dialog_ldflags=`$_dir/dialog-config --ldflags` ++ dialog_libs=`$_dir/dialog-config --libs` ++ dialog_found=yes ++ break ++ fi ++ fi ++ done ++ fi ++ fi ++ _AC_DIALOG_VERBOSE([+ Determined Location:]) ++ _AC_DIALOG_VERBOSE([ o path: $dialog_location]) ++ _AC_DIALOG_VERBOSE([ o type: $dialog_type]) ++ if test ".$dialog_version" = .; then ++ if test ".$with_dialog" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog under $with_dialog. ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past).]) ++ else ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog in any system-wide location (see \$PATH). ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past, or set the DIALOG_CONFIG environment variable to the full path ++ to dialog-config).]) ++ fi ++ fi ++ dnl ======================================================== ++ dnl Check whether the found version is sufficiently new ++ dnl ======================================================== ++ _req_version="ifelse([$1],,1.0.0,$1)" ++ for _var in dialog_version _req_version; do ++ eval "_val=\"\$${_var}\"" ++ _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\1/'` ++ _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\2/'` ++ _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\4/'` ++ _hex=`echo dummy | awk '{ printf("%d%02d%02d", major, minor, micro); }' \ ++ "major=$_major" "minor=$_minor" "micro=$_micro"` ++ eval "${_var}_hex=\"\$_hex\"" ++ done ++ _AC_DIALOG_VERBOSE([+ Determined Versions:]) ++ _AC_DIALOG_VERBOSE([ o existing: $dialog_version -> 0x$dialog_version_hex]) ++ _AC_DIALOG_VERBOSE([ o required: $_req_version -> 0x$_req_version_hex]) ++ _ok=0 ++ if test ".$dialog_version_hex" != .; then ++ if test ".$_req_version_hex" != .; then ++ if test $dialog_version_hex -ge $_req_version_hex; then ++ _ok=1 ++ fi ++ fi ++ fi ++ if test ".$_ok" = .0; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog version $dialog_version, but required at least version $_req_version. ++ Upgrade dialog under $dialog_location to $_req_version or higher first, please.]) ++ fi ++ dnl ======================================================== ++ dnl Perform dialog Sanity Compile Check ++ dnl ======================================================== ++ if test ".$with_dialog_test" = .yes; then ++ _ac_save_CFLAGS="$CFLAGS" ++ _ac_save_LDFLAGS="$LDFLAGS" ++ _ac_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ _AC_DIALOG_VERBOSE([+ Test Build Environment:]) ++ _AC_DIALOG_VERBOSE([ o CFLAGS=\"$CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LDFLAGS=\"$LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LIBS=\"$LIBS\"]) ++ cross_compile=no ++ define(_code1, [dnl ++ ++#include ++#include ++#include /* index(3) */ ++ ++#include ++#include ++#include ++ ++ ]) ++ define(_code2, [dnl ++ ++int main( void ) ++{ ++ int status = 0; ++ ++ bzero( (void *)&dialog_vars, sizeof(DIALOG_VARS) ); ++ ++ init_dialog(stdin, stdout); ++ ++ dialog_vars.colors = 1; ++ dialog_vars.backtitle = "\\Z7Test\\Zn \\Z1dialog\\Zn \\Z7Library\\Zn"; ++ dialog_vars.dlg_clear_screen = 1; ++ dialog_vars.sleep_secs = 1; ++ ++ ++ dlg_put_backtitle(); ++ ++ /************************************************* ++ Ruler: 68 characters + 2 spaces left and right: ++ ++ | ----handy-ruler----------------------------------------------------- | */ ++ status = dialog_msgbox( " \\Z4Dialog ==>\\Zn\\Z1libdialog\\Zn\\Z4<== [required]\\Zn ", ++ "\nPackage is installed and corect.\n", ++ 5, 72, 0 ); ++ ++ if( dialog_vars.sleep_secs ) ++ (void)napms(dialog_vars.sleep_secs * 1000); ++ ++ if( dialog_vars.dlg_clear_screen ) ++ { ++ dlg_clear(); ++ (void)refresh(); ++ } ++ end_dialog(); ++ ++ exit( 0 ); ++} ++ ]) ++ _AC_DIALOG_VERBOSE([+ Performing Sanity Checks:]) ++ _AC_DIALOG_VERBOSE([ o pre-processor test]) ++ AC_TRY_CPP(_code1, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity pre-processor check. This means ++ the dialog header dialog.h was not found. ++ We used the following build environment: ++ >> CPP="$CPP" ++ See config.log for possibly more details.]) ++ fi ++ _AC_DIALOG_VERBOSE([ o link check]) ++ AC_TRY_LINK(_code1, _code2, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity linker check. This means ++ the dialog library libdialog.a was not found. ++ We used the following build environment: ++ >> CC="$CC" ++ >> CFLAGS="$CFLAGS" ++ >> LDFLAGS="$LDFLAGS" ++ >> LIBS="$LIBS" ++ See config.log for possibly more details.]) ++ fi ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" != .yes; then ++ CFLAGS="$_ac_save_CFLAGS" ++ LDFLAGS="$_ac_save_LDFLAGS" ++ LIBS="$_ac_save_LIBS" ++ fi ++ else ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" = .yes; then ++ if test ".$dialog_subdir" = .yes; then ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ fi ++ fi ++ fi ++ DIALOG_CFLAGS="$dialog_cflags" ++ DIALOG_LDFLAGS="$dialog_ldflags" ++ DIALOG_LIBS="$dialog_libs" ++ AC_SUBST(DIALOG_CFLAGS) ++ AC_SUBST(DIALOG_LDFLAGS) ++ AC_SUBST(DIALOG_LIBS) ++ ++ AC_SUBST(HAVE_DIALOG, [1]) ++ ++ AC_CHECK_HEADERS(dialog.h dlg_colors.h dlg_keys.h) ++ ++ _AC_DIALOG_VERBOSE([+ Final Results:]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_CFLAGS=\"$DIALOG_CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LDFLAGS=\"$DIALOG_LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LIBS=\"$DIALOG_LIBS\"]) ++fi ++if test ".$with_dialog" != .no; then ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([version $dialog_version, $dialog_type under $dialog_location]) ++ ifelse([$5], , :, [$5]) ++else ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([no]) ++ ifelse([$6], , :, [$6]) ++fi ++]) ++ +diff -b --unified -Nr dialog-1.3-20190211-orig/fselect.c dialog-1.3-20190211/fselect.c +--- dialog-1.3-20190211-orig/fselect.c 2018-06-22 02:28:04.000000000 +0300 ++++ dialog-1.3-20190211/fselect.c 2019-07-20 15:48:25.753332500 +0300 +@@ -631,7 +631,7 @@ + dlg_print_size(height, width); + dlg_ctl_size(height, width); + +- dialog = dlg_new_window(height, width, ++ dialog = dlg_new_window(height + 1, width, + dlg_box_y_ordinate(height), + dlg_box_x_ordinate(width)); + dlg_register_window(dialog, "fselect", binding); +@@ -639,7 +639,7 @@ + + dlg_mouse_setbase(0, 0); + +- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); ++ dlg_draw_box2(dialog, 0, 0, height + 1, width, dialog_attr, border_attr, border2_attr); + dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); + dlg_draw_title(dialog, title); + +@@ -648,7 +648,7 @@ + /* Draw the input field box */ + tbox_height = 1; + tbox_width = width - (4 * MARGIN + 2); +- tbox_y = height - (BTN_HIGH * 2) + MARGIN; ++ tbox_y = height - (BTN_HIGH * 2) + MARGIN + 1; + tbox_x = (width - tbox_width) / 2; + + w_text = derwin(dialog, tbox_height, tbox_width, tbox_y, tbox_x); +@@ -675,7 +675,7 @@ + else + dbox_width = (width - (6 * MARGIN + 2 * EXT_WIDE)) / 2; + dbox_height = height - MIN_HIGH; +- dbox_y = (2 * MARGIN + 1); ++ dbox_y = (2 * MARGIN + 2); + dbox_x = tbox_x; + + w_work = derwin(dialog, dbox_height, dbox_width, dbox_y, dbox_x); +@@ -735,7 +735,7 @@ + if (show_buttons) { + show_buttons = FALSE; + button = (state < 0) ? 0 : state; +- dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width); ++ dlg_draw_buttons(dialog, height - 1, 0, buttons, button, FALSE, width); + } + + if (first_trace) { +diff -b --unified -Nr dialog-1.3-20190211-orig/guage.c dialog-1.3-20190211/guage.c +--- dialog-1.3-20190211-orig/guage.c 2018-06-21 11:23:43.000000000 +0300 ++++ dialog-1.3-20190211/guage.c 2019-07-20 15:48:25.768332827 +0300 +@@ -377,6 +377,9 @@ + MY_OBJ *obj = (MY_OBJ *) objptr; + + if (valid(obj)) { ++ if (obj->title) free(obj->title); ++ if (obj->prompt) free(obj->prompt); ++ + obj->obj.keep_win = FALSE; + dlg_remove_callback(&(obj->obj)); + delink(obj); +diff -b --unified -Nr dialog-1.3-20190211-orig/menubox.c dialog-1.3-20190211/menubox.c +--- dialog-1.3-20190211-orig/menubox.c 2018-06-22 02:28:56.000000000 +0300 ++++ dialog-1.3-20190211/menubox.c 2019-07-20 15:48:25.753332500 +0300 +@@ -48,7 +48,7 @@ + int item_no; + } ALL_DATA; + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + #define INPUT_ROWS 3 /* rows per inputmenu entry */ + diff --git a/doc/dialog/dialog-1.3-20190724.patch b/doc/dialog/dialog-1.3-20190724.patch new file mode 100644 index 0000000..e29bc55 --- /dev/null +++ b/doc/dialog/dialog-1.3-20190724.patch @@ -0,0 +1,467 @@ +diff -b --unified -Nr dialog-1.3-20190724-orig/checklist.c dialog-1.3-20190724/checklist.c +--- dialog-1.3-20190724-orig/checklist.c 2019-07-25 01:17:14.000000000 +0300 ++++ dialog-1.3-20190724/checklist.c 2019-07-26 14:14:01.063282363 +0300 +@@ -29,7 +29,7 @@ + #include + #include + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + typedef struct { + /* the outer-window */ +diff -b --unified -Nr dialog-1.3-20190724-orig/dialog-config.in dialog-1.3-20190724/dialog-config.in +--- dialog-1.3-20190724-orig/dialog-config.in 2019-07-23 11:44:33.000000000 +0300 ++++ dialog-1.3-20190724/dialog-config.in 2019-07-26 14:14:01.063282363 +0300 +@@ -73,7 +73,12 @@ + INCS="-I${prefix}/include" + fi + sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO +- $INCS ++ @CFLAGS@ $INCS ++ENDECHO ++ ;; ++ --ldflags) ++ sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO ++ -L@libdir@ + ENDECHO + ;; + --cflags-only-other) +@@ -81,12 +86,12 @@ + ;; + --libs) + sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO +- -L${exec_prefix}/lib -l${THIS} @LIBS@ ++ -l${THIS} @LIBS@ + ENDECHO + ;; + --libs-only-L) + OPTS= +- for opt in "$LIBS" ++ for opt in -L@libdir@ -l${THIS} @LIBS@ + do + case "x$opt" in + x-L*) +@@ -98,7 +103,7 @@ + ;; + --libs-only-l) + OPTS= +- for opt in "$LIBS" ++ for opt in -L@libdir@ -l${THIS} @LIBS@ + do + case "x$opt" in + x-l*) +@@ -110,7 +115,7 @@ + ;; + --libs-only-other) + OPTS= +- for opt in "$LIBS" ++ for opt in -L@libdir@ -l${THIS} @LIBS@ + do + case "x$opt" in + x-[lL]*) +@@ -154,6 +159,7 @@ + --exec-prefix=ARG sets the executable-prefix of ${THIS} + + --cflags echos the C compiler flags needed to compile with ${THIS} ++ --ldflags echos the linker flags needed to link with ${THIS} + --libs echos the libraries needed to link with ${THIS} + + --libs-only-L echos -L linker options (search path) for ${THIS} +diff -b --unified -Nr dialog-1.3-20190724-orig/dialog.m4 dialog-1.3-20190724/dialog.m4 +--- dialog-1.3-20190724-orig/dialog.m4 1970-01-01 03:00:00.000000000 +0300 ++++ dialog-1.3-20190724/dialog.m4 2019-07-26 14:14:01.063282363 +0300 +@@ -0,0 +1,333 @@ ++dnl # ++dnl # /usr/share/aclocal/dialog.m4 ++dnl # ++dnl # Configure paths for dialog ++dnl # Andrew V.Kosteltsev ++ ++dnl ============================================================ ++dnl ++dnl Synopsis: ++dnl AC_CHECK_DIALOG([MIN-VERSION [, # minimum dialog version, e.g. 1.3-20190211 ++dnl DEFAULT-WITH-DIALOG [, # default value for --with-dialog option ++dnl DEFAULT-WITH-DIALOG-TEST [,# default value for --with-dialog-test option ++dnl EXTEND-VARS [, # whether CFLAGS/LDFLAGS/etc are extended ++dnl ACTION-IF-FOUND [, # action to perform if dialog was found ++dnl ACTION-IF-NOT-FOUND # action to perform if dialog was not found ++dnl ]]]]]]) ++dnl Examples: ++dnl AC_CHECK_DIALOG(1.3-20190211) ++dnl AC_CHECK_DIALOG(1.3-20190211,,,no,CFLAGS="$CFLAGS -DHAVE_DIALOG $DIALOG_CFLAGS") ++dnl AC_CHECK_DIALOG(1.3-20190211,yes,yes,yes,CFLAGS="$CFLAGS -DHAVE_DIALOG") ++dnl ++dnl ++dnl If you have to change prefix returned by dialog-config script or change ++dnl location of dialog-config, you may set environment variable DIALOG_CONFIG, ++dnl for example: ++dnl ++dnl # export DIALOG_CONFIG="dialog-config --prefix=/usr/local" ++dnl # export DIALOG_CONFIG="/usr/bin/dialog-config --prefix=/usr/local" ++dnl ++dnl ============================================================ ++dnl ++dnl ============================================================ ++dnl auxilliary macros ++dnl ============================================================ ++AC_DEFUN([_AC_DIALOG_ERROR], [dnl ++AC_MSG_RESULT([*FAILED*]) ++cat <>/ /' 1>&2 ++$1 ++EOT ++exit 1 ++]) ++ ++AC_DEFUN([_AC_DIALOG_VERBOSE], [dnl ++if test ".$verbose" = .yes; then ++ AC_MSG_RESULT([ $1]) ++fi ++]) ++ ++dnl ============================================================ ++dnl the user macro ++dnl ============================================================ ++AC_DEFUN([AC_CHECK_DIALOG], [dnl ++dnl ++dnl ============================================================ ++dnl prerequisites ++dnl ============================================================ ++AC_REQUIRE([AC_PROG_CC])dnl ++AC_REQUIRE([AC_PROG_CPP])dnl ++dnl ++dnl ============================================================ ++dnl set DIALOG_CONFIG variable ++dnl ============================================================ ++if test -z "$DIALOG_CONFIG"; then ++ DIALOG_CONFIG='dialog-config' ++fi ++dnl ++DIALOG_CFLAGS='' ++DIALOG_LDFLAGS='' ++DIALOG_LIBS='' ++AC_SUBST(DIALOG_CFLAGS) ++AC_SUBST(DIALOG_LDFLAGS) ++AC_SUBST(DIALOG_LIBS) ++dnl ++dnl ============================================================ ++dnl command line options ++dnl ============================================================ ++_AC_DIALOG_VERBOSE([]) ++AC_ARG_WITH(dialog,dnl ++[ --with-dialog[=ARG] Build with dialog Library (default=]ifelse([$2],,yes,$2)[)],dnl ++,dnl ++with_dialog="ifelse([$2],,yes,$2)" ++)dnl ++AC_ARG_WITH(dialog-test,dnl ++[ --with-dialog-test Perform dialog Sanity Test (default=]ifelse([$3],,yes,$3)[)],dnl ++,dnl ++with_dialog_test="ifelse([$3],,yes,$3)" ++)dnl ++_AC_DIALOG_VERBOSE([+ Command Line Options:]) ++_AC_DIALOG_VERBOSE([ o --with-dialog=$with_dialog]) ++_AC_DIALOG_VERBOSE([ o --with-dialog-test=$with_dialog_test]) ++dnl ++dnl ============================================================ ++dnl configuration ++dnl ============================================================ ++if test ".$with_dialog" != .no; then ++ dialog_subdir=no ++ dialog_subdir_opts='' ++ case "$with_dialog" in ++ subdir:* ) ++ dialog_subdir=yes ++ changequote(, )dnl ++ dialog_subdir_opts=`echo $with_dialog | sed -e 's/^subdir:[^ ]*[ ]*//'` ++ with_dialog=`echo $with_dialog | sed -e 's/^subdir:\([^ ]*\).*$/\1/'` ++ changequote([, ])dnl ++ ;; ++ esac ++ dialog_version="" ++ dialog_location="" ++ dialog_type="" ++ dialog_cflags="" ++ dialog_ldflags="" ++ dialog_libs="" ++ if test ".$with_dialog" = .yes; then ++ # via config script in $PATH ++ changequote(, )dnl ++ dialog_version=`($DIALOG_CONFIG --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[-][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$DIALOG_CONFIG --prefix` ++ dialog_type='installed' ++ dialog_cflags=`$DIALOG_CONFIG --cflags` ++ dialog_ldflags=`$DIALOG_CONFIG --ldflags` ++ dialog_libs=`$DIALOG_CONFIG --libs` ++ fi ++ elif test -d "$with_dialog"; then ++ with_dialog=`echo $with_dialog | sed -e 's;/*$;;'` ++ dialog_found=no ++ # via config script under a specified directory ++ # (a standard installation, but not a source tree) ++ if test ".$dialog_found" = .no; then ++ for _dir in $with_dialog/bin $with_dialog; do ++ if test -f "$_dir/dialog-config"; then ++ test -f "$_dir/dialog-config.in" && continue # dialog-config in source tree! ++ changequote(, )dnl ++ dialog_version=`($_dir/dialog-config --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[.][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$_dir/dialog-config --prefix` ++ dialog_type="installed" ++ dialog_cflags=`$_dir/dialog-config --cflags` ++ dialog_ldflags=`$_dir/dialog-config --ldflags` ++ dialog_libs=`$_dir/dialog-config --libs` ++ dialog_found=yes ++ break ++ fi ++ fi ++ done ++ fi ++ fi ++ _AC_DIALOG_VERBOSE([+ Determined Location:]) ++ _AC_DIALOG_VERBOSE([ o path: $dialog_location]) ++ _AC_DIALOG_VERBOSE([ o type: $dialog_type]) ++ if test ".$dialog_version" = .; then ++ if test ".$with_dialog" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog under $with_dialog. ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past).]) ++ else ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog in any system-wide location (see \$PATH). ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past, or set the DIALOG_CONFIG environment variable to the full path ++ to dialog-config).]) ++ fi ++ fi ++ dnl ======================================================== ++ dnl Check whether the found version is sufficiently new ++ dnl ======================================================== ++ _req_version="ifelse([$1],,1.0.0,$1)" ++ for _var in dialog_version _req_version; do ++ eval "_val=\"\$${_var}\"" ++ _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\1/'` ++ _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\2/'` ++ _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\4/'` ++ _hex=`echo dummy | awk '{ printf("%d%02d%02d", major, minor, micro); }' \ ++ "major=$_major" "minor=$_minor" "micro=$_micro"` ++ eval "${_var}_hex=\"\$_hex\"" ++ done ++ _AC_DIALOG_VERBOSE([+ Determined Versions:]) ++ _AC_DIALOG_VERBOSE([ o existing: $dialog_version -> 0x$dialog_version_hex]) ++ _AC_DIALOG_VERBOSE([ o required: $_req_version -> 0x$_req_version_hex]) ++ _ok=0 ++ if test ".$dialog_version_hex" != .; then ++ if test ".$_req_version_hex" != .; then ++ if test $dialog_version_hex -ge $_req_version_hex; then ++ _ok=1 ++ fi ++ fi ++ fi ++ if test ".$_ok" = .0; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog version $dialog_version, but required at least version $_req_version. ++ Upgrade dialog under $dialog_location to $_req_version or higher first, please.]) ++ fi ++ dnl ======================================================== ++ dnl Perform dialog Sanity Compile Check ++ dnl ======================================================== ++ if test ".$with_dialog_test" = .yes; then ++ _ac_save_CFLAGS="$CFLAGS" ++ _ac_save_LDFLAGS="$LDFLAGS" ++ _ac_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ _AC_DIALOG_VERBOSE([+ Test Build Environment:]) ++ _AC_DIALOG_VERBOSE([ o CFLAGS=\"$CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LDFLAGS=\"$LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LIBS=\"$LIBS\"]) ++ cross_compile=no ++ define(_code1, [dnl ++ ++#include ++#include ++#include /* index(3) */ ++ ++#include ++#include ++#include ++ ++ ]) ++ define(_code2, [dnl ++ ++int main( void ) ++{ ++ int status = 0; ++ ++ bzero( (void *)&dialog_vars, sizeof(DIALOG_VARS) ); ++ ++ init_dialog(stdin, stdout); ++ ++ dialog_vars.colors = 1; ++ dialog_vars.backtitle = "\\Z7Test\\Zn \\Z1dialog\\Zn \\Z7Library\\Zn"; ++ dialog_vars.dlg_clear_screen = 1; ++ dialog_vars.sleep_secs = 1; ++ ++ ++ dlg_put_backtitle(); ++ ++ /************************************************* ++ Ruler: 68 characters + 2 spaces left and right: ++ ++ | ----handy-ruler----------------------------------------------------- | */ ++ status = dialog_msgbox( " \\Z4Dialog ==>\\Zn\\Z1libdialog\\Zn\\Z4<== [required]\\Zn ", ++ "\nPackage is installed and corect.\n", ++ 5, 72, 0 ); ++ ++ if( dialog_vars.sleep_secs ) ++ (void)napms(dialog_vars.sleep_secs * 1000); ++ ++ if( dialog_vars.dlg_clear_screen ) ++ { ++ dlg_clear(); ++ (void)refresh(); ++ } ++ end_dialog(); ++ ++ exit( 0 ); ++} ++ ]) ++ _AC_DIALOG_VERBOSE([+ Performing Sanity Checks:]) ++ _AC_DIALOG_VERBOSE([ o pre-processor test]) ++ AC_TRY_CPP(_code1, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity pre-processor check. This means ++ the dialog header dialog.h was not found. ++ We used the following build environment: ++ >> CPP="$CPP" ++ See config.log for possibly more details.]) ++ fi ++ _AC_DIALOG_VERBOSE([ o link check]) ++ AC_TRY_LINK(_code1, _code2, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity linker check. This means ++ the dialog library libdialog.a was not found. ++ We used the following build environment: ++ >> CC="$CC" ++ >> CFLAGS="$CFLAGS" ++ >> LDFLAGS="$LDFLAGS" ++ >> LIBS="$LIBS" ++ See config.log for possibly more details.]) ++ fi ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" != .yes; then ++ CFLAGS="$_ac_save_CFLAGS" ++ LDFLAGS="$_ac_save_LDFLAGS" ++ LIBS="$_ac_save_LIBS" ++ fi ++ else ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" = .yes; then ++ if test ".$dialog_subdir" = .yes; then ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ fi ++ fi ++ fi ++ DIALOG_CFLAGS="$dialog_cflags" ++ DIALOG_LDFLAGS="$dialog_ldflags" ++ DIALOG_LIBS="$dialog_libs" ++ AC_SUBST(DIALOG_CFLAGS) ++ AC_SUBST(DIALOG_LDFLAGS) ++ AC_SUBST(DIALOG_LIBS) ++ ++ AC_SUBST(HAVE_DIALOG, [1]) ++ ++ AC_CHECK_HEADERS(dialog.h dlg_colors.h dlg_keys.h) ++ ++ _AC_DIALOG_VERBOSE([+ Final Results:]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_CFLAGS=\"$DIALOG_CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LDFLAGS=\"$DIALOG_LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LIBS=\"$DIALOG_LIBS\"]) ++fi ++if test ".$with_dialog" != .no; then ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([version $dialog_version, $dialog_type under $dialog_location]) ++ ifelse([$5], , :, [$5]) ++else ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([no]) ++ ifelse([$6], , :, [$6]) ++fi ++]) ++ +diff -b --unified -Nr dialog-1.3-20190724-orig/fselect.c dialog-1.3-20190724/fselect.c +--- dialog-1.3-20190724-orig/fselect.c 2019-07-25 02:40:15.000000000 +0300 ++++ dialog-1.3-20190724/fselect.c 2019-07-26 14:14:01.063282363 +0300 +@@ -639,7 +639,7 @@ + dlg_print_size(height, width); + dlg_ctl_size(height, width); + +- dialog = dlg_new_window(height, width, ++ dialog = dlg_new_window(height + 1, width, + dlg_box_y_ordinate(height), + dlg_box_x_ordinate(width)); + dlg_register_window(dialog, "fselect", binding); +@@ -647,7 +647,7 @@ + + dlg_mouse_setbase(0, 0); + +- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); ++ dlg_draw_box2(dialog, 0, 0, height + 1, width, dialog_attr, border_attr, border2_attr); + dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); + dlg_draw_title(dialog, title); + +@@ -656,7 +656,7 @@ + /* Draw the input field box */ + tbox_height = 1; + tbox_width = width - (4 * MARGIN + 2); +- tbox_y = height - (BTN_HIGH * 2) + MARGIN; ++ tbox_y = height - (BTN_HIGH * 2) + MARGIN + 1; + tbox_x = (width - tbox_width) / 2; + + w_text = derwin(dialog, tbox_height, tbox_width, tbox_y, tbox_x); +@@ -683,7 +683,7 @@ + else + dbox_width = (width - (6 * MARGIN + 2 * EXT_WIDE)) / 2; + dbox_height = height - MIN_HIGH; +- dbox_y = (2 * MARGIN + 1); ++ dbox_y = (2 * MARGIN + 2); + dbox_x = tbox_x; + + w_work = derwin(dialog, dbox_height, dbox_width, dbox_y, dbox_x); +@@ -743,7 +743,7 @@ + if (show_buttons) { + show_buttons = FALSE; + button = (state < 0) ? 0 : state; +- dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width); ++ dlg_draw_buttons(dialog, height - 1, 0, buttons, button, FALSE, width); + } + + if (first_trace) { +diff -b --unified -Nr dialog-1.3-20190724-orig/menubox.c dialog-1.3-20190724/menubox.c +--- dialog-1.3-20190724-orig/menubox.c 2019-07-25 02:42:20.000000000 +0300 ++++ dialog-1.3-20190724/menubox.c 2019-07-26 14:14:01.063282363 +0300 +@@ -48,7 +48,7 @@ + int item_no; + } ALL_DATA; + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + #define INPUT_ROWS 3 /* rows per inputmenu entry */ + diff --git a/doc/dialog/dialog-1.3-20190728.patch b/doc/dialog/dialog-1.3-20190728.patch new file mode 100644 index 0000000..4d39715 --- /dev/null +++ b/doc/dialog/dialog-1.3-20190728.patch @@ -0,0 +1,467 @@ +diff -b --unified -Nr dialog-1.3-20190728-orig/checklist.c dialog-1.3-20190728/checklist.c +--- dialog-1.3-20190728-orig/checklist.c 2019-07-25 01:17:14.000000000 +0300 ++++ dialog-1.3-20190728/checklist.c 2019-08-01 22:20:16.712332775 +0300 +@@ -29,7 +29,7 @@ + #include + #include + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + typedef struct { + /* the outer-window */ +diff -b --unified -Nr dialog-1.3-20190728-orig/dialog-config.in dialog-1.3-20190728/dialog-config.in +--- dialog-1.3-20190728-orig/dialog-config.in 2019-07-29 02:02:53.000000000 +0300 ++++ dialog-1.3-20190728/dialog-config.in 2019-08-01 22:20:16.712332775 +0300 +@@ -89,7 +89,12 @@ + INCS="-I${prefix}/include" + fi + sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO +- $INCS ++ @CFLAGS@ $INCS ++ENDECHO ++ ;; ++ --ldflags) ++ sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO ++ -L@libdir@ + ENDECHO + ;; + --cflags-only-other) +@@ -97,12 +102,12 @@ + ;; + --libs) + sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO +- -L${exec_prefix}/lib -l${THIS} @LIBS@ ++ -l${THIS} @LIBS@ + ENDECHO + ;; + --libs-only-L) + OPTS= +- for opt in @LIBS@ ++ for opt in -L@libdir@ -l${THIS} @LIBS@ + do + case "x$opt" in + x-L*) +@@ -114,7 +119,7 @@ + ;; + --libs-only-l) + OPTS= +- for opt in @LIBS@ ++ for opt in -L@libdir@ -l${THIS} @LIBS@ + do + case "x$opt" in + x-l*) +@@ -126,7 +131,7 @@ + ;; + --libs-only-other) + OPTS= +- for opt in @LIBS@ ++ for opt in -L@libdir@ -l${THIS} @LIBS@ + do + case "x$opt" in + x-[lL]*) +@@ -170,6 +175,7 @@ + --exec-prefix=ARG sets the executable-prefix of ${THIS} + + --cflags echos the C compiler flags needed to compile with ${THIS} ++ --ldflags echos the linker flags needed to link with ${THIS} + --libs echos the libraries needed to link with ${THIS} + + --libs-only-L echos -L linker options (search path) for ${THIS} +diff -b --unified -Nr dialog-1.3-20190728-orig/dialog.m4 dialog-1.3-20190728/dialog.m4 +--- dialog-1.3-20190728-orig/dialog.m4 1970-01-01 03:00:00.000000000 +0300 ++++ dialog-1.3-20190728/dialog.m4 2019-08-01 22:20:16.712332775 +0300 +@@ -0,0 +1,333 @@ ++dnl # ++dnl # /usr/share/aclocal/dialog.m4 ++dnl # ++dnl # Configure paths for dialog ++dnl # Andrew V.Kosteltsev ++ ++dnl ============================================================ ++dnl ++dnl Synopsis: ++dnl AC_CHECK_DIALOG([MIN-VERSION [, # minimum dialog version, e.g. 1.3-20190211 ++dnl DEFAULT-WITH-DIALOG [, # default value for --with-dialog option ++dnl DEFAULT-WITH-DIALOG-TEST [,# default value for --with-dialog-test option ++dnl EXTEND-VARS [, # whether CFLAGS/LDFLAGS/etc are extended ++dnl ACTION-IF-FOUND [, # action to perform if dialog was found ++dnl ACTION-IF-NOT-FOUND # action to perform if dialog was not found ++dnl ]]]]]]) ++dnl Examples: ++dnl AC_CHECK_DIALOG(1.3-20190211) ++dnl AC_CHECK_DIALOG(1.3-20190211,,,no,CFLAGS="$CFLAGS -DHAVE_DIALOG $DIALOG_CFLAGS") ++dnl AC_CHECK_DIALOG(1.3-20190211,yes,yes,yes,CFLAGS="$CFLAGS -DHAVE_DIALOG") ++dnl ++dnl ++dnl If you have to change prefix returned by dialog-config script or change ++dnl location of dialog-config, you may set environment variable DIALOG_CONFIG, ++dnl for example: ++dnl ++dnl # export DIALOG_CONFIG="dialog-config --prefix=/usr/local" ++dnl # export DIALOG_CONFIG="/usr/bin/dialog-config --prefix=/usr/local" ++dnl ++dnl ============================================================ ++dnl ++dnl ============================================================ ++dnl auxilliary macros ++dnl ============================================================ ++AC_DEFUN([_AC_DIALOG_ERROR], [dnl ++AC_MSG_RESULT([*FAILED*]) ++cat <>/ /' 1>&2 ++$1 ++EOT ++exit 1 ++]) ++ ++AC_DEFUN([_AC_DIALOG_VERBOSE], [dnl ++if test ".$verbose" = .yes; then ++ AC_MSG_RESULT([ $1]) ++fi ++]) ++ ++dnl ============================================================ ++dnl the user macro ++dnl ============================================================ ++AC_DEFUN([AC_CHECK_DIALOG], [dnl ++dnl ++dnl ============================================================ ++dnl prerequisites ++dnl ============================================================ ++AC_REQUIRE([AC_PROG_CC])dnl ++AC_REQUIRE([AC_PROG_CPP])dnl ++dnl ++dnl ============================================================ ++dnl set DIALOG_CONFIG variable ++dnl ============================================================ ++if test -z "$DIALOG_CONFIG"; then ++ DIALOG_CONFIG='dialog-config' ++fi ++dnl ++DIALOG_CFLAGS='' ++DIALOG_LDFLAGS='' ++DIALOG_LIBS='' ++AC_SUBST(DIALOG_CFLAGS) ++AC_SUBST(DIALOG_LDFLAGS) ++AC_SUBST(DIALOG_LIBS) ++dnl ++dnl ============================================================ ++dnl command line options ++dnl ============================================================ ++_AC_DIALOG_VERBOSE([]) ++AC_ARG_WITH(dialog,dnl ++[ --with-dialog[=ARG] Build with dialog Library (default=]ifelse([$2],,yes,$2)[)],dnl ++,dnl ++with_dialog="ifelse([$2],,yes,$2)" ++)dnl ++AC_ARG_WITH(dialog-test,dnl ++[ --with-dialog-test Perform dialog Sanity Test (default=]ifelse([$3],,yes,$3)[)],dnl ++,dnl ++with_dialog_test="ifelse([$3],,yes,$3)" ++)dnl ++_AC_DIALOG_VERBOSE([+ Command Line Options:]) ++_AC_DIALOG_VERBOSE([ o --with-dialog=$with_dialog]) ++_AC_DIALOG_VERBOSE([ o --with-dialog-test=$with_dialog_test]) ++dnl ++dnl ============================================================ ++dnl configuration ++dnl ============================================================ ++if test ".$with_dialog" != .no; then ++ dialog_subdir=no ++ dialog_subdir_opts='' ++ case "$with_dialog" in ++ subdir:* ) ++ dialog_subdir=yes ++ changequote(, )dnl ++ dialog_subdir_opts=`echo $with_dialog | sed -e 's/^subdir:[^ ]*[ ]*//'` ++ with_dialog=`echo $with_dialog | sed -e 's/^subdir:\([^ ]*\).*$/\1/'` ++ changequote([, ])dnl ++ ;; ++ esac ++ dialog_version="" ++ dialog_location="" ++ dialog_type="" ++ dialog_cflags="" ++ dialog_ldflags="" ++ dialog_libs="" ++ if test ".$with_dialog" = .yes; then ++ # via config script in $PATH ++ changequote(, )dnl ++ dialog_version=`($DIALOG_CONFIG --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[-][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$DIALOG_CONFIG --prefix` ++ dialog_type='installed' ++ dialog_cflags=`$DIALOG_CONFIG --cflags` ++ dialog_ldflags=`$DIALOG_CONFIG --ldflags` ++ dialog_libs=`$DIALOG_CONFIG --libs` ++ fi ++ elif test -d "$with_dialog"; then ++ with_dialog=`echo $with_dialog | sed -e 's;/*$;;'` ++ dialog_found=no ++ # via config script under a specified directory ++ # (a standard installation, but not a source tree) ++ if test ".$dialog_found" = .no; then ++ for _dir in $with_dialog/bin $with_dialog; do ++ if test -f "$_dir/dialog-config"; then ++ test -f "$_dir/dialog-config.in" && continue # dialog-config in source tree! ++ changequote(, )dnl ++ dialog_version=`($_dir/dialog-config --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[.][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$_dir/dialog-config --prefix` ++ dialog_type="installed" ++ dialog_cflags=`$_dir/dialog-config --cflags` ++ dialog_ldflags=`$_dir/dialog-config --ldflags` ++ dialog_libs=`$_dir/dialog-config --libs` ++ dialog_found=yes ++ break ++ fi ++ fi ++ done ++ fi ++ fi ++ _AC_DIALOG_VERBOSE([+ Determined Location:]) ++ _AC_DIALOG_VERBOSE([ o path: $dialog_location]) ++ _AC_DIALOG_VERBOSE([ o type: $dialog_type]) ++ if test ".$dialog_version" = .; then ++ if test ".$with_dialog" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog under $with_dialog. ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past).]) ++ else ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog in any system-wide location (see \$PATH). ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past, or set the DIALOG_CONFIG environment variable to the full path ++ to dialog-config).]) ++ fi ++ fi ++ dnl ======================================================== ++ dnl Check whether the found version is sufficiently new ++ dnl ======================================================== ++ _req_version="ifelse([$1],,1.0.0,$1)" ++ for _var in dialog_version _req_version; do ++ eval "_val=\"\$${_var}\"" ++ _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\1/'` ++ _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\2/'` ++ _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\4/'` ++ _hex=`echo dummy | awk '{ printf("%d%02d%02d", major, minor, micro); }' \ ++ "major=$_major" "minor=$_minor" "micro=$_micro"` ++ eval "${_var}_hex=\"\$_hex\"" ++ done ++ _AC_DIALOG_VERBOSE([+ Determined Versions:]) ++ _AC_DIALOG_VERBOSE([ o existing: $dialog_version -> 0x$dialog_version_hex]) ++ _AC_DIALOG_VERBOSE([ o required: $_req_version -> 0x$_req_version_hex]) ++ _ok=0 ++ if test ".$dialog_version_hex" != .; then ++ if test ".$_req_version_hex" != .; then ++ if test $dialog_version_hex -ge $_req_version_hex; then ++ _ok=1 ++ fi ++ fi ++ fi ++ if test ".$_ok" = .0; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog version $dialog_version, but required at least version $_req_version. ++ Upgrade dialog under $dialog_location to $_req_version or higher first, please.]) ++ fi ++ dnl ======================================================== ++ dnl Perform dialog Sanity Compile Check ++ dnl ======================================================== ++ if test ".$with_dialog_test" = .yes; then ++ _ac_save_CFLAGS="$CFLAGS" ++ _ac_save_LDFLAGS="$LDFLAGS" ++ _ac_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ _AC_DIALOG_VERBOSE([+ Test Build Environment:]) ++ _AC_DIALOG_VERBOSE([ o CFLAGS=\"$CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LDFLAGS=\"$LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LIBS=\"$LIBS\"]) ++ cross_compile=no ++ define(_code1, [dnl ++ ++#include ++#include ++#include /* index(3) */ ++ ++#include ++#include ++#include ++ ++ ]) ++ define(_code2, [dnl ++ ++int main( void ) ++{ ++ int status = 0; ++ ++ bzero( (void *)&dialog_vars, sizeof(DIALOG_VARS) ); ++ ++ init_dialog(stdin, stdout); ++ ++ dialog_vars.colors = 1; ++ dialog_vars.backtitle = "\\Z7Test\\Zn \\Z1dialog\\Zn \\Z7Library\\Zn"; ++ dialog_vars.dlg_clear_screen = 1; ++ dialog_vars.sleep_secs = 1; ++ ++ ++ dlg_put_backtitle(); ++ ++ /************************************************* ++ Ruler: 68 characters + 2 spaces left and right: ++ ++ | ----handy-ruler----------------------------------------------------- | */ ++ status = dialog_msgbox( " \\Z4Dialog ==>\\Zn\\Z1libdialog\\Zn\\Z4<== [required]\\Zn ", ++ "\nPackage is installed and corect.\n", ++ 5, 72, 0 ); ++ ++ if( dialog_vars.sleep_secs ) ++ (void)napms(dialog_vars.sleep_secs * 1000); ++ ++ if( dialog_vars.dlg_clear_screen ) ++ { ++ dlg_clear(); ++ (void)refresh(); ++ } ++ end_dialog(); ++ ++ exit( 0 ); ++} ++ ]) ++ _AC_DIALOG_VERBOSE([+ Performing Sanity Checks:]) ++ _AC_DIALOG_VERBOSE([ o pre-processor test]) ++ AC_TRY_CPP(_code1, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity pre-processor check. This means ++ the dialog header dialog.h was not found. ++ We used the following build environment: ++ >> CPP="$CPP" ++ See config.log for possibly more details.]) ++ fi ++ _AC_DIALOG_VERBOSE([ o link check]) ++ AC_TRY_LINK(_code1, _code2, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity linker check. This means ++ the dialog library libdialog.a was not found. ++ We used the following build environment: ++ >> CC="$CC" ++ >> CFLAGS="$CFLAGS" ++ >> LDFLAGS="$LDFLAGS" ++ >> LIBS="$LIBS" ++ See config.log for possibly more details.]) ++ fi ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" != .yes; then ++ CFLAGS="$_ac_save_CFLAGS" ++ LDFLAGS="$_ac_save_LDFLAGS" ++ LIBS="$_ac_save_LIBS" ++ fi ++ else ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" = .yes; then ++ if test ".$dialog_subdir" = .yes; then ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ fi ++ fi ++ fi ++ DIALOG_CFLAGS="$dialog_cflags" ++ DIALOG_LDFLAGS="$dialog_ldflags" ++ DIALOG_LIBS="$dialog_libs" ++ AC_SUBST(DIALOG_CFLAGS) ++ AC_SUBST(DIALOG_LDFLAGS) ++ AC_SUBST(DIALOG_LIBS) ++ ++ AC_SUBST(HAVE_DIALOG, [1]) ++ ++ AC_CHECK_HEADERS(dialog.h dlg_colors.h dlg_keys.h) ++ ++ _AC_DIALOG_VERBOSE([+ Final Results:]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_CFLAGS=\"$DIALOG_CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LDFLAGS=\"$DIALOG_LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LIBS=\"$DIALOG_LIBS\"]) ++fi ++if test ".$with_dialog" != .no; then ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([version $dialog_version, $dialog_type under $dialog_location]) ++ ifelse([$5], , :, [$5]) ++else ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([no]) ++ ifelse([$6], , :, [$6]) ++fi ++]) ++ +diff -b --unified -Nr dialog-1.3-20190728-orig/fselect.c dialog-1.3-20190728/fselect.c +--- dialog-1.3-20190728-orig/fselect.c 2019-07-25 02:40:15.000000000 +0300 ++++ dialog-1.3-20190728/fselect.c 2019-08-01 22:20:16.712332775 +0300 +@@ -639,7 +639,7 @@ + dlg_print_size(height, width); + dlg_ctl_size(height, width); + +- dialog = dlg_new_window(height, width, ++ dialog = dlg_new_window(height + 1, width, + dlg_box_y_ordinate(height), + dlg_box_x_ordinate(width)); + dlg_register_window(dialog, "fselect", binding); +@@ -647,7 +647,7 @@ + + dlg_mouse_setbase(0, 0); + +- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); ++ dlg_draw_box2(dialog, 0, 0, height + 1, width, dialog_attr, border_attr, border2_attr); + dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); + dlg_draw_title(dialog, title); + +@@ -656,7 +656,7 @@ + /* Draw the input field box */ + tbox_height = 1; + tbox_width = width - (4 * MARGIN + 2); +- tbox_y = height - (BTN_HIGH * 2) + MARGIN; ++ tbox_y = height - (BTN_HIGH * 2) + MARGIN + 1; + tbox_x = (width - tbox_width) / 2; + + w_text = derwin(dialog, tbox_height, tbox_width, tbox_y, tbox_x); +@@ -683,7 +683,7 @@ + else + dbox_width = (width - (6 * MARGIN + 2 * EXT_WIDE)) / 2; + dbox_height = height - MIN_HIGH; +- dbox_y = (2 * MARGIN + 1); ++ dbox_y = (2 * MARGIN + 2); + dbox_x = tbox_x; + + w_work = derwin(dialog, dbox_height, dbox_width, dbox_y, dbox_x); +@@ -743,7 +743,7 @@ + if (show_buttons) { + show_buttons = FALSE; + button = (state < 0) ? 0 : state; +- dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width); ++ dlg_draw_buttons(dialog, height - 1, 0, buttons, button, FALSE, width); + } + + if (first_trace) { +diff -b --unified -Nr dialog-1.3-20190728-orig/menubox.c dialog-1.3-20190728/menubox.c +--- dialog-1.3-20190728-orig/menubox.c 2019-07-25 02:42:20.000000000 +0300 ++++ dialog-1.3-20190728/menubox.c 2019-08-01 22:20:16.712332775 +0300 +@@ -48,7 +48,7 @@ + int item_no; + } ALL_DATA; + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + #define INPUT_ROWS 3 /* rows per inputmenu entry */ + diff --git a/doc/dialog/dialog-1.3-20190808.patch b/doc/dialog/dialog-1.3-20190808.patch new file mode 100644 index 0000000..6c27a3b --- /dev/null +++ b/doc/dialog/dialog-1.3-20190808.patch @@ -0,0 +1,460 @@ +diff --unified -Nr dialog-1.3-20190808-orig/checklist.c dialog-1.3-20190808/checklist.c +--- dialog-1.3-20190808-orig/checklist.c 2019-08-05 12:14:59.000000000 +0300 ++++ dialog-1.3-20190808/checklist.c 2019-08-15 19:43:02.164788537 +0300 +@@ -29,7 +29,7 @@ + #include + #include + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + typedef struct { + /* the outer-window */ +diff --unified -Nr dialog-1.3-20190808-orig/dialog-config.in dialog-1.3-20190808/dialog-config.in +--- dialog-1.3-20190808-orig/dialog-config.in 2019-08-02 03:20:15.000000000 +0300 ++++ dialog-1.3-20190808/dialog-config.in 2019-08-15 19:43:02.164788537 +0300 +@@ -60,7 +60,7 @@ + [ -z "$includedir" ] && includedir="${prefix}/include" + + eval LDFLAGS='"@LDFLAGS@"' +- [ -z "$LDFLAGS" ] && LDFLAGS="-L${exec_prefix}/lib" ++ [ -z "$LDFLAGS" ] && LDFLAGS="-L${libdir}" + + eval LIBS='"@LIBS@"' + LIBS="-l${THIS} $LIBS" +@@ -93,10 +93,7 @@ + ;; + # compile/link + --cflags|--cflags-only-I) +- INCS= +- if test "$includedir" != /usr/include ; then +- INCS="-I$includedir" +- fi ++ INCS="-I$includedir" + sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO + $INCS + ENDECHO +@@ -110,6 +107,18 @@ + $LIBS + ENDECHO + ;; ++ --ldflags) ++ OPTS= ++ for opt in $LDFLAGS $LIBS ++ do ++ case "x$opt" in ++ x-[^l]*) ++ OPTS="$OPTS $opt" ++ ;; ++ esac ++ done ++ printf "%s\n" "$OPTS" ++ ;; + --libs-only-L) + OPTS= + for opt in $LDFLAGS $LIBS +@@ -182,6 +191,7 @@ + --cflags echos the C compiler flags needed to compile with ${THIS} + --libs echos the libraries needed to link with ${THIS} + ++ --ldflags echos the linker flags needed to link with ${THIS} + --libs-only-L echos -L linker options (search path) for ${THIS} + --libs-only-l echos -l linker options (libraries) for ${THIS} + --libs-only-other echos linker options other than -L/-l +diff --unified -Nr dialog-1.3-20190808-orig/dialog.m4 dialog-1.3-20190808/dialog.m4 +--- dialog-1.3-20190808-orig/dialog.m4 1970-01-01 03:00:00.000000000 +0300 ++++ dialog-1.3-20190808/dialog.m4 2019-08-15 19:43:02.164788537 +0300 +@@ -0,0 +1,333 @@ ++dnl # ++dnl # /usr/share/aclocal/dialog.m4 ++dnl # ++dnl # Configure paths for dialog ++dnl # Andrew V.Kosteltsev ++ ++dnl ============================================================ ++dnl ++dnl Synopsis: ++dnl AC_CHECK_DIALOG([MIN-VERSION [, # minimum dialog version, e.g. 1.3-20190211 ++dnl DEFAULT-WITH-DIALOG [, # default value for --with-dialog option ++dnl DEFAULT-WITH-DIALOG-TEST [,# default value for --with-dialog-test option ++dnl EXTEND-VARS [, # whether CFLAGS/LDFLAGS/etc are extended ++dnl ACTION-IF-FOUND [, # action to perform if dialog was found ++dnl ACTION-IF-NOT-FOUND # action to perform if dialog was not found ++dnl ]]]]]]) ++dnl Examples: ++dnl AC_CHECK_DIALOG(1.3-20190211) ++dnl AC_CHECK_DIALOG(1.3-20190211,,,no,CFLAGS="$CFLAGS -DHAVE_DIALOG $DIALOG_CFLAGS") ++dnl AC_CHECK_DIALOG(1.3-20190211,yes,yes,yes,CFLAGS="$CFLAGS -DHAVE_DIALOG") ++dnl ++dnl ++dnl If you have to change prefix returned by dialog-config script or change ++dnl location of dialog-config, you may set environment variable DIALOG_CONFIG, ++dnl for example: ++dnl ++dnl # export DIALOG_CONFIG="dialog-config --prefix=/usr/local" ++dnl # export DIALOG_CONFIG="/usr/bin/dialog-config --prefix=/usr/local" ++dnl ++dnl ============================================================ ++dnl ++dnl ============================================================ ++dnl auxilliary macros ++dnl ============================================================ ++AC_DEFUN([_AC_DIALOG_ERROR], [dnl ++AC_MSG_RESULT([*FAILED*]) ++cat <>/ /' 1>&2 ++$1 ++EOT ++exit 1 ++]) ++ ++AC_DEFUN([_AC_DIALOG_VERBOSE], [dnl ++if test ".$verbose" = .yes; then ++ AC_MSG_RESULT([ $1]) ++fi ++]) ++ ++dnl ============================================================ ++dnl the user macro ++dnl ============================================================ ++AC_DEFUN([AC_CHECK_DIALOG], [dnl ++dnl ++dnl ============================================================ ++dnl prerequisites ++dnl ============================================================ ++AC_REQUIRE([AC_PROG_CC])dnl ++AC_REQUIRE([AC_PROG_CPP])dnl ++dnl ++dnl ============================================================ ++dnl set DIALOG_CONFIG variable ++dnl ============================================================ ++if test -z "$DIALOG_CONFIG"; then ++ DIALOG_CONFIG='dialog-config' ++fi ++dnl ++DIALOG_CFLAGS='' ++DIALOG_LDFLAGS='' ++DIALOG_LIBS='' ++AC_SUBST(DIALOG_CFLAGS) ++AC_SUBST(DIALOG_LDFLAGS) ++AC_SUBST(DIALOG_LIBS) ++dnl ++dnl ============================================================ ++dnl command line options ++dnl ============================================================ ++_AC_DIALOG_VERBOSE([]) ++AC_ARG_WITH(dialog,dnl ++[ --with-dialog[=ARG] Build with dialog Library (default=]ifelse([$2],,yes,$2)[)],dnl ++,dnl ++with_dialog="ifelse([$2],,yes,$2)" ++)dnl ++AC_ARG_WITH(dialog-test,dnl ++[ --with-dialog-test Perform dialog Sanity Test (default=]ifelse([$3],,yes,$3)[)],dnl ++,dnl ++with_dialog_test="ifelse([$3],,yes,$3)" ++)dnl ++_AC_DIALOG_VERBOSE([+ Command Line Options:]) ++_AC_DIALOG_VERBOSE([ o --with-dialog=$with_dialog]) ++_AC_DIALOG_VERBOSE([ o --with-dialog-test=$with_dialog_test]) ++dnl ++dnl ============================================================ ++dnl configuration ++dnl ============================================================ ++if test ".$with_dialog" != .no; then ++ dialog_subdir=no ++ dialog_subdir_opts='' ++ case "$with_dialog" in ++ subdir:* ) ++ dialog_subdir=yes ++ changequote(, )dnl ++ dialog_subdir_opts=`echo $with_dialog | sed -e 's/^subdir:[^ ]*[ ]*//'` ++ with_dialog=`echo $with_dialog | sed -e 's/^subdir:\([^ ]*\).*$/\1/'` ++ changequote([, ])dnl ++ ;; ++ esac ++ dialog_version="" ++ dialog_location="" ++ dialog_type="" ++ dialog_cflags="" ++ dialog_ldflags="" ++ dialog_libs="" ++ if test ".$with_dialog" = .yes; then ++ # via config script in $PATH ++ changequote(, )dnl ++ dialog_version=`($DIALOG_CONFIG --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[-][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$DIALOG_CONFIG --prefix` ++ dialog_type='installed' ++ dialog_cflags=`$DIALOG_CONFIG --cflags` ++ dialog_ldflags=`$DIALOG_CONFIG --ldflags` ++ dialog_libs=`$DIALOG_CONFIG --libs` ++ fi ++ elif test -d "$with_dialog"; then ++ with_dialog=`echo $with_dialog | sed -e 's;/*$;;'` ++ dialog_found=no ++ # via config script under a specified directory ++ # (a standard installation, but not a source tree) ++ if test ".$dialog_found" = .no; then ++ for _dir in $with_dialog/bin $with_dialog; do ++ if test -f "$_dir/dialog-config"; then ++ test -f "$_dir/dialog-config.in" && continue # dialog-config in source tree! ++ changequote(, )dnl ++ dialog_version=`($_dir/dialog-config --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[.][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$_dir/dialog-config --prefix` ++ dialog_type="installed" ++ dialog_cflags=`$_dir/dialog-config --cflags` ++ dialog_ldflags=`$_dir/dialog-config --ldflags` ++ dialog_libs=`$_dir/dialog-config --libs` ++ dialog_found=yes ++ break ++ fi ++ fi ++ done ++ fi ++ fi ++ _AC_DIALOG_VERBOSE([+ Determined Location:]) ++ _AC_DIALOG_VERBOSE([ o path: $dialog_location]) ++ _AC_DIALOG_VERBOSE([ o type: $dialog_type]) ++ if test ".$dialog_version" = .; then ++ if test ".$with_dialog" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog under $with_dialog. ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past).]) ++ else ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog in any system-wide location (see \$PATH). ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past, or set the DIALOG_CONFIG environment variable to the full path ++ to dialog-config).]) ++ fi ++ fi ++ dnl ======================================================== ++ dnl Check whether the found version is sufficiently new ++ dnl ======================================================== ++ _req_version="ifelse([$1],,1.0.0,$1)" ++ for _var in dialog_version _req_version; do ++ eval "_val=\"\$${_var}\"" ++ _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\1/'` ++ _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\2/'` ++ _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\4/'` ++ _hex=`echo dummy | awk '{ printf("%d%02d%02d", major, minor, micro); }' \ ++ "major=$_major" "minor=$_minor" "micro=$_micro"` ++ eval "${_var}_hex=\"\$_hex\"" ++ done ++ _AC_DIALOG_VERBOSE([+ Determined Versions:]) ++ _AC_DIALOG_VERBOSE([ o existing: $dialog_version -> 0x$dialog_version_hex]) ++ _AC_DIALOG_VERBOSE([ o required: $_req_version -> 0x$_req_version_hex]) ++ _ok=0 ++ if test ".$dialog_version_hex" != .; then ++ if test ".$_req_version_hex" != .; then ++ if test $dialog_version_hex -ge $_req_version_hex; then ++ _ok=1 ++ fi ++ fi ++ fi ++ if test ".$_ok" = .0; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog version $dialog_version, but required at least version $_req_version. ++ Upgrade dialog under $dialog_location to $_req_version or higher first, please.]) ++ fi ++ dnl ======================================================== ++ dnl Perform dialog Sanity Compile Check ++ dnl ======================================================== ++ if test ".$with_dialog_test" = .yes; then ++ _ac_save_CFLAGS="$CFLAGS" ++ _ac_save_LDFLAGS="$LDFLAGS" ++ _ac_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ _AC_DIALOG_VERBOSE([+ Test Build Environment:]) ++ _AC_DIALOG_VERBOSE([ o CFLAGS=\"$CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LDFLAGS=\"$LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LIBS=\"$LIBS\"]) ++ cross_compile=no ++ define(_code1, [dnl ++ ++#include ++#include ++#include /* index(3) */ ++ ++#include ++#include ++#include ++ ++ ]) ++ define(_code2, [dnl ++ ++int main( void ) ++{ ++ int status = 0; ++ ++ bzero( (void *)&dialog_vars, sizeof(DIALOG_VARS) ); ++ ++ init_dialog(stdin, stdout); ++ ++ dialog_vars.colors = 1; ++ dialog_vars.backtitle = "\\Z7Test\\Zn \\Z1dialog\\Zn \\Z7Library\\Zn"; ++ dialog_vars.dlg_clear_screen = 1; ++ dialog_vars.sleep_secs = 1; ++ ++ ++ dlg_put_backtitle(); ++ ++ /************************************************* ++ Ruler: 68 characters + 2 spaces left and right: ++ ++ | ----handy-ruler----------------------------------------------------- | */ ++ status = dialog_msgbox( " \\Z4Dialog ==>\\Zn\\Z1libdialog\\Zn\\Z4<== [required]\\Zn ", ++ "\nPackage is installed and corect.\n", ++ 5, 72, 0 ); ++ ++ if( dialog_vars.sleep_secs ) ++ (void)napms(dialog_vars.sleep_secs * 1000); ++ ++ if( dialog_vars.dlg_clear_screen ) ++ { ++ dlg_clear(); ++ (void)refresh(); ++ } ++ end_dialog(); ++ ++ exit( 0 ); ++} ++ ]) ++ _AC_DIALOG_VERBOSE([+ Performing Sanity Checks:]) ++ _AC_DIALOG_VERBOSE([ o pre-processor test]) ++ AC_TRY_CPP(_code1, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity pre-processor check. This means ++ the dialog header dialog.h was not found. ++ We used the following build environment: ++ >> CPP="$CPP" ++ See config.log for possibly more details.]) ++ fi ++ _AC_DIALOG_VERBOSE([ o link check]) ++ AC_TRY_LINK(_code1, _code2, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity linker check. This means ++ the dialog library libdialog.a was not found. ++ We used the following build environment: ++ >> CC="$CC" ++ >> CFLAGS="$CFLAGS" ++ >> LDFLAGS="$LDFLAGS" ++ >> LIBS="$LIBS" ++ See config.log for possibly more details.]) ++ fi ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" != .yes; then ++ CFLAGS="$_ac_save_CFLAGS" ++ LDFLAGS="$_ac_save_LDFLAGS" ++ LIBS="$_ac_save_LIBS" ++ fi ++ else ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" = .yes; then ++ if test ".$dialog_subdir" = .yes; then ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ fi ++ fi ++ fi ++ DIALOG_CFLAGS="$dialog_cflags" ++ DIALOG_LDFLAGS="$dialog_ldflags" ++ DIALOG_LIBS="$dialog_libs" ++ AC_SUBST(DIALOG_CFLAGS) ++ AC_SUBST(DIALOG_LDFLAGS) ++ AC_SUBST(DIALOG_LIBS) ++ ++ AC_SUBST(HAVE_DIALOG, [1]) ++ ++ AC_CHECK_HEADERS(dialog.h dlg_colors.h dlg_keys.h) ++ ++ _AC_DIALOG_VERBOSE([+ Final Results:]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_CFLAGS=\"$DIALOG_CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LDFLAGS=\"$DIALOG_LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LIBS=\"$DIALOG_LIBS\"]) ++fi ++if test ".$with_dialog" != .no; then ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([version $dialog_version, $dialog_type under $dialog_location]) ++ ifelse([$5], , :, [$5]) ++else ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([no]) ++ ifelse([$6], , :, [$6]) ++fi ++]) ++ +diff --unified -Nr dialog-1.3-20190808-orig/fselect.c dialog-1.3-20190808/fselect.c +--- dialog-1.3-20190808-orig/fselect.c 2019-08-09 00:28:56.000000000 +0300 ++++ dialog-1.3-20190808/fselect.c 2019-08-15 19:43:02.164788537 +0300 +@@ -639,7 +639,7 @@ + dlg_print_size(height, width); + dlg_ctl_size(height, width); + +- dialog = dlg_new_window(height, width, ++ dialog = dlg_new_window(height + 1, width, + dlg_box_y_ordinate(height), + dlg_box_x_ordinate(width)); + dlg_register_window(dialog, "fselect", binding); +@@ -647,7 +647,7 @@ + + dlg_mouse_setbase(0, 0); + +- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); ++ dlg_draw_box2(dialog, 0, 0, height + 1, width, dialog_attr, border_attr, border2_attr); + dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); + dlg_draw_title(dialog, title); + +@@ -656,7 +656,7 @@ + /* Draw the input field box */ + tbox_height = 1; + tbox_width = width - (4 * MARGIN + 2); +- tbox_y = height - (BTN_HIGH * 2) + MARGIN; ++ tbox_y = height - (BTN_HIGH * 2) + MARGIN + 1; + tbox_x = (width - tbox_width) / 2; + + w_text = derwin(dialog, tbox_height, tbox_width, tbox_y, tbox_x); +@@ -683,7 +683,7 @@ + else + dbox_width = (width - (6 * MARGIN + 2 * EXT_WIDE)) / 2; + dbox_height = height - MIN_HIGH; +- dbox_y = (2 * MARGIN + 1); ++ dbox_y = (2 * MARGIN + 2); + dbox_x = tbox_x; + + w_work = derwin(dialog, dbox_height, dbox_width, dbox_y, dbox_x); +@@ -743,7 +743,7 @@ + if (show_buttons) { + show_buttons = FALSE; + button = (state < 0) ? 0 : state; +- dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width); ++ dlg_draw_buttons(dialog, height - 1, 0, buttons, button, FALSE, width); + } + + if (first_trace) { +diff --unified -Nr dialog-1.3-20190808-orig/menubox.c dialog-1.3-20190808/menubox.c +--- dialog-1.3-20190808-orig/menubox.c 2019-08-09 00:00:23.000000000 +0300 ++++ dialog-1.3-20190808/menubox.c 2019-08-15 19:43:02.164788537 +0300 +@@ -48,7 +48,7 @@ + int item_no; + } ALL_DATA; + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + #define INPUT_ROWS 3 /* rows per inputmenu entry */ + diff --git a/doc/dialog/dialog-1.3-20201126.patch b/doc/dialog/dialog-1.3-20201126.patch new file mode 100644 index 0000000..6832773 --- /dev/null +++ b/doc/dialog/dialog-1.3-20201126.patch @@ -0,0 +1,462 @@ +diff --unified -Nr dialog-1.3-20201126-orig/checklist.c dialog-1.3-20201126/checklist.c +--- dialog-1.3-20201126-orig/checklist.c 2020-11-23 03:37:47.000000000 +0300 ++++ dialog-1.3-20201126/checklist.c 2020-12-18 03:18:05.742635782 +0300 +@@ -29,7 +29,7 @@ + #include + #include + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + typedef struct { + /* the outer-window */ +diff --unified -Nr dialog-1.3-20201126-orig/dialog-config.in dialog-1.3-20201126/dialog-config.in +--- dialog-1.3-20201126-orig/dialog-config.in 2019-09-26 03:50:46.000000000 +0300 ++++ dialog-1.3-20201126/dialog-config.in 2020-12-18 03:18:05.742635782 +0300 +@@ -79,7 +79,7 @@ + [ -n "$LFLAGS" ] && LDFLAGS=" $LFDLAGS" + LDFLAGS="-L${libdir}$LDFLAGS" + fi +- [ -z "$LDFLAGS" ] && LDFLAGS="-L${exec_prefix}/lib" ++ [ -z "$LDFLAGS" ] && LDFLAGS="-L${libdir}" + + # Ignore -L options which do not correspond to an actual directory, + # or which are standard library directories (i.e., the linker is +@@ -133,10 +133,7 @@ + ;; + # compile/link + --cflags|--cflags-only-I) +- INCS= +- if test "$includedir" != /usr/include ; then +- INCS="-I$includedir" +- fi ++ INCS="-I$includedir" + sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO + $INCS + ENDECHO +@@ -145,6 +142,18 @@ + # no -D/-U options should be needed + echo + ;; ++ --ldflags) ++ OPTS= ++ for opt in $LDFLAGS $LIBS ++ do ++ case "x$opt" in ++ x-[^l]*) ++ OPTS="$OPTS $opt" ++ ;; ++ esac ++ done ++ printf "%s\n" "$OPTS" ++ ;; + --libs) + OPTS= + for opt in $lib_flags +@@ -227,8 +236,9 @@ + --exec-prefix=ARG sets the executable-prefix of ${THIS} + + --cflags echos the C compiler flags needed to compile with ${THIS} +- --libs echos the libraries needed to link with ${THIS} ++ --ldflags echos the linker flags needed to link with ${THIS} + ++ --libs echos the libraries needed to link with ${THIS} + --libs-only-L echos -L linker options (search path) for ${THIS} + --libs-only-l echos -l linker options (libraries) for ${THIS} + --libs-only-other echos linker options other than -L/-l +diff --unified -Nr dialog-1.3-20201126-orig/dialog.m4 dialog-1.3-20201126/dialog.m4 +--- dialog-1.3-20201126-orig/dialog.m4 1970-01-01 03:00:00.000000000 +0300 ++++ dialog-1.3-20201126/dialog.m4 2020-12-18 03:18:05.742635782 +0300 +@@ -0,0 +1,332 @@ ++dnl # ++dnl # /usr/share/aclocal/dialog.m4 ++dnl # ++dnl # Configure paths for dialog ++dnl # Andrew V.Kosteltsev ++ ++dnl ============================================================ ++dnl ++dnl Synopsis: ++dnl AC_CHECK_DIALOG([MIN-VERSION [, # minimum dialog version, e.g. 1.3-20190211 ++dnl DEFAULT-WITH-DIALOG [, # default value for --with-dialog option ++dnl DEFAULT-WITH-DIALOG-TEST [,# default value for --with-dialog-test option ++dnl EXTEND-VARS [, # whether CFLAGS/LDFLAGS/etc are extended ++dnl ACTION-IF-FOUND [, # action to perform if dialog was found ++dnl ACTION-IF-NOT-FOUND # action to perform if dialog was not found ++dnl ]]]]]]) ++dnl Examples: ++dnl AC_CHECK_DIALOG(1.3-20201126) ++dnl AC_CHECK_DIALOG(1.3-20201126,,,no,CFLAGS="$CFLAGS -DHAVE_DIALOG $DIALOG_CFLAGS") ++dnl AC_CHECK_DIALOG(1.3-20201126,yes,yes,yes,CFLAGS="$CFLAGS -DHAVE_DIALOG") ++dnl ++dnl ++dnl If you have to change prefix returned by dialog-config script or change ++dnl location of dialog-config, you may set environment variable DIALOG_CONFIG, ++dnl for example: ++dnl ++dnl # export DIALOG_CONFIG="dialog-config --prefix=/usr/local" ++dnl # export DIALOG_CONFIG="/usr/bin/dialog-config --prefix=/usr/local" ++dnl ++dnl ============================================================ ++dnl ++dnl ============================================================ ++dnl auxilliary macros ++dnl ============================================================ ++AC_DEFUN([_AC_DIALOG_ERROR], [dnl ++AC_MSG_RESULT([*FAILED*]) ++cat <>/ /' 1>&2 ++$1 ++EOT ++exit 1 ++]) ++ ++AC_DEFUN([_AC_DIALOG_VERBOSE], [dnl ++if test ".$verbose" = .yes; then ++ AC_MSG_RESULT([ $1]) ++fi ++]) ++ ++dnl ============================================================ ++dnl the user macro ++dnl ============================================================ ++AC_DEFUN([AC_CHECK_DIALOG], [dnl ++dnl ++dnl ============================================================ ++dnl prerequisites ++dnl ============================================================ ++AC_REQUIRE([AC_PROG_CC])dnl ++AC_REQUIRE([AC_PROG_CPP])dnl ++dnl ++dnl ============================================================ ++dnl set DIALOG_CONFIG variable ++dnl ============================================================ ++if test -z "$DIALOG_CONFIG"; then ++ DIALOG_CONFIG='dialog-config' ++fi ++dnl ++DIALOG_CFLAGS='' ++DIALOG_LDFLAGS='' ++DIALOG_LIBS='' ++AC_SUBST(DIALOG_CFLAGS) ++AC_SUBST(DIALOG_LDFLAGS) ++AC_SUBST(DIALOG_LIBS) ++dnl ++dnl ============================================================ ++dnl command line options ++dnl ============================================================ ++_AC_DIALOG_VERBOSE([]) ++AC_ARG_WITH(dialog,dnl ++[ --with-dialog[=ARG] Build with dialog Library (default=]ifelse([$2],,yes,$2)[)],dnl ++,dnl ++with_dialog="ifelse([$2],,yes,$2)" ++)dnl ++AC_ARG_WITH(dialog-test,dnl ++[ --with-dialog-test Perform dialog Sanity Test (default=]ifelse([$3],,yes,$3)[)],dnl ++,dnl ++with_dialog_test="ifelse([$3],,yes,$3)" ++)dnl ++_AC_DIALOG_VERBOSE([+ Command Line Options:]) ++_AC_DIALOG_VERBOSE([ o --with-dialog=$with_dialog]) ++_AC_DIALOG_VERBOSE([ o --with-dialog-test=$with_dialog_test]) ++dnl ++dnl ============================================================ ++dnl configuration ++dnl ============================================================ ++if test ".$with_dialog" != .no; then ++ dialog_subdir=no ++ dialog_subdir_opts='' ++ case "$with_dialog" in ++ subdir:* ) ++ dialog_subdir=yes ++ changequote(, )dnl ++ dialog_subdir_opts=`echo $with_dialog | sed -e 's/^subdir:[^ ]*[ ]*//'` ++ with_dialog=`echo $with_dialog | sed -e 's/^subdir:\([^ ]*\).*$/\1/'` ++ changequote([, ])dnl ++ ;; ++ esac ++ dialog_version="" ++ dialog_location="" ++ dialog_type="" ++ dialog_cflags="" ++ dialog_ldflags="" ++ dialog_libs="" ++ if test ".$with_dialog" = .yes; then ++ # via config script in $PATH ++ changequote(, )dnl ++ dialog_version=`($DIALOG_CONFIG --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[-][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$DIALOG_CONFIG --prefix` ++ dialog_type='installed' ++ dialog_cflags=`$DIALOG_CONFIG --cflags` ++ dialog_ldflags=`$DIALOG_CONFIG --ldflags` ++ dialog_libs=`$DIALOG_CONFIG --libs` ++ fi ++ elif test -d "$with_dialog"; then ++ with_dialog=`echo $with_dialog | sed -e 's;/*$;;'` ++ dialog_found=no ++ # via config script under a specified directory ++ # (a standard installation, but not a source tree) ++ if test ".$dialog_found" = .no; then ++ for _dir in $with_dialog/bin $with_dialog; do ++ if test -f "$_dir/dialog-config"; then ++ test -f "$_dir/dialog-config.in" && continue # dialog-config in source tree! ++ changequote(, )dnl ++ dialog_version=`($_dir/dialog-config --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[.][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$_dir/dialog-config --prefix` ++ dialog_type="installed" ++ dialog_cflags=`$_dir/dialog-config --cflags` ++ dialog_ldflags=`$_dir/dialog-config --ldflags` ++ dialog_libs=`$_dir/dialog-config --libs` ++ dialog_found=yes ++ break ++ fi ++ fi ++ done ++ fi ++ fi ++ _AC_DIALOG_VERBOSE([+ Determined Location:]) ++ _AC_DIALOG_VERBOSE([ o path: $dialog_location]) ++ _AC_DIALOG_VERBOSE([ o type: $dialog_type]) ++ if test ".$dialog_version" = .; then ++ if test ".$with_dialog" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog under $with_dialog. ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past).]) ++ else ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog in any system-wide location (see \$PATH). ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past, or set the DIALOG_CONFIG environment variable to the full path ++ to dialog-config).]) ++ fi ++ fi ++ dnl ======================================================== ++ dnl Check whether the found version is sufficiently new ++ dnl ======================================================== ++ _req_version="ifelse([$1],,1.0.0,$1)" ++ for _var in dialog_version _req_version; do ++ eval "_val=\"\$${_var}\"" ++ _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\1/'` ++ _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\2/'` ++ _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\4/'` ++ _hex=`echo dummy | awk '{ printf("%d%02d%02d", major, minor, micro); }' \ ++ "major=$_major" "minor=$_minor" "micro=$_micro"` ++ eval "${_var}_hex=\"\$_hex\"" ++ done ++ _AC_DIALOG_VERBOSE([+ Determined Versions:]) ++ _AC_DIALOG_VERBOSE([ o existing: $dialog_version -> 0x$dialog_version_hex]) ++ _AC_DIALOG_VERBOSE([ o required: $_req_version -> 0x$_req_version_hex]) ++ _ok=0 ++ if test ".$dialog_version_hex" != .; then ++ if test ".$_req_version_hex" != .; then ++ if test $dialog_version_hex -ge $_req_version_hex; then ++ _ok=1 ++ fi ++ fi ++ fi ++ if test ".$_ok" = .0; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog version $dialog_version, but required at least version $_req_version. ++ Upgrade dialog under $dialog_location to $_req_version or higher first, please.]) ++ fi ++ dnl ======================================================== ++ dnl Perform dialog Sanity Compile Check ++ dnl ======================================================== ++ if test ".$with_dialog_test" = .yes; then ++ _ac_save_CFLAGS="$CFLAGS" ++ _ac_save_LDFLAGS="$LDFLAGS" ++ _ac_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ _AC_DIALOG_VERBOSE([+ Test Build Environment:]) ++ _AC_DIALOG_VERBOSE([ o CFLAGS=\"$CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LDFLAGS=\"$LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LIBS=\"$LIBS\"]) ++ cross_compile=no ++ define(_code1, [dnl ++ ++#include ++#include ++#include /* index(3) */ ++ ++#include ++#include ++#include ++ ++ ]) ++ define(_code2, [dnl ++ ++int main( void ) ++{ ++ int status = 0; ++ ++ bzero( (void *)&dialog_vars, sizeof(DIALOG_VARS) ); ++ ++ init_dialog(stdin, stdout); ++ ++ dialog_vars.colors = 1; ++ dialog_vars.backtitle = "\\Z7Test\\Zn \\Z1dialog\\Zn \\Z7Library\\Zn"; ++ dialog_vars.dlg_clear_screen = 1; ++ dialog_vars.sleep_secs = 1; ++ ++ ++ dlg_put_backtitle(); ++ ++ /************************************************* ++ Ruler: 68 characters + 2 spaces left and right: ++ ++ | ----handy-ruler----------------------------------------------------- | */ ++ status = dialog_msgbox( " \\Z4Dialog ==>\\Zn\\Z1libdialog\\Zn\\Z4<== [required]\\Zn ", ++ "\nPackage is installed and corect.\n", ++ 5, 72, 0 ); ++ ++ if( dialog_vars.sleep_secs ) ++ (void)napms(dialog_vars.sleep_secs * 1000); ++ ++ if( dialog_vars.dlg_clear_screen ) ++ { ++ dlg_clear(); ++ (void)refresh(); ++ } ++ end_dialog(); ++ ++ exit( 0 ); ++} ++ ]) ++ _AC_DIALOG_VERBOSE([+ Performing Sanity Checks:]) ++ _AC_DIALOG_VERBOSE([ o pre-processor test]) ++ AC_TRY_CPP(_code1, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity pre-processor check. This means ++ the dialog header dialog.h was not found. ++ We used the following build environment: ++ >> CPP="$CPP" ++ See config.log for possibly more details.]) ++ fi ++ _AC_DIALOG_VERBOSE([ o link check]) ++ AC_TRY_LINK(_code1, _code2, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity linker check. This means ++ the dialog library libdialog.a was not found. ++ We used the following build environment: ++ >> CC="$CC" ++ >> CFLAGS="$CFLAGS" ++ >> LDFLAGS="$LDFLAGS" ++ >> LIBS="$LIBS" ++ See config.log for possibly more details.]) ++ fi ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" != .yes; then ++ CFLAGS="$_ac_save_CFLAGS" ++ LDFLAGS="$_ac_save_LDFLAGS" ++ LIBS="$_ac_save_LIBS" ++ fi ++ else ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" = .yes; then ++ if test ".$dialog_subdir" = .yes; then ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ fi ++ fi ++ fi ++ DIALOG_CFLAGS="$dialog_cflags" ++ DIALOG_LDFLAGS="$dialog_ldflags" ++ DIALOG_LIBS="$dialog_libs" ++ AC_SUBST(DIALOG_CFLAGS) ++ AC_SUBST(DIALOG_LDFLAGS) ++ AC_SUBST(DIALOG_LIBS) ++ ++ AC_SUBST(HAVE_DIALOG, [1]) ++ ++ AC_CHECK_HEADERS(dialog.h dlg_colors.h dlg_keys.h) ++ ++ _AC_DIALOG_VERBOSE([+ Final Results:]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_CFLAGS=\"$DIALOG_CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LDFLAGS=\"$DIALOG_LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LIBS=\"$DIALOG_LIBS\"]) ++fi ++if test ".$with_dialog" != .no; then ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([version $dialog_version, $dialog_type under $dialog_location]) ++ ifelse([$5], , :, [$5]) ++else ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([no]) ++ ifelse([$6], , :, [$6]) ++fi ++]) +diff --unified -Nr dialog-1.3-20201126-orig/fselect.c dialog-1.3-20201126/fselect.c +--- dialog-1.3-20201126-orig/fselect.c 2020-11-23 12:03:54.000000000 +0300 ++++ dialog-1.3-20201126/fselect.c 2020-12-18 03:18:05.742635782 +0300 +@@ -649,7 +649,7 @@ + dlg_print_size(height, width); + dlg_ctl_size(height, width); + +- dialog = dlg_new_window(height, width, ++ dialog = dlg_new_window(height + 1, width, + dlg_box_y_ordinate(height), + dlg_box_x_ordinate(width)); + dlg_register_window(dialog, "fselect", binding); +@@ -657,7 +657,7 @@ + + dlg_mouse_setbase(0, 0); + +- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); ++ dlg_draw_box2(dialog, 0, 0, height + 1, width, dialog_attr, border_attr, border2_attr); + dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); + dlg_draw_title(dialog, title); + +@@ -666,7 +666,7 @@ + /* Draw the input field box */ + tbox_height = 1; + tbox_width = width - (4 * MARGIN + 2); +- tbox_y = height - (BTN_HIGH * 2) + MARGIN; ++ tbox_y = height - (BTN_HIGH * 2) + MARGIN + 1; + tbox_x = (width - tbox_width) / 2; + + w_text = dlg_der_window(dialog, tbox_height, tbox_width, tbox_y, tbox_x); +@@ -692,7 +692,7 @@ + else + dbox_width = (width - (6 * MARGIN + 2 * EXT_WIDE)) / 2; + dbox_height = height - MIN_HIGH; +- dbox_y = (2 * MARGIN + 1); ++ dbox_y = (2 * MARGIN + 2); + dbox_x = tbox_x; + + w_work = dlg_der_window(dialog, dbox_height, dbox_width, dbox_y, dbox_x); +@@ -750,7 +750,7 @@ + if (show_buttons) { + show_buttons = FALSE; + button = (state < 0) ? 0 : state; +- dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width); ++ dlg_draw_buttons(dialog, height - 1, 0, buttons, button, FALSE, width); + } + + if (first_trace) { +diff --unified -Nr dialog-1.3-20201126-orig/menubox.c dialog-1.3-20201126/menubox.c +--- dialog-1.3-20201126-orig/menubox.c 2020-11-24 00:03:11.000000000 +0300 ++++ dialog-1.3-20201126/menubox.c 2020-12-18 03:18:05.742635782 +0300 +@@ -48,7 +48,7 @@ + int item_no; + } ALL_DATA; + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + #define INPUT_ROWS 3 /* rows per inputmenu entry */ + diff --git a/doc/dialog/dialog-1.3-20210117.patch b/doc/dialog/dialog-1.3-20210117.patch new file mode 100644 index 0000000..68b1eba --- /dev/null +++ b/doc/dialog/dialog-1.3-20210117.patch @@ -0,0 +1,462 @@ +diff --unified -Nr dialog-1.3-20210117-orig/checklist.c dialog-1.3-20210117/checklist.c +--- dialog-1.3-20210117-orig/checklist.c 2020-11-23 03:37:47.000000000 +0300 ++++ dialog-1.3-20210117/checklist.c 2021-02-14 20:14:51.095326506 +0300 +@@ -29,7 +29,7 @@ + #include + #include + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + typedef struct { + /* the outer-window */ +diff --unified -Nr dialog-1.3-20210117-orig/dialog-config.in dialog-1.3-20210117/dialog-config.in +--- dialog-1.3-20210117-orig/dialog-config.in 2019-09-26 03:50:46.000000000 +0300 ++++ dialog-1.3-20210117/dialog-config.in 2021-02-14 20:14:51.095326506 +0300 +@@ -79,7 +79,7 @@ + [ -n "$LFLAGS" ] && LDFLAGS=" $LFDLAGS" + LDFLAGS="-L${libdir}$LDFLAGS" + fi +- [ -z "$LDFLAGS" ] && LDFLAGS="-L${exec_prefix}/lib" ++ [ -z "$LDFLAGS" ] && LDFLAGS="-L${libdir}" + + # Ignore -L options which do not correspond to an actual directory, + # or which are standard library directories (i.e., the linker is +@@ -133,10 +133,7 @@ + ;; + # compile/link + --cflags|--cflags-only-I) +- INCS= +- if test "$includedir" != /usr/include ; then +- INCS="-I$includedir" +- fi ++ INCS="-I$includedir" + sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO + $INCS + ENDECHO +@@ -145,6 +142,18 @@ + # no -D/-U options should be needed + echo + ;; ++ --ldflags) ++ OPTS= ++ for opt in $LDFLAGS $LIBS ++ do ++ case "x$opt" in ++ x-[^l]*) ++ OPTS="$OPTS $opt" ++ ;; ++ esac ++ done ++ printf "%s\n" "$OPTS" ++ ;; + --libs) + OPTS= + for opt in $lib_flags +@@ -227,8 +236,9 @@ + --exec-prefix=ARG sets the executable-prefix of ${THIS} + + --cflags echos the C compiler flags needed to compile with ${THIS} +- --libs echos the libraries needed to link with ${THIS} ++ --ldflags echos the linker flags needed to link with ${THIS} + ++ --libs echos the libraries needed to link with ${THIS} + --libs-only-L echos -L linker options (search path) for ${THIS} + --libs-only-l echos -l linker options (libraries) for ${THIS} + --libs-only-other echos linker options other than -L/-l +diff --unified -Nr dialog-1.3-20210117-orig/dialog.m4 dialog-1.3-20210117/dialog.m4 +--- dialog-1.3-20210117-orig/dialog.m4 1970-01-01 03:00:00.000000000 +0300 ++++ dialog-1.3-20210117/dialog.m4 2021-02-14 20:14:51.095326506 +0300 +@@ -0,0 +1,332 @@ ++dnl # ++dnl # /usr/share/aclocal/dialog.m4 ++dnl # ++dnl # Configure paths for dialog ++dnl # Andrew V.Kosteltsev ++ ++dnl ============================================================ ++dnl ++dnl Synopsis: ++dnl AC_CHECK_DIALOG([MIN-VERSION [, # minimum dialog version, e.g. 1.3-20190211 ++dnl DEFAULT-WITH-DIALOG [, # default value for --with-dialog option ++dnl DEFAULT-WITH-DIALOG-TEST [,# default value for --with-dialog-test option ++dnl EXTEND-VARS [, # whether CFLAGS/LDFLAGS/etc are extended ++dnl ACTION-IF-FOUND [, # action to perform if dialog was found ++dnl ACTION-IF-NOT-FOUND # action to perform if dialog was not found ++dnl ]]]]]]) ++dnl Examples: ++dnl AC_CHECK_DIALOG(1.3-20210117) ++dnl AC_CHECK_DIALOG(1.3-20210117,,,no,CFLAGS="$CFLAGS -DHAVE_DIALOG $DIALOG_CFLAGS") ++dnl AC_CHECK_DIALOG(1.3-20210117,yes,yes,yes,CFLAGS="$CFLAGS -DHAVE_DIALOG") ++dnl ++dnl ++dnl If you have to change prefix returned by dialog-config script or change ++dnl location of dialog-config, you may set environment variable DIALOG_CONFIG, ++dnl for example: ++dnl ++dnl # export DIALOG_CONFIG="dialog-config --prefix=/usr/local" ++dnl # export DIALOG_CONFIG="/usr/bin/dialog-config --prefix=/usr/local" ++dnl ++dnl ============================================================ ++dnl ++dnl ============================================================ ++dnl auxilliary macros ++dnl ============================================================ ++AC_DEFUN([_AC_DIALOG_ERROR], [dnl ++AC_MSG_RESULT([*FAILED*]) ++cat <>/ /' 1>&2 ++$1 ++EOT ++exit 1 ++]) ++ ++AC_DEFUN([_AC_DIALOG_VERBOSE], [dnl ++if test ".$verbose" = .yes; then ++ AC_MSG_RESULT([ $1]) ++fi ++]) ++ ++dnl ============================================================ ++dnl the user macro ++dnl ============================================================ ++AC_DEFUN([AC_CHECK_DIALOG], [dnl ++dnl ++dnl ============================================================ ++dnl prerequisites ++dnl ============================================================ ++AC_REQUIRE([AC_PROG_CC])dnl ++AC_REQUIRE([AC_PROG_CPP])dnl ++dnl ++dnl ============================================================ ++dnl set DIALOG_CONFIG variable ++dnl ============================================================ ++if test -z "$DIALOG_CONFIG"; then ++ DIALOG_CONFIG='dialog-config' ++fi ++dnl ++DIALOG_CFLAGS='' ++DIALOG_LDFLAGS='' ++DIALOG_LIBS='' ++AC_SUBST(DIALOG_CFLAGS) ++AC_SUBST(DIALOG_LDFLAGS) ++AC_SUBST(DIALOG_LIBS) ++dnl ++dnl ============================================================ ++dnl command line options ++dnl ============================================================ ++_AC_DIALOG_VERBOSE([]) ++AC_ARG_WITH(dialog,dnl ++[ --with-dialog[=ARG] Build with dialog Library (default=]ifelse([$2],,yes,$2)[)],dnl ++,dnl ++with_dialog="ifelse([$2],,yes,$2)" ++)dnl ++AC_ARG_WITH(dialog-test,dnl ++[ --with-dialog-test Perform dialog Sanity Test (default=]ifelse([$3],,yes,$3)[)],dnl ++,dnl ++with_dialog_test="ifelse([$3],,yes,$3)" ++)dnl ++_AC_DIALOG_VERBOSE([+ Command Line Options:]) ++_AC_DIALOG_VERBOSE([ o --with-dialog=$with_dialog]) ++_AC_DIALOG_VERBOSE([ o --with-dialog-test=$with_dialog_test]) ++dnl ++dnl ============================================================ ++dnl configuration ++dnl ============================================================ ++if test ".$with_dialog" != .no; then ++ dialog_subdir=no ++ dialog_subdir_opts='' ++ case "$with_dialog" in ++ subdir:* ) ++ dialog_subdir=yes ++ changequote(, )dnl ++ dialog_subdir_opts=`echo $with_dialog | sed -e 's/^subdir:[^ ]*[ ]*//'` ++ with_dialog=`echo $with_dialog | sed -e 's/^subdir:\([^ ]*\).*$/\1/'` ++ changequote([, ])dnl ++ ;; ++ esac ++ dialog_version="" ++ dialog_location="" ++ dialog_type="" ++ dialog_cflags="" ++ dialog_ldflags="" ++ dialog_libs="" ++ if test ".$with_dialog" = .yes; then ++ # via config script in $PATH ++ changequote(, )dnl ++ dialog_version=`($DIALOG_CONFIG --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[-][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$DIALOG_CONFIG --prefix` ++ dialog_type='installed' ++ dialog_cflags=`$DIALOG_CONFIG --cflags` ++ dialog_ldflags=`$DIALOG_CONFIG --ldflags` ++ dialog_libs=`$DIALOG_CONFIG --libs` ++ fi ++ elif test -d "$with_dialog"; then ++ with_dialog=`echo $with_dialog | sed -e 's;/*$;;'` ++ dialog_found=no ++ # via config script under a specified directory ++ # (a standard installation, but not a source tree) ++ if test ".$dialog_found" = .no; then ++ for _dir in $with_dialog/bin $with_dialog; do ++ if test -f "$_dir/dialog-config"; then ++ test -f "$_dir/dialog-config.in" && continue # dialog-config in source tree! ++ changequote(, )dnl ++ dialog_version=`($_dir/dialog-config --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[.][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$_dir/dialog-config --prefix` ++ dialog_type="installed" ++ dialog_cflags=`$_dir/dialog-config --cflags` ++ dialog_ldflags=`$_dir/dialog-config --ldflags` ++ dialog_libs=`$_dir/dialog-config --libs` ++ dialog_found=yes ++ break ++ fi ++ fi ++ done ++ fi ++ fi ++ _AC_DIALOG_VERBOSE([+ Determined Location:]) ++ _AC_DIALOG_VERBOSE([ o path: $dialog_location]) ++ _AC_DIALOG_VERBOSE([ o type: $dialog_type]) ++ if test ".$dialog_version" = .; then ++ if test ".$with_dialog" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog under $with_dialog. ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past).]) ++ else ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog in any system-wide location (see \$PATH). ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past, or set the DIALOG_CONFIG environment variable to the full path ++ to dialog-config).]) ++ fi ++ fi ++ dnl ======================================================== ++ dnl Check whether the found version is sufficiently new ++ dnl ======================================================== ++ _req_version="ifelse([$1],,1.0.0,$1)" ++ for _var in dialog_version _req_version; do ++ eval "_val=\"\$${_var}\"" ++ _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\1/'` ++ _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\2/'` ++ _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\4/'` ++ _hex=`echo dummy | awk '{ printf("%d%02d%02d", major, minor, micro); }' \ ++ "major=$_major" "minor=$_minor" "micro=$_micro"` ++ eval "${_var}_hex=\"\$_hex\"" ++ done ++ _AC_DIALOG_VERBOSE([+ Determined Versions:]) ++ _AC_DIALOG_VERBOSE([ o existing: $dialog_version -> 0x$dialog_version_hex]) ++ _AC_DIALOG_VERBOSE([ o required: $_req_version -> 0x$_req_version_hex]) ++ _ok=0 ++ if test ".$dialog_version_hex" != .; then ++ if test ".$_req_version_hex" != .; then ++ if test $dialog_version_hex -ge $_req_version_hex; then ++ _ok=1 ++ fi ++ fi ++ fi ++ if test ".$_ok" = .0; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog version $dialog_version, but required at least version $_req_version. ++ Upgrade dialog under $dialog_location to $_req_version or higher first, please.]) ++ fi ++ dnl ======================================================== ++ dnl Perform dialog Sanity Compile Check ++ dnl ======================================================== ++ if test ".$with_dialog_test" = .yes; then ++ _ac_save_CFLAGS="$CFLAGS" ++ _ac_save_LDFLAGS="$LDFLAGS" ++ _ac_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ _AC_DIALOG_VERBOSE([+ Test Build Environment:]) ++ _AC_DIALOG_VERBOSE([ o CFLAGS=\"$CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LDFLAGS=\"$LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o LIBS=\"$LIBS\"]) ++ cross_compile=no ++ define(_code1, [dnl ++ ++#include ++#include ++#include /* index(3) */ ++ ++#include ++#include ++#include ++ ++ ]) ++ define(_code2, [dnl ++ ++int main( void ) ++{ ++ int status = 0; ++ ++ bzero( (void *)&dialog_vars, sizeof(DIALOG_VARS) ); ++ ++ init_dialog(stdin, stdout); ++ ++ dialog_vars.colors = 1; ++ dialog_vars.backtitle = "\\Z7Test\\Zn \\Z1dialog\\Zn \\Z7Library\\Zn"; ++ dialog_vars.dlg_clear_screen = 1; ++ dialog_vars.sleep_secs = 1; ++ ++ ++ dlg_put_backtitle(); ++ ++ /************************************************* ++ Ruler: 68 characters + 2 spaces left and right: ++ ++ | ----handy-ruler----------------------------------------------------- | */ ++ status = dialog_msgbox( " \\Z4Dialog ==>\\Zn\\Z1libdialog\\Zn\\Z4<== [required]\\Zn ", ++ "\nPackage is installed and corect.\n", ++ 5, 72, 0 ); ++ ++ if( dialog_vars.sleep_secs ) ++ (void)napms(dialog_vars.sleep_secs * 1000); ++ ++ if( dialog_vars.dlg_clear_screen ) ++ { ++ dlg_clear(); ++ (void)refresh(); ++ } ++ end_dialog(); ++ ++ exit( 0 ); ++} ++ ]) ++ _AC_DIALOG_VERBOSE([+ Performing Sanity Checks:]) ++ _AC_DIALOG_VERBOSE([ o pre-processor test]) ++ AC_TRY_CPP(_code1, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity pre-processor check. This means ++ the dialog header dialog.h was not found. ++ We used the following build environment: ++ >> CPP="$CPP" ++ See config.log for possibly more details.]) ++ fi ++ _AC_DIALOG_VERBOSE([ o link check]) ++ AC_TRY_LINK(_code1, _code2, _ok=yes, _ok=no) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity linker check. This means ++ the dialog library libdialog.a was not found. ++ We used the following build environment: ++ >> CC="$CC" ++ >> CFLAGS="$CFLAGS" ++ >> LDFLAGS="$LDFLAGS" ++ >> LIBS="$LIBS" ++ See config.log for possibly more details.]) ++ fi ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" != .yes; then ++ CFLAGS="$_ac_save_CFLAGS" ++ LDFLAGS="$_ac_save_LDFLAGS" ++ LIBS="$_ac_save_LIBS" ++ fi ++ else ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" = .yes; then ++ if test ".$dialog_subdir" = .yes; then ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ fi ++ fi ++ fi ++ DIALOG_CFLAGS="$dialog_cflags" ++ DIALOG_LDFLAGS="$dialog_ldflags" ++ DIALOG_LIBS="$dialog_libs" ++ AC_SUBST(DIALOG_CFLAGS) ++ AC_SUBST(DIALOG_LDFLAGS) ++ AC_SUBST(DIALOG_LIBS) ++ ++ AC_SUBST(HAVE_DIALOG, [1]) ++ ++ AC_CHECK_HEADERS(dialog.h dlg_colors.h dlg_keys.h) ++ ++ _AC_DIALOG_VERBOSE([+ Final Results:]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_CFLAGS=\"$DIALOG_CFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LDFLAGS=\"$DIALOG_LDFLAGS\"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LIBS=\"$DIALOG_LIBS\"]) ++fi ++if test ".$with_dialog" != .no; then ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([version $dialog_version, $dialog_type under $dialog_location]) ++ ifelse([$5], , :, [$5]) ++else ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([no]) ++ ifelse([$6], , :, [$6]) ++fi ++]) +diff --unified -Nr dialog-1.3-20210117-orig/fselect.c dialog-1.3-20210117/fselect.c +--- dialog-1.3-20210117-orig/fselect.c 2021-01-16 20:19:15.000000000 +0300 ++++ dialog-1.3-20210117/fselect.c 2021-02-14 20:14:51.095326506 +0300 +@@ -650,7 +650,7 @@ + dlg_print_size(height, width); + dlg_ctl_size(height, width); + +- dialog = dlg_new_window(height, width, ++ dialog = dlg_new_window(height + 1, width, + dlg_box_y_ordinate(height), + dlg_box_x_ordinate(width)); + dlg_register_window(dialog, "fselect", binding); +@@ -658,7 +658,7 @@ + + dlg_mouse_setbase(0, 0); + +- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); ++ dlg_draw_box2(dialog, 0, 0, height + 1, width, dialog_attr, border_attr, border2_attr); + dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); + dlg_draw_title(dialog, title); + +@@ -667,7 +667,7 @@ + /* Draw the input field box */ + tbox_height = 1; + tbox_width = width - (4 * MARGIN + 2); +- tbox_y = height - (BTN_HIGH * 2) + MARGIN; ++ tbox_y = height - (BTN_HIGH * 2) + MARGIN + 1; + tbox_x = (width - tbox_width) / 2; + + w_text = dlg_der_window(dialog, tbox_height, tbox_width, tbox_y, tbox_x); +@@ -693,7 +693,7 @@ + else + dbox_width = (width - (6 * MARGIN + 2 * EXT_WIDE)) / 2; + dbox_height = height - MIN_HIGH; +- dbox_y = (2 * MARGIN + 1); ++ dbox_y = (2 * MARGIN + 2); + dbox_x = tbox_x; + + w_work = dlg_der_window(dialog, dbox_height, dbox_width, dbox_y, dbox_x); +@@ -751,7 +751,7 @@ + if (show_buttons) { + show_buttons = FALSE; + button = (state < 0) ? 0 : state; +- dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width); ++ dlg_draw_buttons(dialog, height - 1, 0, buttons, button, FALSE, width); + } + + if (first_trace) { +diff --unified -Nr dialog-1.3-20210117-orig/menubox.c dialog-1.3-20210117/menubox.c +--- dialog-1.3-20210117-orig/menubox.c 2020-11-24 00:03:11.000000000 +0300 ++++ dialog-1.3-20210117/menubox.c 2021-02-14 20:14:51.095326506 +0300 +@@ -48,7 +48,7 @@ + int item_no; + } ALL_DATA; + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + #define INPUT_ROWS 3 /* rows per inputmenu entry */ + diff --git a/doc/dialog/dialog-1.3-20210621.patch b/doc/dialog/dialog-1.3-20210621.patch new file mode 100644 index 0000000..7ffd1ae --- /dev/null +++ b/doc/dialog/dialog-1.3-20210621.patch @@ -0,0 +1,454 @@ +diff --unified -Nr dialog-1.3-20210621-orig/checklist.c dialog-1.3-20210621/checklist.c +--- dialog-1.3-20210621-orig/checklist.c 2020-11-23 03:37:47.000000000 +0300 ++++ dialog-1.3-20210621/checklist.c 2021-10-15 12:06:20.636637175 +0300 +@@ -29,7 +29,7 @@ + #include + #include + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + typedef struct { + /* the outer-window */ +diff --unified -Nr dialog-1.3-20210621-orig/dialog-config.in dialog-1.3-20210621/dialog-config.in +--- dialog-1.3-20210621-orig/dialog-config.in 2021-03-06 02:48:36.000000000 +0300 ++++ dialog-1.3-20210621/dialog-config.in 2021-10-15 12:06:20.635637175 +0300 +@@ -79,7 +79,7 @@ + [ -n "$LFLAGS" ] && LDFLAGS=" $LFDLAGS" + LDFLAGS="-L${libdir}$LDFLAGS" + fi +- [ -z "$LDFLAGS" ] && LDFLAGS="-L${exec_prefix}/lib" ++ [ -z "$LDFLAGS" ] && LDFLAGS="-L${libdir}" + + # Ignore -L options which do not correspond to an actual directory, + # or which are standard library directories (i.e., the linker is +@@ -134,10 +134,7 @@ + ;; + # compile/link + --cflags|--cflags-only-I) +- INCS= +- if test "$includedir" != /usr/include ; then +- INCS="-I$includedir" +- fi ++ INCS="-I$includedir" + sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO + $INCS + ENDECHO +@@ -146,6 +143,18 @@ + # no -D/-U options should be needed + echo + ;; ++ --ldflags) ++ OPTS= ++ for opt in $LDFLAGS $LIBS ++ do ++ case "x$opt" in ++ x-[^l]*) ++ OPTS="$OPTS $opt" ++ ;; ++ esac ++ done ++ printf "%s\n" "$OPTS" ++ ;; + --libs) + OPTS= + for opt in $lib_flags +@@ -228,8 +237,9 @@ + --exec-prefix=ARG sets the executable-prefix of ${THIS} + + --cflags echos the C compiler flags needed to compile with ${THIS} +- --libs echos the libraries needed to link with ${THIS} ++ --ldflags echos the linker flags needed to link with ${THIS} + ++ --libs echos the libraries needed to link with ${THIS} + --libs-only-L echos -L linker options (search path) for ${THIS} + --libs-only-l echos -l linker options (libraries) for ${THIS} + --libs-only-other echos linker options other than -L/-l +diff --unified -Nr dialog-1.3-20210621-orig/dialog.m4 dialog-1.3-20210621/dialog.m4 +--- dialog-1.3-20210621-orig/dialog.m4 1970-01-01 03:00:00.000000000 +0300 ++++ dialog-1.3-20210621/dialog.m4 2021-10-15 12:06:20.635637175 +0300 +@@ -0,0 +1,324 @@ ++dnl # ++dnl # /usr/share/aclocal/dialog.m4 ++dnl # ++dnl # Configure paths for dialog ++dnl # Andrew V.Kosteltsev ++ ++dnl ============================================================ ++dnl ++dnl Synopsis: ++dnl AC_CHECK_DIALOG([MIN-VERSION [, # minimum dialog version, e.g. 1.3-20190211 ++dnl DEFAULT-WITH-DIALOG [, # default value for --with-dialog option ++dnl DEFAULT-WITH-DIALOG-TEST [,# default value for --with-dialog-test option ++dnl EXTEND-VARS [, # whether CFLAGS/LDFLAGS/etc are extended ++dnl ACTION-IF-FOUND [, # action to perform if dialog was found ++dnl ACTION-IF-NOT-FOUND # action to perform if dialog was not found ++dnl ]]]]]]) ++dnl Examples: ++dnl AC_CHECK_DIALOG(1.3-20210621) ++dnl AC_CHECK_DIALOG(1.3-20210621,,,no,CFLAGS="$CFLAGS -DHAVE_DIALOG $DIALOG_CFLAGS") ++dnl AC_CHECK_DIALOG(1.3-20210621,yes,yes,yes,CFLAGS="$CFLAGS -DHAVE_DIALOG") ++dnl ++dnl ++dnl If you have to change prefix returned by dialog-config script or change ++dnl location of dialog-config, you may set environment variable DIALOG_CONFIG, ++dnl for example: ++dnl ++dnl # export DIALOG_CONFIG="dialog-config --prefix=/usr/local" ++dnl # export DIALOG_CONFIG="/usr/bin/dialog-config --prefix=/usr/local" ++dnl ++dnl ============================================================ ++dnl ++dnl ============================================================ ++dnl auxilliary macros ++dnl ============================================================ ++AC_DEFUN([_AC_DIALOG_ERROR], [dnl ++AC_MSG_RESULT([*FAILED*]) ++cat <>/ /' 1>&2 ++$1 ++EOT ++exit 1 ++]) ++ ++AC_DEFUN([_AC_DIALOG_VERBOSE], [dnl ++if test ".$verbose" = .yes; then ++ AC_MSG_RESULT([ $1]) ++fi ++]) ++ ++dnl ============================================================ ++dnl the user macro ++dnl ============================================================ ++AC_DEFUN([AC_CHECK_DIALOG], [dnl ++dnl ++dnl ============================================================ ++dnl prerequisites ++dnl ============================================================ ++AC_REQUIRE([AC_PROG_CC])dnl ++AC_REQUIRE([AC_PROG_CPP])dnl ++dnl ++dnl ============================================================ ++dnl set DIALOG_CONFIG variable ++dnl ============================================================ ++if test -z "$DIALOG_CONFIG"; then ++ DIALOG_CONFIG='dialog-config' ++fi ++dnl ++DIALOG_CFLAGS='' ++DIALOG_LDFLAGS='' ++DIALOG_LIBS='' ++AC_SUBST(DIALOG_CFLAGS) ++AC_SUBST(DIALOG_LDFLAGS) ++AC_SUBST(DIALOG_LIBS) ++dnl ++dnl ============================================================ ++dnl command line options ++dnl ============================================================ ++_AC_DIALOG_VERBOSE([]) ++AC_ARG_WITH(dialog,dnl ++[ --with-dialog[=ARG] Build with dialog Library (default=]ifelse([$2],,yes,$2)[)],dnl ++,dnl ++with_dialog="ifelse([$2],,yes,$2)" ++)dnl ++AC_ARG_WITH(dialog-test,dnl ++[ --with-dialog-test Perform dialog Sanity Test (default=]ifelse([$3],,yes,$3)[)],dnl ++,dnl ++with_dialog_test="ifelse([$3],,yes,$3)" ++)dnl ++_AC_DIALOG_VERBOSE([+ Command Line Options:]) ++_AC_DIALOG_VERBOSE([ o --with-dialog=$with_dialog]) ++_AC_DIALOG_VERBOSE([ o --with-dialog-test=$with_dialog_test]) ++dnl ++dnl ============================================================ ++dnl configuration ++dnl ============================================================ ++if test ".$with_dialog" != .no; then ++ dialog_subdir=no ++ dialog_subdir_opts='' ++ case "$with_dialog" in ++ subdir:* ) ++ dialog_subdir=yes ++ changequote(, )dnl ++ dialog_subdir_opts=`echo $with_dialog | sed -e 's/^subdir:[^ ]*[ ]*//'` ++ with_dialog=`echo $with_dialog | sed -e 's/^subdir:\([^ ]*\).*$/\1/'` ++ changequote([, ])dnl ++ ;; ++ esac ++ dialog_version="" ++ dialog_location="" ++ dialog_type="" ++ dialog_cflags="" ++ dialog_ldflags="" ++ dialog_libs="" ++ if test ".$with_dialog" = .yes; then ++ # via config script in $PATH ++ changequote(, )dnl ++ dialog_version=`($DIALOG_CONFIG --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[-][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$DIALOG_CONFIG --prefix` ++ dialog_type='installed' ++ dialog_cflags=`$DIALOG_CONFIG --cflags` ++ dialog_ldflags=`$DIALOG_CONFIG --ldflags` ++ dialog_libs=`$DIALOG_CONFIG --libs` ++ fi ++ elif test -d "$with_dialog"; then ++ with_dialog=`echo $with_dialog | sed -e 's;/*$;;'` ++ dialog_found=no ++ # via config script under a specified directory ++ # (a standard installation, but not a source tree) ++ if test ".$dialog_found" = .no; then ++ for _dir in $with_dialog/bin $with_dialog; do ++ if test -f "$_dir/dialog-config"; then ++ test -f "$_dir/dialog-config.in" && continue # dialog-config in source tree! ++ changequote(, )dnl ++ dialog_version=`($_dir/dialog-config --version) 2>/dev/null |\ ++ sed -e 's/^.*\([0-9]\.[0-9]*[.][0-9]*\).*$/\1/'` ++ changequote([, ])dnl ++ if test ".$dialog_version" != .; then ++ dialog_location=`$_dir/dialog-config --prefix` ++ dialog_type="installed" ++ dialog_cflags=`$_dir/dialog-config --cflags` ++ dialog_ldflags=`$_dir/dialog-config --ldflags` ++ dialog_libs=`$_dir/dialog-config --libs` ++ dialog_found=yes ++ break ++ fi ++ fi ++ done ++ fi ++ fi ++ _AC_DIALOG_VERBOSE([+ Determined Location:]) ++ _AC_DIALOG_VERBOSE([ o path: $dialog_location]) ++ _AC_DIALOG_VERBOSE([ o type: $dialog_type]) ++ if test ".$dialog_version" = .; then ++ if test ".$with_dialog" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog under $with_dialog. ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past).]) ++ else ++ _AC_DIALOG_ERROR([dnl ++ Unable to locate dialog in any system-wide location (see \$PATH). ++ Please specify the correct path to either a dialog installation tree ++ (use --with-dialog=DIR if you used --prefix=DIR for installing dialog in ++ the past, or set the DIALOG_CONFIG environment variable to the full path ++ to dialog-config).]) ++ fi ++ fi ++ dnl ======================================================== ++ dnl Check whether the found version is sufficiently new ++ dnl ======================================================== ++ _req_version="ifelse([$1],,1.0.0,$1)" ++ for _var in dialog_version _req_version; do ++ eval "_val=\"\$${_var}\"" ++ _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\1/'` ++ _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\2/'` ++ _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[.]]\)\([[0-9]]*\)/\4/'` ++ _hex=`echo dummy | awk '{ printf("%d%02d%02d", major, minor, micro); }' \ ++ "major=$_major" "minor=$_minor" "micro=$_micro"` ++ eval "${_var}_hex=\"\$_hex\"" ++ done ++ _AC_DIALOG_VERBOSE([+ Determined Versions:]) ++ _AC_DIALOG_VERBOSE([ o existing: $dialog_version -> 0x$dialog_version_hex]) ++ _AC_DIALOG_VERBOSE([ o required: $_req_version -> 0x$_req_version_hex]) ++ _ok=0 ++ if test ".$dialog_version_hex" != .; then ++ if test ".$_req_version_hex" != .; then ++ if test $dialog_version_hex -ge $_req_version_hex; then ++ _ok=1 ++ fi ++ fi ++ fi ++ if test ".$_ok" = .0; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog version $dialog_version, but required at least version $_req_version. ++ Upgrade dialog under $dialog_location to $_req_version or higher first, please.]) ++ fi ++ dnl ======================================================== ++ dnl Perform dialog Sanity Compile Check ++ dnl ======================================================== ++ if test ".$with_dialog_test" = .yes; then ++ _ac_save_CFLAGS="$CFLAGS" ++ _ac_save_LDFLAGS="$LDFLAGS" ++ _ac_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ _AC_DIALOG_VERBOSE([+ Test Build Environment:]) ++ _AC_DIALOG_VERBOSE([ o CFLAGS="$CFLAGS"]) ++ _AC_DIALOG_VERBOSE([ o LDFLAGS="$LDFLAGS"]) ++ _AC_DIALOG_VERBOSE([ o LIBS="$LIBS"]) ++ cross_compile=no ++ define([_code1], [ ++#include ++#include ++#include /* index(3) */ ++ ++#include ++#include ++#include ++ ]) ++ define([_code2], [ ++ int status = 0; ++ ++ bzero( (void *)&dialog_vars, sizeof(DIALOG_VARS) ); ++ ++ init_dialog(stdin, stdout); ++ ++ dialog_vars.colors = 1; ++ dialog_vars.backtitle = "Test dialog Library"; ++ dialog_vars.dlg_clear_screen = 1; ++ dialog_vars.sleep_secs = 1; ++ ++ ++ dlg_put_backtitle(); ++ ++ /************************************************* ++ Ruler: 68 characters + 2 spaces left and right: ++ ++ | ----handy-ruler----------------------------------------------------- | */ ++ status = dialog_msgbox( " Dialog ==>libdialog<== [required] ", ++ "\nPackage is installed and corect.\n", ++ 5, 72, 0 ); ++ ++ if( dialog_vars.sleep_secs ) ++ (void)napms(dialog_vars.sleep_secs * 1000); ++ ++ if( dialog_vars.dlg_clear_screen ) ++ { ++ dlg_clear(); ++ (void)refresh(); ++ } ++ end_dialog(); ++ ]) ++ _AC_DIALOG_VERBOSE([+ Performing Sanity Checks:]) ++ _AC_DIALOG_VERBOSE([ o pre-processor test]) ++ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([_code1], [_code2])], [_ok=yes], [_ok=no]) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity pre-processor check. This means ++ the dialog header dialog.h was not found. ++ We used the following build environment: ++ >> CPP="$CPP" ++ See config.log for possibly more details.]) ++ fi ++ _AC_DIALOG_VERBOSE([ o link check]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([_code1], [_code2])], [_ok=yes], [_ok=no]) ++ if test ".$_ok" != .yes; then ++ _AC_DIALOG_ERROR([dnl ++ Found dialog $dialog_version under $dialog_location, but ++ was unable to perform a sanity linker check. This means ++ the dialog library libdialog.a was not found. ++ We used the following build environment: ++ >> CC="$CC" ++ >> CFLAGS="$CFLAGS" ++ >> LDFLAGS="$LDFLAGS" ++ >> LIBS="$LIBS" ++ See config.log for possibly more details.]) ++ fi ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" != .yes; then ++ CFLAGS="$_ac_save_CFLAGS" ++ LDFLAGS="$_ac_save_LDFLAGS" ++ LIBS="$_ac_save_LIBS" ++ fi ++ else ++ _extendvars="ifelse([$4],,yes,$4)" ++ if test ".$_extendvars" = .yes; then ++ if test ".$dialog_subdir" = .yes; then ++ CFLAGS="$CFLAGS $dialog_cflags" ++ LDFLAGS="$LDFLAGS $dialog_ldflags" ++ LIBS="$LIBS $dialog_libs" ++ fi ++ fi ++ fi ++ DIALOG_CFLAGS="$dialog_cflags" ++ DIALOG_LDFLAGS="$dialog_ldflags" ++ DIALOG_LIBS="$dialog_libs" ++ AC_SUBST(DIALOG_CFLAGS) ++ AC_SUBST(DIALOG_LDFLAGS) ++ AC_SUBST(DIALOG_LIBS) ++ ++ AC_SUBST(HAVE_DIALOG, [1]) ++ ++ AC_CHECK_HEADERS(dialog.h dlg_colors.h dlg_keys.h) ++ ++ _AC_DIALOG_VERBOSE([+ Final Results:]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_CFLAGS="$DIALOG_CFLAGS"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LDFLAGS="$DIALOG_LDFLAGS"]) ++ _AC_DIALOG_VERBOSE([ o DIALOG_LIBS="$DIALOG_LIBS"]) ++fi ++if test ".$with_dialog" != .no; then ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([version $dialog_version, $dialog_type under $dialog_location]) ++ ifelse([$5], , :, [$5]) ++else ++ AC_MSG_CHECKING(for libdialog) ++ AC_MSG_RESULT([no]) ++ ifelse([$6], , :, [$6]) ++fi ++]) +diff --unified -Nr dialog-1.3-20210621-orig/fselect.c dialog-1.3-20210621/fselect.c +--- dialog-1.3-20210621-orig/fselect.c 2021-06-21 22:50:35.000000000 +0300 ++++ dialog-1.3-20210621/fselect.c 2021-10-15 12:06:20.635637175 +0300 +@@ -659,7 +659,7 @@ + dlg_print_size(height, width); + dlg_ctl_size(height, width); + +- dialog = dlg_new_window(height, width, ++ dialog = dlg_new_window(height + 1, width, + dlg_box_y_ordinate(height), + dlg_box_x_ordinate(width)); + dlg_register_window(dialog, "fselect", binding); +@@ -667,7 +667,7 @@ + + dlg_mouse_setbase(0, 0); + +- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); ++ dlg_draw_box2(dialog, 0, 0, height + 1, width, dialog_attr, border_attr, border2_attr); + dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); + dlg_draw_title(dialog, title); + +@@ -676,7 +676,7 @@ + /* Draw the input field box */ + tbox_height = 1; + tbox_width = width - (4 * MARGIN + 2); +- tbox_y = height - (BTN_HIGH * 2) + MARGIN; ++ tbox_y = height - (BTN_HIGH * 2) + MARGIN + 1; + tbox_x = (width - tbox_width) / 2; + + w_text = dlg_der_window(dialog, tbox_height, tbox_width, tbox_y, tbox_x); +@@ -702,7 +702,7 @@ + else + dbox_width = (width - (6 * MARGIN + 2 * EXT_WIDE)) / 2; + dbox_height = height - MIN_HIGH; +- dbox_y = (2 * MARGIN + 1); ++ dbox_y = (2 * MARGIN + 2); + dbox_x = tbox_x; + + w_work = dlg_der_window(dialog, dbox_height, dbox_width, dbox_y, dbox_x); +@@ -760,7 +760,7 @@ + if (show_buttons) { + show_buttons = FALSE; + button = (state < 0) ? 0 : state; +- dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width); ++ dlg_draw_buttons(dialog, height - 1, 0, buttons, button, FALSE, width); + } + + if (first_trace) { +diff --unified -Nr dialog-1.3-20210621-orig/menubox.c dialog-1.3-20210621/menubox.c +--- dialog-1.3-20210621-orig/menubox.c 2020-11-24 00:03:11.000000000 +0300 ++++ dialog-1.3-20210621/menubox.c 2021-10-15 12:06:20.636637175 +0300 +@@ -48,7 +48,7 @@ + int item_no; + } ALL_DATA; + +-#define MIN_HIGH (1 + (5 * MARGIN)) ++#define MIN_HIGH 4 + + #define INPUT_ROWS 3 /* rows per inputmenu entry */ + -- cgit v1.2.3