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"
VERSION= 0.1.7
VERSION= 0.1.10a
DISTNAME= libusb-${VERSION}
PKGNAME= ${DISTNAME}p2
CATEGORIES= devel
HOMEPAGE= http://libusb.sourceforge.net/
@ -19,12 +18,9 @@ PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libusb/}
SEPARATE_BUILD= concurrent
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
CONFIGURE_ARGS+= --enable-static --disable-build-docs
post-extract:
@rm ${WRKSRC}/usb.h
SEPARATE_BUILD= concurrent
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--enable-static --disable-build-docs
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
MD5 (libusb-0.1.7.tar.gz) = 4c7abee86d8715bccb43428a500d2170
RMD160 (libusb-0.1.7.tar.gz) = 9fa1642f5c2806216e0445ba0f6aa80bcd6655a1
SHA1 (libusb-0.1.7.tar.gz) = e87a1f023686ebbc63b619e5d6b65f219222f36e
SIZE (libusb-0.1.7.tar.gz) = 193075
MD5 (libusb-0.1.10a.tar.gz) = c6062b29acd2cef414bcc34e0decbdd1
RMD160 (libusb-0.1.10a.tar.gz) = 18d50ac645440925bfa9f58d7a311d857e640882
SHA1 (libusb-0.1.10a.tar.gz) = 7e03a71f2cec39d96f58e22ea9289088eee617ef
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 Sun Nov 17 13:45:28 2002
+++ Makefile.in Mon Dec 30 09:26:09 2002
@@ -121,7 +121,6 @@ include_HEADERS = usb.h
--- Makefile.in.orig Mon Feb 14 13:23:19 2005
+++ Makefile.in Fri May 20 22:44:55 2005
@@ -250,7 +250,7 @@ target_alias = @target_alias@
# 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 = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
- -release $(LT_RELEASE) \
-export-dynamic \
$(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 2002-11-11 11:04:16.000000000 -0700
+++ bsd.c 2003-11-26 21:20:46.000000000 -0700
@@ -276,7 +276,7 @@ static int ensure_ep_open(usb_dev_handle
int usb_bulk_write(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout)
--- bsd.c.orig Tue Feb 17 23:34:52 2004
+++ bsd.c Fri May 20 22:35:57 2005
@@ -357,7 +357,7 @@ int usb_bulk_read(usb_dev_handle *dev, i
int usb_interrupt_write(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout)
{
- int fd, ret, sent = 0;
+ int fd, ret;
/* Ensure the endpoint address is correct */
ep &= ~USB_ENDPOINT_IN;
@@ -298,8 +298,7 @@ int usb_bulk_write(usb_dev_handle *dev,
USB_ERROR_STR(ret, "error setting timeout: %s",
@@ -379,8 +379,7 @@ int usb_interrupt_write(usb_dev_handle *
USB_ERROR_STR(-errno, "error setting timeout: %s",
strerror(errno));
- do {
- ret = write(fd, bytes+sent, size-sent);
+ ret = write(fd, bytes, size);
+ ret = write(fd, bytes, size);
if (ret < 0)
#if __FreeBSD__
USB_ERROR_STR(ret, "error writing to bulk endpoint %s.%d: %s",
@@ -309,16 +308,13 @@ int usb_bulk_write(usb_dev_handle *dev,
USB_ERROR_STR(-errno, "error writing to interrupt endpoint %s.%d: %s",
@@ -390,16 +389,13 @@ int usb_interrupt_write(usb_dev_handle *
dev->device->filename, UE_GET_ADDR(ep), strerror(errno));
#endif
- sent += ret;
- } while(ret > 0 && sent < size);
- } while (ret > 0 && sent < size);
-
- return sent;
+ return ret;
}
int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout)
int usb_interrupt_read(usb_dev_handle *dev, int ep, char *bytes, int size,
int timeout)
{
- int fd, ret, retrieved = 0, one = 1;
+ int fd, ret, one = 1;
/* Ensure the endpoint address is correct */
ep |= USB_ENDPOINT_IN;
@@ -345,8 +341,7 @@ int usb_bulk_read(usb_dev_handle *dev, i
USB_ERROR_STR(ret, "error setting short xfer: %s",
strerror(errno));
@@ -424,8 +420,7 @@ int usb_interrupt_read(usb_dev_handle *d
if (ret < 0)
USB_ERROR_STR(-errno, "error setting short xfer: %s", strerror(errno));
- do {
- ret = read(fd, bytes+retrieved, size-retrieved);
+ ret = read(fd, bytes, size);
if (ret < 0)
#if __FreeBSD__
USB_ERROR_STR(ret, "error reading from bulk endpoint %s.%d: %s",
@@ -355,10 +350,8 @@ int usb_bulk_read(usb_dev_handle *dev, i
USB_ERROR_STR(ret, "error reading from bulk endpoint %s.%02d: %s",
USB_ERROR_STR(-errno, "error reading from interrupt endpoint %s.%d: %s",
@@ -434,10 +429,7 @@ int usb_interrupt_read(usb_dev_handle *d
USB_ERROR_STR(-errno, "error reading from interrupt endpoint %s.%02d: %s",
dev->device->filename, UE_GET_ADDR(ep), strerror(errno));
#endif
- retrieved += ret;
- } while (ret > 0 && retrieved < size);
-
- return retrieved;
+ 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 18:26:18 2002
+++ libusb-config.in Mon Dec 30 09:26:09 2002
--- libusb-config.in.orig Mon May 13 16:29:07 2002
+++ libusb-config.in Fri May 20 22:35:57 2005
@@ -75,5 +75,5 @@ if test "$echo_cflags" = "yes"; then
echo $includes
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 $
@lib lib/libusb.so.7.0
@comment $OpenBSD: PFRAG.shared,v 1.7 2005/05/21 22:24:21 pvalchev Exp $
@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
include/usb.h
include/usbpp.h
lib/libusb.a
lib/libusb.la
%%SHARED%%
lib/libusbpp.a