about summary refs log tree commit diff
path: root/pkgs/tools/graphics/pgf
diff options
context:
space:
mode:
authorRobert Schütz <nix@dotlambda.de>2023-02-09 09:06:15 -0800
committerRobert Schütz <nix@dotlambda.de>2023-02-09 09:17:26 -0800
commitac17c2b4b3a14b038bfcf5c7a7958be1bfad3594 (patch)
treeb5b3f25e595aaf5e7683572aefa33c60ea71b707 /pkgs/tools/graphics/pgf
parent131957d90f97542f709584b420b02e1a99440015 (diff)
pgf_graphics: 6.14.12 -> 7.21.7
Diffstat (limited to 'pkgs/tools/graphics/pgf')
-rw-r--r--pkgs/tools/graphics/pgf/default.nix39
1 files changed, 25 insertions, 14 deletions
diff --git a/pkgs/tools/graphics/pgf/default.nix b/pkgs/tools/graphics/pgf/default.nix
index a2adb7ee61d97..e63875c19cd31 100644
--- a/pkgs/tools/graphics/pgf/default.nix
+++ b/pkgs/tools/graphics/pgf/default.nix
@@ -1,26 +1,37 @@
-{ lib, stdenv, fetchurl, autoconf, automake, libtool, dos2unix, libpgf, freeimage, doxygen }:
+{ lib
+, stdenv
+, fetchzip
+, autoreconfHook
+, dos2unix
+, doxygen
+, freeimage
+, libpgf
+}:
 
 stdenv.mkDerivation rec {
   pname = "pgf";
-  version = "6.14.12";
+  version = "7.21.7";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/libpgf/pgf-console-src-${version}.tar.gz";
-    sha256 = "1vfm12cfq3an3xg0679bcwdmjq2x1bbij1iwsmm60hwmrm3zvab0";
+  src = fetchzip {
+    url = "mirror://sourceforge/libpgf/libpgf/${version}/pgf-console.zip";
+    hash = "sha256-W9eXYhbynLtvZQsn724Uw0SZ5TuyK2MwREwYKGFhJj0=";
   };
 
-  nativeBuildInputs = [ autoconf automake ];
-  buildInputs = [ libtool dos2unix libpgf freeimage doxygen ];
-
-  patchPhase = ''
-      sed 1i'#include <inttypes.h>' -i src/PGF.cpp
-      sed s/__int64/int64_t/g -i src/PGF.cpp
-      rm include/FreeImage.h include/FreeImagePlus.h
+  postPatch = ''
+    find . -type f | xargs dos2unix
+    mv README.txt README
   '';
 
-  preConfigure = "dos2unix configure.ac; sh autogen.sh";
+  nativeBuildInputs = [
+    autoreconfHook
+    dos2unix
+    doxygen
+  ];
 
-# configureFlags = optional static "--enable-static --disable-shared";
+  buildInputs = [
+    freeimage
+    libpgf
+  ];
 
   meta = {
     homepage = "https://www.libpgf.org/";