Control: reassign -1 libmtp-dev 1.1.6-20-g1b9f164-1
Hello,
Ketvirtadienis 14 Lapkritis 2013 03:12:20 rašė:
> Package: libgphoto2-2-dev
> Version: 2.4.14-2.3
> Severity: serious
> Tags: patch
> User: debian-bsd@lists.debian.org
> Usertags: kfreebsd
> Control: block 725951 by -1
>
> Hi,
>
> The recent change to the libusb dependency of libgphoto2-2-dev created
> an odd problem on kfreebsd when trying to build gvfs:
>
> https://buildd.debian.org/status/package.php?p=gvfs
>
> > gvfs build-depends on:
> > - libgphoto2-2-dev (>= 2.4.0)
> > libgphoto2-2-dev depends on:
> > - libusb-1.0-0-dev | --virtual-libusb-1.0-0-dev
> > gvfs build-depends on:
> > - libmtp-dev (>= 1.1.0)
> > libmtp-dev depends on:
> > - libusb-dev
> > libusb2-dev conflicts with:
> > - libusb-dev
>
> kfreebsd has its own libusb-dev different from the implementations
> available on linux.
I wouldn't be so sure that libgphoto2 is the one which needs to be fixed. In
my opinion, here libmtp-dev does the wrong thing. libusb-1.0 home page[1]
says:
-
FreeBSD 8 and above include a FreeBSD-specific reimplementation of the
libusb-1.0 API, so your applications will probably work there too. The source
code for this library can be found here.
-
Having in mind that libusb-0.1 is deprecated, it seems that the whole libusb*
packaging structure (i.e. libusb-1.0-0-dev virtual package on kFreeBSD) in
Debian is meant to establish that libusbx should be used on Linux while
libusb2 from freebsd-libs should be used on kFreeBSD. I might be wrong so I'm
also CC'ing libusbx and kFreeBSD maintainers. I will reassign the bug back to
libgphoto2-2-dev if that's the case.
So the attached patch once applied against libmtp would also solve the
problem. I have verified that resulting libmtp actually builds on both
kfreebsd-amd64/sid and linux-amd64/sid. I haven't checked that it works on
kfreebsd-amd64 though but very likely it is safe to assume that it would.
[1] http://www.libusb.org/wiki/libusb-1.0
--
Modestas Vainius diff -Nru libmtp-1.1.6-20-g1b9f164/debian/changelog libmtp-1.1.6-20-g1b9f164/debian/changelog
--- libmtp-1.1.6-20-g1b9f164/debian/changelog 2013-08-23 11:22:41.0 +0300
+++ libmtp-1.1.6-20-g1b9f164/debian/changelog 2013-11-17 18:04:40.0 +0200
@@ -1,3 +1,9 @@
+libmtp (1.1.6-20-g1b9f164-1.1) UNRELEASED; urgency=low
+
+ * Build against libusb2 on kfreebsd-any. (Closes: #729545)
+
+ -- Modestas Vainius Sun, 17 Nov 2013 14:37:35 +
+
libmtp (1.1.6-20-g1b9f164-1) unstable; urgency=low
* New upstream release.
diff -Nru libmtp-1.1.6-20-g1b9f164/debian/control libmtp-1.1.6-20-g1b9f164/debian/control
--- libmtp-1.1.6-20-g1b9f164/debian/control 2013-08-23 11:21:28.0 +0300
+++ libmtp-1.1.6-20-g1b9f164/debian/control 2013-11-17 18:04:40.0 +0200
@@ -13,8 +13,8 @@
dpkg-dev (>= 1.13.19),
gnulib,
libgcrypt11-dev,
- libusb-1.0-0-dev [linux-any],
- libusb-dev [!linux-any],
+ libusb-1.0-0-dev [!hurd-i386],
+ libusb-dev [hurd-i386],
lsb-release,
pkg-config,
xsltproc
@@ -96,8 +96,8 @@
Architecture: any
Depends:
libmtp9 (= ${binary:Version}),
- libusb-1.0-0-dev [linux-any],
- libusb-dev [!linux-any],
+ libusb-1.0-0-dev [!hurd-i386],
+ libusb-dev [hurd-i386],
${misc:Depends}
Multi-Arch: same
Description: Media Transfer Protocol (MTP) development files
diff -Nru libmtp-1.1.6-20-g1b9f164/debian/control.in libmtp-1.1.6-20-g1b9f164/debian/control.in
--- libmtp-1.1.6-20-g1b9f164/debian/control.in 2013-08-23 11:20:52.0 +0300
+++ libmtp-1.1.6-20-g1b9f164/debian/control.in 2013-11-17 18:20:37.0 +0200
@@ -13,8 +13,8 @@
dpkg-dev (>= 1.13.19),
gnulib,
libgcrypt11-dev,
- libusb-1.0-0-dev [linux-any],
- libusb-dev [!linux-any],
+ libusb-1.0-0-dev [!hurd-i386],
+ libusb-dev [hurd-i386],
lsb-release,
pkg-config,
xsltproc
@@ -96,8 +96,8 @@
Architecture: any
Depends:
libmtp@SOVERSION@ (= ${binary:Version}),
- libusb-1.0-0-dev [linux-any],
- libusb-dev [!linux-any],
+ libusb-1.0-0-dev [!hurd-i386],
+ libusb-dev [hurd-i386],
${misc:Depends}
Multi-Arch: same
Description: Media Transfer Protocol (MTP) development files
diff -Nru libmtp-1.1.6-20-g1b9f164/debian/patches/kfreebsd_libusb2.patch libmtp-1.1.6-20-g1b9f164/debian/patches/kfreebsd_libusb2.patch
--- libmtp-1.1.6-20-g1b9f164/debian/patches/kfreebsd_libusb2.patch 1970-01-01 03:00:00.0 +0300
+++ libmtp-1.1.6-20-g1b9f164/debian/patches/kfreebsd_libusb2.patch 2013-11-17 18:04:40.0 +0200
@@ -0,0 +1,17 @@
+Description: Make libmtp built against libusb2-dev on kFreeBSD
+Author: Modestas Vainius
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729545
+Origin: vendor
+Last-Update: 2013-11-17
+
+--- libmtp-1.1.6-20-g1b9f164.orig/src/libusb-glue.h
libmtp-1.1.6-20-g1b9f164/src/libusb-glue.h
+@@ -32,7 +32,7 @@
+
+ #include "ptp.h"
+ #ifdef HAVE_LIBUSB1
+-#in