1{ fetchurl, stdenv, libpng, autoreconfHook }:
2
3# debian splits this package into plotutils and libplot2c2
4
5# gentoo passes X, this package contains fonts
6# I'm only interested in making pstoedit convert to svg
7
8stdenv.mkDerivation rec {
9 name = "plotutils-2.6";
10
11 src = fetchurl {
12 url = "mirror://gnu/plotutils/${name}.tar.gz";
13 sha256 = "1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg";
14 };
15
16 nativeBuildInputs = [ autoreconfHook ];
17 buildInputs = [ libpng ];
18 patches = map fetchurl (import ./debian-patches.nix);
19
20 preBuild = ''
21 # Fix parallel building.
22 make -C libplot xmi.h
23 '';
24
25 configureFlags = [ "--enable-libplotter" ]; # required for pstoedit
26
27 hardeningDisable = [ "format" ];
28
29 doCheck = true;
30
31 enableParallelBuilding = true;
32
33 meta = {
34 description = "Powerful C/C++ library for exporting 2D vector graphics";
35
36 longDescription =
37 '' The GNU plotutils package contains software for both programmers and
38 technical users. Its centerpiece is libplot, a powerful C/C++
39 function library for exporting 2-D vector graphics in many file
40 formats, both vector and raster. It can also do vector graphics
41 animations.
42
43 libplot is device-independent in the sense that its API (application
44 programming interface) does not depend on the type of graphics file
45 to be exported.
46
47 Besides libplot, the package contains command-line programs for
48 plotting scientific data. Many of them use libplot to export
49 graphics.
50 '';
51
52 homepage = http://www.gnu.org/software/plotutils/;
53
54 license = stdenv.lib.licenses.gpl2Plus;
55 maintainers = [ stdenv.lib.maintainers.marcweber ];
56 platforms = stdenv.lib.platforms.unix;
57 };
58}