Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 306655 - dev-libs/expat: need unicode/wide-unicode versions of the library
Summary: dev-libs/expat: need unicode/wide-unicode versions of the library
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 250930
  Show dependency tree
 
Reported: 2010-02-24 14:29 UTC by Tiziano Müller (RETIRED)
Modified: 2011-08-01 10:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
expat-2.0.1-r3.ebuild.diff (expat-2.0.1-r3.ebuild.diff,1.77 KB, patch)
2011-05-19 14:06 UTC, Gilles Dartiguelongue (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tiziano Müller (RETIRED) gentoo-dev 2010-02-24 14:29:15 UTC
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.
Comment 1 Tiziano Müller (RETIRED) gentoo-dev 2010-02-24 14:39:24 UTC
Little correction: I now build all three variants of expat based on use flags now.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2010-02-24 14:44:11 UTC
How about USE cjk (global) instead of USE wide-unicode (local) ?

cjk - Adds support for Multi-byte character languages (Chinese, Japanese, Korean)
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-02-25 09:30:32 UTC
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.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2010-03-12 08:52:40 UTC
If it wasn't clear already, please do commit this, since it will solve security bug #250930 (bundling of vulnerable expat)
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-05-19 14:06:57 UTC
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).
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-06-06 13:48:14 UTC
without any comments I'll try to commit this before the weekend.
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2011-08-01 10:14:06 UTC
+  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