1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darringon <jmd@gnu.org>
3 ;;; Copyright © 2016, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
5 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
7 ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages aidc)
25 #:use-module (gnu packages)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix git-download)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages check)
32 #:use-module (gnu packages imagemagick)
33 #:use-module (gnu packages glib)
34 #:use-module (gnu packages gtk)
35 #:use-module (gnu packages image)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages python)
38 #:use-module (gnu packages python-xyz)
39 #:use-module (gnu packages qt)
40 #:use-module (gnu packages video)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system gnu))
44 (define-public zxing-cpp
53 (url "https://github.com/nu-book/zxing-cpp.git")
54 (commit (string-append "v" version))))
55 (file-name (git-file-name name version))
57 (base32 "011sq8wcjfxbnd8sj6bf2fgkamlp8gj6q835g61c952npvwsnl71"))))
59 `(("googletest-source" ,(package-source googletest))))
60 (build-system cmake-build-system)
64 (modify-phases %standard-phases
65 (add-after 'unpack 'unpack-googletest
66 ;; Copy the googletest sources to where the CMake build expects them.
67 (lambda* (#:key inputs #:allow-other-keys)
68 (let ((source (assoc-ref inputs "googletest-source"))
69 (target "test/unit/googletest-src"))
71 (copy-recursively source target)
72 ;; Disable downloading via ExternalProject.
73 (substitute* "test/unit/CMakeLists.txt.in"
74 (("ExternalProject_Add\\(") "message("))
78 (with-directory-excursion "test/unit"
81 (invoke "./ZXingUnitTest"))
83 (synopsis "C++ port of ZXing")
84 (description "ZXing-CPP is a barcode scanning library.")
85 (home-page "https://github.com/nu-book/zxing-cpp")
86 (license license:asl2.0)))
88 (define-public barcode
94 (uri (string-append "mirror://gnu/barcode/barcode-"
98 "1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8"))))
99 (build-system gnu-build-system)
100 (synopsis "Convert text strings to printed bars in various standards")
101 (description "GNU Barcode is a flexible tool to produce printed barcodes
102 from text strings. It supports a variety of encoding standards and sizing
103 measurements. Barcodes can be output in PostScript or Encapsulated PostScript
105 (license license:gpl3+)
106 (home-page "https://www.gnu.org/software/barcode/")))
108 (define-public qrencode
115 "https://fukuchi.org/works/qrencode/qrencode-" version
119 "1d2q5d3v8g3hsi3h5jq4n177bjhf3kawms09immw7p187f6jgjy9"))))
120 (build-system gnu-build-system)
121 (inputs `(("libpng" ,libpng)))
122 (native-inputs `(("pkg-config" ,pkg-config)))
123 (synopsis "Encode data into a QR Code symbol")
124 (description "Libqrencode is a C library for encoding data in a QR Code
125 symbol, a kind of 2D symbology that can be scanned by handy terminals such as
126 a mobile phone with CCD. The capacity of QR Code is up to 7000 digits or 4000
127 characters, and is highly robust.")
128 (license license:lgpl2.1+)
129 (home-page "https://fukuchi.org/works/qrencode")))
131 (define-public libdmtx
139 (url "https://github.com/dmtx/libdmtx")
140 (commit (string-append "v" version))))
141 (file-name (git-file-name name version))
143 (base32 "0wk3fkxzf9ip75v8ia54v6ywx72ajp5s6777j4ay8barpbv869rj"))))
144 (build-system gnu-build-system)
146 ;; XXX Test suite is broken: https://github.com/dmtx/libdmtx/issues/22
149 `(("autoconf" ,autoconf)
150 ("automake" ,automake)
152 ("pkg-config" ,pkg-config)))
153 (home-page "https://github.com/dmtx")
154 (synopsis "Library for reading and writing Data Matrix 2D barcodes")
155 (description "libdmtx is software for reading and writing Data Matrix 2D
156 barcodes of the modern ECC200 variety. libdmtx is a shared library, allowing
157 C/C++ programs to use its capabilities without restrictions or overhead.")
158 (license license:bsd-3)))
167 (uri (string-append "https://linuxtv.org/downloads/zbar/zbar-"
172 "0bmd93a15qpgbsq9c9j33qms18rdrgz6gbc48zi6z9w5pvrvi7z9"))))
173 (build-system gnu-build-system)
175 '(#:configure-flags (list "--with-gtk=auto"
177 (string-append "--with-dbusconfdir="
178 (assoc-ref %outputs "out")
181 `(("glib" ,glib "bin")
182 ("pkg-config" ,pkg-config)))
184 `(("gobject-introspection" ,gobject-introspection)
186 ("imagemagick" ,imagemagick)
187 ("libjpeg" ,libjpeg-turbo)
190 ("qtx11extras" ,qtx11extras)
191 ("v4l-utils" ,v4l-utils)))
192 (synopsis "Bar code reader")
194 "ZBar can read barcodes from various sources, such as video streams,
195 image files, and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E,
196 EAN-8, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ
197 Code. Included with the library are basic applications for decoding captured
198 bar code images and using a video device (e.g. webcam) as a bar code scanner.
199 For application developers, language bindings are included for C, C++ and
200 Python as well as GUI widgets for GTK and Qt.")
201 (home-page "https://github.com/mchehab/zbar")
202 (license license:lgpl2.1+)))
204 (define-public qrcodegen-cpp
206 (name "qrcodegen-cpp")
211 (url "https://github.com/nayuki/QR-Code-generator")
212 (commit (string-append "v" version))))
213 (file-name (git-file-name name version))
214 (patches (search-patches "qrcodegen-cpp-make-install.patch"))
217 "0iq9sv9na0vg996aqrxrjn9rrbiyy7sc9vslw945p3ky22pw3lql"))))
218 (build-system gnu-build-system)
220 `(#:tests? #f ; no test suite
222 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
224 (modify-phases %standard-phases
225 (delete 'configure) ; No ./configure script
226 ;; Only build the C++ variant.
227 (add-after 'unpack 'chdir
231 (synopsis "QR Code generator library")
232 (description "qrcodegen-cpp is a QR code generator library in C++. The
233 project also offers Java, Javascript, Python, C, and Rust implementations.")
234 (home-page "https://www.nayuki.io/page/qr-code-generator-library")
235 (license license:expat)))