From 880ecd66bacf9ba36778dc4673e0e61eb78e8ad1 Mon Sep 17 00:00:00 2001 From: Sergey Alirzaev Date: Mon, 10 Jun 2024 11:48:01 +0200 Subject: [PATCH] dev-libs/libusb: treeclean i don't even remember why i needed it, perhaps for n900 firmare upload? fixes https://github.com/l29ah/booboo/issues/87 --- dev-libs/libusb/Manifest | 1 - dev-libs/libusb/files/0.1.12-fbsd.patch | 97 ----------- dev-libs/libusb/files/08_bus_location.diff | 10 -- dev-libs/libusb/files/libusb-0.1-ansi.patch | 191 --------------------- .../files/libusb-0.1.12-no-infinite-bulk.patch | 24 --- dev-libs/libusb/files/libusb-0.1.12-nocpp.patch | 20 --- dev-libs/libusb/libusb-0.1.12-r8.ebuild | 60 ------- 7 files changed, 403 deletions(-) delete mode 100644 dev-libs/libusb/Manifest delete mode 100644 dev-libs/libusb/files/0.1.12-fbsd.patch delete mode 100644 dev-libs/libusb/files/08_bus_location.diff delete mode 100644 dev-libs/libusb/files/libusb-0.1-ansi.patch delete mode 100644 dev-libs/libusb/files/libusb-0.1.12-no-infinite-bulk.patch delete mode 100644 dev-libs/libusb/files/libusb-0.1.12-nocpp.patch delete mode 100644 dev-libs/libusb/libusb-0.1.12-r8.ebuild diff --git a/dev-libs/libusb/Manifest b/dev-libs/libusb/Manifest deleted file mode 100644 index 7b05bfb..0000000 --- a/dev-libs/libusb/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST libusb-0.1.12.tar.gz 389343 SHA256 37f6f7d9de74196eb5fc0bbe0aea9b5c939de7f500acba3af6fd643f3b538b44 SHA512 08c10e899f93b5f8567d1a1e1ed87dd5631ad0a1463975404709c1d165e545e340afb474a66788efcfdd8193542e2a2eb9cf133f55cbbf76441244191d0bb825 WHIRLPOOL 1991590fd971229d4cb809ff3cd1844243edffd0500a710019836683f291b7187756409c137c8a5bbdc908f90ff5a06c4a1923a77ee04c56988fcb5d68433245 diff --git a/dev-libs/libusb/files/0.1.12-fbsd.patch b/dev-libs/libusb/files/0.1.12-fbsd.patch deleted file mode 100644 index 57fd2ee..0000000 --- a/dev-libs/libusb/files/0.1.12-fbsd.patch +++ /dev/null @@ -1,97 +0,0 @@ -Index: libusb-0.1.12/configure.in -=================================================================== ---- libusb-0.1.12.orig/configure.in -+++ libusb-0.1.12/configure.in -@@ -90,6 +90,8 @@ LINUX_API=0 - DARWIN_API=0 - BSD_API=0 - -+DEFINE_USB_HID_DESCRIPTOR=1 -+ - AC_MSG_CHECKING(for what USB OS support) - case $host in - *-linux*) -@@ -101,13 +103,40 @@ case $host in - AC_MSG_RESULT(Linux) - OSLIBS="" - ;; -- *-freebsd*|*-kfreebsd*-gnu|*-openbsd*|*-netbsd*) -+ *-freebsd*) -+ AC_DEFINE(BSD_API, 1) -+ AC_DEFINE(LINUX_API, 0) -+ AC_DEFINE(DARWIN_API, 0) -+ BSD_API=1 -+ os_support=bsd -+ AC_MSG_RESULT(FreeBSD) -+ OSLIBS="" -+ AC_CHECK_HEADERS([dev/usb/usbhid.h]) -+ if test "x$ac_cv_header_dev_usb_hisbhid_h" = "xyes"; then -+ AC_MSG_CHECKING([for usb_hid_descriptor]) -+ have_usb_hid_descriptor=no -+ AC_TRY_COMPILE([ -+ #include -+ #include -+ #include -+ ], [ -+ struct usb_hid_descriptor descr; -+ ], [ -+ have_usb_hid_descriptor=yes -+ ]) -+ AC_MSG_RESULT([$have_usb_hid_descriptor]) -+ if test "x$have_usb_hid_descriptor" = "xyes"; then -+ DEFINE_USB_HID_DESCRIPTOR=0 -+ fi -+ fi -+ ;; -+ *-dragonfly*|*-kfreebsd*-gnu|*-openbsd*|*-netbsd*) - AC_DEFINE(BSD_API, 1) - AC_DEFINE(LINUX_API, 0) - AC_DEFINE(DARWIN_API, 0) - BSD_API=1 - os_support=bsd -- AC_MSG_RESULT(FreeBSD, OpenBSD and/or NetBSD) -+ AC_MSG_RESULT(DragonFly, OpenBSD and/or NetBSD) - OSLIBS="" - ;; - *-darwin*) -@@ -128,6 +157,7 @@ esac - AC_SUBST(DARWIN_API) - AC_SUBST(LINUX_API) - AC_SUBST(BSD_API) -+AC_SUBST(DEFINE_USB_HID_DESCRIPTOR) - - AM_CONDITIONAL(LINUX_API, test "$os_support" = "linux") - AM_CONDITIONAL(BSD_API, test "$os_support" = "bsd") -Index: libusb-0.1.12/usb.h.in -=================================================================== ---- libusb-0.1.12.orig/usb.h.in -+++ libusb-0.1.12/usb.h.in -@@ -17,6 +17,12 @@ - - #include - -+#if ! @DEFINE_USB_HID_DESCRIPTOR@ && defined(__FreeBSD__) -+#include -+#include -+#include -+#endif -+ - /* - * USB spec information - * -@@ -75,6 +81,7 @@ struct usb_string_descriptor { - u_int16_t wData[1]; - }; - -+#if ! @DEFINE_USB_HID_DESCRIPTOR@ && defined(__FreeBSD__) - /* HID descriptor */ - struct usb_hid_descriptor { - u_int8_t bLength; -@@ -86,6 +93,7 @@ struct usb_hid_descriptor { - /* u_int16_t wDescriptorLength; */ - /* ... */ - }; -+#endif - - /* Endpoint descriptor */ - #define USB_MAXENDPOINTS 32 diff --git a/dev-libs/libusb/files/08_bus_location.diff b/dev-libs/libusb/files/08_bus_location.diff deleted file mode 100644 index ad96bb6..0000000 --- a/dev-libs/libusb/files/08_bus_location.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- a/linux.c -+++ b/linux.c -@@ -355,6 +355,7 @@ - - strncpy(bus->dirname, entry->d_name, sizeof(bus->dirname) - 1); - bus->dirname[sizeof(bus->dirname) - 1] = 0; -+ bus->location = atoi(bus->dirname); - - LIST_ADD(fbus, bus); - diff --git a/dev-libs/libusb/files/libusb-0.1-ansi.patch b/dev-libs/libusb/files/libusb-0.1-ansi.patch deleted file mode 100644 index 9db4b4d..0000000 --- a/dev-libs/libusb/files/libusb-0.1-ansi.patch +++ /dev/null @@ -1,191 +0,0 @@ -diff -Nuar --exclude '*.rej' --exclude '*.orig' libusb-0.1.12.orig/usb.h.in libusb-0.1.12/usb.h.in ---- libusb-0.1.12.orig/usb.h.in 2009-11-11 07:57:27.335948692 +0000 -+++ libusb-0.1.12/usb.h.in 2009-11-11 08:00:11.391786398 +0000 -@@ -13,8 +13,10 @@ - - #include - #include -+#include - #include - -+#include - #include - - #if ! @DEFINE_USB_HID_DESCRIPTOR@ && defined(__FreeBSD__) -@@ -70,27 +72,27 @@ - - /* All standard descriptors have these 2 fields in common */ - struct usb_descriptor_header { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -+ uint8_t bLength; -+ uint8_t bDescriptorType; - }; - - /* String descriptor */ - struct usb_string_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int16_t wData[1]; -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint16_t wData[1]; - }; - - #if ! @DEFINE_USB_HID_DESCRIPTOR@ && defined(__FreeBSD__) - /* HID descriptor */ - struct usb_hid_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int16_t bcdHID; -- u_int8_t bCountryCode; -- u_int8_t bNumDescriptors; -- /* u_int8_t bReportDescriptorType; */ -- /* u_int16_t wDescriptorLength; */ -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint16_t bcdHID; -+ uint8_t bCountryCode; -+ uint8_t bNumDescriptors; -+ /* uint8_t bReportDescriptorType; */ -+ /* uint16_t wDescriptorLength; */ - /* ... */ - }; - #endif -@@ -98,14 +100,14 @@ - /* Endpoint descriptor */ - #define USB_MAXENDPOINTS 32 - struct usb_endpoint_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int8_t bEndpointAddress; -- u_int8_t bmAttributes; -- u_int16_t wMaxPacketSize; -- u_int8_t bInterval; -- u_int8_t bRefresh; -- u_int8_t bSynchAddress; -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint8_t bEndpointAddress; -+ uint8_t bmAttributes; -+ uint16_t wMaxPacketSize; -+ uint8_t bInterval; -+ uint8_t bRefresh; -+ uint8_t bSynchAddress; - - unsigned char *extra; /* Extra descriptors */ - int extralen; -@@ -123,15 +125,15 @@ - /* Interface descriptor */ - #define USB_MAXINTERFACES 32 - struct usb_interface_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int8_t bInterfaceNumber; -- u_int8_t bAlternateSetting; -- u_int8_t bNumEndpoints; -- u_int8_t bInterfaceClass; -- u_int8_t bInterfaceSubClass; -- u_int8_t bInterfaceProtocol; -- u_int8_t iInterface; -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint8_t bInterfaceNumber; -+ uint8_t bAlternateSetting; -+ uint8_t bNumEndpoints; -+ uint8_t bInterfaceClass; -+ uint8_t bInterfaceSubClass; -+ uint8_t bInterfaceProtocol; -+ uint8_t iInterface; - - struct usb_endpoint_descriptor *endpoint; - -@@ -149,14 +151,14 @@ - /* Configuration descriptor information.. */ - #define USB_MAXCONFIG 8 - struct usb_config_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int16_t wTotalLength; -- u_int8_t bNumInterfaces; -- u_int8_t bConfigurationValue; -- u_int8_t iConfiguration; -- u_int8_t bmAttributes; -- u_int8_t MaxPower; -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint16_t wTotalLength; -+ uint8_t bNumInterfaces; -+ uint8_t bConfigurationValue; -+ uint8_t iConfiguration; -+ uint8_t bmAttributes; -+ uint8_t MaxPower; - - struct usb_interface *interface; - -@@ -166,28 +168,28 @@ - - /* Device descriptor */ - struct usb_device_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int16_t bcdUSB; -- u_int8_t bDeviceClass; -- u_int8_t bDeviceSubClass; -- u_int8_t bDeviceProtocol; -- u_int8_t bMaxPacketSize0; -- u_int16_t idVendor; -- u_int16_t idProduct; -- u_int16_t bcdDevice; -- u_int8_t iManufacturer; -- u_int8_t iProduct; -- u_int8_t iSerialNumber; -- u_int8_t bNumConfigurations; -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint16_t bcdUSB; -+ uint8_t bDeviceClass; -+ uint8_t bDeviceSubClass; -+ uint8_t bDeviceProtocol; -+ uint8_t bMaxPacketSize0; -+ uint16_t idVendor; -+ uint16_t idProduct; -+ uint16_t bcdDevice; -+ uint8_t iManufacturer; -+ uint8_t iProduct; -+ uint8_t iSerialNumber; -+ uint8_t bNumConfigurations; - }; - - struct usb_ctrl_setup { -- u_int8_t bRequestType; -- u_int8_t bRequest; -- u_int16_t wValue; -- u_int16_t wIndex; -- u_int16_t wLength; -+ uint8_t bRequestType; -+ uint8_t bRequest; -+ uint16_t wValue; -+ uint16_t wIndex; -+ uint16_t wLength; - }; - - /* -@@ -258,7 +260,7 @@ - - void *dev; /* Darwin support */ - -- u_int8_t devnum; -+ uint8_t devnum; - - unsigned char num_children; - struct usb_device **children; -@@ -270,7 +272,7 @@ - char dirname[PATH_MAX + 1]; - - struct usb_device *devices; -- u_int32_t location; -+ uint32_t location; - - struct usb_device *root_dev; - }; diff --git a/dev-libs/libusb/files/libusb-0.1.12-no-infinite-bulk.patch b/dev-libs/libusb/files/libusb-0.1.12-no-infinite-bulk.patch deleted file mode 100644 index 563397d..0000000 --- a/dev-libs/libusb/files/libusb-0.1.12-no-infinite-bulk.patch +++ /dev/null @@ -1,24 +0,0 @@ -Patch-from: http://bugs.gentoo.org/show_bug.cgi?id=225879 -Gentoo-Bug: 225879 -Signed-off-by: Robin H. Johnson - -Prevents an infinite loop if device is removed during usb_bulk_read or -usb_bulk_write. - -diff -Naur libusb-0.1.12/linux.c libusb-0.1.12-new/linux.c ---- libusb-0.1.12/linux.c 2006-03-04 04:52:46.000000000 +0200 -+++ libusb-0.1.12-new/linux.c 2008-06-11 14:22:20.000000000 +0300 -@@ -220,6 +220,13 @@ - waiting = 1; - context = NULL; - while (!urb.usercontext && ((ret = ioctl(dev->fd, IOCTL_USB_REAPURBNDELAY, &context)) == -1) && waiting) { -+ if (ret == -1) -+ { -+ if (errno == ENODEV) -+ { -+ return -ENODEV; -+ } -+ } - tv.tv_sec = 0; - tv.tv_usec = 1000; // 1 msec - select(dev->fd + 1, NULL, &writefds, NULL, &tv); //sub second wait diff --git a/dev-libs/libusb/files/libusb-0.1.12-nocpp.patch b/dev-libs/libusb/files/libusb-0.1.12-nocpp.patch deleted file mode 100644 index de1a8c7..0000000 --- a/dev-libs/libusb/files/libusb-0.1.12-nocpp.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- libusb-0.1.12/Makefile.am 2006-03-04 13:52:46.000000000 +1100 -+++ libusb-0.1.12/Makefile.am.new 2007-11-08 16:25:38.000000000 +1100 -@@ -4,7 +4,7 @@ - # gnu strictness chokes on README being autogenerated - AUTOMAKE_OPTIONS = 1.4 foreign - --SUBDIRS = . tests doc -+SUBDIRS = . doc - - AM_CFLAGS = -Werror - -@@ -19,7 +19,7 @@ - apidocs/footer.html apidocs/doxygen.css apidocs/doxygen.png libusb.pc.in - EXTRA_libusb_la_SOURCE = linux.c linux.h bsd.c darwin.c - --lib_LTLIBRARIES = libusb.la libusbpp.la -+lib_LTLIBRARIES = libusb.la - - pkgconfig_DATA = libusb.pc - diff --git a/dev-libs/libusb/libusb-0.1.12-r8.ebuild b/dev-libs/libusb/libusb-0.1.12-r8.ebuild deleted file mode 100644 index 9afcbfa..0000000 --- a/dev-libs/libusb/libusb-0.1.12-r8.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libusb/Attic/libusb-0.1.12-r7.ebuild,v 1.13 2013/08/01 12:27:35 ssuominen dead $ - -EAPI=6 - -inherit eutils libtool autotools toolchain-funcs multilib-minimal - -DESCRIPTION="Userspace access to USB devices" -HOMEPAGE="http://libusb.sourceforge.net/" -SRC_URI="mirror://sourceforge/libusb/${P}.tar.gz" - -LICENSE="LGPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="debug doc +cxx static-libs" -RESTRICT="test" - -RDEPEND="!dev-libs/libusb-compat" -DEPEND="${RDEPEND} - doc? ( app-text/openjade - app-text/docbook-dsssl-stylesheets - app-text/docbook-sgml-utils - ~app-text/docbook-sgml-dtd-4.2 )" - -src_prepare() { - default - - sed -i -e 's:-Werror::' Makefile.am - sed -i 's:AC_LANG_CPLUSPLUS:AC_PROG_CXX:' configure.in #213800 - epatch "${FILESDIR}"/${PV}-fbsd.patch - use cxx || epatch "${FILESDIR}"/${PN}-0.1.12-nocpp.patch - epatch "${FILESDIR}"/${PN}-0.1.12-no-infinite-bulk.patch - epatch "${FILESDIR}"/${PN}-0.1-ansi.patch # 273752 - epatch "$FILESDIR/08_bus_location.diff" # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611958 - eautoreconf - - multilib_copy_sources -} - -multilib_src_configure() { - econf \ - $(use_enable static-libs static) \ - $(use_enable debug debug all) \ - $(use_enable doc build-docs) -} - -multilib_src_install() { - emake -j1 DESTDIR="${D}" install || die "make install failed" - gen_usr_ldscript -a usb -} - -multilib_src_install_all() { - dodoc AUTHORS NEWS README - use doc && dohtml doc/html/*.html - - use cxx || rm -f "${ED}"/usr/include/usbpp.h - - rm -f "${ED}"/usr/lib*/libusb*.la -} -- 2.11.4.GIT