update to libusb-0.1.10a; based on Douglas Santos <dsantos@hydroxyl.org>

This commit is contained in:
pvalchev 2005-05-21 22:24:20 +00:00
parent bf0b20f510
commit 912a7cbc47
10 changed files with 93 additions and 59 deletions

View File

@ -1,10 +1,9 @@
# $OpenBSD: Makefile,v 1.11 2004/04/21 03:04:14 naddy Exp $ # $OpenBSD: Makefile,v 1.12 2005/05/21 22:24:20 pvalchev Exp $
COMMENT= "USB access library" COMMENT= "USB access library"
VERSION= 0.1.7 VERSION= 0.1.10a
DISTNAME= libusb-${VERSION} DISTNAME= libusb-${VERSION}
PKGNAME= ${DISTNAME}p2
CATEGORIES= devel CATEGORIES= devel
HOMEPAGE= http://libusb.sourceforge.net/ HOMEPAGE= http://libusb.sourceforge.net/
@ -19,12 +18,9 @@ PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libusb/} MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libusb/}
SEPARATE_BUILD= concurrent SEPARATE_BUILD= concurrent
CONFIGURE_STYLE= gnu CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
CONFIGURE_ARGS+= --enable-static --disable-build-docs --enable-static --disable-build-docs
post-extract:
@rm ${WRKSRC}/usb.h
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
MD5 (libusb-0.1.7.tar.gz) = 4c7abee86d8715bccb43428a500d2170 MD5 (libusb-0.1.10a.tar.gz) = c6062b29acd2cef414bcc34e0decbdd1
RMD160 (libusb-0.1.7.tar.gz) = 9fa1642f5c2806216e0445ba0f6aa80bcd6655a1 RMD160 (libusb-0.1.10a.tar.gz) = 18d50ac645440925bfa9f58d7a311d857e640882
SHA1 (libusb-0.1.7.tar.gz) = e87a1f023686ebbc63b619e5d6b65f219222f36e SHA1 (libusb-0.1.10a.tar.gz) = 7e03a71f2cec39d96f58e22ea9289088eee617ef
SIZE (libusb-0.1.7.tar.gz) = 193075 SIZE (libusb-0.1.10a.tar.gz) = 375144

View File

@ -1,11 +1,25 @@
$OpenBSD: patch-Makefile_in,v 1.4 2003/01/01 21:34:45 brad Exp $ --- Makefile.in.orig Mon Feb 14 13:23:19 2005
--- Makefile.in.orig Sun Nov 17 13:45:28 2002 +++ Makefile.in Fri May 20 22:44:55 2005
+++ Makefile.in Mon Dec 30 09:26:09 2002 @@ -250,7 +250,7 @@ target_alias = @target_alias@
@@ -121,7 +121,6 @@ include_HEADERS = usb.h # require automake 1.4
# gnu strictness chokes on README being autogenerated
AUTOMAKE_OPTIONS = 1.4 foreign
-SUBDIRS = . tests doc
+SUBDIRS = . doc
AM_CFLAGS = $(CFLAGS_EXT)
configincludedir = $(pkglibdir)/include
bin_SCRIPTS = libusb-config
@@ -277,13 +277,11 @@ nodist_include_HEADERS = usb.h
include_HEADERS = usbpp.h
libusb_la_LDFLAGS = \ libusb_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
- -release $(LT_RELEASE) \ - -release $(LT_RELEASE) \
-export-dynamic \ -export-dynamic \
$(LDADDS) $(LDADDS)
libusbpp_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
- -release $(LT_RELEASE) \
-export-dynamic \
$(LDADDS) -lusb $(QT_LDFLAGS)

View File

