aidc.scm 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014 John Darringon <jmd@gnu.org>
  3. ;;; Copyright © 2016, 2020, 2021 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>
  8. ;;;
  9. ;;; This file is part of GNU Guix.
  10. ;;;
  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.
  15. ;;;
  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.
  20. ;;;
  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/>.
  23. (define-module (gnu packages aidc)
  24. #:use-module (gnu packages)
  25. #:use-module ((guix licenses) #:prefix license:)
  26. #:use-module (guix packages)
  27. #:use-module (guix download)
  28. #:use-module (guix git-download)
  29. #:use-module (gnu packages autotools)
  30. #:use-module (gnu packages check)
  31. #:use-module (gnu packages imagemagick)
  32. #:use-module (gnu packages gettext)
  33. #:use-module (gnu packages glib)
  34. #:use-module (gnu packages gtk)
  35. #:use-module (gnu packages image)
  36. #:use-module (gnu packages perl)
  37. #:use-module (gnu packages pkg-config)
  38. #:use-module (gnu packages python)
  39. #:use-module (gnu packages python-xyz)
  40. #:use-module (gnu packages qt)
  41. #:use-module (gnu packages video)
  42. #:use-module (guix build-system cmake)
  43. #:use-module (guix build-system gnu))
  44. (define-public zxing-cpp
  45. (package
  46. (name "zxing-cpp")
  47. (version "1.0.8")
  48. (source
  49. (origin
  50. (method git-fetch)
  51. (uri
  52. (git-reference
  53. (url "https://github.com/nu-book/zxing-cpp")
  54. (commit (string-append "v" version))))
  55. (file-name (git-file-name name version))
  56. (sha256
  57. (base32 "011sq8wcjfxbnd8sj6bf2fgkamlp8gj6q835g61c952npvwsnl71"))))
  58. (native-inputs
  59. `(("googletest-source" ,(package-source googletest))))
  60. (build-system cmake-build-system)
  61. (arguments
  62. `(#:out-of-source? #f
  63. #:phases
  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"))
  70. (mkdir-p target)
  71. (copy-recursively source target)
  72. ;; Disable downloading via ExternalProject.
  73. (substitute* "test/unit/CMakeLists.txt.in"
  74. (("ExternalProject_Add\\(") "message("))
  75. #t)))
  76. (replace 'check
  77. (lambda _
  78. (with-directory-excursion "test/unit"
  79. (invoke "cmake" ".")
  80. (invoke "make")
  81. (invoke "./ZXingUnitTest"))
  82. #t)))))
  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)))
  87. (define-public barcode
  88. (package
  89. (name "barcode")
  90. (version "0.99")
  91. (source (origin
  92. (method url-fetch)
  93. (uri (string-append "mirror://gnu/barcode/barcode-"
  94. version ".tar.xz"))
  95. (sha256
  96. (base32
  97. "1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8"))))
  98. (build-system gnu-build-system)
  99. (synopsis "Convert text strings to printed bars in various standards")
  100. (description "GNU Barcode is a flexible tool to produce printed barcodes
  101. from text strings. It supports a variety of encoding standards and sizing
  102. measurements. Barcodes can be output in PostScript or Encapsulated PostScript
  103. formats.")
  104. (license license:gpl3+)
  105. (home-page "https://www.gnu.org/software/barcode/")))
  106. (define-public qrencode
  107. (package
  108. (name "qrencode")
  109. (version "4.1.1")
  110. (source (origin
  111. (method url-fetch)
  112. (uri (string-append "https://fukuchi.org/works/qrencode/"
  113. "qrencode-" version ".tar.bz2"))
  114. (sha256
  115. (base32
  116. "08v9d8jn26bva2a8x4hghq3mgl8zcid393iqkidwyhc05xrxjmg4"))))
  117. (build-system gnu-build-system)
  118. (arguments
  119. `(#:configure-flags '("--with-tests")
  120. #:phases
  121. (modify-phases %standard-phases
  122. (replace 'check
  123. (lambda* (#:key tests? #:allow-other-keys)
  124. (when tests?
  125. (with-directory-excursion "tests"
  126. (invoke "./test_basic.sh")))
  127. #t)))))
  128. (inputs `(("libpng" ,libpng)))
  129. (native-inputs `(("pkg-config" ,pkg-config)))
  130. (synopsis "Encode data into a QR Code symbol")
  131. (description "Libqrencode is a C library for encoding data in a QR Code
  132. symbol, a kind of 2D symbology that can be scanned by handy terminals such as
  133. a mobile phone with CCD. The capacity of QR Code is up to 7000 digits or 4000
  134. characters, and is highly robust.")
  135. (license license:lgpl2.1+)
  136. (home-page "https://fukuchi.org/works/qrencode")))
  137. (define-public libdmtx
  138. (package
  139. (name "libdmtx")
  140. (version "0.7.5")
  141. (source
  142. (origin
  143. (method git-fetch)
  144. (uri (git-reference
  145. (url "https://github.com/dmtx/libdmtx")
  146. (commit (string-append "v" version))))
  147. (file-name (git-file-name name version))
  148. (sha256
  149. (base32 "0wk3fkxzf9ip75v8ia54v6ywx72ajp5s6777j4ay8barpbv869rj"))))
  150. (build-system gnu-build-system)
  151. (arguments
  152. ;; XXX Test suite is broken: https://github.com/dmtx/libdmtx/issues/22
  153. `(#:tests? #f))
  154. (native-inputs
  155. `(("autoconf" ,autoconf)
  156. ("automake" ,automake)
  157. ("libtool" ,libtool)
  158. ("pkg-config" ,pkg-config)))
  159. (home-page "https://github.com/dmtx")
  160. (synopsis "Library for reading and writing Data Matrix 2D barcodes")
  161. (description "libdmtx is software for reading and writing Data Matrix 2D
  162. barcodes of the modern ECC200 variety. libdmtx is a shared library, allowing
  163. C/C++ programs to use its capabilities without restrictions or overhead.")
  164. (license license:bsd-3)))
  165. (define-public zbar
  166. (package
  167. (name "zbar")
  168. (version "0.23.90")
  169. (source
  170. (origin
  171. (method git-fetch)
  172. (uri
  173. (git-reference
  174. (url "https://github.com/mchehab/zbar")
  175. (commit version)))
  176. (file-name (git-file-name name version))
  177. (sha256
  178. (base32
  179. "0rf3i7lx0fqzxsngird6l4d4dnl612nr32rm8sib699qqx67px8n"))))
  180. (build-system gnu-build-system)
  181. (arguments
  182. '(#:configure-flags (list "--with-gtk=auto"
  183. "--with-python=auto"
  184. (string-append "--with-dbusconfdir="
  185. (assoc-ref %outputs "out")
  186. "/etc"))))
  187. (native-inputs
  188. `(("autoconf" ,autoconf)
  189. ("automake" ,automake)
  190. ("gettext" ,gettext-minimal)
  191. ("glib" ,glib "bin")
  192. ("gobject-introspection" ,gobject-introspection)
  193. ("libtool" ,libtool)
  194. ("pkg-config" ,pkg-config)
  195. ("python-wrapper" ,python-wrapper)))
  196. (inputs
  197. `(("dbus" ,dbus)
  198. ("imagemagick" ,imagemagick)
  199. ("libjpeg" ,libjpeg-turbo)
  200. ("perl" ,perl)
  201. ("python" ,python)
  202. ("qtx11extras" ,qtx11extras)
  203. ("v4l-utils" ,v4l-utils)))
  204. (propagated-inputs
  205. ;; These are in 'requires' field of .pc files.
  206. `(("glib" ,glib)
  207. ("gtk+" ,gtk+)
  208. ("qtbase" ,qtbase-5)))
  209. (synopsis "Bar code reader")
  210. (description
  211. "ZBar can read barcodes from various sources, such as video streams,
  212. image files, and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E,
  213. EAN-8, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ
  214. Code. Included with the library are basic applications for decoding captured
  215. bar code images and using a video device (e.g. webcam) as a bar code scanner.
  216. For application developers, language bindings are included for C, C++ and
  217. Python as well as GUI widgets for GTK and Qt.")
  218. (home-page "https://github.com/mchehab/zbar")
  219. (license license:lgpl2.1+)))
  220. (define-public qrcodegen-cpp
  221. (package
  222. (name "qrcodegen-cpp")
  223. (version "1.6.0")
  224. (source (origin
  225. (method git-fetch)
  226. (uri (git-reference
  227. (url "https://github.com/nayuki/QR-Code-generator")
  228. (commit (string-append "v" version))))
  229. (file-name (git-file-name name version))
  230. (patches (search-patches "qrcodegen-cpp-make-install.patch"))
  231. (sha256
  232. (base32
  233. "0iq9sv9na0vg996aqrxrjn9rrbiyy7sc9vslw945p3ky22pw3lql"))))
  234. (build-system gnu-build-system)
  235. (arguments
  236. `(#:tests? #f ; no test suite
  237. #:make-flags
  238. (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
  239. #:phases
  240. (modify-phases %standard-phases
  241. (delete 'configure) ; No ./configure script
  242. ;; Only build the C++ variant.
  243. (add-after 'unpack 'chdir
  244. (lambda _
  245. (chdir "cpp")
  246. #t)))))
  247. (synopsis "QR Code generator library")
  248. (description "qrcodegen-cpp is a QR code generator library in C++. The
  249. project also offers Java, Javascript, Python, C, and Rust implementations.")
  250. (home-page "https://www.nayuki.io/page/qr-code-generator-library")
  251. (license license:expat)))