From patchwork Sat Dec 14 17:42:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Titouan Christophe X-Patchwork-Id: 1209756 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=railnova.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=railnova-eu.20150623.gappssmtp.com header.i=@railnova-eu.20150623.gappssmtp.com header.b="vDr6ppod"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Zvxf6gjJz9sPK for ; Sun, 15 Dec 2019 04:42:30 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BBC9320428; Sat, 14 Dec 2019 17:42:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7vMysrc3PDgL; Sat, 14 Dec 2019 17:42:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id C32B02049A; Sat, 14 Dec 2019 17:42:22 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 38B131BF424 for ; Sat, 14 Dec 2019 17:42:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 352AC8639F for ; Sat, 14 Dec 2019 17:42:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hu8CI-hlX95T for ; Sat, 14 Dec 2019 17:42:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id BEF0E86302 for ; Sat, 14 Dec 2019 17:42:15 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id j42so2186061wrj.12 for ; Sat, 14 Dec 2019 09:42:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=railnova-eu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R5FP2xntKpKigvetqkJixEfUGWDgEjfO9+7K0TM5fEU=; b=vDr6ppoduTpanbXJrJrI7/lsyJID/liYFY4Xq5BdUJ8GgwbrI3yCaktigKk/kADB0s AkvlLVfKwLLDh1+ZmWjYNbZsBPvlSnKgePBIJEzgtOU5zK2i07pb2D/Q84k5UTkysvNq kflJRy/PmqM/DdT5wG6GRPrqeVwCu0RIKiniM2ayEC5QHlou+9HkZuth986N/iwZqBOB eKz25c3LIjIoru4wR+WhM55ibTmwe3YCT0akSEwNCRzG1wersIea28Gwd3liS1k5nza2 EuKjQ+H2KSqltPi2NN5501WDGf7p/jYrEGSAsCERJs6B4/Pm3tx/gDu4oT1OIDw1w9zo geNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R5FP2xntKpKigvetqkJixEfUGWDgEjfO9+7K0TM5fEU=; b=Y228fShrRLAOtiRSgltStfN9iH2H0kJe/xmjrso1lAi1fCOBUJikG6sYy3Vz+3WA5V YLxBu2ENwxYGpG082qfS57MnkqwkPuvVk8JZo82eFiMgBrFLGF5dPa7L35g7KsGor7FU 2P/h9F/52QYVrXYnEs3a2fkO5+JgoN3t1Ca8gt5YUJYQx20bJalC6IECSElk6vMlK3hu fjkOpabN329SPgBj0zq6qHSaPhqyWo2gj1OXoLG9j9J+fHKmo55UiWGAKPpsg7Ik2mEE WsnjG6XS33xlRu0mcPKHlhzZ5dECcfz3IW4PvcWF12bDXlCHZMRFHdQgeak9vKjif2cO ukAA== X-Gm-Message-State: APjAAAWZbRHKRpXS4hDcgo4vmxVbayNn60QN3N92EiUAaJApk7Y4mgQ4 Ndq8FAaPlpgTFdTBYMklbv/X26FoReusPw== X-Google-Smtp-Source: APXvYqx7GlfTsFHUsFR7qWSXCUVgHD7heSSzT4uAnluLShDqclIeiOClm4gsb3rvD/Ze3vRwtE8n8A== X-Received: by 2002:a5d:4d0e:: with SMTP id z14mr19250853wrt.208.1576345333668; Sat, 14 Dec 2019 09:42:13 -0800 (PST) Received: from taurus.home ([2a02:a03f:3c93:3700:26f7:590:e050:6ea9]) by smtp.gmail.com with ESMTPSA id p5sm14274635wrt.79.2019.12.14.09.42.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Dec 2019 09:42:13 -0800 (PST) From: Titouan Christophe To: buildroot@buildroot.org Date: Sat, 14 Dec 2019 18:42:05 +0100 Message-Id: <20191214174206.161446-2-titouan.christophe@railnova.eu> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191214174206.161446-1-titouan.christophe@railnova.eu> References: <20191214174206.161446-1-titouan.christophe@railnova.eu> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 1/2] package/avro-c: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gilles Talis , Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Titouan Christophe Reviewed-by: Gilles Talis --- DEVELOPERS | 1 + package/Config.in | 1 + package/avro-c/0001-Compile-on-musl.patch | 39 +++++++++++++++++++++++ package/avro-c/Config.in | 25 +++++++++++++++ package/avro-c/avro-c.hash | 5 +++ package/avro-c/avro-c.mk | 22 +++++++++++++ 6 files changed, 93 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 8d11ad8a31..4468373a73 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2400,6 +2400,7 @@ N: Timo Ketola F: package/fbgrab/ N: Titouan Christophe +F: package/avro-c/ F: package/mosquitto/ F: package/redis/ diff --git a/package/Config.in b/package/Config.in index 4bac3aabff..fa4e98403c 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1708,6 +1708,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..d6df6e83c2 --- /dev/null +++ b/package/avro-c/0001-Compile-on-musl.patch @@ -0,0 +1,39 @@ +From 4ada709e44e26a329d11359f10ab208ce758d863 Mon Sep 17 00:00:00 2001 +From: Titouan Christophe +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 +[Upstream status: 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 ++ + #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..01fc97f33d --- /dev/null +++ b/package/avro-c/avro-c.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# 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 = jansson + +ifeq ($(BR2_PACKAGE_SNAPPY),y) +AVRO_C_DEPENDENCIES += snappy +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +AVRO_C_DEPENDENCIES += zlib +endif + +$(eval $(cmake-package))