pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libmtp libmtp: Don't attempt to unload kernel dr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f8ab5e6191d4
branches:  trunk
changeset: 426616:f8ab5e6191d4
user:      nia <nia%pkgsrc.org@localhost>
date:      Fri Apr 03 20:15:19 2020 +0000

description:
libmtp: Don't attempt to unload kernel drivers on NetBSD.

This reduces the amount the command line utilities complain and makes
this marginally less broken. But, it's a hack around the underlying issue,
it shouldn't treat this as a failure if the underlying libusb driver doesn't
support it.

diffstat:

 devel/libmtp/Makefile                         |   3 ++-
 devel/libmtp/distinfo                         |   3 ++-
 devel/libmtp/patches/patch-src_libusb1-glue.c |  22 ++++++++++++++++++++++
 3 files changed, 26 insertions(+), 2 deletions(-)

diffs (53 lines):

diff -r a630c2088ba5 -r f8ab5e6191d4 devel/libmtp/Makefile
--- a/devel/libmtp/Makefile     Fri Apr 03 20:06:08 2020 +0000
+++ b/devel/libmtp/Makefile     Fri Apr 03 20:15:19 2020 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.19 2020/03/24 16:58:05 nia Exp $
+# $NetBSD: Makefile,v 1.20 2020/04/03 20:15:19 nia Exp $
 
 DISTNAME=      libmtp-1.1.17
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=libmtp/}
 
diff -r a630c2088ba5 -r f8ab5e6191d4 devel/libmtp/distinfo
--- a/devel/libmtp/distinfo     Fri Apr 03 20:06:08 2020 +0000
+++ b/devel/libmtp/distinfo     Fri Apr 03 20:15:19 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2020/03/24 16:58:05 nia Exp $
+$NetBSD: distinfo,v 1.14 2020/04/03 20:15:19 nia Exp $
 
 SHA1 (libmtp-1.1.17.tar.gz) = b9d29f6f99f682e3b8c4f05cb6b1c8de3a454688
 RMD160 (libmtp-1.1.17.tar.gz) = a6ee084464d610a307388701f56f014c9669c8bb
@@ -7,4 +7,5 @@
 SHA1 (patch-configure) = f57b708684696e496b1d61783e48fe4b63618d65
 SHA1 (patch-hotplug.sh.in) = 72216bb36bd0f6274c16c09d121fcffb567ab120
 SHA1 (patch-m4_byteorder.m4) = e6c1170d9099f13c637b3a73d67618d318c7a73d
+SHA1 (patch-src_libusb1-glue.c) = 2c83f2436a7cbc27c8b03f8d22db9bb446f55446
 SHA1 (patch-src_util.c) = f7be6760014323dc2b159e1e44f94e40d96f26d0
diff -r a630c2088ba5 -r f8ab5e6191d4 devel/libmtp/patches/patch-src_libusb1-glue.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libmtp/patches/patch-src_libusb1-glue.c     Fri Apr 03 20:15:19 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_libusb1-glue.c,v 1.1 2020/04/03 20:15:19 nia Exp $
+
+Don't try to unload kernel drivers on NetBSD, it doesn't work.
+
+--- src/libusb1-glue.c.orig    2019-03-25 06:02:39.000000000 +0000
++++ src/libusb1-glue.c
+@@ -1920,6 +1920,7 @@ static int init_ptp_usb(PTPParams* param
+    * drivers (such as mass storage), then try to unload it to make it
+    * accessible from user space.
+    */
++#ifndef __NetBSD__
+   if (FLAG_UNLOAD_DRIVER(ptp_usb) &&
+       libusb_kernel_driver_active(device_handle, ptp_usb->interface)
+   ) {
+@@ -1927,6 +1928,7 @@ static int init_ptp_usb(PTPParams* param
+         perror("libusb_detach_kernel_driver() failed, continuing anyway...");
+       }
+   }
++#endif
+ 
+ 
+   /*



Home | Main Index | Thread Index | Old Index