@ -1,61 +1,60 @@
$OpenBSD: patch-bsd_c,v 1.5 2003/11/27 04:34:26 pvalchev Exp $ --- bsd.c.orig Tue Feb 17 23:34:52 2004
--- bsd.c.orig 2002-11-11 11:04:16.000000000 -0700 +++ bsd.c Fri May 20 22:35:57 2005
+++ bsd.c 2003-11-26 21:20:46.000000000 -0700 @@ -357,7 +357,7 @@ int usb_bulk_read(usb_dev_handle *dev, i
@@ -276,7 +276,7 @@ static int ensure_ep_open(usb_dev_handle int usb_interrupt_write(usb_dev_handle *dev, int ep, char *bytes, int size,
int usb_bulk_write(usb_dev_handle *dev, int ep, char *bytes, int size, int timeout)
int timeout)
{ {
- int fd, ret, sent = 0; - int fd, ret, sent = 0;
+ int fd, ret; + int fd, ret;
/* Ensure the endpoint address is correct */ /* Ensure the endpoint address is correct */
ep &= ~USB_ENDPOINT_IN; ep &= ~USB_ENDPOINT_IN;
@@ -298,8 +298,7 @@ int usb_bulk_write(usb_dev_handle *dev, @@ -379,8 +379,7 @@ int usb_interrupt_write(usb_dev_handle *
USB_ERROR_STR(ret, "error setting timeout: %s", USB_ERROR_STR(-errno, "error setting timeout: %s",
strerror(errno)); strerror(errno));
- do { - do {
- ret = write(fd, bytes+sent, size-sent); - ret = write(fd, bytes+sent, size-sent);
+ ret = write(fd, bytes, size); + ret = write(fd, bytes, size);
if (ret < 0) if (ret < 0)
#if __FreeBSD__ #if __FreeBSD__
USB_ERROR_STR(ret, "error writing to bulk endpoint %s.%d: %s", USB_ERROR_STR(-errno, "error writing to interrupt endpoint %s.%d: %s",
@@ -309,16 +308,13 @@ int usb_bulk_write(usb_dev_handle *dev, @@ -390,16 +389,13 @@ int usb_interrupt_write(usb_dev_handle *
dev->device->filename, UE_GET_ADDR(ep), strerror(errno)); dev->device->filename, UE_GET_ADDR(ep), strerror(errno));
#endif #endif
- sent += ret; - sent += ret;
- } while(ret > 0 && sent < size); - } while (ret > 0 && sent < size);
- -
- return sent; - return sent;
+ return ret; + return ret;
} }
int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size, int usb_interrupt_read(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout) int timeout)
{ {
- int fd, ret, retrieved = 0, one = 1; - int fd, ret, retrieved = 0, one = 1;
+ int fd, ret, one = 1; + int fd, ret, one = 1;
/* Ensure the endpoint address is correct */ /* Ensure the endpoint address is correct */
ep |= USB_ENDPOINT_IN; ep |= USB_ENDPOINT_IN;
@@ -345,8 +341,7 @@ int usb_bulk_read(usb_dev_handle *dev, i @@ -424,8 +420,7 @@ int usb_interrupt_read(usb_dev_handle *d
USB_ERROR_STR(ret, "error setting short xfer: %s", if (ret < 0)
strerror(errno)); USB_ERROR_STR(-errno, "error setting short xfer: %s", strerror(errno));
- do { - do {
- ret = read(fd, bytes+retrieved, size-retrieved); - ret = read(fd, bytes+retrieved, size-retrieved);
+ ret = read(fd, bytes, size); + ret = read(fd, bytes, size);
if (ret < 0) if (ret < 0)
#if __FreeBSD__ #if __FreeBSD__
USB_ERROR_STR(ret, "error reading from bulk endpoint %s.%d: %s", USB_ERROR_STR(-errno, "error reading from interrupt endpoint %s.%d: %s",
@@ -355,10 +350,8 @@ int usb_bulk_read(usb_dev_handle *dev, i @@ -434,10 +429,7 @@ int usb_interrupt_read(usb_dev_handle *d
USB_ERROR_STR(ret, "error reading from bulk endpoint %s.%02d: %s", USB_ERROR_STR(-errno, "error reading from interrupt endpoint %s.%02d: %s",
dev->device->filename, UE_GET_ADDR(ep), strerror(errno)); dev->device->filename, UE_GET_ADDR(ep), strerror(errno));
#endif #endif
- retrieved += ret; - retrieved += ret;
- } while (ret > 0 && retrieved < size); - } while (ret > 0 && retrieved < size);
-
- return retrieved; - return retrieved;
+ return ret; + return ret;
} }

View File

@ -0,0 +1,20 @@
--- configure.orig Mon Feb 14 13:23:23 2005
+++ configure Fri May 20 22:35:57 2005
@@ -21635,17 +21635,11 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <dev/usb/usb.h>
-int
-main ()
-{
int main(void)
{
int a = ((struct usb_ctl_request *)0L)->ucr_addr;
return 0;
}
- ;
- return 0;
-}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-descriptors_c,v 1.1 2002/05/30 18:38:17 naddy Exp $
--- descriptors.c.orig Thu May 30 02:26:32 2002
+++ descriptors.c Thu May 30 02:26:46 2002
@@ -7,6 +7,7 @@
*/
#include <stdio.h>
+#include <string.h>
#include "usbi.h"
int usb_get_descriptor(usb_dev_handle *udev, unsigned char type, unsigned char index, void *buf, int size)

View File

@ -1,6 +1,5 @@
$OpenBSD: patch-libusb-config_in,v 1.2 2003/01/01 21:34:45 brad Exp $ --- libusb-config.in.orig Mon May 13 16:29:07 2002
--- libusb-config.in.orig Mon May 13 18:26:18 2002 +++ libusb-config.in Fri May 20 22:35:57 2005
+++ libusb-config.in Mon Dec 30 09:26:09 2002
@@ -75,5 +75,5 @@ if test "$echo_cflags" = "yes"; then @@ -75,5 +75,5 @@ if test "$echo_cflags" = "yes"; then
echo $includes echo $includes
fi fi

View File

@ -0,0 +1,15 @@
--- ltmain.sh.orig Sun Apr 11 20:01:57 2004
+++ ltmain.sh Fri May 20 22:35:57 2005
@@ -5550,10 +5550,12 @@ relink_command=\"$relink_command\""
fi
# Install the pseudo-library for information purposes.
+ if false; then
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
instname="$dir/$name"i
$show "$install_prog $instname $destdir/$name"
$run eval "$install_prog $instname $destdir/$name" || exit $?
+ fi
# Maybe install the static library, too.
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"

View File

@ -1,2 +1,3 @@
@comment $OpenBSD: PFRAG.shared,v 1.6 2004/08/09 15:20:24 espie Exp $ @comment $OpenBSD: PFRAG.shared,v 1.7 2005/05/21 22:24:21 pvalchev Exp $
@lib lib/libusb.so.7.0 @lib lib/libusb.so.8.2
@lib lib/libusbpp.so.8.2

View File

@ -1,6 +1,7 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/08/20 06:23:00 pvalchev Exp $ @comment $OpenBSD: PLIST,v 1.2 2005/05/21 22:24:21 pvalchev Exp $
%%SHARED%%
bin/libusb-config bin/libusb-config
include/usb.h include/usb.h
include/usbpp.h
lib/libusb.a lib/libusb.a
lib/libusb.la lib/libusbpp.a
%%SHARED%%