From 468475a8919c18ce142c40ee0b94e617896b99e3 Mon Sep 17 00:00:00 2001 From: kilianar Date: Tue, 10 Sep 2024 17:24:26 +0200 Subject: [PATCH] pstoedit: 3.78 -> 4.01 --- pkgs/tools/graphics/pstoedit/default.nix | 18 +++++++++--------- .../pstoedit/pstoedit-gs-9.22-compat.patch | 13 ------------- 2 files changed, 9 insertions(+), 22 deletions(-) delete mode 100644 pkgs/tools/graphics/pstoedit/pstoedit-gs-9.22-compat.patch diff --git a/pkgs/tools/graphics/pstoedit/default.nix b/pkgs/tools/graphics/pstoedit/default.nix index 810c2365b2c3..783846ede52c 100644 --- a/pkgs/tools/graphics/pstoedit/default.nix +++ b/pkgs/tools/graphics/pstoedit/default.nix @@ -1,24 +1,19 @@ { stdenv, fetchurl, pkg-config, darwin, lib , zlib, ghostscript, imagemagick, plotutils, gd -, libjpeg, libwebp, libiconv +, libjpeg, libwebp, libiconv, makeWrapper }: stdenv.mkDerivation rec { pname = "pstoedit"; - version = "3.78"; + version = "4.01"; src = fetchurl { url = "mirror://sourceforge/pstoedit/pstoedit-${version}.tar.gz"; - sha256 = "sha256-jMKONLx/iNkTeA+AdOgT3VqqCsIFams21L8ASg6Q2AE="; + hash = "sha256-RZdlq3NssQ+VVKesAsXqfzVcbC6fz9IXYRx9UQKxB2s="; }; - # - # Turn on "-rdb" option (REALLYDELAYBIND) by default to ensure compatibility with gs-9.22 - # - patches = [ ./pstoedit-gs-9.22-compat.patch ]; - outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ makeWrapper pkg-config ]; buildInputs = [ zlib ghostscript imagemagick plotutils gd libjpeg libwebp ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ libiconv ApplicationServices @@ -30,6 +25,11 @@ stdenv.mkDerivation rec { substituteInPlace config/pstoedit.pc.in --replace '@LIBPNG_LDFLAGS@' "" ''; + postInstall = '' + wrapProgram $out/bin/pstoedit \ + --prefix PATH : ${lib.makeBinPath [ ghostscript ]} + ''; + meta = with lib; { description = "Translates PostScript and PDF graphics into other vector formats"; homepage = "https://sourceforge.net/projects/pstoedit/"; diff --git a/pkgs/tools/graphics/pstoedit/pstoedit-gs-9.22-compat.patch b/pkgs/tools/graphics/pstoedit/pstoedit-gs-9.22-compat.patch deleted file mode 100644 index 64fe805d5015..000000000000 --- a/pkgs/tools/graphics/pstoedit/pstoedit-gs-9.22-compat.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/pstoeditoptions.h b/src/pstoeditoptions.h -index 7846883..0fb6a6f 100755 ---- a/src/pstoeditoptions.h -+++ b/src/pstoeditoptions.h -@@ -453,7 +453,7 @@ private: - "Later versions of Ghostscript will probably support -dDELAYBIND again. " - "But also in that case the security risk remains. So be careful with what " - "files you process with pstoedit and Ghostscript.", -- false), // -+ true), // - #endif - pagetoextract (true, "-page","page number",g_t,"extract a specific page: 0 means all pages", - "Select a single page from a multi-page PostScript or PDF file.",