commit:     5d02cc13b8dd9945c32a42730136bddceb290f39
Author:     Kurt Kanzenbach <kurt <AT> kmk-computers <DOT> de>
AuthorDate: Sun Apr 14 15:02:54 2024 +0000
Commit:     Kurt Kanzenbach <kurt <AT> kmk-computers <DOT> de>
CommitDate: Sun Apr 14 15:06:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5d02cc13

dev-libs/open62541: add 1.4.0

Signed-off-by: Kurt Kanzenbach <kurt <AT> kmk-computers.de>

 dev-libs/open62541/Manifest               |  1 +
 dev-libs/open62541/open62541-1.4.0.ebuild | 82 +++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+)

diff --git a/dev-libs/open62541/Manifest b/dev-libs/open62541/Manifest
index 29c41e5d4c..23b0acb338 100644
--- a/dev-libs/open62541/Manifest
+++ b/dev-libs/open62541/Manifest
@@ -1 +1,2 @@
 DIST open62541-1.3.9.tar.gz 3874701 BLAKE2B 
22fe64d02f900dfdb70013783727f0b6edf90e8637e57dce4b07f6b97d7fd33c36090f3d0be5af28d484e8654c3184d03df4c8438c27530d6e2be9c516b06b82
 SHA512 
8771a70d1f38f2a02f21281200d98fdd8d41d842cc82704155793529a1768beeb2583382f7547e6aaefdab4a17c3130779af792b2a59487889a3cdea4a2fa776
+DIST open62541-1.4.0.tar.gz 4193601 BLAKE2B 
9285c2e8e7d59c306d575579b7935881536c3b2b4d1765a3fb2b6e342540dcae4b65662e2672641b446b0f4d737692af21f62efe497a83fbe42a400bd18f0048
 SHA512 
2c0a3caea48d4708f37cc084ee8d683a02190f4402fd51bbd5cba763bfab8afa92ecbfb129aa4cfa94930a785ab6037fc4b71de363a374b8952e483464c5e7d3

diff --git a/dev-libs/open62541/open62541-1.4.0.ebuild 
b/dev-libs/open62541/open62541-1.4.0.ebuild
new file mode 100644
index 0000000000..7fc876bf81
--- /dev/null
+++ b/dev-libs/open62541/open62541-1.4.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake python-single-r1
+
+DESCRIPTION="Open source C implementation of OPC UA"
+HOMEPAGE="https://www.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 mbedtls pubsub openssl tools"
+# Requires network access
+RESTRICT="test"
+
+REQUIRED_USE="
+       ${PYTHON_REQUIRED_USE}
+       encryption? ( || ( mbedtls openssl ) )
+"
+
+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}]
+               ')
+       )
+"
+DEPEND="
+       mbedtls? ( net-libs/mbedtls:= )
+       openssl? ( dev-libs/openssl:0= )
+"
+RDEPEND="
+       ${PYTHON_DEPS}
+       ${DEPEND}
+"
+
+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=OFF
+               -DUA_ENABLE_PUBSUB=$(usex pubsub)
+               -DUA_FORCE_WERROR=OFF
+       )
+
+       if use encryption; then
+               use mbedtls && mycmakeargs+=(-DUA_ENABLE_ENCRYPTION=MBEDTLS)
+               use openssl && mycmakeargs+=(-DUA_ENABLE_ENCRYPTION=OPENSSL)
+       fi
+
+       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
+}
+
+src_test() {
+       cmake_src_test -j1
+}

Reply via email to