If crosscompiling ncurses one gets in the configure options --target, which breaks the compilation. I confirmed this by downloading the exact same source and applying the same patches, and then configuring one build with the *exact* same configuration as the ebuild provided, and then compiling in the same way just without --target. Devs have said --target should not be used here. Still haven't figured out which eclass is doing this.
..Sorry never mind, seems like --target CTARGET is set by ebuild.sh if CTARGET is defined. unset CTARGET didn't solved it. I'll look up some more to see why source builds and ebuild doesn't...
Ok, think I figured the problem. To reproduce crosscompile ncurses with unicode. It'll need an include dir in / that's compatible with its arch (read the ebuild - second call of do_compile). To solve it should instead compare CBUILD with CHOST and if different use SYSROOT/usr/include instead. Output: configure --prefix=/usr --host=powerpc-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/lib --with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo --with-shared --without-debug --without-profile --without-gpm --disable-termcap --enable-symlinks --with-rcs-ids --with-manpage-format=normal --enable-const --enable-colorfgbg --enable-echo --enable-warnings --without-assertions --with-leaks --without-expanded --with-macros --without-trace --with-chtype=long --with-mmask-t=long --disable-ext-colors --disable-ext-mouse --without-ada --enable-widec --includedir=/usr/include/ncursesw --build=i686-pc-linux-gnu checking for egrep... grep -E Configuring NCURSES 5.6 ABI 5 (Thu Aug 14 00:21:26 UTC 2008) checking build system type... i686-pc-linux-gnu checking host system type... powerpc-unknown-linux-gnu checking target system type... powerpc-unknown-linux-gnu Configuring for linux-gnu (...) ** Include-directory is not in a standard location cd man && make DESTDIR="" sources (...) In file included from /var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/ncurses/tinfo/comp_hash.c:42: /var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/ncurses/curses.priv.h:1082: attention : noms de paramètres (sans type) dans la déclaration de fonction /var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/ncurses/curses.priv.h:1083: erreur: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_nc_to_widechar’ make[1]: *** [make_hash] Erreur 1
*** This bug has been marked as a duplicate of bug 214642 ***