#1079507 ncurses-base: compile with wgetch-events code

#1079507#5
Date:
2024-08-24 05:47:32 UTC
From:
To:
Dear Maintainer,

While trying to compile the haskell example program for module ncurses,
I got the following error:
While compiling: got:
Failed to build ncurses-0.2.16.
Build log (
/home/paul/.cabal/logs/ghc-9.4.7/ncurses-0.2.16-d863cb3651dc4baa1ab3f5d6ea2fc5693727b1cc5282fbebd8a1f4a6edda73e5.log
):
Warning: ncurses.cabal:85:21: version operators used. To use version operators
the package needs to specify at least 'cabal-version: >= 1.8'.
Configuring ncurses-0.2.16...
Preprocessing library for ncurses-0.2.16..
c2hs: C header contains errors:

dist/build/UI/NCurses/Enums.chs.h:140: (column 25) [ERROR]  >>> Unknown
identifier!
  Cannot find a definition for `KEY_EVENT' in the header file.

Error: cabal: Failed to build ncurses-0.2.16 (which is required by
exe:ncurses1 from ncurses1-0.1.0.0). See the build log above for details.

Contacting the old maintainer of the ncurses Haskell module he said:
Regarding the specific case of KEY_EVENT, it was removed from the ncurses
public API (a backwards-incompatible breaking change), and the configure flag
`--enable-wgetch-events` is required to re-enable it. I recommend filing a bug
against the Debian ncurses package asking them to set that flag when building.

I downloaded latest source code, and:
paul@albukerk:~/Téléchargements/ncurses-6.4-20230520$ ./configure --help|grep
event
  --enable-wgetch-events  compile with wgetch-events code
paul@albukerk:~/Téléchargements/ncurses-6.4-20230520$

So the option seems to still exist.

So... this is a wish request to build with this flag enable.

#1079507#10
Date:
2024-08-24 16:08:45 UTC
From:
To:
It exists but has been deprecated four years ago, in the same
patchlevel that removed the KEY_EVENT macro.  See the NEWS file:

,----
| 20200817
| 	+ mark wgetch-events feature as deprecated.
| 	+ prevent KEY_EVENT from appearing in curses.h unless the configure
| 	  option --enable-wgetch-events is used (report by Werner Fink).
`----

Not going to happen, I am afraid.  You could try the following change to
haskell-ncurses:

#1079507#15
Date:
2024-08-24 16:49:22 UTC
From:
To:
That's what I recommend.  I deprecated it because (aside from
copy/paste stuff like this), there were no known uses of the feature,
and there was no documentation.

#1079507#18
Date:
2024-08-24 16:49:22 UTC
From:
To:
That's what I recommend.  I deprecated it because (aside from
copy/paste stuff like this), there were no known uses of the feature,
and there was no documentation.