On 2026/07/23 00:23, Alexander Bluhm wrote:
> I need both flavors.  With ns0_full debugging open62541 is hard
> because everything is so big.  But in production I must install
> ns0_full.
> 
> Would two flavors of p5-OPCUA-Open62541 help?  Each on would have
> a dependency to one version of open62541.

i.e.

LIB_DEPENDS = open62541-*-!ns0_full:misc/open62541
LIB_DEPENDS = open62541-*-ns0_full:misc/open62541,ns0_full

This would avoid building a bad p5-OPCUA-Open62541, though may
occasionally run into problems during bulk builds due to the conflict.

> And the include search path during build of open62541 has to be
> fixed.

This fixes it for me. (The DIST_TUPLE changes are optional but a bit
tidier I think).

Index: patches/patch-tests_CMakeLists_txt
===================================================================
RCS file: patches/patch-tests_CMakeLists_txt
diff -N patches/patch-tests_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-tests_CMakeLists_txt  23 Jul 2026 09:06:13 -0000
@@ -0,0 +1,24 @@
+Index: tests/CMakeLists.txt
+--- tests/CMakeLists.txt.orig
++++ tests/CMakeLists.txt
+@@ -19,7 +19,6 @@ if(APPLE)
+ endif()
+ 
+ get_property(open62541_BUILD_INCLUDE_DIRS TARGET open62541 PROPERTY 
INTERFACE_INCLUDE_DIRECTORIES)
+-include_directories(${open62541_BUILD_INCLUDE_DIRS})
+ # ua_server_internal.h
+ include_directories("${PROJECT_SOURCE_DIR}/src")
+ include_directories("${PROJECT_SOURCE_DIR}/src/server")
+@@ -45,10 +44,11 @@ if(UA_ENABLE_ENCRYPTION_LIBRESSL)
+ endif()
+ 
+ if(CMAKE_HOST_SYSTEM_NAME MATCHES "OpenBSD")
+-    include_directories(AFTER /usr/local/include)
+     link_directories(AFTER /usr/local/lib)
+     add_definitions(-Wno-gnu-zero-variadic-macro-arguments)
+ endif()
++
++include_directories(BEFORE ${open62541_BUILD_INCLUDE_DIRS})
+ 
+ add_definitions(-DUA_sleep_ms=UA_comboSleep)
+ 
Index: Makefile
===================================================================
RCS file: /cvs/ports/misc/open62541/Makefile,v
diff -u -p -r1.38 Makefile
--- Makefile    8 Jul 2026 16:11:16 -0000       1.38
+++ Makefile    23 Jul 2026 09:06:13 -0000
@@ -1,8 +1,11 @@
 COMMENT =      library implementation of OPC UA
 
 VERSION =      1.3.18
+REVISION =     0
 DISTNAME =     open62541-${VERSION}
 PKGNAME =      open62541-${VERSION}
+DIST_TUPLE +=  github open62541 open62541 v${VERSION} .
+DIST_TUPLE +=  github OPCFoundation UA-Nodeset UA-1.04.10-2021-09-15 ../UA
 
 SHARED_LIBS =  open62541       6.0
 
@@ -17,11 +20,6 @@ PERMIT_PACKAGE =     Yes
 
 WANTLIB =              c crypto m pthread ssl tls
 
-SITES =                        https://github.com/open62541/open62541/
-SITES.ua =             https://github.com/OPCFoundation/UA-Nodeset/archive/
-DISTFILES =            open62541-{archive/refs/tags/v}${VERSION}.tar.gz
-DISTFILES.ua=          UA-1.04.10-2021-09-15.tar.gz
-
 MODULES =              devel/cmake
 
 # needed to build unit tests and documentation
@@ -53,10 +51,12 @@ CONFIGURE_ARGS +=   -DUA_NAMESPACE_ZERO=FU
 CONFIGURE_ARGS +=      -DUA_NAMESPACE_ZERO=REDUCED
 .endif
 
+# additional files are installed if this dir is present.
+# avoid that for the !ns0_full build.
 .if ${FLAVOR:Mns0_full}
-post-extract:
+post-patch:
        rmdir ${WRKSRC}/deps/ua-nodeset/
-       mv ${WRKDIR}/UA-Nodeset-UA-*/ ${WRKSRC}/deps/ua-nodeset/
+       mv ${WRKDIR}/UA ${WRKSRC}/deps/ua-nodeset
 .endif
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/misc/open62541/distinfo,v
diff -u -p -r1.16 distinfo
--- distinfo    8 Jul 2026 16:11:16 -0000       1.16
+++ distinfo    23 Jul 2026 09:06:13 -0000
@@ -1,4 +1,4 @@
-SHA256 (UA-1.04.10-2021-09-15.tar.gz) = 
TaoMRz1MU01hSqnlSqhrcb7CREZnO550yF5a3SYkw5M=
-SHA256 (open62541-1.3.18.tar.gz) = gnM4J8RkaVyO2NX05/dG9uQ7KUj8k8o3px2a9iTErQM=
-SIZE (UA-1.04.10-2021-09-15.tar.gz) = 5720040
-SIZE (open62541-1.3.18.tar.gz) = 3899790
+SHA256 (OPCFoundation-UA-Nodeset-UA-1.04.10-2021-09-15.tar.gz) = 
TaoMRz1MU01hSqnlSqhrcb7CREZnO550yF5a3SYkw5M=
+SHA256 (open62541-open62541-v1.3.18.tar.gz) = 
gnM4J8RkaVyO2NX05/dG9uQ7KUj8k8o3px2a9iTErQM=
+SIZE (OPCFoundation-UA-Nodeset-UA-1.04.10-2021-09-15.tar.gz) = 5720040
+SIZE (open62541-open62541-v1.3.18.tar.gz) = 3899790

Reply via email to