Subject: Re: How to enable USE_GNU_ICONV for glib2?
To: None <>
From: Bernd Ernesti <>
List: tech-pkg
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 <> 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 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:

---	7 Apr 2005 02:35:39 -0000	1.8
+++	6 Jan 2006 18:47:20 -0000
@@ -16,6 +16,12 @@
 BUILDLINK_PKGSRCDIR.glib2?=	../../devel/glib2
+.include "../../mk/"
+.if defined(PKG_OPTIONS.glib2) && !empty(PKG_OPTIONS.glib2:Mgnu-iconv)
 .include "../../converters/libiconv/"
 .include "../../devel/gettext-lib/"
> 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.

I agree.

> 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.