diff mbox

[1/1] libuio: new package

Message ID 1465474971-4832-1-git-send-email-joris.lijssens@gmail.com
State Changes Requested
Headers show

Commit Message

Joris Lijssens June 9, 2016, 12:22 p.m. UTC
Signed-off-by: Joris Lijssens <joris.lijssens@gmail.com>
---
 package/Config.in          |  1 +
 package/libuio/Config.in   |  8 ++++++++
 package/libuio/libuio.hash |  2 ++
 package/libuio/libuio.mk   | 27 +++++++++++++++++++++++++++
 4 files changed, 38 insertions(+)
 create mode 100644 package/libuio/Config.in
 create mode 100644 package/libuio/libuio.hash
 create mode 100644 package/libuio/libuio.mk

Comments

Thomas Petazzoni June 9, 2016, 2:07 p.m. UTC | #1
Hello,

On Thu,  9 Jun 2016 14:22:51 +0200, Joris Lijssens wrote:
> diff --git a/package/libuio/libuio.mk b/package/libuio/libuio.mk
> new file mode 100644
> index 0000000..ead6e69
> --- /dev/null
> +++ b/package/libuio/libuio.mk
> @@ -0,0 +1,27 @@
> +################################################################################
> +#
> +# libuio
> +#
> +################################################################################
> +
> +LIBUIO_VERSION = 940861de278cb794bf9d775b76a4d1d4f9108607# v0.2.7
> +LIBUIO_SITE = $(call github,Linutronix,libuio,$(LIBUIO_VERSION))
> +LIBUIO_LICENSE = LGPLv2.1
> +LIBUIO_LICENSE_FILES = COPYING
> +LIBUIO_CONF_OPTS = --with-glib=no 
> +LIBUIO_INSTALL_STAGING = YES
> +LIBUIO_DEPENDENCIES = \
> +	host-pkgconf \

LIBUIO_DEPENDENCIES = host-pkgconf

is sufficient (i.e on one line).

> +ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
> +LIBUIO_DEPENDENCIES += argp-standalone
> +LIBUIO_CONF_ENV += LIBS="-largp"
> +endif
> +
> +define LIBUIO_RUN_AUTOGEN
> +	cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
> +endef

This cannot work if you don't depend on host-automake, host-libtool and
host-autoconf. However, have you tried instead:

LIBUIO_AUTORECONF = YES

And if yes, why aren't you using this?

Thanks,

Thomas
Joris Lijssens June 13, 2016, 10:21 a.m. UTC | #2
Hello Thomas


On 13 June 2016 at 11:53, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> Why are we having this conversation privately instead of on the
> Buildroot mailing list?
>

Probably because i pushed reply iso reply-all :), added the mailling list
again to the list of recipients.

>
> On Mon, 13 Jun 2016 11:46:41 +0200, Joris Lijssens wrote:
>
> > LIBUIO_GETTEXTIZE = YES didn't solve the issue.
>
> Gaah.
>


>
> > But one small question, can
> > you explain what the difference is between calling the autogen.sh script
> > directly and using the autoreconfig option of buildroot?
>
> Doing <pkg>_AUTORECONF = YES also adds host-automake, host-autoconf and
> host-libtool in the dependencies of the package.
>
> If you just call autogen.sh manually, you also have to add those
> dependencies manually. Doable, but it's better when possible to use
> <pkg>_AUTORECONF = YES.
>
> Sane packages should work with "autoreconf" without any custom
> autogen.sh script.
>

The autogen script just calls autoreconf with -s -f -i, maybe we just have
to give along these options when doing AUTORECONF=YES ?


mkdir -p m4 && \
touch ChangeLog && \
autoreconf -s -f -i


regards,
Joris

>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
Thomas Petazzoni June 13, 2016, 10:39 a.m. UTC | #3
Hello,

On Mon, 13 Jun 2016 12:21:34 +0200, Joris Lijssens wrote:

> The autogen script just calls autoreconf with -s -f -i, maybe we just have
> to give along these options when doing AUTORECONF=YES ?
> 
> 
> mkdir -p m4 && \
> touch ChangeLog && \
> autoreconf -s -f -i

