2021-01-17 09:17:16 +00:00
|
|
|
{ stdenv, fetchurl, pkg-config, darwin, lib
|
2016-06-01 20:45:19 +00:00
|
|
|
, zlib, ghostscript, imagemagick, plotutils, gd
|
2024-09-10 15:24:26 +00:00
|
|
|
, libjpeg, libwebp, libiconv, makeWrapper
|
2016-06-01 20:45:19 +00:00
|
|
|
}:
|
2010-07-28 11:55:54 +00:00
|
|
|
|
2016-05-14 05:06:24 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-08-12 18:41:54 +00:00
|
|
|
pname = "pstoedit";
|
2024-09-10 15:24:26 +00:00
|
|
|
version = "4.01";
|
2009-10-18 04:43:53 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-12 18:41:54 +00:00
|
|
|
url = "mirror://sourceforge/pstoedit/pstoedit-${version}.tar.gz";
|
2024-09-10 15:24:26 +00:00
|
|
|
hash = "sha256-RZdlq3NssQ+VVKesAsXqfzVcbC6fz9IXYRx9UQKxB2s=";
|
2009-10-18 04:43:53 +00:00
|
|
|
};
|
|
|
|
|
2016-08-29 00:30:01 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
2024-09-10 15:24:26 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper pkg-config ];
|
2017-06-30 14:27:12 +00:00
|
|
|
buildInputs = [ zlib ghostscript imagemagick plotutils gd libjpeg libwebp ]
|
2017-02-07 08:01:33 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
|
|
|
libiconv ApplicationServices
|
|
|
|
]);
|
2009-10-18 04:43:53 +00:00
|
|
|
|
2017-06-30 14:27:12 +00:00
|
|
|
# '@LIBPNG_LDFLAGS@' is no longer substituted by autoconf (the code is commented out)
|
|
|
|
# so we need to remove it from the pkg-config file as well
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace config/pstoedit.pc.in --replace '@LIBPNG_LDFLAGS@' ""
|
|
|
|
'';
|
|
|
|
|
2024-09-10 15:24:26 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/pstoedit \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ ghostscript ]}
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-05-14 05:06:24 +00:00
|
|
|
description = "Translates PostScript and PDF graphics into other vector formats";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://sourceforge.net/projects/pstoedit/";
|
2024-04-26 11:35:31 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2016-06-01 20:45:19 +00:00
|
|
|
maintainers = [ maintainers.marcweber ];
|
2017-02-07 08:01:33 +00:00
|
|
|
platforms = platforms.unix;
|
2023-11-23 02:51:17 +00:00
|
|
|
mainProgram = "pstoedit";
|
2009-10-18 04:43:53 +00:00
|
|
|
};
|
|
|
|
}
|