gnu: Add python-click-log.
[jackhill/guix/guix.git] / gnu / packages / libusb.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
5 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages libusb)
23 #:use-module (gnu packages)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix utils)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system glib-or-gtk)
30 #:use-module (gnu packages gnupg)
31 #:use-module (gnu packages gtk)
32 #:use-module (gnu packages linux)
33 #:use-module (gnu packages mp3)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages xiph))
36
37 (define-public libusb
38 (package
39 (name "libusb")
40 (version "1.0.19")
41 (source
42 (origin
43 (method url-fetch)
44 (uri (string-append "mirror://sourceforge/libusb/libusb-1.0/"
45 "libusb-" version "/libusb-" version ".tar.bz2"))
46 (sha256
47 (base32
48 "0h38p9rxfpg9vkrbyb120i1diq57qcln82h5fr7hvy82c20jql3c"))))
49 (build-system gnu-build-system)
50
51 ;; XXX: Enabling udev is now recommended, but eudev indirectly depends on
52 ;; libusb.
53 (arguments `(#:configure-flags '("--disable-udev")))
54 ;; (inputs `(("eudev" ,eudev)))
55
56 (home-page "http://www.libusb.org")
57 (synopsis "User-space USB library")
58 (description
59 "Libusb is a library that gives applications easy access to USB
60 devices on various operating systems.")
61 (license lgpl2.1+)))
62
63 (define-public libusb-compat
64 (package
65 (name "libusb-compat")
66 (version "0.1.5")
67 (source
68 (origin
69 (method url-fetch)
70 (uri (string-append "mirror://sourceforge/libusb/"
71 name "-" (version-major+minor version) "/"
72 name "-" version "/"
73 name "-" version ".tar.bz2"))
74 (sha256
75 (base32
76 "0nn5icrfm9lkhzw1xjvaks9bq3w6mjg86ggv3fn7kgi4nfvg8kj0"))))
77 (build-system gnu-build-system)
78 (native-inputs
79 `(("pkg-config" ,pkg-config)))
80 (inputs
81 `(("libusb" ,libusb)))
82 (home-page "http://www.libusb.org")
83 (synopsis "Compatibility shim for libusb")
84 (description
85 "Libusb-compat provides a shim allowing applications based on older
86 version of libusb to run with newer libusb.")
87 (license lgpl2.1+)))
88
89 (define-public libmtp
90 (package
91 (name "libmtp")
92 (version "1.1.9")
93 (source (origin
94 (method url-fetch)
95 (uri (string-append "mirror://sourceforge/libmtp/" version
96 "/libmtp-" version ".tar.gz"))
97 (sha256
98 (base32
99 "12dinqic0ljnhrwx3rc61jc7q24ybr0mckc2ya5kh1s1np0d7w93"))
100 (patches (list (search-patch "libmtp-devices.patch")))))
101 (build-system gnu-build-system)
102 (native-inputs
103 `(("pkg-config" ,pkg-config)))
104 (propagated-inputs
105 ;; libmtp.pc refers to all these.
106 `(("libgcrypt" ,libgcrypt)
107 ("libusb" ,libusb)))
108 (arguments
109 `(#:configure-flags
110 (list (string-append "--with-udev="
111 (assoc-ref %outputs "out")
112 "/lib/udev"))))
113 (home-page "http://libmtp.sourceforge.net/")
114 (synopsis "Library implementing the Media Transfer Protocol")
115 (description "Libmtp implements an MTP (Media Transfer Protocol)
116 initiator, which means that it initiates MTP sessions with devices. The
117 devices responding are known as MTP responders. Libmtp runs on devices
118 with a USB host controller interface. It implements MTP Basic, which was
119 proposed for standardization.")
120 ;; COPYING contains lgpl2.1, while files headers give
121 ;; "GNU Lesser General Public License as published by the Free Software
122 ;; Foundation; either version 2 of the License, or (at your option) any
123 ;; later version."
124 (license lgpl2.1+)))
125
126 (define-public gmtp
127 (package
128 (name "gmtp")
129 (version "1.3.9")
130 (source (origin
131 (method url-fetch)
132 (uri (string-append "mirror://sourceforge/gmtp/" version
133 "/gmtp-" version ".tar.gz"))
134 (sha256
135 (base32
136 "0bdxvi0jf3q870a39xzsaj4qrjwc9b5bgvc95plc7xb6vf2m7zsv"))))
137 (build-system glib-or-gtk-build-system)
138 (arguments
139 '(#:configure-flags
140 (let ((libid3tag (assoc-ref %build-inputs "libid3tag")))
141 (list
142 ;; libid3tag provides no .pc file, so pkg-config fails to find them.
143 (string-append "ID3TAG_CFLAGS=-I" libid3tag "/include")
144 (string-append "ID3TAG_LIBS=-L" libid3tag "/lib -lid3tag -lz")))))
145 (inputs
146 `(("gtk+" ,gtk+)
147 ("flac" ,flac)
148 ("libvorbis" ,libvorbis)
149 ("libid3tag" ,libid3tag)
150 ("libmtp" ,libmtp)))
151 (native-inputs
152 `(("pkg-config" ,pkg-config)))
153 (home-page "http://gmtp.sourceforge.net/")
154 (synopsis "Simple graphical MTP client")
155 (description "gMTP is a simple graphical client for the Media Transfer Protocol
156 (MTP), which allows media files to be transferred to and from many portable
157 devices.")
158 (license bsd-3)))