Control: tags -1 + fixed-upstream patch

On 2023-01-29 21:39 +0100, Sven Joachim wrote:

> Control: reopen -1
> Control: tags -1 - bullseye bookworm
> Control: tags -1 + trixie
>
> On 2022-03-28 11:09 +0000, Debian Bug Tracking System wrote:
>
>>  cpm (0.32-1.4) unstable; urgency=medium
>>    * debian/control:
>>      - Update Build-Depends:
>>        + libncurses5-dev -> libncurses-dev (Closes: #851594).
>
> Unfortunately, this does not change anything.  In a chroot where
> /usr/bin/libncurses{w,5}-config are not present (I set up a suitable
> path-exclude for dpkg), cpm still FTBFS with the same error as in the
> original report:
>
> ,----
> | checking for wget_wch in -lncursesw... yes
> | checking for ncursesw5-config... no
> | : error: Could not find ncursesw5-config anywhere.
> `----
>
> It seems that the bug has been fixed in the upstream git repository, I
> will try that next.

Commit d2bcaa553a49[1] contains a patch.  It only applies with fuzz in
the Debian package, so I had to run "quilt refresh" after putting it
into debian/patches.  Attached is that version which made cpm build
successfully.

Sven


1. 
https://github.com/comotion/cpm/commit/d2bcaa553a4989f49c75fe1fd51418cfe22a0dbd

From d2bcaa553a4989f49c75fe1fd51418cfe22a0dbd Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmik...@vmiklos.hu>
Date: Thu, 14 Mar 2019 22:24:36 +0100
Subject: [PATCH 1/1] Port to ncursesw6

ESCDELAY is removed in ncursesw6, but set_escdelay() is available in
ncursesw5 already, so that can be changed unconditionally, it seems to
me.
---
 configure       |    6 +++++-
 configure.in    |    6 +++++-
 interface_gui.c |    2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

--- a/configure
+++ b/configure
@@ -3583,7 +3583,11 @@ fi

       if test "${ac_cv_lib_ncursesw_wget_wch}" == "yes"; then
         curses_found=1
-        curses_config=ncursesw5-config
+        if test -n "$(type -p ncursesw6-config)" ; then
+          curses_config=ncursesw6-config
+        else
+          curses_config=ncursesw5-config
+        fi
       fi
       ;;
   pdcurses)
--- a/configure.in
+++ b/configure.in
@@ -57,7 +57,11 @@ case ${use_curses_lib} in
       AC_CHECK_LIB(ncursesw, wget_wch)
       if test "${ac_cv_lib_ncursesw_wget_wch}" = "yes"; then
         curses_found=1
-        curses_config=ncursesw5-config
+        if test -n "$(type -p ncursesw6-config)" ; then
+          curses_config=ncursesw6-config
+        else
+          curses_config=ncursesw5-config
+        fi
       fi
       ;;
   pdcurses)
--- a/interface_gui.c
+++ b/interface_gui.c
@@ -1872,7 +1872,7 @@ int initializeScreen(void)
     assume_default_colors(-1, -1);

     /* we do not want any ESC delay */
-    ESCDELAY = 0;
+    set_escdelay(0);

     /* start color mode */
     initCDKColor();

Reply via email to