GNU bug report logs - #64255
[PATCH 0/2] gnu: utfcpp: Update to 3.2.3

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Fri, 23 Jun 2023 15:34:01 UTC

Severity: normal

Tags: patch

Done: Hilton Chain <hako <at> ultrarare.space>

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 64255 in the body.
You can then email your comments to 64255 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 liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#64255; Package guix-patches. (Fri, 23 Jun 2023 15:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hilton Chain <hako <at> ultrarare.space>:
New bug report received and forwarded. Copy sent to liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org. (Fri, 23 Jun 2023 15:34:02 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: guix-patches <at> gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, 63765 <at> debbugs.gnu.org,
 62473 <at> debbugs.gnu.org
Subject: [PATCH 0/2] gnu: utfcpp: Update to 3.2.3
Date: Fri, 23 Jun 2023 23:33:04 +0800
This patchset:
* Updates utfcpp to 3.2.3.
* Unbundles its test framework ftest as a new package used in the native-inputs.
* Fixes build issues caused by utfcpp's include path change.

The patchset is a split from both #62473 and #63765 since they have a common
procedure to update utfcpp.

As utfcpp has less dependents, it might be better to get this applied first.

For #63765, there's no change besides "utfcpp update" removal, so I'll keep the
current version before reviews or the QA process.

Reza Housseini (2):
  gnu: Add ftest.
  gnu: utfcpp: Update to 3.2.3.

 gnu/packages/check.scm     | 41 ++++++++++++++++++++++++++++++++++++++
 gnu/packages/games.scm     |  2 +-
 gnu/packages/textutils.scm | 27 ++++++++++++-------------
 gnu/packages/video.scm     |  5 +++++
 4 files changed, 60 insertions(+), 15 deletions(-)


base-commit: f25529b08e356f89ca7cecc44295085531a8faba
--
2.40.1




Information forwarded to guix-patches <at> gnu.org:
bug#64255; Package guix-patches. (Fri, 23 Jun 2023 15:36:02 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: 64255 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Reza Housseini <reza <at> housseini.me>
Subject: [PATCH 1/2] gnu: Add ftest.
Date: Fri, 23 Jun 2023 23:35:25 +0800
From: Reza Housseini <reza <at> housseini.me>

* gnu/packages/check.scm (ftest): New variable.

Co-authored-by: Hilton Chain <hako <at> ultrarare.space>
---
 gnu/packages/check.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 87728fefa3..0aa519ad67 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -43,6 +43,8 @@
 ;;; Copyright © 2022 jgart <jgart <at> dismail.de>
 ;;; Copyright © 2023 Luis Felipe López Acevedo <luis.felipe.la <at> protonmail.com>
 ;;; Copyright © 2023 Timo Wilken <guix <at> twilken.net>
+;;; Copyright © 2023 Reza Housseini <reza <at> housseini.me>
+;;; Copyright © 2023 Hilton Chain <hako <at> ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -65,6 +67,7 @@ (define-module (gnu packages check)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
@@ -92,6 +95,7 @@ (define-module (gnu packages check)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
@@ -863,6 +867,43 @@ (define-public doctest
 has been designed to be fast, light and unintrusive.")
     (license license:expat)))
 
+(define-public ftest
+  ;; There aren't any releases and it looks more like a small side project.
+  ;; It is included for completness to run tests for package utfcpp.
+  (let ((commit "c4ad4af0946b73ce1a40cbc72205d15d196c7e06")
+        (revision "0"))
+    (package
+      (name "ftest")
+      (version (git-version "0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/nemtrif/ftest")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1jcd76zjhx5f2nsi80hj7gmywgpz1f7vcw8lv5yf7gx0l99dn86x"))))
+      ;; No CMakeLists.txt file provided, only one to run tests
+      (build-system copy-build-system)
+      (arguments
+       (list #:install-plan
+             #~'(("ftest.h" "include/ftest/"))
+             #:phases
+             #~(modify-phases %standard-phases
+                 (add-before 'install 'check
+                   (lambda _
+                     (with-directory-excursion "tests"
+                       (invoke "cmake" ".")
+                       (invoke "make")
+                       (invoke "ctest")))))))
+      (native-inputs (list cmake-minimal))
+      (home-page "https://github.com/nemtrif/ftest")
+      (synopsis "C++ testing framework")
+      (description
+       "This package provides a simple and limited unit-test framework for C++.")
+      (license license:boost1.0))))
+
 (define-public go-github.com-smartystreets-gunit
   (package
     (name "go-github.com-smartystreets-gunit")
-- 
2.40.1





Information forwarded to liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#64255; Package guix-patches. (Fri, 23 Jun 2023 15:36:02 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: 64255 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Reza Housseini <reza <at> housseini.me>
Subject: [PATCH 2/2] gnu: utfcpp: Update to 3.2.3.
Date: Fri, 23 Jun 2023 23:35:26 +0800
From: Reza Housseini <reza <at> housseini.me>

* gnu/packages/textutils.scm (utfcpp): Update to 3.2.3.
[snippet]: Unbundle ftest.
[arguments]: Remove field.
[native-inputs]: Add ftest.
* gnu/packages/games.scm (warzone2100)<#:phases>: Adjust 'fix-utfcpp-include.
* gnu/packages/video.scm (mkvtoolnix)<#:phases>: Add 'fix-utfcpp-include.

Co-authored-by: Hilton Chain <hako <at> ultrarare.space>
---
 gnu/packages/games.scm     |  2 +-
 gnu/packages/textutils.scm | 27 +++++++++++++--------------
 gnu/packages/video.scm     |  5 +++++
 3 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 83704dd720..9dbf5a3739 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5510,7 +5510,7 @@ (define-public warzone2100
                  (lambda _
                    (substitute* "lib/framework/wzstring.cpp"
                      (("<utfcpp/source/utf8.h>")
-                      "<utf8.h>"))))
+                      "<utf8cpp/utf8.h>"))))
                (add-after 'unpack 'link-tests-with-qt
                  (lambda _
                    (substitute* "tests/Makefile.am"
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 51df3748cd..5f7ab7a438 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -25,6 +25,8 @@
 ;;; Copyright © 2021 Felix Gruber <felgru <at> posteo.net>
 ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me <at> bonfacemunyoki.com>
 ;;; Copyright © 2022 Gabriel Wicki <gabriel <at> erlikon.ch>
+;;; Copyright © 2023 Reza Housseini <reza <at> housseini.me>
+;;; Copyright © 2023 Hilton Chain <hako <at> ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -687,29 +689,26 @@ (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))))
               (file-name (git-file-name name version))
