Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 1/2] package/avro-c: new package
Date: Sun, 29 Dec 2019 19:12:49 +0100	[thread overview]
Message-ID: <20191229181249.GA26395@scaer> (raw)
In-Reply-To: <20191223172357.68914-2-titouan.christophe@railnova.eu>

Titouan, All,

On 2019-12-23 18:23 +0100, Titouan Christophe spake thusly:
> Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>

The patch was accepted and merged upstreram, so I backported it
directly, adapted the comment, and applied to master. Thanks!

Regards,
Yann E. MORIN.

> ---
> Dropped reviewed-by from Gilles because of changes in AVRO_C_DEPENDENCIES
> ---
>  DEVELOPERS                                |  1 +
>  package/Config.in                         |  1 +
>  package/avro-c/0001-Compile-on-musl.patch | 40 +++++++++++++++++++++++
>  package/avro-c/Config.in                  | 25 ++++++++++++++
>  package/avro-c/avro-c.hash                |  5 +++
>  package/avro-c/avro-c.mk                  | 26 +++++++++++++++
>  6 files changed, 98 insertions(+)
>  create mode 100644 package/avro-c/0001-Compile-on-musl.patch
>  create mode 100644 package/avro-c/Config.in
>  create mode 100644 package/avro-c/avro-c.hash
>  create mode 100644 package/avro-c/avro-c.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 8850463130..a6d04bfaf3 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2418,6 +2418,7 @@ N:	Timo Ketola <timo.ketola@exertus.fi>
>  F:	package/fbgrab/
>  
>  N:	Titouan Christophe <titouan.christophe@railnova.eu>
> +F:	package/avro-c/
>  F:	package/mosquitto/
>  F:	package/redis/
>  
> diff --git a/package/Config.in b/package/Config.in
> index de0091629f..582a93d8cd 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1724,6 +1724,7 @@ menu "Other"
>  	source "package/argp-standalone/Config.in"
>  	source "package/armadillo/Config.in"
>  	source "package/atf/Config.in"
> +	source "package/avro-c/Config.in"
>  	source "package/bctoolbox/Config.in"
>  	source "package/bdwgc/Config.in"
>  	source "package/boost/Config.in"
> diff --git a/package/avro-c/0001-Compile-on-musl.patch b/package/avro-c/0001-Compile-on-musl.patch
> new file mode 100644
> index 0000000000..0434f89a5e
> --- /dev/null
> +++ b/package/avro-c/0001-Compile-on-musl.patch
> @@ -0,0 +1,40 @@
> +From 4ada709e44e26a329d11359f10ab208ce758d863 Mon Sep 17 00:00:00 2001
> +From: Titouan Christophe <titouan.christophe@railnova.eu>
> +Date: Sun, 8 Dec 2019 01:55:59 +0100
> +Subject: [PATCH] Allow avro C to be built on musl based systems.
> +
> +The type 'ssize_t' is defined in sys/types.h, and nowhere else
> +in the musl standard C library, so it should be included for the
> +compilation to succeed.
> +
> +This fixes several errors like:
> +
> +    In file included from src/generic.c:29:0:
> +    src/generic.c: In function 'avro_generic_value_new':
> +    src/avro_generic_internal.h:63:39:
> +        error: 'ssize_t' undeclared (first use in this function);
> +               did you mean 'size_t'?
> +
> +Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
> +[Upstream status: accepted, not yet released
> + https://github.com/apache/avro/pull/740]
> +---
> + src/avro_generic_internal.h | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/src/avro_generic_internal.h b/src/avro_generic_internal.h
> +index 709403c0..9843ed65 100644
> +--- a/src/avro_generic_internal.h
> ++++ b/src/avro_generic_internal.h
> +@@ -24,6 +24,8 @@ extern "C" {
> + #define CLOSE_EXTERN
> + #endif
> + 
> ++#include <sys/types.h>
> ++
> + #include "avro/generic.h"
> + #include "avro/schema.h"
> + #include "avro/value.h"
> +-- 
> +2.23.0
> +
> diff --git a/package/avro-c/Config.in b/package/avro-c/Config.in
> new file mode 100644
> index 0000000000..fe962e1e3c
> --- /dev/null
> +++ b/package/avro-c/Config.in
> @@ -0,0 +1,25 @@
> +comment "avro-c needs a toolchain w/ dynamic library"
> +	depends on BR2_STATIC_LIBS
> +
> +config BR2_PACKAGE_AVRO_C
> +	bool "avro-c"
> +	depends on !BR2_STATIC_LIBS  # Avro unconditionally compiles shared libs
> +	select BR2_PACKAGE_JANSSON
> +	help
> +	  Select this option to install the Avro C language bindings,
> +	  and the command line tools avroappend, avrocat, avromod and
> +	  avropipe.
> +
> +	  Apache Avro is a data serialization system.
> +	  Avro provides:
> +	  - Rich data structures.
> +	  - A compact, fast, binary data format.
> +	  - A container file, to store persistent data.
> +	  - Remote procedure call (RPC).
> +	  - Simple integration with dynamic languages.
> +	  - Code generation is not required to read or write data
> +	    files nor to use or implement RPC protocols.
> +	  - Code generation as an optional optimization,
> +	    only worth implementing for statically typed languages.
> +
> +	  http://avro.apache.org/
> diff --git a/package/avro-c/avro-c.hash b/package/avro-c/avro-c.hash
> new file mode 100644
> index 0000000000..da74f3c052
> --- /dev/null
> +++ b/package/avro-c/avro-c.hash
> @@ -0,0 +1,5 @@
> +# From https://www-eu.apache.org/dist/avro/avro-1.9.1/c/avro-c-1.9.1.tar.gz.sha512
> +sha512 68b1f44f870c9b6f0b2380da9e34d91148ff4398cb300f4bdd4e3e1ad00820acd9084b73232b00d4cd4935fb992b41dc65afdafcbea14a3d87259608688df904  avro-c-1.9.1.tar.gz
> +
> +# License files
> +sha256 d62488d6ba17132e92c23c03c80bfedc848267f96ab36489fec860f76cf6819a  LICENSE
> diff --git a/package/avro-c/avro-c.mk b/package/avro-c/avro-c.mk
> new file mode 100644
> index 0000000000..a1b1931bf0
> --- /dev/null
> +++ b/package/avro-c/avro-c.mk
> @@ -0,0 +1,26 @@
> +################################################################################
> +#
> +# avro-c
> +#
> +################################################################################
> +
> +AVRO_C_VERSION = 1.9.1
> +AVRO_C_SITE = https://www-eu.apache.org/dist/avro/avro-$(AVRO_C_VERSION)/c
> +AVRO_C_LICENSE = Apache-2.0
> +AVRO_C_LICENSE_FILES = LICENSE
> +AVRO_C_INSTALL_STAGING = YES
> +AVRO_C_DEPENDENCIES = host-pkgconf jansson
> +
> +ifeq ($(BR2_PACKAGE_SNAPPY),y)
> +AVRO_C_DEPENDENCIES += snappy
> +endif
> +
> +ifeq ($(BR2_PACKAGE_ZLIB),y)
> +AVRO_C_DEPENDENCIES += zlib
> +endif
> +
> +ifeq ($(BR2_PACKAGE_XZ),y)
> +AVRO_C_DEPENDENCIES += xz
> +endif
> +
> +$(eval $(cmake-package))
> -- 
> 2.23.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2019-12-29 18:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-23 17:23 [Buildroot] [PATCH v4 0/2] new Avro packages Titouan Christophe
2019-12-23 17:23 ` [Buildroot] [PATCH v4 1/2] package/avro-c: new package Titouan Christophe
2019-12-29 18:12   ` Yann E. MORIN [this message]
2019-12-23 17:23 ` [Buildroot] [PATCH v4 2/2] package/python-avro: " Titouan Christophe
2019-12-29 18:16   ` Yann E. MORIN
2019-12-29 19:34     ` Titouan Christophe

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=20191229181249.GA26395@scaer \
    --to=yann.morin.1998@free.fr \
    --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