sys-libs/ncurses needs the config option --enable-term-driver set when cross-compiling for mingw, otherwise it fails saying that Sleep and DWORD aren't defined. FWIW, vcpkg sets --enable-term-driver on mingw: https://github.com/microsoft/vcpkg/blob/master/ports/ncurses/portfile.cmake --- a/ncurses-6.4_p20240414.ebuild 2024-05-11 17:12:18.000000000 +0100 +++ b/ncurses-6.4_p20240414.ebuild 2024-05-18 12:23:18.228532680 +0100 @@ -297,7 +297,6 @@ # The configure script uses ldd to parse the linked output which # is flaky for cross-compiling/multilib/ldd versions/etc... $(use_with gpm gpm libgpm.so.1) - --disable-term-driver --disable-termcap --enable-symlinks --with-manpage-format=normal @@ -318,6 +317,15 @@ --disable-pkg-ldflags ) + case ${CHOST} in + *-mingw32*) + conf+=( --enable-term-driver ) + ;; + *) + conf+=( --disable-term-driver ) + ;; + esac + if [[ ${target} == ncurses*w ]] ; then conf+=( --enable-widec ) else Reproducible: Always Steps to Reproduce: 1. crossdev -t x86_64-w64-mingw32 2. USE="libraries tools" emerge cross-x86_64-w64-mingw32/mingw64-runtime (so that we get pthreads.h) 3. x86_64-w64-mingw32-emerge sys-libs/ncurses
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4310c6008e8734af315a6ec67ed888ace5579829 commit 4310c6008e8734af315a6ec67ed888ace5579829 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-01-04 11:44:04 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-01-04 11:44:26 +0000 sys-libs/ncurses: pass --enable-term-driver for mingw Closes: https://bugs.gentoo.org/932152 Signed-off-by: Sam James <sam@gentoo.org> sys-libs/ncurses/ncurses-6.5_p20241109.ebuild | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)