2021-01-15 09:19:50 +00:00
|
|
|
{ fetchurl, lib, stdenv, libpng, autoreconfHook }:
|
2009-10-18 04:43:50 +00:00
|
|
|
|
|
|
|
# debian splits this package into plotutils and libplot2c2
|
|
|
|
|
|
|
|
# gentoo passes X, this package contains fonts
|
|
|
|
# I'm only interested in making pstoedit convert to svg
|
|
|
|
|
2009-11-06 22:44:13 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-08-12 18:41:54 +00:00
|
|
|
pname = "plotutils";
|
|
|
|
version = "2.6";
|
2009-10-18 04:43:50 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-12 18:41:54 +00:00
|
|
|
url = "mirror://gnu/plotutils/plotutils-${version}.tar.gz";
|
2009-10-18 04:43:50 +00:00
|
|
|
sha256 = "1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg";
|
|
|
|
};
|
|
|
|
|
2018-01-17 19:25:18 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2016-08-24 19:27:51 +00:00
|
|
|
buildInputs = [ libpng ];
|
2023-09-08 03:16:49 +00:00
|
|
|
patches = map fetchurl (import ./debian-patches.nix)
|
|
|
|
# `pic2plot/gram.cc` uses the register storage class specifier, which is not supported in C++17.
|
|
|
|
# This prevents clang 16 from building plotutils because it defaults to C++17.
|
|
|
|
++ [ ./c++17-register-usage-fix.patch ];
|
2012-01-25 18:06:30 +00:00
|
|
|
|
2018-06-04 06:46:30 +00:00
|
|
|
preBuild = ''
|
|
|
|
# Fix parallel building.
|
|
|
|
make -C libplot xmi.h
|
|
|
|
'';
|
|
|
|
|
2018-07-25 21:44:21 +00:00
|
|
|
configureFlags = [ "--enable-libplotter" ]; # required for pstoedit
|
2009-10-18 04:43:50 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-12 02:48:09 +00:00
|
|
|
|
2009-11-06 22:44:13 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2018-01-17 19:25:18 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2009-11-06 22:44:13 +00:00
|
|
|
meta = {
|
2014-08-24 14:21:08 +00:00
|
|
|
description = "Powerful C/C++ library for exporting 2D vector graphics";
|
2009-11-06 22:44:13 +00:00
|
|
|
|
|
|
|
longDescription =
|
|
|
|
'' The GNU plotutils package contains software for both programmers and
|
|
|
|
technical users. Its centerpiece is libplot, a powerful C/C++
|
|
|
|
function library for exporting 2-D vector graphics in many file
|
|
|
|
formats, both vector and raster. It can also do vector graphics
|
|
|
|
animations.
|
|
|
|
|
|
|
|
libplot is device-independent in the sense that its API (application
|
|
|
|
programming interface) does not depend on the type of graphics file
|
|
|
|
to be exported.
|
|
|
|
|
|
|
|
Besides libplot, the package contains command-line programs for
|
|
|
|
plotting scientific data. Many of them use libplot to export
|
|
|
|
graphics.
|
|
|
|
'';
|
|
|
|
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.gnu.org/software/plotutils/";
|
2009-11-06 22:44:13 +00:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = [ lib.maintainers.marcweber ];
|
|
|
|
platforms = lib.platforms.unix;
|
2009-10-18 04:43:50 +00:00
|
|
|
};
|
|
|
|
}
|