Gentoo Archives: gentoo-dev

From: Sebastian Pipping <sping@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Cc: freedesktop-bugs@g.o
Subject: [gentoo-dev] [rfc] dev-libs/expat[unicode] and dev-libs/libbsd dependency
Date: Wed, 31 May 2017 12:19:33
Message-Id: 9a1b4531-dac1-848d-af13-f010e704f40b@gentoo.org
1 Hi!
2
3
4 The next release of dev-libs/expat is not far away and there are two
5 things that I would appreciate input with, before the next bump in Gentoo:
6
7
8 -DXML_UNICODE_WCHAR_T issues and Gentoo/Debian mismatch
9 =======================================================
10
11 With USE=unicode, on Gentoo two extra libraries are built:
12
13 * libexpatu.so (with CPPFLAGS=-DXML_UNICODE)
14 * libexpatw.so (with CPPFLAGS=-DXML_UNICODE_WCHAR_T)
15 ^
16 However, -DXML_UNICODE_WCHAR_T has only ever worked with 2-byte wchar_t,
17 while 4-byte wchar_t seems mainstream on Linux (and GCC -fshort-wchar
18 would required libc to have the same, if you actually wanted to pass
19 those wchar_t strings to wprintf and friends).
20
21 So libexpatw.so in Gentoo is not functional at the moment.
22
23 To make things worse, Debian has libexpatw.so with
24 CPPFLAGS=-DXML_UNICODE, which corresponds to current libexpatu.so in
25 Gentoo, rather than libexpatw.so.
26
27
28 How do you evaluate these options:
29
30 a) Keep libexpatu.so + change libexpatw.so to CPPFLAGS=-DXML_UNICODE
31
32 b) Drop libexpatu.so + change libexpatw.so to CPPFLAGS=-DXML_UNICODE
33
34
35 Depend on dev-libs/libbsd
36 =========================
37
38 The next release is very likely to add (optional but helpful) support
39 for arc4random_buf that dev-libs/libbsd provides (especially on systems
40 with glibc prior to 2.25) [1]. I wonder if Expat's proximity to @system
41 has any strong implications on whether
42
43 A) libbsd should be a default-off use dependency
44 IUSE="libbsd" RDEPEND="libbsd? ( dev-libs/libbsd )"
45
46 B) libbsd could be a default-on use dependency
47 IUSE="+libbsd" RDEPEND="libbsd? ( dev-libs/libbsd )"
48
49 C) libbsd could even go into DEPEND and RDEPEND directly, or
50 RDEPEND="dev-libs/libbsd"
51
52 D) libbsd should not become any kind of future dependency of
53 dev-libs/expat.
54
55
56 Thanks for your time!
57
58 Best
59
60
61
62 Sebastian
63
64
65 [1] https://github.com/libexpat/libexpat/pull/30

Replies