GNU bug report logs - #57685
[PATCH] gnu: libharu: Update to 2.4.1.

Previous Next

Package: guix-patches;

Reported by: "Paul A. Patience" <paul <at> apatience.com>

Date: Thu, 8 Sep 2022 19:52:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57685 in the body.
You can then email your comments to 57685 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#57685; Package guix-patches. (Thu, 08 Sep 2022 19:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Paul A. Patience" <paul <at> apatience.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 08 Sep 2022 19:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: guix-patches <at> gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH] gnu: libharu: Update to 2.4.1.
Date: Thu, 08 Sep 2022 19:51:13 +0000
* gnu/packages/pdf.scm (libharu): Update to 2.4.1.
[build-system]: Switch to cmake-build-system.
[arguments]: Remove #:configure-flags, add #:tests? and #:phases.
[inputs]: Sort them.
[native-inputs]: Remove.
---
 gnu/packages/pdf.scm | 44 +++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 14f75d9ef9..d449d36818 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -22,6 +22,7 @@
 ;;; Copyright © 2020 Timotej Lazar <timotej.lazar <at> araneo.si>
 ;;; Copyright © 2020, 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
+;;; Copyright © 2022 Paul A. Patience <paul <at> apatience.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -363,29 +364,30 @@ (define-public python-poppler-qt5
 (define-public libharu
   (package
    (name "libharu")
-   (version "2.3.0")
-   (source (origin
-             (method git-fetch)
-             (uri (git-reference
-                   (url "https://github.com/libharu/libharu")
-                   (commit (string-append
-                            "RELEASE_"
-                            (string-join (string-split version #\.) "_")))))
-             (file-name (git-file-name name version))
-             (sha256
-              (base32
-               "15s9hswnl3qqi7yh29jyrg0hma2n99haxznvcywmsp8kjqlyg75q"))))
-   (build-system gnu-build-system)
+   (version "2.4.1")
+   (source
+    (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/libharu/libharu")
+            (commit (string-append "v" version))))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32 "0371ba8ffqczdw7xnkx6pkjdbgw8s2yvqp7b8j0n2ky9cx4ga8v4"))))
+   (build-system cmake-build-system)
    (arguments
-    `(#:configure-flags
-      (list (string-append "--with-zlib="
-                           (assoc-ref %build-inputs "zlib"))
-            (string-append "--with-png="
-                           (assoc-ref %build-inputs "libpng")))))
+    (list #:tests? #f                   ; No tests
+          #:phases
+          #~(modify-phases %standard-phases
+              (add-after 'unpack 'patch-cmake
+                (lambda _
+                  (substitute* "CMakeLists.txt"
+                    (("^install\\(FILES (README\\.md CHANGES) INSTALL DESTINATION .*\\)"
+                      _ files)
+                     (format #f "install(FILES ~a DESTINATION ~a/share/doc/~a-~a)"
+                             files #$output #$name #$version))))))))
    (inputs
-    (list zlib libpng))
-   (native-inputs
-    (list autoconf automake libtool))
+    (list libpng zlib))
    (home-page "http://libharu.org/")
    (synopsis "Library for generating PDF files")
    (description
--
2.37.3






Information forwarded to guix-patches <at> gnu.org:
bug#57685; Package guix-patches. (Sat, 10 Sep 2022 09:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 57685 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: "Paul A. Patience" <paul <at> apatience.com>
Cc: 57685 <at> debbugs.gnu.org
Subject: Re: [bug#57685] [PATCH] gnu: libharu: Update to 2.4.1.
Date: Sat, 10 Sep 2022 10:55:26 +0100
[Message part 1 (text/plain, inline)]
"Paul A. Patience" <paul <at> apatience.com> writes:

> * gnu/packages/pdf.scm (libharu): Update to 2.4.1.
> [build-system]: Switch to cmake-build-system.
> [arguments]: Remove #:configure-flags, add #:tests? and #:phases.
> [inputs]: Sort them.
> [native-inputs]: Remove.
> ---
>  gnu/packages/pdf.scm | 44 +++++++++++++++++++++++---------------------
>  1 file changed, 23 insertions(+), 21 deletions(-)

This looks to break the build for the saga package. Do you see it fail
to build locally with this change?

Thanks,

Chris

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#57685; Package guix-patches. (Mon, 12 Sep 2022 19:26:02 GMT) Full text and rfc822 format available.

Message #11 received at 57685 <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: 57685 <at> debbugs.gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH v2 0/3] gnu: libharu: Update to 2.4.2.
Date: Mon, 12 Sep 2022 19:25:20 +0000
The issue causing the saga build to fail was fixed in libHaru 2.4.2, so I
updated it to that version.
(I had tested the build of emboss, which also depends on libHaru, but not that
of saga; I should have.)

saga still needed a patch, and VTK too, because the 2.4.0 update of libHaru
contained several breaking changes.

Paul A. Patience (3):
  gnu: libharu: Update to 2.4.2.
  gnu: saga: Fix build with newer libHaru.
  gnu: vtk: Use system libHaru.

 gnu/packages/geo.scm              |  9 ++++++-
 gnu/packages/image-processing.scm | 22 ++++++++++------
 gnu/packages/pdf.scm              | 44 ++++++++++++++++---------------
 3 files changed, 45 insertions(+), 30 deletions(-)

--
2.37.3






Information forwarded to guix-patches <at> gnu.org:
bug#57685; Package guix-patches. (Mon, 12 Sep 2022 19:26:02 GMT) Full text and rfc822 format available.

Message #14 received at 57685 <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: 57685 <at> debbugs.gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH v2 1/3] gnu: libharu: Update to 2.4.2.
Date: Mon, 12 Sep 2022 19:25:32 +0000
* gnu/packages/pdf.scm (libharu): Update to 2.4.2.
[build-system]: Switch to cmake-build-system.
[arguments]: Remove #:configure-flags, add #:tests? and #:phases.
[inputs]: Sort them.
[native-inputs]: Remove.
---
 gnu/packages/pdf.scm | 44 +++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 14f75d9ef9..c5076fbe45 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -22,6 +22,7 @@
 ;;; Copyright © 2020 Timotej Lazar <timotej.lazar <at> araneo.si>
 ;;; Copyright © 2020, 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
+;;; Copyright © 2022 Paul A. Patience <paul <at> apatience.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -363,29 +364,30 @@ (define-public python-poppler-qt5
 (define-public libharu
   (package
    (name "libharu")
-   (version "2.3.0")
-   (source (origin
-             (method git-fetch)
-             (uri (git-reference
-                   (url "https://github.com/libharu/libharu")
-                   (commit (string-append
-                            "RELEASE_"
-                            (string-join (string-split version #\.) "_")))))
-             (file-name (git-file-name name version))
-             (sha256
-              (base32
-               "15s9hswnl3qqi7yh29jyrg0hma2n99haxznvcywmsp8kjqlyg75q"))))
-   (build-system gnu-build-system)
+   (version "2.4.2")
+   (source
+    (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/libharu/libharu")
+            (commit (string-append "v" version))))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32 "1jwzqvv81zf5f7zssyixhyjirlp9ddwkbaabd177syb1bxljlsdc"))))
+   (build-system cmake-build-system)
    (arguments
-    `(#:configure-flags
-      (list (string-append "--with-zlib="
-                           (assoc-ref %build-inputs "zlib"))
-            (string-append "--with-png="
-                           (assoc-ref %build-inputs "libpng")))))
+    (list #:tests? #f                   ; No tests
+          #:phases
+          #~(modify-phases %standard-phases
+              (add-after 'unpack 'patch-cmake
+                (lambda _
+                  (substitute* "CMakeLists.txt"
+                    (("^install\\(FILES (README\\.md CHANGES) INSTALL DESTINATION .*\\)"
+                      _ files)
+                     (format #f "install(FILES ~a DESTINATION ~a/share/doc/~a-~a)"
+                             files #$output #$name #$version))))))))
    (inputs
-    (list zlib libpng))
-   (native-inputs
-    (list autoconf automake libtool))
+    (list libpng zlib))
    (home-page "http://libharu.org/")
    (synopsis "Library for generating PDF files")
    (description
--
2.37.3






Information forwarded to guix-patches <at> gnu.org:
bug#57685; Package guix-patches. (Mon, 12 Sep 2022 19:26:03 GMT) Full text and rfc822 format available.

Message #17 received at 57685 <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: 57685 <at> debbugs.gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH v2 3/3] gnu: vtk: Use system libHaru.
Date: Mon, 12 Sep 2022 19:25:45 +0000
* gnu/packages/image-processing.scm (vtk)[snippet]: Delete bundled
libHaru and patch VTK for newer libHaru. Reindent and remove trailing
boolean.
[arguments]: Specify external libHaru in configure flags.
[inputs]: Add libharu.
---
 gnu/packages/image-processing.scm | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 0225f72651..4600c71ce0 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -324,14 +324,18 @@ (define-public vtk
               (snippet
                '(begin
                   (for-each
-                    (lambda (dir)
-                      (delete-file-recursively
-                        (string-append "ThirdParty/" dir "/vtk" dir)))
-                    ;; pugixml depended upon unconditionally
-                    '("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
-                      "glew" "hdf5" "jpeg" "jsoncpp" "libproj" "libxml2" "lz4"
-                      "netcdf" "ogg" "png" "sqlite" "theora" "tiff" "zlib"))
-                  #t))))
+                   (lambda (dir)
+                     (delete-file-recursively
+                      (string-append "ThirdParty/" dir "/vtk" dir)))
+                   ;; pugixml depended upon unconditionally
+                   '("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
+                     "glew" "hdf5" "jpeg" "jsoncpp" "libharu" "libproj"
+                     "libxml2" "lz4" "netcdf" "ogg" "png" "sqlite" "theora"
+                     "tiff" "zlib"))
+                  (substitute* "IO/ExportPDF/vtkPDFContextDevice2D.cxx"
+                    (("\\bHPDF_UINT16 (noPen|dash|dot|denseDot|dashDot|dashDotDot)\\b"
+                      _ var)
+                     (string-append "HPDF_REAL " var)))))))
     (properties `((release-monitoring-url . "https://vtk.org/download/")))
     (build-system cmake-build-system)
     (arguments
@@ -348,6 +352,7 @@ (define-public vtk
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_hdf5=ON"
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_jpeg=ON"
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_jsoncpp=ON"
+                           "-DVTK_MODULE_USE_EXTERNAL_VTK_libharu=ON"
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_libproj=ON"
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_libxml2=ON"
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_lz4=ON"
@@ -381,6 +386,7 @@ (define-public vtk
            glew
            glu
            hdf5
+           libharu
            libjpeg-turbo
            jsoncpp
            libtheora
--
2.37.3






Information forwarded to guix-patches <at> gnu.org:
bug#57685; Package guix-patches. (Mon, 12 Sep 2022 19:26:03 GMT) Full text and rfc822 format available.

Message #20 received at 57685 <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: 57685 <at> debbugs.gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH v2 2/3] gnu: saga: Fix build with newer libHaru.
Date: Mon, 12 Sep 2022 19:25:39 +0000
* gnu/packages/geo.scm (saga)[modules, snippet]: New fields.
---
 gnu/packages/geo.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 9734ae66fe..082a55fc91 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -2338,7 +2338,14 @@ (define-public saga
                            (version-major version) "/SAGA%20-%20" version
                            "/saga-" version ".tar.gz"))
        (sha256
-        (base32 "008izjs6gvj09abxf16ssl1xy0ay3ljq4jswbggp6wiiq459minv"))))
+        (base32 "008izjs6gvj09abxf16ssl1xy0ay3ljq4jswbggp6wiiq459minv"))
+       (modules '((guix build utils)))
+       (snippet
+        '(substitute* "saga-gis/src/tools/docs/docs_pdf/doc_pdf.cpp"
+           (("^#include <hpdf\\.h>\n" all)
+            (string-append all "#include <hpdf_version.h>\n"))
+           (("\\bHPDF_PROJECTING_SCUARE_END\\b")
+            "HPDF_PROJECTING_SQUARE_END")))))
     (build-system cmake-build-system)
     (native-inputs
      (list pkg-config swig))
--
2.37.3






Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Sat, 17 Sep 2022 17:21:01 GMT) Full text and rfc822 format available.

Notification sent to "Paul A. Patience" <paul <at> apatience.com>:
bug acknowledged by developer. (Sat, 17 Sep 2022 17:21:02 GMT) Full text and rfc822 format available.

Message #25 received at 57685-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: "Paul A. Patience" <paul <at> apatience.com>
Cc: 57685-done <at> debbugs.gnu.org
Subject: Re: [bug#57685] [PATCH v2 0/3] gnu: libharu: Update to 2.4.2.
Date: Sat, 17 Sep 2022 19:20:05 +0200
[Message part 1 (text/plain, inline)]
"Paul A. Patience" <paul <at> apatience.com> writes:

> The issue causing the saga build to fail was fixed in libHaru 2.4.2, so I
> updated it to that version.
> (I had tested the build of emboss, which also depends on libHaru, but not that
> of saga; I should have.)
>
> saga still needed a patch, and VTK too, because the 2.4.0 update of libHaru
> contained several breaking changes.
>
> Paul A. Patience (3):
>   gnu: libharu: Update to 2.4.2.
>   gnu: saga: Fix build with newer libHaru.
>   gnu: vtk: Use system libHaru.
>
>  gnu/packages/geo.scm              |  9 ++++++-
>  gnu/packages/image-processing.scm | 22 ++++++++++------
>  gnu/packages/pdf.scm              | 44 ++++++++++++++++---------------
>  3 files changed, 45 insertions(+), 30 deletions(-)

Thanks, these changes generally look good to me, and seem to update/fix
things, so I've gone ahead and pushed them to master as
c967d1153cae419e4acbe0dbed8f558d95ced0e3.

Thanks again,

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 Oct 2022 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 164 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.