From f1ea4d18359c13396090cd0b548de94f2fb06b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 22 Jun 2010 08:06:12 +0000 Subject: [PATCH] GNU Guile 1.8: Fix builds with GCC 4.5. svn path=/nixpkgs/branches/stdenv-updates/; revision=22369 --- .../interpreters/guile/cpp-4.5.patch | 24 +++++++++++++++++++ .../interpreters/guile/default.nix | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/interpreters/guile/cpp-4.5.patch diff --git a/pkgs/development/interpreters/guile/cpp-4.5.patch b/pkgs/development/interpreters/guile/cpp-4.5.patch new file mode 100644 index 00000000000..7e7671f0da0 --- /dev/null +++ b/pkgs/development/interpreters/guile/cpp-4.5.patch @@ -0,0 +1,24 @@ +Fix doc snarfing with GCC 4.5. +From . + +diff --git a/scripts/snarf-check-and-output-texi b/scripts/snarf-check-and-output-texi +index ea33e17..8cd42e8 100755 +--- a/scripts/snarf-check-and-output-texi ++++ b/scripts/snarf-check-and-output-texi +@@ -267,6 +267,17 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@" + (set! *file* file) + (set! *line* line)) + ++ ;; newer gccs like to throw around more location markers into the ++ ;; preprocessed source; these (hash . hash) bits are what they translate to ++ ;; in snarfy terms. ++ (('location ('string . file) ('int . line) ('hash . 'hash)) ++ (set! *file* file) ++ (set! *line* line)) ++ ++ (('location ('hash . 'hash) ('string . file) ('int . line) ('hash . 'hash)) ++ (set! *file* file) ++ (set! *line* line)) ++ + (('arglist rest ...) + (set! *args* (do-arglist rest))) diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix index 8dd7953a42d..dae6a69bcb6 100644 --- a/pkgs/development/interpreters/guile/default.nix +++ b/pkgs/development/interpreters/guile/default.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "1czhcrn6l63xhsw3fjmv88djflqxbdpxjhgmwwvscm8rv4wn7vmz"; }; + patches = [ ./cpp-4.5.patch ]; + buildNativeInputs = [ makeWrapper gawk ]; propagatedBuildInputs = [ readline gmp libtool ]; selfBuildNativeInput = true; @@ -31,6 +33,8 @@ stdenv.mkDerivation rec { # One test fails. # ERROR: file: "libtest-asmobs", message: "file not found" + # This is fixed here: + # . doCheck = false; setupHook = ./setup-hook.sh;