c97ccd388c
The hand-rolled iterator declaration is incompatible with libc++'s, and clang > 3.5 is stricter about this. See <https://lists.freebsd.org/pipermail/freebsd-ports-bugs/2014-December/298242.html> for another reference to this issue. The errors that occur are of the form: reference to 'random_access_iterator_tag' is ambiguous
25 lines
926 B
Nix
25 lines
926 B
Nix
{stdenv, fetchurl, cmake}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "qhull-2012.1";
|
|
|
|
src = fetchurl {
|
|
url = "${meta.homepage}/download/${name}-src.tgz";
|
|
sha256 = "127zpjp6sm8c101hz239k82lpxqcqf4ksdyfqc2py2sm22kclpm3";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
cmakeFlags = "-DMAN_INSTALL_DIR=share/man/man1 -DDOC_INSTALL_DIR=share/doc/qhull";
|
|
|
|
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
sed -i 's/namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; }/#include <iterator>/' ./src/libqhullcpp/QhullIterator.h
|
|
sed -i 's/namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; }/#include <iterator>/' ./src/libqhullcpp/QhullLinkedList.h
|
|
'';
|
|
|
|
meta = {
|
|
homepage = http://www.qhull.org/;
|
|
description = "Computes the convex hull, Delaunay triangulation, Voronoi diagram and more";
|
|
license = stdenv.lib.licenses.free;
|
|
};
|
|
}
|