From fce5b7fe78346ef088c148e5b03fbff116277b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 23 Nov 2009 19:38:34 +0000 Subject: [PATCH] Adding a hack for gettext to cross-build with gcc+glibc in linux. svn path=/nixpkgs/branches/stdenv-updates/; revision=18568 --- pkgs/development/libraries/gettext/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 3ef348dc4b8..6b094fdc839 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -10,6 +10,17 @@ stdenv.mkDerivation (rec { configureFlags = "--disable-csharp"; + # On cross building, gettext supposes that the wchar.h from libc + # does not fulfill gettext needs, so it tries to work with its + # own wchar.h file, which does not cope well with the system's + # wchar.h and stddef.h (gcc-4.3 - glibc-2.9) + preConfigure = '' + if test -n "$crossConfig"; then + echo gl_cv_func_wcwidth_works=yes > cachefile + configureFlags="$configureFlags --cache-file=`pwd`/cachefile" + fi + ''; + meta = { description = "GNU gettext, a well integrated set of translation tools and documentation";