We are already passing -f and -i, and I don't quite see why -s would
make a difference (it simply tells to use symlinks instead of making a
copy).

You can play around with LIBUIO_AUTORECONF_OPTS to pass more options,
but I doubt you will see a difference.

Thomas
Joris Lijssens June 14, 2016, 9:23 a.m. UTC | #4
Hello Thomas,

Indeed playing around with the AUTORECONF_OPTS didn't make any difference.
So what is the best option to move forwared? Send an updated patch which
calls the custom autogen.sh script and add the needed package dependencies
(host-libtool, host-autoconf and host-automake) or use  AUTORECONF=YES and
strip out the gettext dependency. The gettext dependency isn't really
needed, and of little use if you're not using lsuio. Removing it will make
the build smaller.

regards
Joris

On 13 June 2016 at 12:39, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> On Mon, 13 Jun 2016 12:21:34 +0200, Joris Lijssens wrote:
>
> > The autogen script just calls autoreconf with -s -f -i, maybe we just
> have
> > to give along these options when doing AUTORECONF=YES ?
> >
> >
> > mkdir -p m4 && \
> > touch ChangeLog && \
> > autoreconf -s -f -i
>
> We are already passing -f and -i, and I don't quite see why -s would
> make a difference (it simply tells to use symlinks instead of making a
> copy).
>
> You can play around with LIBUIO_AUTORECONF_OPTS to pass more options,
> but I doubt you will see a difference.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 0cb2e7e..a67930a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -403,6 +403,7 @@  endif
 	source "package/kbd/Config.in"
 	source "package/lcdproc/Config.in"
 	source "package/libump/Config.in"
+	source "package/libuio/Config.in"
 	source "package/linux-backports/Config.in"
 	source "package/lirc-tools/Config.in"
 	source "package/lm-sensors/Config.in"
diff --git a/package/libuio/Config.in b/package/libuio/Config.in
new file mode 100644
index 0000000..97be1e3
--- /dev/null
+++ b/package/libuio/Config.in
@@ -0,0 +1,8 @@ 
+config BR2_PACKAGE_LIBUIO
+	bool "libuio"
+	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
+	help
+	  libuio is a light-weight C programming library to handle UIO
+	  (Userspace I/O) device discovery and binding task.
+
+	  http://github.com/Linutronix/libuio
diff --git a/package/libuio/libuio.hash b/package/libuio/libuio.hash
new file mode 100644
index 0000000..6afe7de
--- /dev/null
+++ b/package/libuio/libuio.hash
@@ -0,0 +1,2 @@ 
+# Locally calculated
+sha256 57f9617f75d20f7912b270568cffdf098fe9d0c1ca690c002e949be8424aa4e6 libuio-940861de278cb794bf9d775b76a4d1d4f9108607.tar.gz
diff --git a/package/libuio/libuio.mk b/package/libuio/libuio.mk
new file mode 100644
index 0000000..ead6e69
--- /dev/null
+++ b/package/libuio/libuio.mk
@@ -0,0 +1,27 @@ 
+################################################################################
+#
+# libuio
+#
+################################################################################
+
+LIBUIO_VERSION = 940861de278cb794bf9d775b76a4d1d4f9108607# v0.2.7
+LIBUIO_SITE = $(call github,Linutronix,libuio,$(LIBUIO_VERSION))
+LIBUIO_LICENSE = LGPLv2.1
+LIBUIO_LICENSE_FILES = COPYING
+LIBUIO_CONF_OPTS = --with-glib=no 
+LIBUIO_INSTALL_STAGING = YES
+LIBUIO_DEPENDENCIES = \
+	host-pkgconf \
+
+ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
+LIBUIO_DEPENDENCIES += argp-standalone
+LIBUIO_CONF_ENV += LIBS="-largp"
+endif
+
+define LIBUIO_RUN_AUTOGEN
+	cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
+endef
+
+LIBUIO_PRE_CONFIGURE_HOOKS += LIBUIO_RUN_AUTOGEN
+
+$(eval $(autotools-package))