Re: [ptxdist] [PATCH 3/3] open62541: New package.

2020-01-14 Thread Ulrich Ölmann
Hi Alex,

On Tue, Jan 14 2020 at 10:56 +0100, Alexander Dahl  wrote:
> out of curiousity, is this based on that DistroKit topic branch from
> last year?
>
> https://git.pengutronix.de/cgit/DistroKit/log/?h=rsc/topic/open62541

yes, that was Björn's starting point. :-)

Best regards
Ulrich


> ;-)
>
> Greets
> Alex
>
> On Mon, Jan 13, 2020 at 02:35:56PM +0100, Björn Esser wrote:
>> The open62541 project is an open source implementation of the OPC UA
>> communication infrastructure which is used in industrial control.
>> 
>> Signed-off-by: Björn Esser 
>> ---
>>  ...-UA_NODESET_DIR-to-be-custom-defined.patch | 224 ++
>>  patches/open62541-1.0/series  |   4 +
>>  rules/host-open62541.in   |   6 +
>>  rules/host-open62541.make |  50 
>>  rules/open62541.in|  13 +
>>  rules/open62541.make  | 140 +++
>>  6 files changed, 437 insertions(+)
>> [...]
-- 
Pengutronix e.K.   | Ulrich Ölmann   |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH 3/3] open62541: New package.

2020-01-14 Thread Alexander Dahl
Hello Björn,

out of curiousity, is this based on that DistroKit topic branch from
last year?

https://git.pengutronix.de/cgit/DistroKit/log/?h=rsc/topic/open62541

;-)

Greets
Alex

