Subject: Re: How to enable USE_GNU_ICONV for glib2?
To: None <tech-pkg@NetBSD.org>
From: Bernd Ernesti <firstname.lastname@example.org>
Date: 01/06/2006 20:21:48
On Fri, Jan 06, 2006 at 06:55:09PM +0100, Julio M. Merino Vidal wrote:
> On 1/6/06, Bernd Ernesti <email@example.com> wrote:
> > Later I discovered that some packages, like arts and ORBit2 doesn't build
> > shared libraries for some of the libraries anymore:
> This might be because you haven't patched glib2's buildlink3.mk file to
> pull in gnu iconv as well, so it is not adding the correct libraries in the
> buildlink directory.
Yeah, I thought it was that problem and was allready trying to figure it out.
I come up with the following additional patch:
--- buildlink3.mk 7 Apr 2005 02:35:39 -0000 1.8
+++ buildlink3.mk 6 Jan 2006 18:47:20 -0000
@@ -16,6 +16,12 @@
.endif # GLIB2_BUILDLINK3_MK
+.if defined(PKG_OPTIONS.glib2) && !empty(PKG_OPTIONS.glib2:Mgnu-iconv)
> It seems dangerous to me to make this option package-specific. Having
> a mixture of packages (libraries) built with different implementations of iconv
> will surely cause problems if both libraries are loaded at the same time by a
> concrete program. I hit this problem -- random crashes -- with different SSL
> implementations. (And this is one of the reasons I added the plural handling
> hack in gettext-lib.)
But what should we do with glib2, which seems to not enable all features with
the native iconv?
Juha-Matti Tilli gave me this example:
% /usr/bin/iconv -f iso-8859-15 -t ascii//translit
iconv: iconv_open(ascii//translit, iso-8859-15): Invalid argument
> I don't know how we'd solve this... asking the user to rebuild one package
> with different options to get another one working is... ugly, at the very least.
> Maybe we'd have a glib2-gnu package that relies on gnu iconv and gnu
> gettext, which might be parallel installable with glib2 and could be used by,
> e.g., irssi?
The best would if the citrus iconv would support the needed things for irssi.