Subject: [PATCH v3 2/4] gnu: utfcpp: Update to 3.2.3.

From: reza <[email-masked]>
Date: Thu, 4 May 2023 08:04:53 +0000

* gnu/packages/textutils.scm (utfcpp): Update to 3.2.3.
---
 gnu/packages/textutils.scm | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index d7cb217e17..40a5c01242 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2021 Felix Gruber <[email-masked]>
 ;;; Copyright © 2021 Bonface Munyoki Kilyungi <[email-masked]>
 ;;; Copyright © 2022 Gabriel Wicki <[email-masked]>
+;;; Copyright © 2023 Reza Housseini <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,6 +58,7 @@ (define-module (gnu packages textutils)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages golang)
@@ -685,30 +687,31 @@ (define-public catdoc
 (define-public utfcpp
   (package
     (name "utfcpp")
-    (version "2.3.5")
+    (version "3.2.3")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                     (url "https://github.com/nemtrif/utfcpp")
-                     (commit (string-append "v" version))))
+                    (url "https://github.com/nemtrif/utfcpp")
+                    (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1gr98d826z6wa58r1s5i7rz7q2x3r31v7zj0pjjlrc7gfxwklr4s"))))
+                "00hzh39iddbc6nxg13813qd6d55g2kccwjf5dr96wykfhway9wbr"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; delete bundled dependencies
+                          (delete-file-recursively "extern")
+                          (substitute* (list "tests/apitests.cpp"
+                                             "tests/noexceptionstests.cpp"
+                                             "tests/test_cpp11.cpp"
+                                             "tests/test_cpp17.cpp")
+                            (("\"\\.\\./extern/ftest/ftest.h\"")
+                             "<ftest/ftest.h>"))))))
     (build-system cmake-build-system)
+    (native-inputs (list ftest))
     (arguments
-     `(#:out-of-source? #f
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'install              ; no install target
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (include (string-append out "/include"))
-                    (doc (string-append out "/share/doc/" ,name)))
-               (copy-recursively "source" include)
-               (install-file "README.md" doc)
-               #t))))))
-    (home-page "https://github.com/nemtrif/utfcpp")
+     `(#:build-type "Release"))
+    (home-page "https://utfcpp.sourceforge.net")
     (synopsis "Portable C++ library for handling UTF-8")
     (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
 in a portable way.")
-- 
2.39.2