From 45c7aa04d777f7cf4c727d664576c4420bc8105f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 24 May 2007 15:20:40 +0000 Subject: [PATCH] * Don't look in /usr/lib and /usr/include for certain kinds of dependencies. (NIXPKGS-45) svn path=/nixpkgs/trunk/; revision=8755 --- .../build-managers/gnumake-3.80/default.nix | 2 +- .../tools/build-managers/gnumake/default.nix | 13 ++++++- .../build-managers/gnumake/impure-dirs.patch | 34 +++++++++++++++++++ .../gnumake/{log.diff => log.patch} | 0 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/tools/build-managers/gnumake/impure-dirs.patch rename pkgs/development/tools/build-managers/gnumake/{log.diff => log.patch} (100%) diff --git a/pkgs/development/tools/build-managers/gnumake-3.80/default.nix b/pkgs/development/tools/build-managers/gnumake-3.80/default.nix index caedaac14964..2e343b4237b3 100644 --- a/pkgs/development/tools/build-managers/gnumake-3.80/default.nix +++ b/pkgs/development/tools/build-managers/gnumake-3.80/default.nix @@ -6,5 +6,5 @@ stdenv.mkDerivation { url = http://nix.cs.uu.nl/dist/tarballs/make-3.80.tar.bz2; md5 = "0bbd1df101bc0294d440471e50feca71"; }; - patches = [./log.diff]; + patches = [./log.patch]; } diff --git a/pkgs/development/tools/build-managers/gnumake/default.nix b/pkgs/development/tools/build-managers/gnumake/default.nix index 2d83d10094de..9e751902922d 100644 --- a/pkgs/development/tools/build-managers/gnumake/default.nix +++ b/pkgs/development/tools/build-managers/gnumake/default.nix @@ -6,5 +6,16 @@ stdenv.mkDerivation { url = http://nix.cs.uu.nl/dist/tarballs/make-3.81.tar.bz2; md5 = "354853e0b2da90c527e35aabb8d6f1e6"; }; - patches = [./log.diff]; + + patches = [ + # Provide nested log output for subsequent pretty-printing by + # nix-log2xml. + ./log.patch + + # Purity: don't look for library dependencies (of the form + # `-lfoo') in /lib and /usr/lib. It's a stupid feature anyway. + # Likewise, when searching for included Makefiles, don't look in + # /usr/include and friends. + ./impure-dirs.patch + ]; } diff --git a/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch b/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch new file mode 100644 index 000000000000..433f61108dbc --- /dev/null +++ b/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch @@ -0,0 +1,34 @@ +diff -rc make-3.81-orig/read.c make-3.81/read.c +*** make-3.81-orig/read.c 2006-03-17 15:24:20.000000000 +0100 +--- make-3.81/read.c 2007-05-24 17:16:31.000000000 +0200 +*************** +*** 99,107 **** +--- 99,109 ---- + #endif + INCLUDEDIR, + #ifndef _AMIGA ++ #if 0 + "/usr/gnu/include", + "/usr/local/include", + "/usr/include", ++ #endif + #endif + 0 + }; +diff -rc make-3.81-orig/remake.c make-3.81/remake.c +*** make-3.81-orig/remake.c 2006-03-20 03:36:37.000000000 +0100 +--- make-3.81/remake.c 2007-05-24 17:06:54.000000000 +0200 +*************** +*** 1452,1460 **** +--- 1452,1462 ---- + static char *dirs[] = + { + #ifndef _AMIGA ++ #if 0 + "/lib", + "/usr/lib", + #endif ++ #endif + #if defined(WINDOWS32) && !defined(LIBDIR) + /* + * This is completely up to the user at product install time. Just define diff --git a/pkgs/development/tools/build-managers/gnumake/log.diff b/pkgs/development/tools/build-managers/gnumake/log.patch similarity index 100% rename from pkgs/development/tools/build-managers/gnumake/log.diff rename to pkgs/development/tools/build-managers/gnumake/log.patch