Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[open62541] Add OpenSSL encryption, update Julia compat and increase version number (1.4.0) #7889

Merged
merged 22 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions O/open62541/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,27 @@
using BinaryBuilder, Pkg

name = "open62541"
version = v"1.3.9"
version = v"1.4.0"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/open62541/open62541.git",
"70ff3501ddecd7e7594ebc63e2365994d59e010d")
"84347820c8550b5750f2cd581c14ab201611c579"),
DirectorySource("./bundled")
]

# Bash recipe for building across all platforms
script = raw"""
# Necessary for cmake to find openssl on Windows
if [[ ${target} == x86_64-*-mingw* ]]; then
export OPENSSL_ROOT_DIR=${prefix}/lib64
fi
cd $WORKSPACE/srcdir/open62541/
if [[ "${target}" == *-freebsd* ]]; then
# https://github.com/open62541/open62541/issues/6414
atomic_patch -p1 ../0001-freebsd.patch
fi
mkdir build && cd build/
cmake -DCMAKE_INSTALL_PREFIX=${prefix} \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
Expand All @@ -23,7 +33,7 @@ cmake -DCMAKE_INSTALL_PREFIX=${prefix} \
-DUA_ENABLE_METHODCALLS=ON \
-DUA_ENABLE_PARSING=ON \
-DUA_ENABLE_NODEMANAGEMENT=ON \
-DUA_ENABLE_AMALGAMATION=ON \
-DUA_ENABLE_ENCRYPTION=OPENSSL \
-DUA_ENABLE_IMMUTABLE_NODES=ON \
-DUA_ENABLE_HISTORIZING=ON \
-DBUILD_SHARED_LIBS=ON \
Expand All @@ -44,7 +54,8 @@ products = [
]

# Dependencies that must be installed before this package can be built
dependencies = Dependency[
dependencies = [
Dependency("OpenSSL_jll"; compat="3.0.8")
]

# Build the tarballs, and possibly a `build.jl` as well.
Expand Down
25 changes: 25 additions & 0 deletions O/open62541/bundled/0001-freebsd.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/arch/posix/ua_architecture.h b/arch/posix/ua_architecture.h
index c42768548..8e6159818 100644
--- a/arch/posix/ua_architecture.h
+++ b/arch/posix/ua_architecture.h
@@ -14,6 +14,7 @@

#include <errno.h>
#include <arpa/inet.h>
+#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include <sys/ioctl.h>
diff --git a/include/open62541/config.h.in b/include/open62541/config.h.in
index 5b20497ed..7758f2ab3 100644
--- a/include/open62541/config.h.in
+++ b/include/open62541/config.h.in
@@ -127,7 +127,7 @@
* header. */
#ifdef UA_ARCHITECTURE_POSIX
# if !defined(_XOPEN_SOURCE)
-# define _XOPEN_SOURCE 600
+// # define _XOPEN_SOURCE 600
# endif
# ifndef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE