From 4b87687a84766271089b26323ca467986e3f5ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Sun, 13 Apr 2014 13:46:23 +0200 Subject: [PATCH] cloogppl: patch to use ppl version 1.0 (close #2236) --- pkgs/development/libraries/cloog-ppl/default.nix | 15 ++++++++++++++- .../libraries/cloog-ppl/fix-ppl-version.patch | 16 ++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/cloog-ppl/fix-ppl-version.patch diff --git a/pkgs/development/libraries/cloog-ppl/default.nix b/pkgs/development/libraries/cloog-ppl/default.nix index 2c723e2c8b24..a6ebbf8dfdc0 100644 --- a/pkgs/development/libraries/cloog-ppl/default.nix +++ b/pkgs/development/libraries/cloog-ppl/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, ppl }: +{ fetchurl, stdenv, ppl, autoconf, automake, libtool }: stdenv.mkDerivation rec { name = "cloog-ppl-0.15.11"; @@ -10,8 +10,21 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ ppl ]; + buildInputs = [ automake autoconf libtool ]; + + patches = [ ./fix-ppl-version.patch ]; + configureFlags = "--with-ppl=${ppl}"; + preConfigure = '' + touch NEWS ChangeLog AUTHORS + ${libtool}/bin/libtoolize -c --force + ${automake}/bin/aclocal + ${automake}/bin/automake --add-missing + ${automake}/bin/automake -a -c --foreign + ${autoconf}/bin/autoreconf + ''; + crossAttrs = { configureFlags = "--with-ppl=${ppl.crossDrv}"; }; diff --git a/pkgs/development/libraries/cloog-ppl/fix-ppl-version.patch b/pkgs/development/libraries/cloog-ppl/fix-ppl-version.patch new file mode 100644 index 000000000000..8440d839411b --- /dev/null +++ b/pkgs/development/libraries/cloog-ppl/fix-ppl-version.patch @@ -0,0 +1,16 @@ +diff -rupN src/configure.in cloog-ppl-0.15.11/configure.in +--- src/configure.in 2014-04-13 13:33:43.349392305 +0200 ++++ cloog-ppl-0.15.11/configure.in 2014-04-13 13:34:12.695379888 +0200 +@@ -337,11 +337,7 @@ if test "x$with_ppl" != "x" -a "x$with_p + [AC_MSG_ERROR(Can't find PPL headers.)]) + + AC_MSG_CHECKING([for version 0.10 (or later revision) of PPL]) +- AC_TRY_COMPILE([#include "ppl_c.h"],[ +- #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10 +- choke me +- #endif +- ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR(Can't find correct version of PPL.) ]) ++ AC_MSG_RESULT([yes]) + + LIBS="$LIBS -lppl_c -lppl -lgmpxx" + AC_DEFINE([CLOOG_PPL_BACKEND], 1, [Use the PPL backend])