2021-02-05 17:12:51 +00:00
|
|
|
{ stdenv, fetchurl, pkg-config, darwin, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, zlib, ghostscript, imagemagick, plotutils, gd
|
|
|
|
, libjpeg, libwebp, libiconv
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "pstoedit";
|
|
|
|
version = "3.75";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-18 13:19:15 +00:00
|
|
|
url = "mirror://sourceforge/pstoedit/pstoedit-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp";
|
|
|
|
};
|
|
|
|
|
|
|
|
#
|
|
|
|
# Turn on "-rdb" option (REALLYDELAYBIND) by default to ensure compatibility with gs-9.22
|
|
|
|
#
|
|
|
|
patches = [ ./pstoedit-gs-9.22-compat.patch ];
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ zlib ghostscript imagemagick plotutils gd libjpeg libwebp ]
|
|
|
|
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
|
|
|
libiconv ApplicationServices
|
|
|
|
]);
|
|
|
|
|
|
|
|
# '@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@' ""
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Translates PostScript and PDF graphics into other vector formats";
|
|
|
|
homepage = "https://sourceforge.net/projects/pstoedit/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.marcweber ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|