--- /var/db/portage/gentoo/sys-libs/ncurses/ncurses-6.4_p20230401.ebuild 2023-05-13 10:04:39.442342312 +0200 +++ /var/db/portage/local/sys-libs/ncurses/ncurses-6.4_p20230401.ebuild 2023-05-13 10:31:51.314898367 +0200 @@ -149,11 +149,6 @@ # bug #214642 BUILD_CPPFLAGS+=" -D_GNU_SOURCE" - # bug #852665 - if [[ ${CHOST} == *-cygwin* ]]; then - BUILD_CPPFLAGS+=" -DBUILDING_NCURSES" - fi - # Build the various variants of ncurses -- narrow, wide, and threaded. #510440 # Order matters here -- we want unicode/thread versions to come last so that the # binaries in /usr/bin support both wide and narrow. @@ -182,7 +177,7 @@ echo "int main() {}" | \ $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \ || lbuildflags="${dbuildflags}" - + lbuildflags="" # We can't re-use the multilib BUILD_DIR because we run outside of it. BUILD_DIR="${WORKDIR}" \ CC=${BUILD_CC} \ @@ -299,7 +294,17 @@ src_compile() { # See comments in src_configure. if ! has_version -b "~sys-libs/${P}:0" ; then - BUILD_DIR="${WORKDIR}" do_compile cross -C progs tic$(get_exeext) + # We could possibly merge these two branches but opting to be + # conservative when merging some of the Prefix changes. + + if [[ ${CHOST} == *-cygwin* ]] && ! multilib_is_native_abi ; then + # We make 'tic$(x)' here, for Cygwin having x=".exe". + BUILD_DIR="${WORKDIR}" \ + do_compile cross -C progs all PROGS='tic$(x)' + else + BUILD_DIR="${WORKDIR}" \ + do_compile cross -C progs tic + fi fi multilib-minimal_src_compile