[PATCH 0/3] gnu: Add spectacle-ocr-screenshot.

  • Done
  • quality assurance status badge
Details
4 participants
  • Andreas Enge
  • gay
  • Sughosha
  • Z572
Owner
unassigned
Submitted by
Sughosha
Severity
normal

Debbugs page

S
S
Sughosha wrote on 30 May 10:52 -0700
(address . guix-patches@gnu.org)(name . Sughosha)(address . sughosha@disroot.org)
cover.1748627468.git.sughosha@disroot.org
This series updates zxing-cpp and adds spectacle-ocr-screenshot.

Sughosha (3):
gnu: Add zint.
gnu: zxing-cpp: Update to 2.3.0.
gnu: Add spectacle-ocr-screenshot.

gnu/packages/aidc.scm | 80 +++++++++++++++++++++++---------
gnu/packages/kde-systemtools.scm | 43 +++++++++++++++++
2 files changed, 100 insertions(+), 23 deletions(-)


base-commit: 6659e1bfac2e9edba0edabc5aaa3941c1c413f51
--
2.49.0
S
S
Sughosha wrote on 30 May 11:01 -0700
[PATCH 1/3] gnu: Add zint.
(address . 78643@debbugs.gnu.org)(name . Sughosha)(address . sughosha@disroot.org)
fc0edba6ea0d92bbd320307c4ce3194bf9738399.1748627468.git.sughosha@disroot.org
* gnu/packages/aidc.scm (zint): New variable.

