To be able to unbundle expat from certain packages we need a unicode/wide-unicode enabled expat-library. Luckily expat upstream has a recipe for it in their README which I implemented in an ebuild in my overlay here: http://git.overlays.gentoo.org/gitweb/?p=dev/dev-zero.git;a=blob_plain;f=dev-libs/expat/expat-2.0.1-r4.ebuild;hb=HEAD There is a question though: should we build one library for UTF-16 unicode (probably named libexpatu.so) and one for UTF-16 unicode using wchar_t (libexpatw.so) or should we have just one additional one, namely libexpatw.so (as I did in the ebuild)? If you don't care about additional libs laying around I'd go for the libexpatu/libexpatw solution. The headers are always the same, btw. An app which wants to link against a UTF-16/wchar_t version of expat just has to define the corresponding macro (XML_UNICODE OR XML_UNICODE_WCHAR_T) and link against the right lib.
Little correction: I now build all three variants of expat based on use flags now.
How about USE cjk (global) instead of USE wide-unicode (local) ? cjk - Adds support for Multi-byte character languages (Chinese, Japanese, Korean)
I would suggest "UTF-16" (or "utf-16") USE flag. UTF-16 is not intended only for Chinese, Japanese and Korean. UTF-8 also supports multi-byte characters.
If it wasn't clear already, please do commit this, since it will solve security bug #250930 (bundling of vulnerable expat)
Created attachment 273979 [details, diff] expat-2.0.1-r3.ebuild.diff ack too,but since it doesn't pull any other deps and it's fast enough to build maybe build everything. Attached is a tentative ebuild based on the one from Tiziano's overlay. I haven't copied static-libs stuff since I have no idea if it is used and I'm not really comfortable with removing the la files of this lib (except maybe for the w and u variant since they are new).
without any comments I'll try to commit this before the weekend.
+ 01 Aug 2011; Samuli Suominen <ssuominen@gentoo.org> +expat-2.0.1-r5.ebuild: + Build libexpatu (unicode) and libexpatw (unicode wchar_t) libraries wrt + #306655 by Gilles Dartiguelongue and Tiziano Müller