* Fix building of OCaml on Darwin. Gnu sed changed its behavior after version 4.2.1 (bug?), here we add a simple workaround

svn path=/nixpkgs/trunk/; revision=25330
This commit is contained in:
Marco Maggesi 2011-01-01 17:26:07 +00:00
parent b5f00acee2
commit f2f1009d98
2 changed files with 11 additions and 0 deletions

View File

@ -18,6 +18,8 @@ stdenv.mkDerivation rec {
# Needed to avoid a SIGBUS on the final executable on mips
NIX_CFLAGS_COMPILE = if stdenv.isMips then "-fPIC" else "";
patches = optionals stdenv.isDarwin [ ./gnused-on-osx-fix.patch ];
prefixKey = "-prefix ";
configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ];
buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";

View File

@ -0,0 +1,9 @@
diff -Nuar ocaml-3.11.1/ocamldoc/remove_DEBUG ocaml-3.11.1-nixpkgs/ocamldoc/remove_DEBUG
--- ocaml-3.11.1/ocamldoc/remove_DEBUG 2004-04-15 18:18:52.000000000 +0200
+++ ocaml-3.11.1-nixpkgs/ocamldoc/remove_DEBUG 2011-01-01 17:37:07.000000000 +0100
@@ -18,4 +18,4 @@
# respecting the cpp # line annotation conventions
echo "# 1 \"$1\""
-LC_ALL=C sed -e '/DEBUG/s/.*//' "$1"
+grep -v 'DEBUG' "$1"