2021-01-21 18:00:13 +01:00
|
|
|
{ fetchurl, fetchpatch, lib, stdenv, gmpxx, perl, gnum4 }:
|
2011-12-14 15:31:56 +01:00
|
|
|
|
2017-08-26 13:58:04 +02:00
|
|
|
let version = "1.2"; in
|
2011-12-14 15:31:56 +01:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "ppl";
|
|
|
|
inherit version;
|
2011-12-14 15:31:56 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://bugseng.com/products/ppl/download/ftp/releases/${version}/ppl-${version}.tar.bz2";
|
2017-08-26 13:58:04 +02:00
|
|
|
sha256 = "1wgxcbgmijgk11df43aiqfzv31r3bkxmgb4yl68g21194q60nird";
|
2011-12-14 15:31:56 +01:00
|
|
|
};
|
|
|
|
|
2018-02-18 13:11:06 +01:00
|
|
|
patches = [(fetchpatch {
|
2020-12-02 20:44:10 +01:00
|
|
|
name = "clang5-support.patch";
|
2023-09-02 17:46:11 +02:00
|
|
|
url = "https://raw.githubusercontent.com/sagemath/sage/9.2/build/pkgs/ppl/patches/clang5-support.patch";
|
2018-02-18 13:11:06 +01:00
|
|
|
sha256 = "1zj90hm25pkgvk4jlkfzh18ak9b98217gbidl3731fdccbw6hr87";
|
|
|
|
})];
|
|
|
|
|
2023-11-11 01:29:25 +01:00
|
|
|
postPatch = lib.optionalString stdenv.cc.isClang ''
|
|
|
|
substituteInPlace src/PIP_Tree.cc \
|
|
|
|
--replace "std::auto_ptr" "std::unique_ptr"
|
|
|
|
substituteInPlace src/Powerset_inlines.hh src/Pointset_Powerset_inlines.hh \
|
|
|
|
--replace "std::mem_fun_ref" "std::mem_fn"
|
|
|
|
'';
|
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ perl gnum4 ];
|
2011-12-14 15:31:56 +01:00
|
|
|
propagatedBuildInputs = [ gmpxx ];
|
|
|
|
|
2014-06-01 20:46:33 +02:00
|
|
|
configureFlags = [ "--disable-watchdog" ] ++
|
2021-01-21 18:00:13 +01:00
|
|
|
lib.optionals stdenv.isDarwin [
|
2014-06-01 20:46:33 +02:00
|
|
|
"CPPFLAGS=-fexceptions"
|
2014-05-28 08:35:31 +02:00
|
|
|
"--disable-ppl_lcdd" "--disable-ppl_lpsol" "--disable-ppl_pips"
|
|
|
|
];
|
2011-12-14 15:31:56 +01:00
|
|
|
|
|
|
|
# Beware! It took ~6 hours to compile PPL and run its tests on a 1.2 GHz
|
|
|
|
# x86_64 box. Nevertheless, being a dependency of GCC, it probably ought
|
|
|
|
# to be tested.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "The Parma Polyhedra Library";
|
2011-12-14 15:31:56 +01:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
The Parma Polyhedra Library (PPL) provides numerical abstractions
|
|
|
|
especially targeted at applications in the field of analysis and
|
|
|
|
verification of complex systems. These abstractions include convex
|
|
|
|
polyhedra, defined as the intersection of a finite number of (open or
|
|
|
|
closed) halfspaces, each described by a linear inequality (strict or
|
|
|
|
non-strict) with rational coefficients; some special classes of
|
|
|
|
polyhedra shapes that offer interesting complexity/precision tradeoffs;
|
|
|
|
and grids which represent regularly spaced points that satisfy a set of
|
|
|
|
linear congruence relations. The library also supports finite
|
|
|
|
powersets and products of (any kind of) polyhedra and grids and a mixed
|
|
|
|
integer linear programming problem solver using an exact-arithmetic
|
|
|
|
version of the simplex algorithm.
|
|
|
|
'';
|
|
|
|
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://bugseng.com/products/ppl/";
|
2011-12-14 15:31:56 +01:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2011-12-14 15:31:56 +01:00
|
|
|
|
2013-08-16 23:44:33 +02:00
|
|
|
maintainers = [ ];
|
2021-01-21 18:00:13 +01:00
|
|
|
platforms = lib.platforms.unix;
|
2011-12-14 15:31:56 +01:00
|
|
|
};
|
|
|
|
}
|