diff options
author | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2019-03-05 22:17:41 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-04-03 13:44:54 +0200 |
commit | 6dd5119b1b7d4b0d313a7272feaddfac3cfd808f (patch) | |
tree | ac9dc63df5061bdda7d9955062dc59c9b768cbd8 /contrib | |
parent | ac123283d47ff2418111cb194a7aa92e9dfa0cd0 (diff) | |
download | gnunet-6dd5119b1b7d4b0d313a7272feaddfac3cfd808f.tar.gz gnunet-6dd5119b1b7d4b0d313a7272feaddfac3cfd808f.zip |
contrib/guix: Add package zbar (for gnunet-qr).
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/guix/gnu/packages/gnunet.scm | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/contrib/guix/gnu/packages/gnunet.scm b/contrib/guix/gnu/packages/gnunet.scm index 6089ee2fa..c10517c75 100644 --- a/contrib/guix/gnu/packages/gnunet.scm +++ b/contrib/guix/gnu/packages/gnunet.scm | |||
@@ -43,6 +43,7 @@ | |||
43 | #:use-module (gnu packages gtk) | 43 | #:use-module (gnu packages gtk) |
44 | #:use-module (gnu packages guile) | 44 | #:use-module (gnu packages guile) |
45 | #:use-module (gnu packages gstreamer) | 45 | #:use-module (gnu packages gstreamer) |
46 | #:use-module (gnu packages imagemagick) | ||
46 | #:use-module (gnu packages libidn) | 47 | #:use-module (gnu packages libidn) |
47 | #:use-module (gnu packages linux) | 48 | #:use-module (gnu packages linux) |
48 | #:use-module (gnu packages image) | 49 | #:use-module (gnu packages image) |
@@ -56,11 +57,14 @@ | |||
56 | #:use-module (gnu packages perl) | 57 | #:use-module (gnu packages perl) |
57 | #:use-module (gnu packages pulseaudio) | 58 | #:use-module (gnu packages pulseaudio) |
58 | #:use-module (gnu packages python) | 59 | #:use-module (gnu packages python) |
60 | #:use-module (gnu packages qt) | ||
59 | #:use-module (gnu packages databases) | 61 | #:use-module (gnu packages databases) |
60 | #:use-module (gnu packages tls) | 62 | #:use-module (gnu packages tls) |
61 | #:use-module (gnu packages video) | 63 | #:use-module (gnu packages video) |
62 | #:use-module (gnu packages web) | 64 | #:use-module (gnu packages web) |
63 | #:use-module (gnu packages xiph) | 65 | #:use-module (gnu packages xiph) |
66 | #:use-module (gnu packages xml) | ||
67 | #:use-module (gnu packages xorg) | ||
64 | #:use-module (gnu packages backup) | 68 | #:use-module (gnu packages backup) |
65 | #:use-module ((guix licenses) #:prefix license:) | 69 | #:use-module ((guix licenses) #:prefix license:) |
66 | #:use-module ((guix build utils) #:prefix build-utils:) | 70 | #:use-module ((guix build utils) #:prefix build-utils:) |
@@ -191,6 +195,122 @@ authentication and support for SSL3 and TLS.") | |||
191 | (license license:lgpl2.1+) | 195 | (license license:lgpl2.1+) |
192 | (home-page "https://www.gnu.org/software/libmicrohttpd/"))) | 196 | (home-page "https://www.gnu.org/software/libmicrohttpd/"))) |
193 | 197 | ||
198 | (define-public zbar | ||
199 | (package | ||
200 | (name "zbar") | ||
201 | (version "0.22") | ||
202 | (source (origin | ||
203 | (method url-fetch) | ||
204 | (uri (string-append "https://www.linuxtv.org/downloads/zbar/zbar-" | ||
205 | version ".tar.bz2")) | ||
206 | (sha256 | ||
207 | (base32 | ||
208 | "1dsffj42gbasfq4sfhgirmi3lfgdygfspwzr00wbva0pf96fka8v")))) | ||
209 | (build-system gnu-build-system) | ||
210 | (outputs '("out" "gtk" "qt")) | ||
211 | (native-inputs | ||
212 | `(;;("coreutils" ,coreutils) | ||
213 | ("dbus" ,dbus) | ||
214 | ("glib:bin", glib "bin") | ||
215 | ("pkg-config" ,pkg-config) | ||
216 | ;; for testing | ||
217 | ("perl" ,perl) | ||
218 | ("python2" ,python-2.7) | ||
219 | )) | ||
220 | (inputs | ||
221 | `(("gtk+-2" ,gtk+-2) | ||
222 | ("imagemagick" ,imagemagick) | ||
223 | ("libjpeg" ,libjpeg) | ||
224 | ("libxv" ,libxv) | ||
225 | ;;("python2-pygtk" ,python2-pygtk) | ||
226 | ("qtbase" ,qtbase) | ||
227 | ("qt11extras" ,qtx11extras) | ||
228 | ("v4l-utils" ,v4l-utils) | ||
229 | ("xmlto" ,xmlto))) | ||
230 | (arguments | ||
231 | `(#:configure-flags | ||
232 | (list "--without-python2" | ||
233 | "--without-java" | ||
234 | (string-append | ||
235 | "--with-dbusconfdir=" (assoc-ref %outputs "out") "/etc") | ||
236 | "CXXFLAGS=-std=gnu++11" ;; for qt related | ||
237 | ;; Add the other outputs lib directories to the RUNPATH. | ||
238 | ;; (string-append "LDFLAGS=" | ||
239 | ;; "-Wl,-rpath=" (assoc-ref %outputs "gtk") "/lib" | ||
240 | ;; " " | ||
241 | ;; "-Wl,-rpath=" (assoc-ref %outputs "qt") "/lib" | ||
242 | ;; ) | ||
243 | ) | ||
244 | #:tests? #f | ||
245 | #:validate-runpath? #f | ||
246 | #:phases | ||
247 | (modify-phases %standard-phases | ||
248 | (add-before 'configure 'create-missing-file | ||
249 | ;; Create a file missing in the distribution archive, | ||
250 | ;; see https://github.com/mchehab/zbar/issues/35 | ||
251 | (lambda _ | ||
252 | (with-output-to-file "examples/sha1sum" | ||
253 | (lambda _ | ||
254 | (display " | ||
255 | a56811d078ea5cfac9be5deb4b6796177763e152 zbarimg codabar.png | ||
256 | cc53bf34878f769fc3611020c11e572f2853bd2a zbarimg code-128.png | ||
257 | 7537d593ea42393a43bc0eda0a896c0e31017dd8 zbarimg code-39.png | ||
258 | f8f55b828eb7d0400f300be021d29293bd4a3191 zbarimg code-93.png | ||
259 | aebbdbed0b32d7fd72f1245e3fb384822d492062 zbarimg databar.png | ||
260 | 9e245874d3229a575eabfdba1c668369c55960e3 zbarimg databar-exp.png | ||
261 | 53429fc04dfcf674349e2db6cfbaf73e301fc3dc zbarimg ean-13.png | ||
262 | 4095418b74efbb026dd730543558fefdda46f5b9 zbarimg ean-8.png | ||
263 | 5501245dbba21c153f690787fc97ab50c973b846 zbarimg i2-5.png | ||
264 | b350ca7efad7a50c5ac082d5c683a8e8d8d380a7 zbarimg qr-code.png | ||
265 | 84c0ce7072e2227073dc8bd1e5f4518d8f42ae3d zbarimg sqcode1-generated.png | ||
266 | 84c0ce7072e2227073dc8bd1e5f4518d8f42ae3d zbarimg sqcode1-scanned.png | ||
267 | 5ab2b518e2c9d827cedc5825d2e3c9646d43713a zbarimg -Sean2.enable ean-2.png | ||
268 | 668fef8cb9caac34df8cb8564c2cde62e4af5e65 zbarimg -Sean5.enable ean-5.png | ||
269 | b567e550216fe24f7652f683146365a9fe7ee867 zbarimg -Sisbn10.enable ean-13.png | ||
270 | d0f37aa076d42c270f7231c5490beea5605e2ba0 zbarimg -Sisbn13.enable ean-13.png | ||
271 | 3f041225df3b8364b5fd0daf9cf402e8a4731f9b zbarimg -Supca.enable code-upc-a.png | ||
272 | b350ca7efad7a50c5ac082d5c683a8e8d8d380a7 zbarimg -Stest-inverted qr-code-inverted.png\n"))))) | ||
273 | (replace 'check | ||
274 | ;; Run test-suite under a dbus session. | ||
275 | (lambda _ | ||
276 | ;; Don't fail on missing '/etc/machine-id'. | ||
277 | (setenv "DBUS_FATAL_WARNINGS" "0") | ||
278 | (invoke "dbus-launch" "make" "check"))) | ||
279 | (add-after 'install 'split | ||
280 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
281 | ;; Split the binaries to the various outputs. | ||
282 | (let* ((out (assoc-ref outputs "out")) | ||
283 | (gtk (assoc-ref outputs "gtk")) | ||
284 | (qt (assoc-ref outputs "qt")) | ||
285 | (mv (lambda (dest-out dir pattern) | ||
286 | (mkdir-p (string-append dest-out dir)) | ||
287 | (for-each | ||
288 | (lambda (file) | ||
289 | (rename-file | ||
290 | file | ||
291 | (string-append dest-out dir "/" (basename file)))) | ||
292 | (find-files (string-append out dir) pattern))))) | ||
293 | (mv qt "/bin" "zbarcam-qt") | ||
294 | (mv gtk "/bin" "zbarcam-gtk") | ||
295 | (mv qt "/lib" "libzbarqt\\..*") | ||
296 | (mv gtk "/lib" "libzbargtk\\..*") | ||
297 | (mv qt "/lib/pkgconfig" "zbar-qt\\.pc" ) | ||
298 | (mv gtk "/lib/pkgconfig" "zbar-gtk\\.pc" ) | ||
299 | (mv qt "/include/zbar" "QZBar.*\\.h") | ||
300 | (mv gtk "/include/zbar" "zbargtk\\.h")) | ||
301 | #t))))) | ||
302 | (synopsis "Read bar-codes from various sources") | ||
303 | (description "ZBar is a software suite for reading bar codes from | ||
304 | various sources, such as video streams, image files and raw intensity | ||
305 | sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, | ||
306 | Interleaved 2 of 5 and QR Code. Included with the library are basic | ||
307 | applications for decoding captured bar code images and using a video | ||
308 | device (eg, webcam) as a bar code scanner. For application developers, | ||
309 | language bindings are included for C, C++ and Perl as well as | ||
310 | GUI widgets for Qt and GTK") | ||
311 | (license license:lgpl2.1+) | ||
312 | (home-page "http://zbar.sourceforge.net/"))) | ||
313 | |||
194 | (define-public gnurl | 314 | (define-public gnurl |
195 | (package | 315 | (package |
196 | (name "gnurl") | 316 | (name "gnurl") |