From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D4913158003 for ; Sat, 26 Feb 2022 18:16:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F237BE0921; Sat, 26 Feb 2022 18:16:43 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8DDA52BC006 for ; Sat, 26 Feb 2022 18:16:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 459A2343214 for ; Sat, 26 Feb 2022 18:16:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 407C330C for ; Sat, 26 Feb 2022 18:16:39 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1645822051.36e42377c96008cd4bc4b200f98ec2348ba4b2a9.flow@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-libs/open62541/, dev-libs/open62541/files/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-libs/open62541/Manifest dev-libs/open62541/files/open62541-1.2.4-headers.patch dev-libs/open62541/files/open62541-1.2.4-tests.patch dev-libs/open62541/open62541-1.2.4.ebuild X-VCS-Directories: dev-libs/open62541/files/ dev-libs/open62541/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 36e42377c96008cd4bc4b200f98ec2348ba4b2a9 X-VCS-Branch: master Date: Sat, 26 Feb 2022 18:16:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: aad1d064-254f-40a4-903b-4bdf942b47ff X-Archives-Hash: c16710107af22af747e75dcfea38f507 commit: 36e42377c96008cd4bc4b200f98ec2348ba4b2a9 Author: Kurt Kanzenbach kmk-computers de> AuthorDate: Fri Feb 25 20:47:31 2022 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Fri Feb 25 20:47:31 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=36e42377 dev-libs/open62541: Bump version to v1.2.4 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Kurt Kanzenbach kmk-computers.de> dev-libs/open62541/Manifest | 1 + .../open62541/files/open62541-1.2.4-headers.patch | 31 ++++++ .../open62541/files/open62541-1.2.4-tests.patch | 124 +++++++++++++++++++++ dev-libs/open62541/open62541-1.2.4.ebuild | 104 +++++++++++++++++ 4 files changed, 260 insertions(+) diff --git a/dev-libs/open62541/Manifest b/dev-libs/open62541/Manifest index d59ef7daa..aa9a52758 100644 --- a/dev-libs/open62541/Manifest +++ b/dev-libs/open62541/Manifest @@ -1 +1,2 @@ DIST open62541-1.2.3.tar.gz 3645511 BLAKE2B 3cebe1a4200cb026916cd801303937509d8e59c10af5400f5a212c16006c1744bc403fad25b40fb7bcf9043982649f1661c13aa16df8a07db6334f7e2fc55872 SHA512 ffcc697901ec978fb9d1f8996f8a4c5114c98a0ec19206cac95d1a84f8d0fcbe38bf73e88f1df59d53bc6be481102aa2f2a6a0efa29797e7ce11123bd23131c2 +DIST open62541-1.2.4.tar.gz 3646665 BLAKE2B 83441f05d4f846e83d441a84d46e6bff4459a239d02eee7a78f846a26cb433ecb67a2b178c8a5bcbc748b10ac49f055f5c9063b02dd72d2e574f1b1e0ea3fe97 SHA512 4fb4c01c0573dd5e06c4f3a0caa6b7b5ef3bafbbf3d4d7a0770e9e448e111b5f4906d6911271f28c27a2b1f07710a6bc0b3204ca39e043c350f5051c3ee8e821 diff --git a/dev-libs/open62541/files/open62541-1.2.4-headers.patch b/dev-libs/open62541/files/open62541-1.2.4-headers.patch new file mode 100644 index 000000000..75d79ec46 --- /dev/null +++ b/dev-libs/open62541/files/open62541-1.2.4-headers.patch @@ -0,0 +1,31 @@ +From a5697f1eb69822e172bc31d1549222c8ca718844 Mon Sep 17 00:00:00 2001 +From: Kurt Kanzenbach +Date: Sun, 12 Jul 2020 10:39:31 +0200 +Subject: [PATCH 2/3] cmake: Install ETF and XDP plugin headers + +When the corresponding features are enabled, the headers should be installed as +well. + +Signed-off-by: Kurt Kanzenbach +--- + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -907,6 +907,7 @@ if(UA_ENABLE_PUBSUB) + list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/pubsub_udp.h) + list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_pubsub_udp.c) + if(UA_ENABLE_PUBSUB_ETH_UADP_ETF) ++ list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/pubsub_ethernet_etf.h) + list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_pubsub_ethernet_etf.c) + endif() + if(UA_ENABLE_PUBSUB_ETH_UADP) +@@ -916,6 +917,7 @@ if(UA_ENABLE_PUBSUB) + if(UA_ENABLE_PUBSUB_ETH_UADP_XDP) + if(EXISTS "${XDP_LIBRARY}") + list(APPEND open62541_LIBRARIES ${XDP_LIBRARY}) ++ list(APPEND default_plugin_headers ${PROJECT_SOURCE_DIR}/plugins/include/open62541/plugin/pubsub_ethernet_xdp.h) + list(APPEND default_plugin_sources ${PROJECT_SOURCE_DIR}/plugins/ua_pubsub_ethernet_xdp.c) + else() + MESSAGE(WARNING "samples in bpf-next directory were not built. Build the bpf-next to use XDP") diff --git a/dev-libs/open62541/files/open62541-1.2.4-tests.patch b/dev-libs/open62541/files/open62541-1.2.4-tests.patch new file mode 100644 index 000000000..e8b83fe08 --- /dev/null +++ b/dev-libs/open62541/files/open62541-1.2.4-tests.patch @@ -0,0 +1,124 @@ +From ab9a4a1c826bb662816f71020054ba2558afefc7 Mon Sep 17 00:00:00 2001 +From: Kurt Kanzenbach +Date: Sat, 20 Jun 2020 14:28:57 +0200 +Subject: [PATCH 1/3] cmake: pubsub: Disable failing tests within portage + +The Pub/Sub tests won't work within portage. Disable them. + +Signed-off-by: Kurt Kanzenbach +--- + tests/CMakeLists.txt | 103 --------------------------------------------------- + 1 file changed, 103 deletions(-) + +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -341,109 +341,6 @@ if(UA_ENABLE_DISCOVERY) + add_test_valgrind(discovery ${TESTS_BINARY_DIR}/check_discovery) + endif() + +-if(UA_ENABLE_PUBSUB) +- add_executable(check_pubsub_encoding pubsub/check_pubsub_encoding.c $ $) +- target_link_libraries(check_pubsub_encoding ${LIBS}) +- add_test_valgrind(pubsub_encoding ${TESTS_BINARY_DIR}/check_pubsub_encoding) +- add_executable(check_pubsub_pds pubsub/check_pubsub_pds.c $ $) +- target_link_libraries(check_pubsub_pds ${LIBS}) +- add_test_valgrind(pubsub_pds ${TESTS_BINARY_DIR}/check_pubsub_pds) +- add_executable(check_pubsub_connection_udp pubsub/check_pubsub_connection_udp.c $ $) +- target_link_libraries(check_pubsub_connection_udp ${LIBS}) +- add_test_valgrind(pubsub_connection_udp ${TESTS_BINARY_DIR}/check_pubsub_connection_udp) +- add_executable(check_pubsub_publish pubsub/check_pubsub_publish.c $ $) +- target_link_libraries(check_pubsub_publish ${LIBS}) +- add_test_valgrind(pubsub_publish ${TESTS_BINARY_DIR}/check_pubsub_publish) +- add_executable(check_pubsub_publish_uadp pubsub/check_pubsub_publish_uadp.c $ $) +- target_link_libraries(check_pubsub_publish_uadp ${LIBS}) +- add_test_valgrind(pubsub_publish ${TESTS_BINARY_DIR}/check_pubsub_publish_uadp) +- add_executable(check_pubsub_get_state pubsub/check_pubsub_get_state.c $ $) +- target_link_libraries(check_pubsub_get_state ${LIBS}) +- add_test_valgrind(check_pubsub_get_state ${TESTS_BINARY_DIR}/check_pubsub_get_state) +- +- #Link libraries for executing subscriber unit test +- add_executable(check_pubsub_subscribe pubsub/check_pubsub_subscribe.c $ $) +- target_link_libraries(check_pubsub_subscribe ${LIBS}) +- add_executable(check_pubsub_publishspeed pubsub/check_pubsub_publishspeed.c $ $) +- target_link_libraries(check_pubsub_publishspeed ${LIBS}) +- add_test_valgrind(pubsub_publishspeed ${TESTS_BINARY_DIR}/check_pubsub_publish) +- add_executable(check_pubsub_config_freeze pubsub/check_pubsub_config_freeze.c $ $) +- target_link_libraries(check_pubsub_config_freeze ${LIBS}) +- add_test_valgrind(check_pubsub_config_freeze ${TESTS_BINARY_DIR}/check_pubsub_config_freeze) +- add_executable(check_pubsub_publish_rt_levels pubsub/check_pubsub_publish_rt_levels.c $ $) +- target_link_libraries(check_pubsub_publish_rt_levels ${LIBS}) +- add_test_valgrind(check_pubsub_publish_rt_levels ${TESTS_BINARY_DIR}/check_pubsub_publish_rt_levels) +- add_executable(check_pubsub_subscribe_config_freeze pubsub/check_pubsub_subscribe_config_freeze.c $ $) +- target_link_libraries(check_pubsub_subscribe_config_freeze ${LIBS}) +- add_test_valgrind(check_pubsub_subscribe_config_freeze ${TESTS_BINARY_DIR}/check_pubsub_subscribe_config_freeze) +- add_executable(check_pubsub_subscribe_rt_levels pubsub/check_pubsub_subscribe_rt_levels.c $ $) +- target_link_libraries(check_pubsub_subscribe_rt_levels ${LIBS}) +- add_test_valgrind(check_pubsub_subscribe_rt_levels ${TESTS_BINARY_DIR}/check_pubsub_subscribe_rt_levels) +- add_executable(check_pubsub_multiple_subscribe_rt_levels pubsub/check_pubsub_multiple_subscribe_rt_levels.c $ $) +- target_link_libraries(check_pubsub_multiple_subscribe_rt_levels ${LIBS}) +- add_test_valgrind(check_pubsub_multiple_subscribe_rt_levels ${TESTS_BINARY_DIR}/check_pubsub_multiple_subscribe_rt_levels) +- +- add_executable(check_pubsub_multiple_layer pubsub/check_pubsub_multiple_layer.c $ $) +- target_link_libraries(check_pubsub_multiple_layer ${LIBS}) +- add_test_valgrind(pubsub_multiple_layer ${TESTS_BINARY_DIR}/check_pubsub_multiple_layer) +- +- if (UA_ENABLE_PUBSUB_MONITORING) +- add_executable(check_pubsub_subscribe_msgrcvtimeout pubsub/check_pubsub_subscribe_msgrcvtimeout.c +- $ +- $) +- target_link_libraries(check_pubsub_subscribe_msgrcvtimeout ${LIBS}) +- add_test_valgrind(check_pubsub_subscribe_msgrcvtimeout ${TESTS_BINARY_DIR}/check_pubsub_subscribe_msgrcvtimeout) +- endif() +- +- if(UA_ENABLE_PUBSUB_ETH_UADP) +- if(NOT UA_ENABLE_PUBSUB_ETH_UADP_ETF) +- add_executable(check_pubsub_connection_ethernet pubsub/check_pubsub_connection_ethernet.c $ $) +- target_link_libraries(check_pubsub_connection_ethernet ${LIBS}) +- add_test_valgrind(pubsub_connection_ethernet ${TESTS_BINARY_DIR}/check_pubsub_connection_ethernet) +- add_executable(check_pubsub_publish_ethernet pubsub/check_pubsub_publish_ethernet.c $ $) +- target_link_libraries(check_pubsub_publish_ethernet ${LIBS}) +- add_test_valgrind(pubsub_publish_ethernet ${TESTS_BINARY_DIR}/check_pubsub_publish_ethernet) +- endif() +- if(UA_ENABLE_PUBSUB_ETH_UADP_XDP) +- add_executable(check_pubsub_connection_xdp pubsub/check_pubsub_connection_xdp.c $ $) +- target_link_libraries(check_pubsub_connection_xdp ${LIBS}) +- add_test_valgrind(pubsub_connection_xdp ${TESTS_BINARY_DIR}/check_pubsub_connection_xdp) +- endif() +- endif() +- if(UA_ENABLE_PUBSUB_ETH_UADP_ETF) +- add_executable(check_pubsub_connection_ethernet_etf pubsub/check_pubsub_connection_ethernet_etf.c $ $) +- target_link_libraries(check_pubsub_connection_ethernet_etf ${LIBS}) +- add_test_valgrind(pubsub_connection_ethernet_etf ${TESTS_BINARY_DIR}/check_pubsub_connection_ethernet_etf) +- add_executable(check_pubsub_publish_ethernet_etf pubsub/check_pubsub_publish_ethernet_etf.c $ $) +- target_link_libraries(check_pubsub_publish_ethernet_etf ${LIBS}) +- add_test_valgrind(pubsub_publish_ethernet_etf ${TESTS_BINARY_DIR}/check_pubsub_publish_ethernet_etf) +- endif() +- +- if(UA_ENABLE_PUBSUB_INFORMATIONMODEL) +- add_executable(check_pubsub_informationmodel pubsub/check_pubsub_informationmodel.c $ $) +- target_link_libraries(check_pubsub_informationmodel ${LIBS}) +- add_test_valgrind(check_pubsub_informationmodel ${TESTS_BINARY_DIR}/check_pubsub_informationmodel) +- if(UA_ENABLE_PUBSUB_INFORMATIONMODEL_METHODS) +- add_executable(check_pubsub_informationmodel_methods pubsub/check_pubsub_informationmodel_methods.c $ $) +- target_link_libraries(check_pubsub_informationmodel_methods ${LIBS}) +- add_test_valgrind(check_pubsub_informationmodel_methods ${TESTS_BINARY_DIR}/check_pubsub_informationmodel_methods) +- +- endif() +- endif() +- if(UA_ENABLE_PUBSUB_MQTT) +- if(NOT WIN32) +- add_executable(check_pubsub_connection_mqtt pubsub/check_pubsub_connection_mqtt.c $ $) +- target_link_libraries(check_pubsub_connection_mqtt ${LIBS}) +- add_test_valgrind(pubsub_connection_mqtt ${TESTS_BINARY_DIR}/check_pubsub_connection_mqtt) +- endif() +- endif() +- if(UA_ENABLE_PUBSUB_FILE_CONFIG) +- add_executable(check_pubsub_configuration pubsub/check_pubsub_configuration.c $ $) +- target_link_libraries(check_pubsub_configuration ${LIBS}) +- add_test_valgrind(pubsub_configuration ${TESTS_BINARY_DIR}/check_pubsub_configuration) +- endif() +-endif() +- + add_executable(check_server_readspeed server/check_server_readspeed.c $ $) + target_link_libraries(check_server_readspeed ${LIBS}) + add_test_no_valgrind(server_readspeed ${TESTS_BINARY_DIR}/check_server_readspeed) diff --git a/dev-libs/open62541/open62541-1.2.4.ebuild b/dev-libs/open62541/open62541-1.2.4.ebuild new file mode 100644 index 000000000..971777330 --- /dev/null +++ b/dev-libs/open62541/open62541-1.2.4.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) + +inherit cmake python-single-r1 + +DESCRIPTION="Open source C implementation of OPC UA" +HOMEPAGE="https://open62541.org/" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="doc encryption examples etf mbedtls pubsub openssl test tools xdp" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + encryption? ( || ( mbedtls openssl ) ) + etf? ( pubsub ) + xdp? ( pubsub ) +" + +BDEPEND=" + ${PYTHON_DEPS} + virtual/pkgconfig + doc? ( + media-gfx/graphviz + $(python_gen_cond_dep ' + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] + ') + ) + test? ( + dev-libs/check + dev-util/valgrind + $(python_gen_cond_dep ' + dev-python/subunit[${PYTHON_USEDEP}] + ') + ) +" +DEPEND=" + mbedtls? ( net-libs/mbedtls:= ) + openssl? ( dev-libs/openssl:0= ) +" +RDEPEND=" + ${PYTHON_DEPS} + ${DEPEND} +" + +PATCHES=( + "${FILESDIR}/${P}-headers.patch" + "${FILESDIR}/${P}-tests.patch" +) + +src_prepare() { + # bug 780912 + sed -i -e 's/check_add_cc_flag("-Werror")//g' CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DOPEN62541_VERSION=v${PV} + -DUA_BUILD_EXAMPLES=OFF + -DUA_BUILD_TOOLS=$(usex tools) + -DUA_BUILD_UNIT_TESTS=$(usex test) + -DUA_ENABLE_ENCRYPTION=$(usex encryption) + -DUA_ENABLE_ENCRYPTION_MBEDTLS=$(usex mbedtls) + -DUA_ENABLE_ENCRYPTION_OPENSSL=$(usex openssl) + -DUA_ENABLE_PUBSUB=$(usex pubsub) + -DUA_ENABLE_PUBSUB_ETH_UADP=$(usex pubsub) + -DUA_ENABLE_PUBSUB_ETH_UADP_ETF=$(usex etf) + -DUA_ENABLE_PUBSUB_ETH_UADP_XDP=$(usex xdp) + ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + use doc && cmake_build doc +} + +src_install() { + use doc && local HTML_DOCS=( "${WORKDIR}"/${P}_build/doc/. ) + cmake_src_install + + if use examples; then + docompress -x /usr/share/doc/${PF}/examples + dodoc -r examples/ + fi + + python_fix_shebang "${ED}" +} + +src_test() { + cmake_src_test -j1 +}