about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/cloog-ppl
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/cloog-ppl
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/cloog-ppl')
-rw-r--r--nixpkgs/pkgs/development/libraries/cloog-ppl/default.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/cloog-ppl/fix-ppl-version.patch16
2 files changed, 86 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/cloog-ppl/default.nix b/nixpkgs/pkgs/development/libraries/cloog-ppl/default.nix
new file mode 100644
index 000000000000..47037339d417
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cloog-ppl/default.nix
@@ -0,0 +1,70 @@
+{ fetchurl, stdenv, ppl, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  name = "cloog-ppl-0.15.11";
+
+  src = fetchurl {
+    url = "mirror://gcc/infrastructure/${name}.tar.gz";
+    sha256 = "0psdm0bn5gx60glfh955x5b3b23zqrd92idmjr0b00dlnb839mkw";
+  };
+
+  propagatedBuildInputs = [ ppl ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  patches = [ ./fix-ppl-version.patch ];
+
+  configureFlags = [ "--with-ppl=${ppl}" ];
+
+  preAutoreconf = ''
+    touch NEWS ChangeLog AUTHORS
+  '';
+
+  doCheck = true;
+
+  meta = {
+    description = "CLooG-PPL, the Chunky Loop Generator";
+
+    longDescription = ''
+      CLooG is a free software library to generate code for scanning
+      Z-polyhedra.  That is, it finds a code (e.g., in C, FORTRAN...) that
+      reaches each integral point of one or more parameterized polyhedra.
+      CLooG has been originally written to solve the code generation problem
+      for optimizing compilers based on the polytope model.  Nevertheless it
+      is used now in various area e.g., to build control automata for
+      high-level synthesis or to find the best polynomial approximation of a
+      function.  CLooG may help in any situation where scanning polyhedra
+      matters.  While the user has full control on generated code quality,
+      CLooG is designed to avoid control overhead and to produce a very
+      effective code.
+    '';
+
+    # CLooG-PPL is actually a port of GLooG from PolyLib to PPL.
+    homepage = http://www.cloog.org/;
+
+    license = stdenv.lib.licenses.gpl2Plus;
+
+    maintainers = [ ];
+
+    /* Leads to an ICE on Cygwin:
+
+       make[3]: Entering directory `/tmp/nix-build-9q5gw5m37q5l4f0kjfv9ar8fsc9plk27-ppl-0.10.2.drv-1/ppl-0.10.2/src'
+       /bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -I.. -I../src    -g -O2 -frounding-math  -W -Wall -c -o Box.lo Box.cc
+       libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O2 -frounding-math -W -Wall -c Box.cc  -DDLL_EXPORT -DPIC -o .libs/Box.o
+       In file included from checked.defs.hh:595,
+                        from Checked_Number.defs.hh:27,
+                        from Coefficient.types.hh:15,
+                        from Coefficient.defs.hh:26,
+                        from Box.defs.hh:28,
+                        from Box.cc:24:
+       checked.inlines.hh: In function `Parma_Polyhedra_Library::Result Parma_Polyhedra_Library::Checked::input_generic(Type&, std::istream&, Parma_Polyhedra_Library::Rounding_Dir)':
+       checked.inlines.hh:607: internal compiler error: in invert_truthvalue, at fold-const.c:2719
+       Please submit a full bug report,
+       with preprocessed source if appropriate.
+       See <URL:http://cygwin.com/problems.html> for instructions.
+       make[3]: *** [Box.lo] Error 1
+
+    */
+    platforms = stdenv.lib.platforms.unix; # Once had cygwin problems
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cloog-ppl/fix-ppl-version.patch b/nixpkgs/pkgs/development/libraries/cloog-ppl/fix-ppl-version.patch
new file mode 100644
index 000000000000..8440d839411b
--- /dev/null
+++ b/nixpkgs/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])