Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/2] libgpiod: new package
Date: Sat, 21 Jan 2017 22:49:19 +0100	[thread overview]
Message-ID: <55bca4f2-aa9e-9c44-528b-79e0a4f42e70@gmail.com> (raw)
In-Reply-To: <1484827310-13779-2-git-send-email-bgolaszewski@baylibre.com>

Hi Bartosz,

Le 19/01/2017 ? 13:01, Bartosz Golaszewski a ?crit :
> Add a package containing a C library and a set of command-line tools
> for controlling GPIOs from user space using the new character device
> interface on linux.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

libgpiod doesn't build with a musl toolchain:

../../include/gpiod.h:232:49: warning: its scope is only this definition or
declaration, which is probably not what you want
../../include/gpiod.h:249:8: warning: ?struct timespec? declared inside
parameter list
        gpiod_event_cb callback, void *cbdata) GPIOD_API;
        ^
../../include/gpiod.h:683:18: error: field ?ts? has incomplete type
  struct timespec ts;

Can you take a look ?

> ---
>  package/Config.in              |  1 +
>  package/libgpiod/Config.in     | 20 ++++++++++++++++++++
>  package/libgpiod/libgpiod.hash |  2 ++
>  package/libgpiod/libgpiod.mk   | 14 ++++++++++++++
>  4 files changed, 37 insertions(+)
>  create mode 100644 package/libgpiod/Config.in
>  create mode 100644 package/libgpiod/libgpiod.hash
>  create mode 100644 package/libgpiod/libgpiod.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 8c8c33e..2100bc7 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1045,6 +1045,7 @@ menu "Hardware handling"
>  	source "package/libfreefare/Config.in"
>  	source "package/libftdi/Config.in"
>  	source "package/libftdi1/Config.in"
> +	source "package/libgpiod/Config.in"
>  	source "package/libgudev/Config.in"
>  	source "package/libhid/Config.in"
>  	source "package/libiio/Config.in"
> diff --git a/package/libgpiod/Config.in b/package/libgpiod/Config.in
> new file mode 100644
> index 0000000..63a7cb6
> --- /dev/null
> +++ b/package/libgpiod/Config.in
> @@ -0,0 +1,20 @@
> +config BR2_PACKAGE_LIBGPIOD
> +	bool "libgpiod"
> +	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8

Why it depend on kernel headers 4.8 ?

> +	help
> +	  This is a C library that abstracts the GPIO character
> +	  device operations on linux.
> +
> +	  https://github.com/brgl/libgpiod
> +
> +if BR2_PACKAGE_LIBGPIOD
> +
> +config BR2_PACKAGE_LIBGPIOD_TOOLS
> +	bool "install tools"
> +	help
> +	  Include a set of command-line tools for managing GPIOs.
> +
> +endif
> +
> +comment "libgpiod needs kernel headers >= 4.8"
> +	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
> diff --git a/package/libgpiod/libgpiod.hash b/package/libgpiod/libgpiod.hash
> new file mode 100644
> index 0000000..7de17bb
> --- /dev/null
> +++ b/package/libgpiod/libgpiod.hash
> @@ -0,0 +1,2 @@
> +# Locally computed
> +sha256 0f9f5215d0100a8066f4e6b064892747720e556cbb83f6c05d6151d68ec2025b libgpiod-v0.1.tar.gz
> diff --git a/package/libgpiod/libgpiod.mk b/package/libgpiod/libgpiod.mk
> new file mode 100644
> index 0000000..aca3d5d
> --- /dev/null
> +++ b/package/libgpiod/libgpiod.mk
> @@ -0,0 +1,14 @@
> +################################################################################
> +#
> +# libgpiod
> +#
> +################################################################################
> +
> +LIBGPIOD_VERSION = v0.1
> +LIBGPIOD_SITE = $(call github,brgl,libgpiod,$(LIBGPIOD_VERSION))
> +LIBGPIOD_LICENSE = GPLv3+
> +LIBGPIOD_LICENSE_FILES = COPYING
> +LIBGPIOD_AUTORECONF = YES

A comment must be added to explain why the package use autoreconf.

> +LIBGPIOD_CONF_OPTS += --$(if $(BR2_PACKAGE_LIBGPIOD_TOOLS),enable,disable)-tools

I'm not sure this coding style will be accepted as is, maybe you can do like
util-linux package:

$(if $(BR2_PACKAGE_LIBGPIOD_TOOLS),--enable-tools,--disable-tools)

Best regards,
Romain

> +
> +$(eval $(autotools-package))
> 

  reply	other threads:[~2017-01-21 21:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19 12:01 [Buildroot] [PATCH v2 0/2] libgpiod: new package Bartosz Golaszewski
2017-01-19 12:01 ` [Buildroot] [PATCH v2 1/2] " Bartosz Golaszewski
2017-01-21 21:49   ` Romain Naour [this message]
2017-01-23 10:17   ` Thomas Petazzoni
2017-01-19 12:01 ` [Buildroot] [PATCH v2 2/2] DEVELOPERS: add Bartosz Golaszewski as developer of package/libgpiod Bartosz Golaszewski
2017-01-23 10:18   ` Thomas Petazzoni

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=55bca4f2-aa9e-9c44-528b-79e0a4f42e70@gmail.com \
    --to=romain.naour@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox