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

Patch



The attached patch fixes the FTBFS.

-- 
Marcin Owsiany <porridge@debian.org>             http://marcin.owsiany.pl/
GnuPG: 2048R/02F946FC  35E9 1344 9F77 5F43 13DD  6423 DBF4 80C6 02F9 46FC
diff -Nru libusb-0.1.12/debian/changelog libusb-0.1.12/debian/changelog
--- libusb-0.1.12/debian/changelog	2012-06-03 17:31:31.000000000 +0100
+++ libusb-0.1.12/debian/changelog	2012-09-22 13:41:35.000000000 +0100
@@ -1,3 +1,12 @@
+libusb (2:0.1.12-23+nmu1) unstable; urgency=low
+
+  * Fix kfreebsd-* FTBFS: ignore the result of the (BSD-only)
+    HAVE_OLD_DEV_USB_USB_H configure check, which started misbehaving in 2012.
+    We ignore the system-provided API in favour of an embedded copy of a header
+    file anyway (closes: #668026).
+
+ -- Marcin Owsiany <porridge@debian.org>  Sat, 22 Sep 2012 12:36:29 +0000
+
 libusb (2:0.1.12-23) unstable; urgency=low
 
   * Enable the patches in debian/patches/series. 
diff -Nru libusb-0.1.12/debian/patches/06_bsd.diff libusb-0.1.12/debian/patches/06_bsd.diff
--- libusb-0.1.12/debian/patches/06_bsd.diff	2011-12-31 10:43:17.000000000 +0000
+++ libusb-0.1.12/debian/patches/06_bsd.diff	2012-09-22 13:35:40.000000000 +0100
@@ -1,6 +1,8 @@
---- a/bsd.c
-+++ b/bsd.c
-@@ -39,7 +39,7 @@
+Index: libusb-0.1.12/bsd.c
+===================================================================
+--- libusb-0.1.12.orig/bsd.c	2012-09-22 12:28:40.000000000 +0000
++++ libusb-0.1.12/bsd.c	2012-09-22 12:35:17.000000000 +0000
+@@ -39,14 +39,22 @@
  #include <sys/time.h>
  #include <sys/ioctl.h>
  
@@ -9,8 +11,26 @@
  
  #include "usbi.h"
  #ifdef HAVE_CONFIG_H
---- /dev/null
-+++ b/freebsd-usb.h
+ #include "config.h"
+ #endif
+ 
+-#ifdef HAVE_OLD_DEV_USB_USB_H
++/*
++ * Since the Debian version includes "freebsd-usb.h" instead of
++ * <dev/usb/usb.h>, the API provided by the latter file does not matter. The
++ * configure check gives false positives as of 2012, but rather than fixing a
++ * check for something we don't use anyway, just unconditionally skip those
++ * definitions.
++ * #ifdef HAVE_OLD_DEV_USB_USB_H
++ */
++#if 0
+ /*
+  * It appears some of the BSD's (OpenBSD atleast) have switched over to a
+  * new naming convention, so we setup some macro's for backward
+Index: libusb-0.1.12/freebsd-usb.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ libusb-0.1.12/freebsd-usb.h	2012-09-22 12:28:40.000000000 +0000
 @@ -0,0 +1,706 @@
 +/*	$NetBSD: usb.h,v 1.69 2002/09/22 23:20:50 augustss Exp $	*/
 +/*	$FreeBSD: src/sys/dev/usb/usb.h,v 1.47.2.1.2.1 2009/04/15 03:14:26 kensmith Exp $    */

Reply to: