diff options
author | Juergen Lock <nox@FreeBSD.org> | 2012-06-09 16:19:05 +0000 |
---|---|---|
committer | Juergen Lock <nox@FreeBSD.org> | 2012-06-09 16:19:05 +0000 |
commit | b4d7f46da987d69753d7e3d9103ccdc3d2e4f2a3 (patch) | |
tree | 931305c9e0306e3b965f52db014726b96d2ffc17 /net/usbredir | |
parent | 545a2d9ad571615bdd9bf914836f61fc7ecde5b7 (diff) | |
download | ports-b4d7f46da987d69753d7e3d9103ccdc3d2e4f2a3.tar.gz ports-b4d7f46da987d69753d7e3d9103ccdc3d2e4f2a3.zip |
Notes
Diffstat (limited to 'net/usbredir')
-rw-r--r-- | net/usbredir/Makefile | 14 | ||||
-rw-r--r-- | net/usbredir/distinfo | 4 | ||||
-rw-r--r-- | net/usbredir/files/patch-clang | 15 | ||||
-rw-r--r-- | net/usbredir/files/patch-usbredirhost-usbredirhost.c | 102 | ||||
-rw-r--r-- | net/usbredir/pkg-plist | 7 |
5 files changed, 17 insertions, 125 deletions
diff --git a/net/usbredir/Makefile b/net/usbredir/Makefile index 1dc2f93ce952..41042cca34b0 100644 --- a/net/usbredir/Makefile +++ b/net/usbredir/Makefile @@ -6,9 +6,9 @@ # PORTNAME= usbredir -PORTVERSION= 0.3 +PORTVERSION= 0.4.3 CATEGORIES= net devel -MASTER_SITES= http://people.fedoraproject.org/~jwrdegoede/ +MASTER_SITES= http://spice-space.org/download/usbredir/ MAINTAINER= nox@FreeBSD.org COMMENT= A protocol for redirection of USB traffic @@ -18,17 +18,21 @@ MAKE_JOBS_SAFE= yes USE_GMAKE= yes USE_GNOME= pkgconfig PATCH_STRIP= -p1 +GNU_CONFIGURE= yes MAKE_ARGS+= PREFIX=${PREFIX} +CONFIGURE_ENV+= LIBUSB_CFLAGS=-I/usr/include +CONFIGURE_ENV+= LIBUSB_LIBS=-lusb +MAN1= usbredirserver.1 .include <bsd.port.options.mk> -.if ${OSVERSION} < 800108 -IGNORE= needs libusb 1.0.4 +.if ${OSVERSION} < 803000 +IGNORE= needs libusb_get_device_speed() .else MAKE_ENV+= PKG_CONFIG_PATH=${FILESDIR} .endif post-patch: - @${REINPLACE_CMD} "s|\\\$$(LIBDIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|" ${WRKSRC}/*/Makefile + @${REINPLACE_CMD} "s|\\\$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|" ${WRKSRC}/*/Makefile.in ${WRKSRC}/*/Makefile.am .include <bsd.port.mk> diff --git a/net/usbredir/distinfo b/net/usbredir/distinfo index 0bc416a89c6f..5a77dcb6071f 100644 --- a/net/usbredir/distinfo +++ b/net/usbredir/distinfo @@ -1,2 +1,2 @@ -SHA256 (usbredir-0.3.tar.bz2) = 385ae4511e2f3d39ab9f1b68d1668ca70ff4c52ddf8274c603cf5b3de7aca6a6 -SIZE (usbredir-0.3.tar.bz2) = 37295 +SHA256 (usbredir-0.4.3.tar.bz2) = f2cbcc67926c2275837143485407a57cf4c3fda52d199cbb58f73d57a6988f9c +SIZE (usbredir-0.4.3.tar.bz2) = 299163 diff --git a/net/usbredir/files/patch-clang b/net/usbredir/files/patch-clang deleted file mode 100644 index ecd7842aa849..000000000000 --- a/net/usbredir/files/patch-clang +++ /dev/null @@ -1,15 +0,0 @@ ---- a/Make.rules -+++ b/Make.rules -@@ -14,10 +14,10 @@ LIB_RELEASE = 0 - - # And last various rules - %.o: %.c -- $(CC) -Wp,-MMD,"$*.d",-MQ,"$@",-MP -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< - - %.o: %.cpp -- $(CXX) -Wp,-MMD,"$*.d",-MQ,"$@",-MP -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< -+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< - - %.so: - $(CC) -shared $(LDFLAGS) -Wl,-soname,$@.$(LIB_RELEASE) -o $@.$(LIB_RELEASE) $^ $(LIBS_$*) diff --git a/net/usbredir/files/patch-usbredirhost-usbredirhost.c b/net/usbredir/files/patch-usbredirhost-usbredirhost.c deleted file mode 100644 index a7b4dffcc78f..000000000000 --- a/net/usbredir/files/patch-usbredirhost-usbredirhost.c +++ /dev/null @@ -1,102 +0,0 @@ ---- a/usbredirhost/usbredirhost.c -+++ b/usbredirhost/usbredirhost.c -@@ -27,6 +27,71 @@ - #include <unistd.h> - #include "usbredirhost.h" - -+/* -+ * passing actual enum libusb_speed libusb_get_device_speed() return -+ * values other than LIBUSB_SPEED_UNKNOWN causes qemu 0.15.0 to -+ * complain when redirecting usb 2.0 devices when ehci isn't enabled -+ * (-readconfig docs/ich9-ehci-uhci.cfg, which breaks at least -+ * FreeBSD 8 guests and hangs at boot in seabios(?) when redirecting -+ * an usb 2.0 flashkey) - it says: -+ * -+ * qemu: Warning: speed mismatch trying to attach usb device USB Redirection Device to bus usb.0 -+ * -+ * and ignores the redirected device. Thus, for now always assume -+ * speed unknown: -+ */ -+#define IGNORE_LIBUSB_GET_DEVICE_SPEED -+ -+/* The following is only interesting once the above is fixed: */ -+#ifndef IGNORE_LIBUSB_GET_DEVICE_SPEED -+#define HAVE_LIBUSB_GET_DEVICE_SPEED -+ -+#ifdef __FreeBSD__ -+/* #undef this if libusb_get_device_speed() is missing in your -+ * version of FreeBSD (not relevant if IGNORE_LIBUSB_GET_DEVICE_SPEED -+ * is defined) */ -+/* #undef HAVE_LIBUSB_GET_DEVICE_SPEED */ -+ -+#ifndef HAVE_LIBUSB_GET_DEVICE_SPEED -+#include <libusb20.h> -+#define HAVE_SRC /* this only works if system sources are available */ -+#ifdef HAVE_SRC -+#include "/usr/src/lib/libusb/libusb10.h" -+#endif -+ -+enum libusb_speed { -+ LIBUSB_SPEED_UNKNOWN = 0, -+ LIBUSB_SPEED_LOW = 1, -+ LIBUSB_SPEED_FULL = 2, -+ LIBUSB_SPEED_HIGH = 3, -+ LIBUSB_SPEED_SUPER = 4, -+}; -+ -+enum libusb_speed libusb_get_device_speed(libusb_device *dev) -+{ -+#ifdef HAVE_SRC -+ if (dev == NULL) -+ return (LIBUSB_SPEED_UNKNOWN); /* should not happen */ -+ -+ switch (libusb20_dev_get_speed(dev->os_priv)) { -+ case LIBUSB20_SPEED_LOW: -+ return (LIBUSB_SPEED_LOW); -+ case LIBUSB20_SPEED_FULL: -+ return (LIBUSB_SPEED_FULL); -+ case LIBUSB20_SPEED_HIGH: -+ return (LIBUSB_SPEED_HIGH); -+ case LIBUSB20_SPEED_SUPER: -+ return (LIBUSB_SPEED_SUPER); -+ default: -+ break; -+ } -+#endif -+ return (LIBUSB_SPEED_UNKNOWN); -+} -+#endif -+#endif -+#endif -+ - #define MAX_ENDPOINTS 32 - #define MAX_INTERFACES 32 /* Max 32 endpoints and thus interfaces */ - #define CTRL_TIMEOUT 5000 /* USB specifies a 5 second max timeout */ -@@ -418,7 +483,9 @@ struct usbredirhost *usbredirhost_open( - struct usbredirhost *host; - struct usb_redir_device_connect_header device_connect; - struct libusb_device_descriptor desc; -+#ifndef IGNORE_LIBUSB_GET_DEVICE_SPEED - enum libusb_speed speed; -+#endif - int r; - - host = calloc(1, sizeof(*host)); -@@ -487,6 +554,9 @@ struct usbredirhost *usbredirhost_open( - return NULL; - } - -+#ifdef IGNORE_LIBUSB_GET_DEVICE_SPEED -+ device_connect.speed = usb_redir_speed_unknown; -+#else - speed = libusb_get_device_speed(host->dev); - switch (speed) { - case LIBUSB_SPEED_LOW: -@@ -500,6 +570,7 @@ struct usbredirhost *usbredirhost_open( - default: - device_connect.speed = usb_redir_speed_unknown; - } -+#endif - device_connect.device_class = desc.bDeviceClass; - device_connect.device_subclass = desc.bDeviceSubClass; - device_connect.device_protocol = desc.bDeviceProtocol; diff --git a/net/usbredir/pkg-plist b/net/usbredir/pkg-plist index 8706dd8c4508..2b1c18a22595 100644 --- a/net/usbredir/pkg-plist +++ b/net/usbredir/pkg-plist @@ -1,10 +1,15 @@ +include/usbredirfilter.h include/usbredirhost.h include/usbredirproto.h include/usbredirparser.h +lib/libusbredirparser.a +lib/libusbredirparser.la lib/libusbredirparser.so lib/libusbredirparser.so.0 +lib/libusbredirhost.a +lib/libusbredirhost.la lib/libusbredirhost.so -lib/libusbredirhost.so.0 +lib/libusbredirhost.so.1 libdata/pkgconfig/libusbredirparser.pc libdata/pkgconfig/libusbredirhost.pc sbin/usbredirserver |