On Mon, Jan 13, 2020 at 02:35:56PM +0100, Björn Esser wrote:
> The open62541 project is an open source implementation of the OPC UA
> communication infrastructure which is used in industrial control.
> 
> Signed-off-by: Björn Esser 
> ---
>  ...-UA_NODESET_DIR-to-be-custom-defined.patch | 224 ++
>  patches/open62541-1.0/series  |   4 +
>  rules/host-open62541.in   |   6 +
>  rules/host-open62541.make |  50 
>  rules/open62541.in|  13 +
>  rules/open62541.make  | 140 +++
>  6 files changed, 437 insertions(+)
>  create mode 100644 
> patches/open62541-1.0/0001-CMake-Allow-UA_NODESET_DIR-to-be-custom-defined.patch
>  create mode 100644 patches/open62541-1.0/series
>  create mode 100644 rules/host-open62541.in
>  create mode 100644 rules/host-open62541.make
>  create mode 100644 rules/open62541.in
>  create mode 100644 rules/open62541.make
> 
> diff --git 
> a/patches/open62541-1.0/0001-CMake-Allow-UA_NODESET_DIR-to-be-custom-defined.patch
>  
> b/patches/open62541-1.0/0001-CMake-Allow-UA_NODESET_DIR-to-be-custom-defined.patch
> new file mode 100644
> index 0..0dfd00351
> --- /dev/null
> +++ 
> b/patches/open62541-1.0/0001-CMake-Allow-UA_NODESET_DIR-to-be-custom-defined.patch
> @@ -0,0 +1,224 @@
> +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= 
> +Date: Mon, 2 Dec 2019 14:38:38 +0100
> +Subject: [PATCH] CMake: Allow UA_NODESET_DIR to be custom defined.
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +This makes it easier for developers to keep all ua-nodesets XML
> +definitions in a common location.
> +
> +Backported from: https://github.com/open62541/open62541/pull/3310
> +
> +Signed-off-by: Björn Esser 
> +---
> + CMakeLists.txt| 14 +-
> + doc/nodeset_compiler.rst  | 22 +++---
> + examples/CMakeLists.txt   |  4 
> + examples/nodeset/CMakeLists.txt   |  6 +++---
> + tests/nodeset-compiler/CMakeLists.txt | 14 +++---
> + tools/cmake/macros_public.cmake   |  2 +-
> + 6 files changed, 31 insertions(+), 31 deletions(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index d426e1da66fe..fbbafd8f2791 100644
> +--- a/CMakeLists.txt
>  b/CMakeLists.txt
> +@@ -15,7 +15,6 @@ include(GNUInstallDirs)
> + 
> + # Set when installed via make install
> + set(open62541_TOOLS_DIR ${PROJECT_SOURCE_DIR}/tools)
> +-set(open62541_NODESET_DIR ${PROJECT_SOURCE_DIR}/deps/ua-nodeset)
> + 
> + include(macros_internal)
> + include(macros_public)
> +@@ -134,6 +133,11 @@ option(UA_ENABLE_ENCRYPTION "Enable encryption support 
> (uses mbedTLS)" OFF)
> + option(UA_ENABLE_MICRO_EMB_DEV_PROFILE "Builds CTT Compliant Micro Embedded 
> Device Server Profile" OFF)
> + option(BUILD_SHARED_LIBS "Enable building of shared libraries (dll/so)" OFF)
> + 
> ++if(NOT UA_NODESET_DIR)
> ++set(UA_NODESET_DIR ${PROJECT_SOURCE_DIR}/deps/ua-nodeset)
> ++endif()
> ++set(open62541_NODESET_DIR ${UA_NODESET_DIR})
> ++
> + # Namespace Zero
> + set(UA_NAMESPACE_ZERO "REDUCED" CACHE STRING "Completeness of the generated 
> namespace zero (minimal/reduced/full)")
> + SET_PROPERTY(CACHE UA_NAMESPACE_ZERO PROPERTY STRINGS "MINIMAL" "REDUCED" 
> "FULL")
> +@@ -770,7 +774,7 @@ set(UA_FILE_NODESETS)
> + 
> + if(UA_NAMESPACE_ZERO STREQUAL "FULL")
> + if(NOT UA_FILE_NS0)
> +-set(UA_FILE_NS0 
> ${PROJECT_SOURCE_DIR}/deps/ua-nodeset/Schema/Opc.Ua.NodeSet2.xml)
> ++set(UA_FILE_NS0 ${UA_NODESET_DIR}/Schema/Opc.Ua.NodeSet2.xml)
> + endif()
> + set(UA_FILE_NODESETS "${UA_FILE_NS0}")
> + 
> +@@ -779,9 +783,9 @@ if(UA_NAMESPACE_ZERO STREQUAL "FULL")
> + endif()
> + 
> + 
> +-set(UA_FILE_NODEIDS 
> ${PROJECT_SOURCE_DIR}/deps/ua-nodeset/Schema/NodeIds.csv)
> +-set(UA_FILE_STATUSCODES 
> ${PROJECT_SOURCE_DIR}/deps/ua-nodeset/Schema/StatusCode.csv)
> +-set(UA_FILE_TYPES_BSD 
> ${PROJECT_SOURCE_DIR}/deps/ua-nodeset/Schema/Opc.Ua.Types.bsd)
> ++set(UA_FILE_NODEIDS ${UA_NODESET_DIR}/Schema/NodeIds.csv)
> ++set(UA_FILE_STATUSCODES ${UA_NODESET_DIR}/Schema/StatusCode.csv)
> ++set(UA_FILE_TYPES_BSD ${UA_NODESET_DIR}/Schema/Opc.Ua.Types.bsd)
> + else()
> + if(NOT UA_FILE_NS0)
> + set(UA_FILE_NS0 
> ${PROJECT_SOURCE_DIR}/tools/schema/Opc.Ua.NodeSet2.Minimal.xml)
> +diff --git a/doc/nodeset_compiler.rst b/doc/nodeset_compiler.rst
> +index dd752ccd70a9..34fc8f800480 100644
> +--- a/doc/nodeset_compiler.rst
>  b/doc/nodeset_compiler.rst
> +@@ -292,17 +292,17 @@ Here are some examples for the ``DI`` and ``PLCOpen`` 
> nodesets::
> + # Generate types and namespace for DI
> + ua_generate_nodeset_and_datatypes(
> + NAME "di"
> +-

[ptxdist] [PATCH 3/3] open62541: New package.

2020-01-13 Thread Björn Esser
The open62541 project is an open source implementation of the OPC UA
communication infrastructure which is used in industrial control.

Signed-off-by: Björn Esser 
---
 ...-UA_NODESET_DIR-to-be-custom-defined.patch | 224 ++
 patches/open62541-1.0/series  |   4 +
 rules/host-open62541.in   |   6 +
 rules/host-open62541.make |  50 
 rules/open62541.in|  13 +
 rules/open62541.make  | 140 +++
 6 files changed, 437 insertions(+)
 create mode 100644 
patches/open62541-1.0/0001-CMake-Allow-UA_NODESET_DIR-to-be-custom-defined.patch
 create mode 100644 patches/open62541-1.0/series
 create mode 100644 rules/host-open62541.in
 create mode 100644 rules/host-open62541.make
 create mode 100644 rules/open62541.in
 create mode 100644 rules/open62541.make

diff --git 
a/patches/open62541-1.0/0001-CMake-Allow-UA_NODESET_DIR-to-be-custom-defined.patch
 
b/patches/open62541-1.0/0001-CMake-Allow-UA_NODESET_DIR-to-be-custom-defined.patch
new file mode 100644
index 0..0dfd00351
--- /dev/null
+++ 
b/patches/open62541-1.0/0001-CMake-Allow-UA_NODESET_DIR-to-be-custom-defined.patch
@@ -0,0 +1,224 @@
+From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= 
+Date: Mon, 2 Dec 2019 14:38:38 +0100
+Subject: [PATCH] CMake: Allow UA_NODESET_DIR to be custom defined.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This makes it easier for developers to keep all ua-nodesets XML
+definitions in a common location.
+
+Backported from: https://github.com/open62541/open62541/pull/3310
+
+Signed-off-by: Björn Esser 
+---
+ CMakeLists.txt| 14 +-
+ doc/nodeset_compiler.rst  | 22 +++---
+ examples/CMakeLists.txt   |  4 
+ examples/nodeset/CMakeLists.txt   |  6 +++---
+ tests/nodeset-compiler/CMakeLists.txt | 14 +++---
+ tools/cmake/macros_public.cmake   |  2 +-
+ 6 files changed, 31 insertions(+), 31 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d426e1da66fe..fbbafd8f2791 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -15,7 +15,6 @@ include(GNUInstallDirs)
+ 
+ # Set when installed via make install
+ set(open62541_TOOLS_DIR ${PROJECT_SOURCE_DIR}/tools)
+-set(open62541_NODESET_DIR ${PROJECT_SOURCE_DIR}/deps/ua-nodeset)
+ 
+ include(macros_internal)
+ include(macros_public)
+@@ -134,6 +133,11 @@ option(UA_ENABLE_ENCRYPTION "Enable encryption support 
(uses mbedTLS)" OFF)
+ option(UA_ENABLE_MICRO_EMB_DEV_PROFILE "Builds CTT Compliant Micro Embedded 
Device Server Profile" OFF)
+ option(BUILD_SHARED_LIBS "Enable building of shared libraries (dll/so)" OFF)
+ 
++if(NOT UA_NODESET_DIR)
++set(UA_NODESET_DIR ${PROJECT_SOURCE_DIR}/deps/ua-nodeset)
++endif()
++set(open62541_NODESET_DIR ${UA_NODESET_DIR})
++
+ # Namespace Zero
+ set(UA_NAMESPACE_ZERO "REDUCED" CACHE STRING "Completeness of the generated 
namespace zero (minimal/reduced/full)")
+ SET_PROPERTY(CACHE UA_NAMESPACE_ZERO PROPERTY STRINGS "MINIMAL" "REDUCED" 
"FULL")
+@@ -770,7 +774,7 @@ set(UA_FILE_NODESETS)
+ 
+ if(UA_NAMESPACE_ZERO STREQUAL "FULL")
+ if(NOT UA_FILE_NS0)
+-set(UA_FILE_NS0 
${PROJECT_SOURCE_DIR}/deps/ua-nodeset/Schema/Opc.Ua.NodeSet2.xml)
++set(UA_FILE_NS0 ${UA_NODESET_DIR}/Schema/Opc.Ua.NodeSet2.xml)
+ endif()
+ set(UA_FILE_NODESETS "${UA_FILE_NS0}")
+ 
+@@ -779,9 +783,9 @@ if(UA_NAMESPACE_ZERO STREQUAL "FULL")
+ endif()
+ 
+ 
+-set(UA_FILE_NODEIDS 
${PROJECT_SOURCE_DIR}/deps/ua-nodeset/Schema/NodeIds.csv)
+-set(UA_FILE_STATUSCODES 
${PROJECT_SOURCE_DIR}/deps/ua-nodeset/Schema/StatusCode.csv)
+-set(UA_FILE_TYPES_BSD 
${PROJECT_SOURCE_DIR}/deps/ua-nodeset/Schema/Opc.Ua.Types.bsd)
++set(UA_FILE_NODEIDS ${UA_NODESET_DIR}/Schema/NodeIds.csv)
++set(UA_FILE_STATUSCODES ${UA_NODESET_DIR}/Schema/StatusCode.csv)
++set(UA_FILE_TYPES_BSD ${UA_NODESET_DIR}/Schema/Opc.Ua.Types.bsd)
+ else()
+ if(NOT UA_FILE_NS0)
+ set(UA_FILE_NS0 
${PROJECT_SOURCE_DIR}/tools/schema/Opc.Ua.NodeSet2.Minimal.xml)
+diff --git a/doc/nodeset_compiler.rst b/doc/nodeset_compiler.rst
+index dd752ccd70a9..34fc8f800480 100644
+--- a/doc/nodeset_compiler.rst
 b/doc/nodeset_compiler.rst
+@@ -292,17 +292,17 @@ Here are some examples for the ``DI`` and ``PLCOpen`` 
nodesets::
+ # Generate types and namespace for DI
+ ua_generate_nodeset_and_datatypes(
+ NAME "di"
+-FILE_CSV "${PROJECT_SOURCE_DIR}/deps/ua-nodeset/DI/OpcUaDiModel.csv"
+-FILE_BSD 
"${PROJECT_SOURCE_DIR}/deps/ua-nodeset/DI/Opc.Ua.Di.Types.bsd"
++FILE_CSV "${UA_NODESET_DIR}/DI/OpcUaDiModel.csv"
++FILE_BSD "${UA_NODESET_DIR}/DI/Opc.Ua.Di.Types.bsd"
+ NAMESPACE_IDX 2
+-FILE_NS 
"${PROJECT_SOURCE_DIR}/deps/ua-nodeset/DI/Opc.Ua.Di.NodeSet2.xml"
++FILE_NS "${UA_NODESET_DIR}/DI/Opc.Ua.Di.NodeSet2.xml"
+ )
+ 
+ # generate