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