From: Alan Ott <alan@signal11.us>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] hidapi: new package
Date: Wed, 25 Nov 2015 23:14:29 -0500 [thread overview]
Message-ID: <56568725.8030900@signal11.us> (raw)
In-Reply-To: <1447692852-21669-1-git-send-email-Vincent.Riera@imgtec.com>
On 11/16/2015 11:54 AM, Vicente Olivert Riera wrote:
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
> package/Config.in | 1 +
> package/hidapi/Config.in | 20 ++++++++++++++++++++
> package/hidapi/hidapi.hash | 2 ++
> package/hidapi/hidapi.mk | 27 +++++++++++++++++++++++++++
> 4 files changed, 50 insertions(+), 0 deletions(-)
> create mode 100644 package/hidapi/Config.in
> create mode 100644 package/hidapi/hidapi.hash
> create mode 100644 package/hidapi/hidapi.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index bdc3063..04800c5 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -864,6 +864,7 @@ menu "Hardware handling"
> source "package/ccid/Config.in"
> source "package/dtc/Config.in"
> source "package/gnu-efi/Config.in"
> + source "package/hidapi/Config.in"
> source "package/lcdapi/Config.in"
> source "package/libaio/Config.in"
> source "package/libatasmart/Config.in"
> diff --git a/package/hidapi/Config.in b/package/hidapi/Config.in
> new file mode 100644
> index 0000000..7fbc1c2
> --- /dev/null
> +++ b/package/hidapi/Config.in
> @@ -0,0 +1,20 @@
> +config BR2_PACKAGE_HIDAPI
> + bool "hidapi"
> + depends on BR2_PACKAGE_HAS_UDEV
> + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
> + select BR2_PACKAGE_LIBUSB
> + # When eudev is used as the udev provider, libgudev is
> + # automatically provided as it is part of eudev. However, when
> + # systemd is used as the udev provider, libgudev is not
> + # provided, and needs to be built separately. This is why we
> + # select the libgudev package only if systemd is used.
> + select BR2_PACKAGE_LIBGUDEV if BR2_PACKAGE_SYSTEMD
> + help
> + HIDAPI is a multi-platform library which allows an application
> + to interface with USB and Bluetooth HID-Class devices on
> + Windows, Linux, and Mac OS X.
> +
> + http://www.signal11.us/oss/hidapi/
> +
> +comment "hidapi needs udev /dev management and a toolchain w/ threads"
> + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_HAS_UDEV
> diff --git a/package/hidapi/hidapi.hash b/package/hidapi/hidapi.hash
> new file mode 100644
> index 0000000..ba00df2
> --- /dev/null
> +++ b/package/hidapi/hidapi.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256 33e206f5e145fc1bc6aeb55084d71b55d686533d23ad5bb762746ceba81e728b hidapi-d17db57b9d4354752e0af42f5f33007a42ef2906.tar.gz
> diff --git a/package/hidapi/hidapi.mk b/package/hidapi/hidapi.mk
> new file mode 100644
> index 0000000..23d5eab
> --- /dev/null
> +++ b/package/hidapi/hidapi.mk
> @@ -0,0 +1,27 @@
> +################################################################################
> +#
> +# hidapi
> +#
> +################################################################################
> +
> +# Use master version as the current stable is very old and some bugs
> +# have been fixed since then.
> +HIDAPI_VERSION = d17db57b9d4354752e0af42f5f33007a42ef2906
> +HIDAPI_SITE = $(call github,signal11,hidapi,$(HIDAPI_VERSION))
> +HIDAPI_INSTALL_STAGING = YES
> +# No configure provided, so we need to autoreconf.
> +HIDAPI_AUTORECONF = YES
> +HIDAPI_LICENSE = GPLv3, BSD-3c
> +HIDAPI_LICENSE_FILES = LICENSE.txt LICENSE-gpl3.txt LICENSE-bsd.txt
> +
> +HIDAPI_DEPENDENCIES = libusb
> +# When eudev is used as the udev provider, libgudev is automatically
> +# provided as it is part of eudev. However, when systemd is used as the
> +# udev provider, libgudev is not provided, and needs to be built
> +# separately. This is why we select the libgudev package only if systemd
> +# is used.
> +ifeq ($(BR2_PACKAGE_SYSTEMD),y)
> +HIDAPI_DEPENDENCIES += libgudev
> +endif
> +
> +$(eval $(autotools-package))
Hi Vicente,
This looks ok to me.
For embedded, it would be nice to be able to build with only one
back-end (hidraw or libusb), but hidapi doesn't currently support
building that way. One day I'll get there.
Thanks for doing this!
Alan.
prev parent reply other threads:[~2015-11-26 4:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 16:54 [Buildroot] [PATCH] hidapi: new package Vicente Olivert Riera
2015-11-16 18:07 ` Baruch Siach
2015-11-17 10:11 ` Vicente Olivert Riera
2015-11-18 4:50 ` Baruch Siach
2015-11-18 8:22 ` Thomas Petazzoni
2015-11-18 8:45 ` Baruch Siach
2015-11-18 8:55 ` Thomas Petazzoni
2015-11-17 21:04 ` Thomas Petazzoni
2015-11-26 4:14 ` Alan Ott [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56568725.8030900@signal11.us \
--to=alan@signal11.us \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.