Message ID | b6f27b8d9306f0a01bd003e2c9bdc1f5c5e87128.1355435224.git.yann.morin.1998@free.fr |
---|---|
State | Superseded |
Headers | show |
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
Yann> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Yann> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Yann> Cc: Arnout Vandecappelle <arnout@mind.be>
Yann> ---
Yann> package/Config.in | 1 +
Yann> package/usbredir/Config.in | 28 ++++++++++++++++++++++++++++
Yann> package/usbredir/usbredir.mk | 31 +++++++++++++++++++++++++++++++
Yann> 3 files changed, 60 insertions(+), 0 deletions(-)
Yann> create mode 100644 package/usbredir/Config.in
Yann> create mode 100644 package/usbredir/usbredir.mk
Yann> diff --git a/package/Config.in b/package/Config.in
Yann> index 8edadf9..9d68581 100644
Yann> --- a/package/Config.in
Yann> +++ b/package/Config.in
Yann> @@ -492,6 +492,7 @@ source "package/libupnp/Config.in"
Yann> source "package/libvncserver/Config.in"
Yann> source "package/nss-mdns/Config.in"
Yann> source "package/ortp/Config.in"
Yann> +source "package/usbredir/Config.in"
Yann> source "package/zeromq/Config.in"
Yann> endmenu
Yann> diff --git a/package/usbredir/Config.in b/package/usbredir/Config.in
Yann> new file mode 100644
Yann> index 0000000..8d8ac5a
Yann> --- /dev/null
Yann> +++ b/package/usbredir/Config.in
Yann> @@ -0,0 +1,28 @@
Yann> +comment "usbredir requires libusb"
Yann> + depends on !BR2_PACKAGE_LIBUSB
Yann> +
We normally use select for libraries. Any reason to not use it here?
Yann> +USBREDIR_VERSION = 0.4.3
Yann> +USBREDIR_SOURCE = usbredir-$(USBREDIR_VERSION).tar.bz2
Yann> +USBREDIR_SITE = http://spice-space.org/download/usbredir
Yann> +USBREDIR_LICENSE = LGPLv2.1+
Yann> +USBREDIR_LICENSE_FILES = COPYING.LIB
Yann> +USBREDIR_INSTALL_STAGING = YES
Yann> +USBREDIR_DEPENDENCIES = libusb
Yann> +
Yann> +USBREDIR_DEPENDENCIES += host-pkgconf
Any particular reason to not merge this line with the one above?
Peter, All, On Friday 14 December 2012 13:53:37 Peter Korsgaard wrote: > >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes: > Yann> diff --git a/package/usbredir/Config.in b/package/usbredir/Config.in > Yann> new file mode 100644 > Yann> index 0000000..8d8ac5a > Yann> --- /dev/null > Yann> +++ b/package/usbredir/Config.in > Yann> @@ -0,0 +1,28 @@ > Yann> +comment "usbredir requires libusb" > Yann> + depends on !BR2_PACKAGE_LIBUSB > Yann> + > > We normally use select for libraries. Any reason to not use it here? libusb depends on threads, and I do not want to play the game of inheriting the dependencies of my own dependencies, and reproduce the libffi mess. libusb has a dependency I can not select, so I just depend on it. > Yann> +USBREDIR_DEPENDENCIES += host-pkgconf > > Any particular reason to not merge this line with the one above? Probably no good reason, indeed. Regards, Yann E. MORIN.
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes: Yann> +comment "usbredir requires libusb" Yann> + depends on !BR2_PACKAGE_LIBUSB Yann> + >> >> We normally use select for libraries. Any reason to not use it here? Yann> libusb depends on threads, and I do not want to play the game of Yann> inheriting the dependencies of my own dependencies, and reproduce Yann> the libffi mess. Yann> libusb has a dependency I can not select, so I just depend on it. Ok, but that just moves the trouble higher up the stack. E.G. you want to enable qemu, but it tells you that it needs usbredir so you go hunting around for it only to discover that it needs libusb and finally you see that you need threads support in your toolchain. In other words, selects are more user friendly than depends on. Most likely we have more users than developers, so we should optimize for making things nice for users rather than devs. I would prefer you select libusb.
Peter, All, On Friday 14 December 2012 Peter Korsgaard wrote: > >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes: > > Yann> +comment "usbredir requires libusb" > Yann> + depends on !BR2_PACKAGE_LIBUSB > Yann> + > >> > >> We normally use select for libraries. Any reason to not use it here? > > Yann> libusb depends on threads, and I do not want to play the game of > Yann> inheriting the dependencies of my own dependencies, and reproduce > Yann> the libffi mess. > > Yann> libusb has a dependency I can not select, so I just depend on it. [--SNIP--] > I would prefer you select libusb. Grudgingly done. ;-) Regards, Yann E. MORIN.
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes: >> I would prefer you select libusb. Yann> Grudgingly done. ;-) Thanks ;)
diff --git a/package/Config.in b/package/Config.in index 8edadf9..9d68581 100644 --- a/package/Config.in +++ b/package/Config.in @@ -492,6 +492,7 @@ source "package/libupnp/Config.in" source "package/libvncserver/Config.in" source "package/nss-mdns/Config.in" source "package/ortp/Config.in" +source "package/usbredir/Config.in" source "package/zeromq/Config.in" endmenu diff --git a/package/usbredir/Config.in b/package/usbredir/Config.in new file mode 100644 index 0000000..8d8ac5a --- /dev/null +++ b/package/usbredir/Config.in @@ -0,0 +1,28 @@ +comment "usbredir requires libusb" + depends on !BR2_PACKAGE_LIBUSB + +config BR2_PACKAGE_USBREDIR + bool "usbredir" + depends on BR2_PACKAGE_LIBUSB + help + usbredir is the name of a network protocol for sending usb device + traffic over a network connection. It is also the name of the + software package offering a parsing library, a usbredirhost library + and several utilities implementing this protocol. + + Note: only the library is installed, not the utilities. Say 'y' + below if you want the server too. + + http://www.spice-space.org/page/UsbRedir + +if BR2_PACKAGE_USBREDIR + +config BR2_PACKAGE_USBREDIR_SERVER + bool "usbredirserver on target" + help + If you want to serve usbredir requests on your target, say 'y' + here to have the usbredir server on the target. + + Note: the server is not required to use the library. + +endif diff --git a/package/usbredir/usbredir.mk b/package/usbredir/usbredir.mk new file mode 100644 index 0000000..70b50c3 --- /dev/null +++ b/package/usbredir/usbredir.mk @@ -0,0 +1,31 @@ +############################################################# +# +# usbredir +# +############################################################# + +USBREDIR_VERSION = 0.4.3 +USBREDIR_SOURCE = usbredir-$(USBREDIR_VERSION).tar.bz2 +USBREDIR_SITE = http://spice-space.org/download/usbredir +USBREDIR_LICENSE = LGPLv2.1+ +USBREDIR_LICENSE_FILES = COPYING.LIB +USBREDIR_INSTALL_STAGING = YES +USBREDIR_DEPENDENCIES = libusb + +USBREDIR_DEPENDENCIES += host-pkgconf + +ifeq ($(BR2_PACKAGE_USBREDIR_SERVER),y) + +USBREDIR_LICENSE += (for the library), GPLv2+ (for the server) +USBREDIR_LICENSE_FILES += COPYING + +else # BR2_PACKAGE_USBREDIR_SERVER != y + +define USBREDIR_POST_INSTALL_TARGET_RM_SERVER + rm -f $(TARGET_DIR)/usr/sbin/usbredirserver +endef +USBREDIR_POST_INSTALL_TARGET_HOOKS += USBREDIR_POST_INSTALL_TARGET_RM_SERVER + +endif # BR2_PACKAGE_USBREDIR_SERVER + +$(eval $(autotools-package))
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> --- package/Config.in | 1 + package/usbredir/Config.in | 28 ++++++++++++++++++++++++++++ package/usbredir/usbredir.mk | 31 +++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 0 deletions(-) create mode 100644 package/usbredir/Config.in create mode 100644 package/usbredir/usbredir.mk