Author: simons
Date: Wed Oct 20 13:05:49 2010
New Revision: 24384
URL: https://svn.nixos.org/websvn/nix/?rev=24384&sc=1

Log:
pkgs/tools/text/recode: added (heavily patched) version 3.6

Added:
   nixpkgs/trunk/pkgs/tools/text/recode/
   nixpkgs/trunk/pkgs/tools/text/recode/default.nix
   nixpkgs/trunk/pkgs/tools/text/recode/recode-3.6-as-if.patch
   nixpkgs/trunk/pkgs/tools/text/recode/recode-3.6-gettextfix.diff
Modified:
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Added: nixpkgs/trunk/pkgs/tools/text/recode/default.nix
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/tools/text/recode/default.nix    Wed Oct 20 13:05:49 
2010        (r24384)
@@ -0,0 +1,46 @@
+{stdenv, fetchurl, autoconf, automake, libtool, gettext, perl}:
+
+let
+  asIfPatch = ./recode-3.6-as-if.patch;
+
+  gettextPatch = ./recode-3.6-gettextfix.diff;
+
+  debianPatch = fetchurl {
+    url = 
"http://ftp.de.debian.org/debian/pool/main/r/recode/recode_3.6-15.diff.gz";;
+    sha256 = "114qxm29wk95w5760bswgd46d5p00g5kbfai5wchjvcbi722p5qf";
+  };
+in
+stdenv.mkDerivation {
+  name = "recode-3.6";
+
+  src = fetchurl {
+    url = "ftp://ftp.halifax.rwth-aachen.de/gnu/recode/recode-3.6.tar.gz";;
+    sha256 = "1krgjqfhsxcls4qvxhagc45sm1sd0w69jm81nwm0bip5z3rs9rp3";
+  };
+
+  buildInputs = [ autoconf automake libtool gettext perl ];
+
+  patchPhase = ''
+    patch -Np1 -i ${asIfPatch}
+    patch -Np1 -i ${gettextPatch}
+    gunzip <${debianPatch} | patch -Np1 -i -
+    sed -i '1i#include <stdlib.h>' src/argmatch.c
+    rm -f acinclude.m4
+    autoreconf -fi
+    libtoolize
+  '';
+
+  configureFlags = "--without-included-gettext";
+
+  doCheck = true;
+
+  meta = {
+    homepage = "http://www.gnu.org/software/recode/";;
+    description = "Converts files between various character sets and usages";
+
+    license = "GPLv2+";
+
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = [];
+  };
+}

Added: nixpkgs/trunk/pkgs/tools/text/recode/recode-3.6-as-if.patch
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/tools/text/recode/recode-3.6-as-if.patch Wed Oct 20 
13:05:49 2010        (r24384)
@@ -0,0 +1,19 @@
+http://bugs.gentoo.org/283029
+
+--- a/m4/flex.m4
++++ b/m4/flex.m4
+@@ -8,11 +8,11 @@ dnl ad_AC_PROG_FLEX
+ dnl Look for flex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
+ AC_DEFUN(ad_AC_PROG_FLEX,
+ [AC_CHECK_PROGS(LEX, flex, missing)
+-if test "$LEX" = missing; then
++AS_IF([test "$LEX" = missing], [dnl
+   LEX="\$(top_srcdir)/$ac_aux_dir/missing flex"
+   LEX_OUTPUT_ROOT=lex.yy
+   AC_SUBST(LEX_OUTPUT_ROOT)dnl
+-else
++], [:
+   AC_PROG_LEX
+   AC_DECL_YYTEXT
+-fi])
++])])

Added: nixpkgs/trunk/pkgs/tools/text/recode/recode-3.6-gettextfix.diff
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/tools/text/recode/recode-3.6-gettextfix.diff     Wed Oct 
20 13:05:49 2010        (r24384)
@@ -0,0 +1,23 @@
+http://bugs.gentoo.org/239372
+
+patch by Dmitry Karasik
+
+--- recode-3.6/m4/gettext.m4
++++ recode-3.6/m4/gettext.m4
+@@ -109,12 +109,12 @@
+     else
+       ac_items="$LINGUAS"
+       for ac_item in $ac_items; do
+-      case "$ALL_LINGUAS" in
+-        *$ac_item*)
++        for supported_item in $ALL_LINGUAS; do
++          if test "$ac_item" = "$supported_item"; then
+           ac_print="$ac_print $ac_item"
+           MOFILES="$MOFILES $ac_item.mo"
+-          ;;
+-      esac
++          fi
++        done
+       done
+     fi
+     AC_SUBST(MOFILES)

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Wed Oct 20 12:30:03 
2010        (r24383)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Wed Oct 20 13:05:49 
2010        (r24384)
@@ -6140,6 +6140,8 @@
 
   rsibreak = newScope pkgs.kde4 ../applications/misc/rsibreak { };
 
+  recode = callPackage ../tools/text/recode { };
+
   rsync = callPackage ../applications/networking/sync/rsync {
     enableACLs = !(stdenv.isDarwin || stdenv.isSunOS);
   };
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to