+              (modules '((guix build utils)))
+              ;; Unbundle ftest
+              (snippet
+               '(begin
+                  (delete-file-recursively "extern")
+                  (substitute* (find-files "tests" "\\.cpp")
+                    (("\"../extern/ftest/ftest.h\"")
+                     "<ftest/ftest.h>"))))
               (sha256
                (base32
-                "1gr98d826z6wa58r1s5i7rz7q2x3r31v7zj0pjjlrc7gfxwklr4s"))))
+                "00hzh39iddbc6nxg13813qd6d55g2kccwjf5dr96wykfhway9wbr"))))
     (build-system cmake-build-system)
-    (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))))))
+    (native-inputs (list ftest))
     (home-page "https://github.com/nemtrif/utfcpp")
     (synopsis "Portable C++ library for handling UTF-8")
     (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 55eab972b9..43ae3899f9 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1048,6 +1048,11 @@ (define-public mkvtoolnix
              "--enable-precompiled-headers=no")
         #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-utfcpp-include
+           (lambda _
+             (substitute* "src/common/strings/utf8.cpp"
+               (("<utf8.h>")
+                "<utf8cpp/utf8.h>"))))
          (add-after 'unpack 'patch-relative-file-names
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
-- 
2.40.1





Added indication that bug 64255 blocks63765 Request was from Hilton Chain <hako <at> ultrarare.space> to control <at> debbugs.gnu.org. (Thu, 03 Aug 2023 07:52:01 GMT) Full text and rfc822 format available.

Information forwarded to liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#64255; Package guix-patches. (Thu, 03 Aug 2023 14:06:01 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: 64255 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v2 0/2] gnu: utfcpp: Update to 3.2.3.
Date: Thu,  3 Aug 2023 22:05:10 +0800
V1 -> V2: Rebase (and see if QA can pick this up).

All affected packages reported by `guix refresh -l' builds on my system
(x86_64-linux).

Thanks

Reza Housseini (2):
  gnu: Add ftest.
  gnu: utfcpp: Update to 3.2.3.

 gnu/packages/check.scm     | 41 ++++++++++++++++++++++++++++++++++++++
 gnu/packages/games.scm     |  2 +-
 gnu/packages/textutils.scm | 27 ++++++++++++-------------
 gnu/packages/video.scm     |  5 +++++
 4 files changed, 60 insertions(+), 15 deletions(-)


base-commit: 23e2ff223c0511317edf236504fb474e3b5ac301
--
2.41.0




Information forwarded to guix-patches <at> gnu.org:
bug#64255; Package guix-patches. (Thu, 03 Aug 2023 14:08:01 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: 64255 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Reza Housseini <reza <at> housseini.me>
Subject: [PATCH v2 1/2] gnu: Add ftest.
Date: Thu,  3 Aug 2023 22:06:43 +0800
From: Reza Housseini <reza <at> housseini.me>

* gnu/packages/check.scm (ftest): New variable.

Co-authored-by: Hilton Chain <hako <at> ultrarare.space>
---
 gnu/packages/check.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 71dc9eb54b..51aa40f18d 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -45,6 +45,8 @@
 ;;; Copyright © 2023 Timo Wilken <guix <at> twilken.net>
 ;;; Copyright © 2023 Zhu Zihao <all_but_last <at> 163.com>
 ;;; Copyright © 2023 Bruno Victal <mirai <at> makinata.eu>
+;;; Copyright © 2023 Reza Housseini <reza <at> housseini.me>
+;;; Copyright © 2023 Hilton Chain <hako <at> ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -67,6 +69,7 @@ (define-module (gnu packages check)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
@@ -94,6 +97,7 @@ (define-module (gnu packages check)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
@@ -813,6 +817,43 @@ (define-public doctest
 has been designed to be fast, light and unintrusive.")
     (license license:expat)))
 
+(define-public ftest
+  ;; There aren't any releases and it looks more like a small side project.
+  ;; It is included for completness to run tests for package utfcpp.
+  (let ((commit "c4ad4af0946b73ce1a40cbc72205d15d196c7e06")
+        (revision "0"))
+    (package
+      (name "ftest")
+      (version (git-version "0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/nemtrif/ftest")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1jcd76zjhx5f2nsi80hj7gmywgpz1f7vcw8lv5yf7gx0l99dn86x"))))
+      ;; No CMakeLists.txt file provided, only one to run tests
+      (build-system copy-build-system)
+      (arguments
+       (list #:install-plan
+             #~'(("ftest.h" "include/ftest/"))
+             #:phases
+             #~(modify-phases %standard-phases
+                 (add-before 'install 'check
+                   (lambda _
+                     (with-directory-excursion "tests"
+                       (invoke "cmake" ".")
+                       (invoke "make")
+                       (invoke "ctest")))))))
+      (native-inputs (list cmake-minimal))
+      (home-page "https://github.com/nemtrif/ftest")
+      (synopsis "C++ testing framework")
+      (description
+       "This package provides a simple and limited unit-test framework for C++.")
+      (license license:boost1.0))))
+
 (define-public python-gixy
   ;; The 0.1.20 release is missing some important fixes.
   ;; XXX: Commit 'e9008dcbd11f43ccac109b0cf2bf98a94e76b449' breaks tests
-- 
2.41.0





Information forwarded to liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#64255; Package guix-patches. (Thu, 03 Aug 2023 14:08:02 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: 64255 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Reza Housseini <reza <at> housseini.me>
Subject: [PATCH v2 2/2] gnu: utfcpp: Update to 3.2.3.
Date: Thu,  3 Aug 2023 22:06:44 +0800
From: Reza Housseini <reza <at> housseini.me>

* gnu/packages/textutils.scm (utfcpp): Update to 3.2.3.
[snippet]: Unbundle ftest.
[arguments]: Remove field.
[native-inputs]: Add ftest.
* gnu/packages/games.scm (warzone2100)<#:phases>: Adjust 'fix-utfcpp-include.
* gnu/packages/video.scm (mkvtoolnix)<#:phases>: Add 'fix-utfcpp-include.

Co-authored-by: Hilton Chain <hako <at> ultrarare.space>
---
 gnu/packages/games.scm     |  2 +-
 gnu/packages/textutils.scm | 27 +++++++++++++--------------
 gnu/packages/video.scm     |  5 +++++
 3 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 1573d7de00..82302852f4 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5573,7 +5573,7 @@ (define-public warzone2100
                  (lambda _
                    (substitute* "lib/framework/wzstring.cpp"
                      (("<utfcpp/source/utf8.h>")
-                      "<utf8.h>"))))
+                      "<utf8cpp/utf8.h>"))))
                (add-after 'unpack 'link-tests-with-qt
                  (lambda _
                    (substitute* "tests/Makefile.am"
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 4e026fc6f9..5fbfdde284 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -25,6 +25,8 @@
 ;;; Copyright © 2021 Felix Gruber <felgru <at> posteo.net>
 ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me <at> bonfacemunyoki.com>
 ;;; Copyright © 2022 Gabriel Wicki <gabriel <at> erlikon.ch>
+;;; Copyright © 2023 Reza Housseini <reza <at> housseini.me>
+;;; Copyright © 2023 Hilton Chain <hako <at> ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -690,29 +692,26 @@ (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))))
               (file-name (git-file-name name version))
+              (modules '((guix build utils)))
+              ;; Unbundle ftest
+              (snippet
+               '(begin
+                  (delete-file-recursively "extern")
+                  (substitute* (find-files "tests" "\\.cpp")
+                    (("\"../extern/ftest/ftest.h\"")
+                     "<ftest/ftest.h>"))))
               (sha256
                (base32
-                "1gr98d826z6wa58r1s5i7rz7q2x3r31v7zj0pjjlrc7gfxwklr4s"))))
+                "00hzh39iddbc6nxg13813qd6d55g2kccwjf5dr96wykfhway9wbr"))))
     (build-system cmake-build-system)
-    (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))))))
+    (native-inputs (list ftest))
     (home-page "https://github.com/nemtrif/utfcpp")
     (synopsis "Portable C++ library for handling UTF-8")
     (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 801c2602e4..f75a528b13 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1050,6 +1050,11 @@ (define-public mkvtoolnix
              "--enable-precompiled-headers=no")
         #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-utfcpp-include
+           (lambda _
+             (substitute* "src/common/strings/utf8.cpp"
+               (("<utf8.h>")
+                "<utf8cpp/utf8.h>"))))
          (add-after 'unpack 'patch-relative-file-names
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
-- 
2.41.0





Information forwarded to liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#64255; Package guix-patches. (Sun, 13 Aug 2023 04:52:02 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: 64255 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v3 0/2] gnu: utfcpp: Update to 3.2.4.
Date: Sun, 13 Aug 2023 12:50:02 +0800
V2 -> V3: utfcpp <at> 3.2.4.
V1 -> V2: Rebase (and see if QA can pick this up).

Reza Housseini (2):
  gnu: Add ftest.
  gnu: utfcpp: Update to 3.2.4.

 gnu/packages/check.scm     | 41 ++++++++++++++++++++++++++++++++++++++
 gnu/packages/games.scm     |  2 +-
 gnu/packages/textutils.scm | 27 ++++++++++++-------------
 gnu/packages/video.scm     |  5 +++++
 4 files changed, 60 insertions(+), 15 deletions(-)


base-commit: d0a2b422e06aab0cab3a10a47ef378602992577f
--
2.41.0




Information forwarded to guix-patches <at> gnu.org:
bug#64255; Package guix-patches. (Sun, 13 Aug 2023 04:52:02 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: 64255 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Reza Housseini <reza <at> housseini.me>
Subject: [PATCH v3 1/2] gnu: Add ftest.
Date: Sun, 13 Aug 2023 12:51:10 +0800
From: Reza Housseini <reza <at> housseini.me>

* gnu/packages/check.scm (ftest): New variable.

Co-authored-by: Hilton Chain <hako <at> ultrarare.space>
---
 gnu/packages/check.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 1d70ea9fe0..a3a79ae189 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -45,6 +45,8 @@
 ;;; Copyright © 2023 Timo Wilken <guix <at> twilken.net>
 ;;; Copyright © 2023 Zhu Zihao <all_but_last <at> 163.com>
 ;;; Copyright © 2023 Bruno Victal <mirai <at> makinata.eu>
+;;; Copyright © 2023 Reza Housseini <reza <at> housseini.me>
+;;; Copyright © 2023 Hilton Chain <hako <at> ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -67,6 +69,7 @@ (define-module (gnu packages check)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
@@ -94,6 +97,7 @@ (define-module (gnu packages check)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
@@ -813,6 +817,43 @@ (define-public doctest
 has been designed to be fast, light and unintrusive.")
     (license license:expat)))
 
+(define-public ftest
+  ;; There aren't any releases and it looks more like a small side project.
+  ;; It is included for completness to run tests for package utfcpp.
+  (let ((commit "c4ad4af0946b73ce1a40cbc72205d15d196c7e06")
+        (revision "0"))
+    (package
+      (name "ftest")
+      (version (git-version "0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/nemtrif/ftest")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1jcd76zjhx5f2nsi80hj7gmywgpz1f7vcw8lv5yf7gx0l99dn86x"))))
+      ;; No CMakeLists.txt file provided, only one to run tests
+      (build-system copy-build-system)
+      (arguments
+       (list #:install-plan
+             #~'(("ftest.h" "include/ftest/"))
+             #:phases
+             #~(modify-phases %standard-phases
+                 (add-before 'install 'check
+                   (lambda _
+                     (with-directory-excursion "tests"
+                       (invoke "cmake" ".")
+                       (invoke "make")
+                       (invoke "ctest")))))))
+      (native-inputs (list cmake-minimal))
+      (home-page "https://github.com/nemtrif/ftest")
+      (synopsis "C++ testing framework")
+      (description
+       "This package provides a simple and limited unit-test framework for C++.")
+      (license license:boost1.0))))
+
 (define-public python-gixy
   ;; The 0.1.20 release is missing some important fixes.
   ;; XXX: Commit 'e9008dcbd11f43ccac109b0cf2bf98a94e76b449' breaks tests
-- 
2.41.0





Information forwarded to liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#64255; Package guix-patches. (Sun, 13 Aug 2023 04:52:03 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: 64255 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Reza Housseini <reza <at> housseini.me>
Subject: [PATCH v3 2/2] gnu: utfcpp: Update to 3.2.4.
Date: Sun, 13 Aug 2023 12:51:11 +0800
From: Reza Housseini <reza <at> housseini.me>

* gnu/packages/textutils.scm (utfcpp): Update to 3.2.4.
[snippet]: Unbundle ftest.
[arguments]: Remove field.
[native-inputs]: Add ftest.
* gnu/packages/games.scm (warzone2100)<#:phases>: Adjust 'fix-utfcpp-include.
* gnu/packages/video.scm (mkvtoolnix)<#:phases>: Add 'fix-utfcpp-include.

Co-authored-by: Hilton Chain <hako <at> ultrarare.space>
---
 gnu/packages/games.scm     |  2 +-
 gnu/packages/textutils.scm | 27 +++++++++++++--------------
 gnu/packages/video.scm     |  5 +++++
 3 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index bf5c680042..9ba5d4a964 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5573,7 +5573,7 @@ (define-public warzone2100
                  (lambda _
                    (substitute* "lib/framework/wzstring.cpp"
                      (("<utfcpp/source/utf8.h>")
-                      "<utf8.h>"))))
+                      "<utf8cpp/utf8.h>"))))
                (add-after 'unpack 'link-tests-with-qt
                  (lambda _
                    (substitute* "tests/Makefile.am"
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 4e026fc6f9..508a954254 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -25,6 +25,8 @@
 ;;; Copyright © 2021 Felix Gruber <felgru <at> posteo.net>
 ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me <at> bonfacemunyoki.com>
 ;;; Copyright © 2022 Gabriel Wicki <gabriel <at> erlikon.ch>
+;;; Copyright © 2023 Reza Housseini <reza <at> housseini.me>
+;;; Copyright © 2023 Hilton Chain <hako <at> ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -690,29 +692,26 @@ (define-public catdoc
 (define-public utfcpp
   (package
     (name "utfcpp")
-    (version "2.3.5")
+    (version "3.2.4")
     (source (origin
               (method git-fetch)
               (uri (git-reference
                      (url "https://github.com/nemtrif/utfcpp")
                      (commit (string-append "v" version))))
               (file-name (git-file-name name version))
+              (modules '((guix build utils)))
+              ;; Unbundle ftest
+              (snippet
+               '(begin
+                  (delete-file-recursively "extern")
+                  (substitute* (find-files "tests" "\\.cpp")
+                    (("\"../extern/ftest/ftest.h\"")
+                     "<ftest/ftest.h>"))))
               (sha256
                (base32
-                "1gr98d826z6wa58r1s5i7rz7q2x3r31v7zj0pjjlrc7gfxwklr4s"))))
+                "0p18cbdk57ilbgcgprgqp7fgysb5i0nidczbhc5rnxkiiw4jvxgn"))))
     (build-system cmake-build-system)
-    (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))))))
+    (native-inputs (list ftest))
     (home-page "https://github.com/nemtrif/utfcpp")
     (synopsis "Portable C++ library for handling UTF-8")
     (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 7df68e8f53..6355acfd4e 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1054,6 +1054,11 @@ (define-public mkvtoolnix
              "--enable-precompiled-headers=no")
         #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-utfcpp-include
+           (lambda _
+             (substitute* "src/common/strings/utf8.cpp"
+               (("<utf8.h>")
+                "<utf8cpp/utf8.h>"))))
          (add-after 'unpack 'patch-relative-file-names
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#64255; Package guix-patches. (Wed, 30 Aug 2023 12:58:01 GMT) Full text and rfc822 format available.

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

From: Andreas Enge <andreas <at> enge.fr>
To: 64255 <at> debbugs.gnu.org
Subject: Green light
Date: Wed, 30 Aug 2023 14:57:37 +0200
Hello Hilton,

there is a green button from QA, I had a quick look over the first version
of the patches, and they look good to me. Since you have git commit access
now, I let you apply the patches and close the bug!

Andreas





Reply sent to Hilton Chain <hako <at> ultrarare.space>:
You have taken responsibility. (Fri, 01 Sep 2023 09:02:02 GMT) Full text and rfc822 format available.

Notification sent to Hilton Chain <hako <at> ultrarare.space>:
bug acknowledged by developer. (Fri, 01 Sep 2023 09:02:02 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: Andreas Enge <andreas <at> enge.fr>
Cc: 64255-done <at> debbugs.gnu.org
Subject: Re: [bug#64255] Green light
Date: Fri, 01 Sep 2023 17:00:25 +0800
Hi Andreas,

On Wed, 30 Aug 2023 20:57:37 +0800,
Andreas Enge wrote:
> 
> Hello Hilton,
> 
> there is a green button from QA, I had a quick look over the first version
> of the patches, and they look good to me. Since you have git commit access
> now, I let you apply the patches and close the bug!

Thank you, pushed it to master.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 29 Sep 2023 11:24:07 GMT) Full text and rfc822 format available.

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

Previous Next


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