From patchwork Fri Apr 24 17:04:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1276526 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.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=smile.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=smile-fr.20150623.gappssmtp.com header.i=@smile-fr.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=j2tQoDJS; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4980sF4Ygmz9sSJ for ; Sat, 25 Apr 2020 03:04:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D83D487AF4; Fri, 24 Apr 2020 17:04:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BAQLYPhRe5cV; Fri, 24 Apr 2020 17:04:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9853A8798A; Fri, 24 Apr 2020 17:04:45 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id DB5891BF2A2 for ; Fri, 24 Apr 2020 17:04:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D810787EE6 for ; Fri, 24 Apr 2020 17:04:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bDVqB-jrhjAC for ; Fri, 24 Apr 2020 17:04:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1683F87EC2 for ; Fri, 24 Apr 2020 17:04:41 +0000 (UTC) Received: by mail-wr1-f44.google.com with SMTP id d17so11736917wrg.11 for ; Fri, 24 Apr 2020 10:04:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=59e6ZJbQmkXFioN2ol1N9OuseJ8Oyi17m/Q97cDHLJY=; b=j2tQoDJSqGAfReiSzqqj/JLZZeq4wAjzrdIeNfDUeuU8h2RiSJrI2QOsntQGy9obUs pCvHPhBHtVe/mtwn/nr4ADIpYQO9Mu7dj9JNAi2QX2k36gMOCVHgdpxMch+RkH87imhj oGqoM8drMqBGhdwgOlqKnjssqmyc/9UWcyuw1JmjlwLbShwvYyUNIohlzlXoBa5HB9iN UHU9qgJB+sEkEb6FU8FULl1TwNSlA7G/mlFgNFwI4rdLQDu4+261RurbLZEqKhaUmMHo PPkqtHxRqDncaYynfwXM3+zJWtpgzF0tvKLjfYc010eRln6fluPPR30cuj9V6tYJMAWE jSgA== 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:mime-version :content-transfer-encoding; bh=59e6ZJbQmkXFioN2ol1N9OuseJ8Oyi17m/Q97cDHLJY=; b=Qovs9v6opKGzKbZPA3ubS4JWZOMW1eeGZxhI7aGDa0JvQdaI2kPS3XjMOuWgvL13vG CZgzDDnp2GAOprkZhqFyke1eujfwjHuiDwg9KDG8Gp94FOy2g7NS9L7b7T7zVaolLQS3 MqNCZSPQBTDMPN7qhiQYH+LVUDIG9wsTubsAWYCP5J5CnHRSmP8o8YGiGVwXEBRLjYrj ILBkmRv8NKDv1AWqQZL9eJ9OdT+89t1dJi715U+OxmwO62A92egtQG356qS9nsIsPLMg 9FbGefudG+SUKpFSzuCJ/NTgiw8BveNc062JxFD5KgHSTzp1kEM51c27n1C4psjiMQ6K pHMg== X-Gm-Message-State: AGi0PubYTLhV922EGw3hyzMBkr876JyTi8shMMNtAY4DDCrlo3aRo9cK rv27ugBh95FmZC2yjkCw3aUm1LXKFSo= X-Google-Smtp-Source: APiQypK38QIpmt07+8HmQTE6vThJQRmDkmK8mEiVFw8RLenqlyHrZgIPREjr1kEDa/DwCy4L7W5tbw== X-Received: by 2002:adf:ee05:: with SMTP id y5mr11792944wrn.176.1587747879634; Fri, 24 Apr 2020 10:04:39 -0700 (PDT) Received: from localhost.localdomain (2a01cb0589880c0014550507501d6533.ipv6.abo.wanadoo.fr. [2a01:cb05:8988:c00:1455:507:501d:6533]) by smtp.gmail.com with ESMTPSA id j10sm3903774wmi.18.2020.04.24.10.04.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Apr 2020 10:04:38 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Fri, 24 Apr 2020 19:04:35 +0200 Message-Id: <20200424170435.22430-1-romain.naour@smile.fr> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/libiec61850: 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: Romain Naour Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Don't add mbedtls support since it require a bundled and specific version. Keep experimental Python binding support disabled for now. Signed-off-by: Romain Naour --- $ ./utils/test-pkg -c defconfig -d pkg-test -p libiec61850 -k -a andes-nds32 [ 1/44]: SKIPPED arm-aarch64 [ 2/44]: OK br-aarch64-glibc [ 3/44]: OK br-arcle-hs38 [ 4/44]: OK br-arm-basic [ 5/44]: SKIPPED br-arm-cortex-a9-glibc [ 6/44]: OK br-arm-cortex-a9-musl [ 7/44]: OK br-arm-cortex-m4-full [ 8/44]: SKIPPED br-arm-full [ 9/44]: OK br-arm-full-nothread [10/44]: SKIPPED br-arm-full-static [11/44]: SKIPPED br-i386-pentium4-full [12/44]: OK br-i386-pentium-mmx-musl [13/44]: OK br-m68k-5208-full [14/44]: SKIPPED br-m68k-68040-full [15/44]: OK br-microblazeel-full [16/44]: OK br-mips32r6-el-hf-glibc [17/44]: OK br-mips64-n64-full [18/44]: OK br-mips64r6-el-hf-glibc [19/44]: OK br-mipsel-o32-full [20/44]: OK br-nios2-glibc [21/44]: OK br-openrisc-uclibc [22/44]: OK br-powerpc-603e-basic-cpp [23/44]: OK br-powerpc64le-power8-glibc [24/44]: OK br-powerpc64-power7-glibc [25/44]: OK br-powerpc-e500mc-full [26/44]: OK br-riscv32 [27/44]: OK br-riscv64 [28/44]: OK br-sh4-full [29/44]: OK br-sparc64-glibc [30/44]: OK br-sparc-uclibc [31/44]: OK br-x86-64-core2-full [32/44]: OK br-x86-64-musl [33/44]: OK br-xtensa-full [34/44]: OK linaro-aarch64-be [35/44]: OK linaro-aarch64 [36/44]: OK linaro-arm [37/44]: OK sourcery-arm-armv4t [38/44]: OK sourcery-arm [39/44]: OK sourcery-arm-thumb2 [40/44]: OK sourcery-mips64 [41/44]: OK sourcery-mips [42/44]: OK sourcery-nios2 [43/44]: OK sourcery-x86-64 [44/44]: OK --- DEVELOPERS | 1 + package/Config.in | 1 + ...001-use-poll.h-instead-of-sys-poll.h.patch | 33 +++++++++++++++++++ ...linux-Add-missing-include-sys-time.h.patch | 32 ++++++++++++++++++ package/libiec61850/Config.in | 21 ++++++++++++ package/libiec61850/libiec61850.hash | 3 ++ package/libiec61850/libiec61850.mk | 15 +++++++++ 7 files changed, 106 insertions(+) create mode 100644 package/libiec61850/0001-use-poll.h-instead-of-sys-poll.h.patch create mode 100644 package/libiec61850/0002-serial_port_linux-Add-missing-include-sys-time.h.patch create mode 100644 package/libiec61850/Config.in create mode 100644 package/libiec61850/libiec61850.hash create mode 100644 package/libiec61850/libiec61850.mk diff --git a/DEVELOPERS b/DEVELOPERS index c57bc1c5c9..16e985270a 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2221,6 +2221,7 @@ F: package/liblinear/ F: package/lensfun/ F: package/libclc/ F: package/libgta/ +F: package/libiec61850/ F: package/libspatialindex/ F: package/linux-syscall-support/ F: package/llvm/ diff --git a/package/Config.in b/package/Config.in index a9c6f6fcbc..da1808ec97 100644 --- a/package/Config.in +++ b/package/Config.in @@ -474,6 +474,7 @@ endmenu source "package/iucode-tool/Config.in" source "package/kbd/Config.in" source "package/lcdproc/Config.in" + source "package/libiec61850/Config.in" source "package/libubootenv/Config.in" source "package/libuio/Config.in" source "package/linux-backports/Config.in" diff --git a/package/libiec61850/0001-use-poll.h-instead-of-sys-poll.h.patch b/package/libiec61850/0001-use-poll.h-instead-of-sys-poll.h.patch new file mode 100644 index 0000000000..a04473d218 --- /dev/null +++ b/package/libiec61850/0001-use-poll.h-instead-of-sys-poll.h.patch @@ -0,0 +1,33 @@ +From 4cad505fc98240eb66eaabfae61a9694f8158dda Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Tue, 7 Apr 2020 20:58:37 +0200 +Subject: [PATCH] use instead of + +The manpage of poll(2) states that the prototype of poll is defined +in . Use that header file instead of to allow +compilation against musl-libc. + +Upstream status: Pending +https://github.com/mz-automation/libiec61850/pull/228 + +Signed-off-by: Romain Naour +--- + hal/ethernet/linux/ethernet_linux.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hal/ethernet/linux/ethernet_linux.c b/hal/ethernet/linux/ethernet_linux.c +index c3ab2e2..9aa5c28 100644 +--- a/hal/ethernet/linux/ethernet_linux.c ++++ b/hal/ethernet/linux/ethernet_linux.c +@@ -23,7 +23,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +-- +2.21.1 + diff --git a/package/libiec61850/0002-serial_port_linux-Add-missing-include-sys-time.h.patch b/package/libiec61850/0002-serial_port_linux-Add-missing-include-sys-time.h.patch new file mode 100644 index 0000000000..e1b8ca15b3 --- /dev/null +++ b/package/libiec61850/0002-serial_port_linux-Add-missing-include-sys-time.h.patch @@ -0,0 +1,32 @@ +From 661405eb6066b67dfe51d5ff9635e29f86bdd238 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Tue, 7 Apr 2020 21:02:54 +0200 +Subject: [PATCH] serial_port_linux: Add missing include sys/time.h + +POSIX says `struct timeval` is defined if is included. + +Adding this header allow to build against musl-libc. + +Upstream status: Pending +https://github.com/mz-automation/libiec61850/pull/228 + +Signed-off-by: Romain Naour +--- + hal/serial/linux/serial_port_linux.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/hal/serial/linux/serial_port_linux.c b/hal/serial/linux/serial_port_linux.c +index e6308c0..15e5794 100644 +--- a/hal/serial/linux/serial_port_linux.c ++++ b/hal/serial/linux/serial_port_linux.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + #include "hal_serial.h" + #include "hal_time.h" +-- +2.21.1 + diff --git a/package/libiec61850/Config.in b/package/libiec61850/Config.in new file mode 100644 index 0000000000..0badc9ba62 --- /dev/null +++ b/package/libiec61850/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_LIBIEC61850 + bool "libiec61850" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + IEC 61850 is an international standard for + communication systems in Substation Automation Systems + (SAS) and management of Decentralized Energy Resources + (DER). It is seen as one of the communication standards + of the emerging Smart Grid. + + The project libIEC61850 provides a server and client + library for the IEC 61850/MMS, IEC 61850/GOOSE and IEC + 61850-9-2/Sampled Values communication protocols + written in C. It is available under the GPLv3 license. + + http://libiec61850.com + +comment "libiec61850 needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/libiec61850/libiec61850.hash b/package/libiec61850/libiec61850.hash new file mode 100644 index 0000000000..5739a5d8c9 --- /dev/null +++ b/package/libiec61850/libiec61850.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 d0630cd5b7ac67a2d286b0ad574ff1c9074c96be33b9d5a300cd69e89429abbe libiec61850-1.4.2.1.tar.gz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/package/libiec61850/libiec61850.mk b/package/libiec61850/libiec61850.mk new file mode 100644 index 0000000000..bd19128ef5 --- /dev/null +++ b/package/libiec61850/libiec61850.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libiec61850 +# +################################################################################ + +LIBIEC61850_VERSION = 1.4.2.1 +LIBIEC61850_SITE = $(call github,mz-automation,libiec61850,v$(LIBIEC61850_VERSION)) +LIBIEC61850_INSTALL_STAGING = YES +LIBIEC61850_LICENSE = GPL-3.0 +LIBIEC61850_LICENSE_FILES = COPYING +LIBIEC61850_CONF_OPTS = -DBUILD_EXAMPLES=OFF \ + -DBUILD_PYTHON_BINDINGS=OFF + +$(eval $(cmake-package))