diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-07-14 11:20:30 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-07-14 11:20:30 +0000 |
commit | 2881391565d0de4929fe0c31c73b22defe47d297 (patch) | |
tree | b811dcd5791c232492088a29c54ecdf9c189f920 /pkgs/tools/text | |
parent | ea2da73c8dd4fa20971fb01bbe5925bf20d60c38 (diff) | |
download | nixlib-2881391565d0de4929fe0c31c73b22defe47d297.tar nixlib-2881391565d0de4929fe0c31c73b22defe47d297.tar.gz nixlib-2881391565d0de4929fe0c31c73b22defe47d297.tar.bz2 nixlib-2881391565d0de4929fe0c31c73b22defe47d297.tar.lz nixlib-2881391565d0de4929fe0c31c73b22defe47d297.tar.xz nixlib-2881391565d0de4929fe0c31c73b22defe47d297.tar.zst nixlib-2881391565d0de4929fe0c31c73b22defe47d297.zip |
* Fix GNU patch on Darwin (and probably FreeBSD as well).
svn path=/nixpkgs/trunk/; revision=5705
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r-- | pkgs/tools/text/gnupatch/default.nix | 9 | ||||
-rw-r--r-- | pkgs/tools/text/gnupatch/setmode.patch | 20 |
2 files changed, 27 insertions, 2 deletions
diff --git a/pkgs/tools/text/gnupatch/default.nix b/pkgs/tools/text/gnupatch/default.nix index c019be07a7b2..2716d6a298ab 100644 --- a/pkgs/tools/text/gnupatch/default.nix +++ b/pkgs/tools/text/gnupatch/default.nix @@ -1,7 +1,12 @@ -{stdenv, fetchurl}: stdenv.mkDerivation { +{stdenv, fetchurl}: stdenv.mkDerivation ({ name = "gnupatch-2.5.4"; src = fetchurl { url = http://nix.cs.uu.nl/dist/tarballs/patch-2.5.4.tar.gz; md5 = "ee5ae84d115f051d87fcaaef3b4ae782"; }; -} +} // + # !!! hack + (if stdenv.system != "i686-linux" then { + patches = [./setmode.patch]; + configureFlags = "dummy"; # doesn't build on Darwin unless a platform is specified + } else {})) diff --git a/pkgs/tools/text/gnupatch/setmode.patch b/pkgs/tools/text/gnupatch/setmode.patch new file mode 100644 index 000000000000..83b7022e18db --- /dev/null +++ b/pkgs/tools/text/gnupatch/setmode.patch @@ -0,0 +1,20 @@ +diff -rc patch-2.5.4-orig/pch.c patch-2.5.4/pch.c +*** patch-2.5.4-orig/pch.c Mon Aug 30 08:20:08 1999 +--- patch-2.5.4/pch.c Fri Jul 14 13:11:26 2006 +*************** +*** 105,111 **** + if (!filename || !*filename || strEQ (filename, "-")) + { + file_offset stdin_pos; +! #if HAVE_SETMODE + if (binary_transput) + { + if (isatty (STDIN_FILENO)) +--- 105,111 ---- + if (!filename || !*filename || strEQ (filename, "-")) + { + file_offset stdin_pos; +! #if 0 && HAVE_SETMODE + if (binary_transput) + { + if (isatty (STDIN_FILENO)) |