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>
7 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
44 (uri (string-append "mirror://sourceforge/libusb/libusb-1.0/"
45 "libusb-" version "/libusb-" version ".tar.bz2"))
48 "0h38p9rxfpg9vkrbyb120i1diq57qcln82h5fr7hvy82c20jql3c"))))
49 (build-system gnu-build-system)
51 ;; XXX: Enabling udev is now recommended, but eudev indirectly depends on
53 (arguments `(#:configure-flags '("--disable-udev")))
54 ;; (inputs `(("eudev" ,eudev)))
56 (home-page "http://www.libusb.org")
57 (synopsis "User-space USB library")
59 "Libusb is a library that gives applications easy access to USB
60 devices on various operating systems.")
63 (define-public libusb-compat
65 (name "libusb-compat")
70 (uri (string-append "mirror://sourceforge/libusb/"
71 name "-" (version-major+minor version) "/"
73 name "-" version ".tar.bz2"))
76 "0nn5icrfm9lkhzw1xjvaks9bq3w6mjg86ggv3fn7kgi4nfvg8kj0"))))
77 (build-system gnu-build-system)
79 `(("pkg-config" ,pkg-config)))
81 `(("libusb" ,libusb)))
82 (home-page "http://www.libusb.org")
83 (synopsis "Compatibility shim for libusb")
85 "Libusb-compat provides a shim allowing applications based on older
86 version of libusb to run with newer libusb.")
95 (uri (string-append "mirror://sourceforge/libmtp/" version
96 "/libmtp-" version ".tar.gz"))
99 "12dinqic0ljnhrwx3rc61jc7q24ybr0mckc2ya5kh1s1np0d7w93"))
100 (patches (list (search-patch "libmtp-devices.patch")))))
101 (build-system gnu-build-system)
103 `(("pkg-config" ,pkg-config)))
105 ;; libmtp.pc refers to all these.
106 `(("libgcrypt" ,libgcrypt)
110 (list (string-append "--with-udev="
111 (assoc-ref %outputs "out")
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
132 (uri (string-append "mirror://sourceforge/gmtp/" version
133 "/gmtp-" version ".tar.gz"))
136 "0bdxvi0jf3q870a39xzsaj4qrjwc9b5bgvc95plc7xb6vf2m7zsv"))))
137 (build-system glib-or-gtk-build-system)
140 (let ((libid3tag (assoc-ref %build-inputs "libid3tag")))
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")))))
148 ("libvorbis" ,libvorbis)
149 ("libid3tag" ,libid3tag)
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