[bug#78643,2/3] gnu: zxing-cpp: Update to 2.3.0.

Message ID 489237b4fe7555869b45157b3583748d99f04ae8.1748627468.git.sughosha@disroot.org
State New
Headers
Series gnu: Add spectacle-ocr-screenshot. |

Commit Message

Sughosha May 30, 2025, 6:01 p.m. UTC
  * gnu/packages/aidc.scm (zxing-cpp): Update to 2.3.0.
[arguments]<#:configure-flags>: Add "-DZXING_USE_BUNDLED_ZINT=OFF",
"-DZXING_EXAMPLES=OFF" and "-DZXING_UNIT_TESTS=ON".
[native-inputs]: Add pkg-config.
[inputs]: Add zint.

Change-Id: Ib16a05a0e629609420948120870b6a031aea5bcd
---
 gnu/packages/aidc.scm | 47 ++++++++++++++++++++++---------------------
 1 file changed, 24 insertions(+), 23 deletions(-)
  

Patch

diff --git a/gnu/packages/aidc.scm b/gnu/packages/aidc.scm
index 9400bb2823..b4fbd2804a 100644
--- a/gnu/packages/aidc.scm
+++ b/gnu/packages/aidc.scm
@@ -83,29 +83,30 @@  (define-public zint
     (license (list license:bsd-2 license:gpl3+))))
 
 (define-public zxing-cpp
-  ;; Use the master branch as it includes unreleased build system improvements
-  ;; allowing to use system libraries (instead of attempting to fetch them
-  ;; from the Internet).
-  (let ((revision "0")
-        (commit "00783db7aa3bcf8620a301854ac71c0ceaaca0c1"))
-    (package
-      (name "zxing-cpp")
-      (version (git-version "1.2.0" revision commit))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/nu-book/zxing-cpp")
-                      (commit commit)))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "1yl2cpaqiv1g4nq9v0xfj1vd5faz55k4541vz6hsffvcxgn9nmc5"))))
-      (build-system cmake-build-system)
-      (native-inputs (list fmt-8 googletest))
-      (synopsis "C++ port of ZXing")
-      (description "ZXing-CPP is a barcode scanning library.")
-      (home-page "https://github.com/nu-book/zxing-cpp")
-      (license license:asl2.0))))
+  (package
+    (name "zxing-cpp")
+    (version "2.3.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/nu-book/zxing-cpp")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1hdr73fllnsp3zpmrhw6cjla39lihwg1khgvddsf4v57a0lmiy3f"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags
+           #~(list "-DZXING_USE_BUNDLED_ZINT=OFF"
+                   "-DZXING_EXAMPLES=OFF" ;requires stb
+                   "-DZXING_UNIT_TESTS=ON")))
+    (native-inputs (list fmt-8 googletest pkg-config))
+    (inputs (list zint))
+    (synopsis "C++ port of ZXing")
+    (description "ZXing-CPP is a barcode scanning library.")
+    (home-page "https://github.com/nu-book/zxing-cpp")
+    (license license:asl2.0)))
 
 ;;; This older variant is kept for gst-plugins-bad (see:
 ;;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1684).