Change-Id: Id2415cc91cceef96696fc8e70146452310f905f4
---
gnu/packages/aidc.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/aidc.scm b/gnu/packages/aidc.scm
index a4816472d7..9400bb2823 100644
--- a/gnu/packages/aidc.scm
+++ b/gnu/packages/aidc.scm
@@ -46,9 +46,42 @@ (define-module (gnu packages aidc)
#:use-module (gnu packages qt)
#:use-module (gnu packages video)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system qt)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk))
+(define-public zint
+ (package
+ (name "zint")
+ (version "2.15.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/zint/zint")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0arnpdqspyy3bxafm3lqc020bhwq3vazfnja2fk2s8c7mr9wimgr"))))
+ (build-system qt-build-system)
+ (arguments
+ (list #:qtbase qtbase
+ #:configure-flags
+ #~(list "-DZINT_QT6=ON"
+ "-DZINT_TEST=ON"
+ "-DZINT_UNINSTALL=OFF")))
+ (native-inputs
+ (list pkg-config qttools))
+ (inputs
+ (list libpng
+ qtsvg))
+ (synopsis "Barcode encoding library")
+ (description "Zint is a suite of programs to allow easy encoding of data in
+any of the wide range of public domain barcode standards and to allow
+integration of this capability into your own programs.")
+ (home-page "https://www.zint.org.uk/")
+ (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
--
2.49.0
S
S
Sughosha wrote on 30 May 11:01 -0700
[PATCH 2/3] gnu: zxing-cpp: Update to 2.3.0.
(address . 78643@debbugs.gnu.org)(name . Sughosha)(address . sughosha@disroot.org)
489237b4fe7555869b45157b3583748d99f04ae8.1748627468.git.sughosha@disroot.org
* 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(-)

Toggle diff (60 lines)
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).
--
2.49.0
S
S
Sughosha wrote on 30 May 11:01 -0700
[PATCH 3/3] gnu: Add spectacle-ocr-screenshot.
(address . 78643@debbugs.gnu.org)(name . Sughosha)(address . sughosha@disroot.org)
2e39ef0e5342768869b90ced428fd0b509c9c95e.1748627468.git.sughosha@disroot.org
* gnu/packages/kde-systemtools.scm (spectacle-ocr-screenshot): New variable.

Change-Id: I387830c8beafb391275ce721191effa2dc022f2b
---
gnu/packages/kde-systemtools.scm | 43 ++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (74 lines)
diff --git a/gnu/packages/kde-systemtools.scm b/gnu/packages/kde-systemtools.scm
index 4923854a7c..0cf3855cd7 100644
--- a/gnu/packages/kde-systemtools.scm
+++ b/gnu/packages/kde-systemtools.scm
@@ -23,17 +23,21 @@
(define-module (gnu packages kde-systemtools)
#:use-module (guix build-system qt)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix gexp)
#:use-module (gnu packages)
+ #:use-module (gnu packages aidc)
#:use-module (gnu packages compression)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages image)
#:use-module (gnu packages kde)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages kde-plasma)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages ocr)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages qt)
#:use-module (gnu packages glib)
@@ -447,6 +451,45 @@ (define-public spectacle
(description "Spectacle is a screenshot taking utility for the KDE.")
(license license:gpl2+)))
+(define-public spectacle-ocr-screenshot
+ (package
+ (name "spectacle-ocr-screenshot")
+ (version "0.3.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/funinkina/spectacle-ocr-screenshot")
+ (commit version)))
+ (sha256
+ (base32 "06dyvv4h4m4j8cm3f7ivcczql26rfajkmw84qh7kik71f70qvwjw"))
+ (file-name (git-file-name name version))))
+ (build-system qt-build-system)
+ (arguments
+ (list #:qtbase qtbase
+ #:tests? #f ;no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (invoke "qmake" (string-append "PREFIX=" #$output))))
+ (replace 'install
+ (lambda _
+ (install-file "spectacle-ocr-screenshot"
+ (string-append #$output "/bin")))))))
+ (native-inputs
+ (list pkg-config))
+ (inputs
+ (list leptonica
+ tesseract-ocr
+ zxing-cpp))
+ (home-page "https://github.com/funinkina/spectacle-ocr-screenshot")
+ (synopsis "Utility to extract text from Spectacle")
+ (description "This package provides an application that integrates with KDE
+Spectacle screenshot tool with Tesseract OCR to extract text from screenshots
+as well as QR codes.")
+ (license license:expat)))
+
(define-public yakuake
(package
(name "yakuake")
--
2.49.0
A
A
Andreas Enge wrote on 14 Jun 12:05 -0700
Re: [PATCH 1/3] gnu: Add zint.
(name . Sughosha)(address . sughosha@disroot.org)(address . 78643@debbugs.gnu.org)
aE3H9x9LHoeRaPxA@jurong
Hello,

this issue is somehow stuck in QA, so I have given it a look.

I have pushed the new package zint, with bsd-3 instead of bsd-2 as
license (it was what was mentioned in two files I checked in the backend
subdirectory).

The zxing-cpp update, however, causes build failures:
kaidan, liblinphone, yosys-clang

Could you have a look, please, and maybe suggest a v2?

Notice also the issue
around a related topic.

Thanks,

Andreas
G
[PATCH 2/3] gnu: zxing-cpp: Update to 2.3.0.
3ffa69756b945a5f13a9224d2a996812@disroot.org
Hi, "[PATCH 6/8] gnu: zxing-cpp: Update to 2.3.0." in
https://issues.guix.gnu.org/78790has zxing-cpp-1.2a variable to solve
that issue, but I can't find yosys-clang variable.
S
S
Sughosha wrote on 18 Jul 11:16 -0700
[PATCH v2] gnu: Add spectacle-ocr-screenshot.
(address . 78643@debbugs.gnu.org)(name . Sughosha)(address . sughosha@disroot.org)
20250718181642.28352-1-sughosha@disroot.org
* gnu/packages/kde-systemtools.scm (spectacle-ocr-screenshot): New variable.

Change-Id: I387830c8beafb391275ce721191effa2dc022f2b
---
gnu/packages/kde-systemtools.scm | 43 ++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (74 lines)
diff --git a/gnu/packages/kde-systemtools.scm b/gnu/packages/kde-systemtools.scm
index 0d57a06d96..b2799712e3 100644
--- a/gnu/packages/kde-systemtools.scm
+++ b/gnu/packages/kde-systemtools.scm
@@ -23,17 +23,21 @@
(define-module (gnu packages kde-systemtools)
#:use-module (guix build-system qt)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix gexp)
#:use-module (gnu packages)
+ #:use-module (gnu packages aidc)
#:use-module (gnu packages compression)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages image)
#:use-module (gnu packages kde)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages kde-plasma)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages ocr)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages qt)
#:use-module (gnu packages glib)
@@ -446,6 +450,45 @@ (define-public spectacle
(description "Spectacle is a screenshot taking utility for the KDE.")
(license license:gpl2+)))
+(define-public spectacle-ocr-screenshot
+ (package
+ (name "spectacle-ocr-screenshot")
+ (version "0.3.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/funinkina/spectacle-ocr-screenshot")
+ (commit version)))
+ (sha256
+ (base32 "06dyvv4h4m4j8cm3f7ivcczql26rfajkmw84qh7kik71f70qvwjw"))
+ (file-name (git-file-name name version))))
+ (build-system qt-build-system)
+ (arguments
+ (list #:qtbase qtbase
+ #:tests? #f ;no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (invoke "qmake" (string-append "PREFIX=" #$output))))
+ (replace 'install
+ (lambda _
+ (install-file "spectacle-ocr-screenshot"
+ (string-append #$output "/bin")))))))
+ (native-inputs
+ (list pkg-config))
+ (inputs
+ (list leptonica
+ tesseract-ocr
+ zxing-cpp))
+ (home-page "https://github.com/funinkina/spectacle-ocr-screenshot")
+ (synopsis "Utility to extract text from Spectacle")
+ (description "This package provides an application that integrates with KDE
+Spectacle screenshot tool with Tesseract OCR to extract text from screenshots
+as well as QR codes.")
+ (license license:expat)))
+
(define-public yakuake
(package
(name "yakuake")
--
2.50.0
Z
(name . Sughosha via Guix-patches via)(address . guix-patches@gnu.org)
87pldwh1d9.fsf@z572.online
Sughosha via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (80 lines)
> * gnu/packages/kde-systemtools.scm (spectacle-ocr-screenshot): New variable.
>
> Change-Id: I387830c8beafb391275ce721191effa2dc022f2b
> ---
> gnu/packages/kde-systemtools.scm | 43 ++++++++++++++++++++++++++++++++
> 1 file changed, 43 insertions(+)
>
> diff --git a/gnu/packages/kde-systemtools.scm b/gnu/packages/kde-systemtools.scm
> index 0d57a06d96..b2799712e3 100644
> --- a/gnu/packages/kde-systemtools.scm
> +++ b/gnu/packages/kde-systemtools.scm
> @@ -23,17 +23,21 @@
> (define-module (gnu packages kde-systemtools)
> #:use-module (guix build-system qt)
> #:use-module (guix download)
> + #:use-module (guix git-download)
> #:use-module ((guix licenses) #:prefix license:)
> #:use-module (guix packages)
> #:use-module (guix utils)
> #:use-module (guix gexp)
> #:use-module (gnu packages)
> + #:use-module (gnu packages aidc)
> #:use-module (gnu packages compression)
> #:use-module (gnu packages freedesktop)
> + #:use-module (gnu packages image)
> #:use-module (gnu packages kde)
> #:use-module (gnu packages kde-frameworks)
> #:use-module (gnu packages kde-plasma)
> #:use-module (gnu packages linux)
> + #:use-module (gnu packages ocr)
> #:use-module (gnu packages pkg-config)
> #:use-module (gnu packages qt)
> #:use-module (gnu packages glib)
> @@ -446,6 +450,45 @@ (define-public spectacle
> (description "Spectacle is a screenshot taking utility for the KDE.")
> (license license:gpl2+)))
>
> +(define-public spectacle-ocr-screenshot
> + (package
> + (name "spectacle-ocr-screenshot")
> + (version "0.3.0")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/funinkina/spectacle-ocr-screenshot")
> + (commit version)))
> + (sha256
> + (base32 "06dyvv4h4m4j8cm3f7ivcczql26rfajkmw84qh7kik71f70qvwjw"))
> + (file-name (git-file-name name version))))
> + (build-system qt-build-system)
> + (arguments
> + (list #:qtbase qtbase
> + #:tests? #f ;no tests
> + #:phases
> + #~(modify-phases %standard-phases
> + (replace 'configure
> + (lambda _
> + (invoke "qmake" (string-append "PREFIX=" #$output))))
> + (replace 'install
> + (lambda _
> + (install-file "spectacle-ocr-screenshot"
> + (string-append #$output "/bin")))))))
> + (native-inputs
> + (list pkg-config))
> + (inputs
> + (list leptonica
> + tesseract-ocr
> + zxing-cpp))
> + (home-page "https://github.com/funinkina/spectacle-ocr-screenshot")
> + (synopsis "Utility to extract text from Spectacle")
> + (description "This package provides an application that integrates with KDE
> +Spectacle screenshot tool with Tesseract OCR to extract text from screenshots
> +as well as QR codes.")
> + (license license:expat)))
> +
> (define-public yakuake
> (package
> (name "yakuake")

pushed, closing.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmh7f9IACgkQO1qpk+Gi
3/Ceig/+OFkwY7bKynfBRnhbkCqgYR2aX+y3yrO8tV5hvVLAafbL7ZVT+OdlQsbk
p3qwMrn/sIEzMDaoZ/5/5qItsIjqhNrgk9jIzr96WmopnJ4i6Kxg68P7UxGBgV4o
4/2vZ1iBe8DAGyF4gTI4b1tVQJ7gaCDAk05VnxLITewLNd7XZ3thTO6FmWJhCpHR
cYtM330pKnT5W7YXZE+vZ485CCf9I4JnKPoz7wzeLQATrKccYbLPfiDzI2oIY9zN
dwdatH6JwRT1Vi27LXMmDFmX3Yus+LiKkd/FP7mJuKqeQuyJFRiuTqD92oJ9VxRj
t1CFXUW9zOyurZoHxZJ89gk1LLsLb4iHo+LBowRgHzmdhDnydDaKxHVFvbKKukR7
qVgNxCUhvW+Wf1A9ybk8tzNakvCzDHo0A8dZwuAt59YovIzlPJVnceGkEImYYrXh
W5oqk0WIXnBclLhLaBIihCd12hYxyKAYkPrOmudLORql4VsS+fDqMnKsKbf6WkQY
DLQT3vyZRWlD7Ne5O7urpwj0Y0SuoF1ccWG6voJJF4yR81gNAD+t4tg1XGK/rJsD
0xaQfnNlq35DJgmmWZry4u/fsakb8//wqzr6GFmsN5cl5ge3ypv8G6/ujQPkeZlR
I2g9/B72x7NjGXudX+mEpsu8kBne2D2FIiU2Ejg342b/0FZyCIw=
=F8tP
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

To comment on this conversation send an email to 78643@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 78643
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch