diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-05-29 10:13:23 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-05-29 10:13:23 +0000 |
commit | ae23a33b9a44a45907e7885568841bd7c8ad5dbc (patch) | |
tree | a14eded2fc3546407e1f587e08b433963459a8d5 /pkgs/development/libraries/gettext | |
parent | 8c810af59b9336f53d9f3d9547b10ea647d20999 (diff) | |
download | nixpkgs-ae23a33b9a44a45907e7885568841bd7c8ad5dbc.tar nixpkgs-ae23a33b9a44a45907e7885568841bd7c8ad5dbc.tar.gz nixpkgs-ae23a33b9a44a45907e7885568841bd7c8ad5dbc.tar.bz2 nixpkgs-ae23a33b9a44a45907e7885568841bd7c8ad5dbc.tar.lz nixpkgs-ae23a33b9a44a45907e7885568841bd7c8ad5dbc.tar.xz nixpkgs-ae23a33b9a44a45907e7885568841bd7c8ad5dbc.tar.zst nixpkgs-ae23a33b9a44a45907e7885568841bd7c8ad5dbc.zip |
GNU Gettext: Fix Cygwin build.
svn path=/nixpkgs/trunk/; revision=34270
Diffstat (limited to 'pkgs/development/libraries/gettext')
-rw-r--r-- | pkgs/development/libraries/gettext/default.nix | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index f7b31139b56..73366b2bdc9 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, libiconv }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (rec { name = "gettext-0.18.1.1"; src = fetchurl { @@ -8,7 +8,14 @@ stdenv.mkDerivation rec { sha256 = "1sa3ch12qxa4h3ya6hkz119yclcccmincl9j20dhrdx5mykp3b4k"; }; - configureFlags = "--disable-csharp"; + configureFlags = [ "--disable-csharp" ] + ++ (stdenv.lib.optionals stdenv.isCygwin + [ # We have a static libiconv, so we can only build the static lib. + "--disable-shared" "--enable-static" + + # Share the cache among the various `configure' runs. + "--config-cache" + ]); # On cross building, gettext supposes that the wchar.h from libc # does not fulfill gettext needs, so it tries to work with its @@ -60,3 +67,16 @@ stdenv.mkDerivation rec { platforms = stdenv.lib.platforms.all; }; } + +// + +stdenv.lib.optionalAttrs stdenv.isCygwin { + patchPhase = + # Make sure `error.c' gets compiled and is part of `libgettextlib.la'. + # This fixes: + # gettext-0.18.1.1/gettext-tools/src/msgcmp.c:371: undefined reference to `_error_message_count' + + '' sed -i gettext-tools/gnulib-lib/Makefile.in \ + -e 's/am_libgettextlib_la_OBJECTS =/am_libgettextlib_la_OBJECTS = error.lo/g' + ''; +}) |