Re: [ptxdist] [PATCH v5 3/3] open62541: new package

2020-03-11 Thread Ulrich Ölmann
On Mon, Feb 17 2020 at 11:32 +0100, Michael Olbrich  
wrote:
> On Mon, Feb 17, 2020 at 10:50:12AM +0100, Roland Hieber wrote:
>> On Fri, Feb 14, 2020 at 01:50:23PM +0100, Michael Olbrich wrote:
>> > On Wed, Feb 05, 2020 at 11:42:41AM +0100, Ulrich Ölmann wrote:
>> 
>> [...]
>> 
>> > > diff --git a/rules/open62541.make b/rules/open62541.make
>> > > new file mode 100644
>> > > index ..62e030ed3752
>> > > --- /dev/null
>> > > +++ b/rules/open62541.make
>> > > @@ -0,0 +1,140 @@
>> > > +# -*-makefile-*-
>> > > +#
>> > > +# Copyright (C) 2018 by Robert Schwebel 
>> > > +# Copyright (C) 2019 by Bjoern Esser 
>> > > +#
>> > > +# See CREDITS for details about who has contributed to this project.
>> > > +#
>> > > +# For further information about the PTXdist project and license 
>> > > conditions
>> > > +# see the README file.
>> > > +#
>> > > +
>> > > +#
>> > > +# We provide this package
>> > > +#
>> > > +PACKAGES-$(PTXCONF_OPEN62541) += open62541
>> > > +
>> > > +#
>> > > +# Paths and names
>> > > +#
>> > > +OPEN62541_VERSION   := 1.0
>> > > +OPEN62541_MD5   := b8e02d7310e8b48faf52efc539fa9496
>> > > +OPEN62541   := open62541-$(OPEN62541_VERSION)
>> > > +OPEN62541_SUFFIX:= tar.gz
>> > > +OPEN62541_URL   := 
>> > > https://github.com/open62541/open62541/archive/v$(OPEN62541_VERSION)/$(OPEN62541).$(OPEN62541_SUFFIX)
>> > > +OPEN62541_SOURCE:= 
>> > > $(SRCDIR)/$(OPEN62541).$(OPEN62541_SUFFIX)
>> > > +OPEN62541_DIR   := $(BUILDDIR)/$(OPEN62541)
>> > > +OPEN62541_LICENSE   := MPL-2.0
>> > > +OPEN62541_LICENSE_FILES := 
>> > > file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad
>> > > +
>> > > +OPEN62541_MDNSD_VERSION := 
>> > > 4bd993e0fdd06d54c8fd0b8f416cda6a8db18585
>> > > +OPEN62541_MDNSD_MD5 := 0961fc8dc253753ec8ea157104671498
>> > > +OPEN62541_MDNSD_URL := 
>> > > https://github.com/Pro/mdnsd/archive/$(OPEN62541_MDNSD_VERSION)/open62541-mdnsd-$(OPEN62541_MDNSD_VERSION).tar.gz
>> > > +OPEN62541_MDNSD_SOURCE  := 
>> > > $(SRCDIR)/open62541-mdnsd-$(OPEN62541_MDNSD_VERSION).tar.gz
>> > 
>> > The suffix deserves a separate variable.
>> 
>> I'm curious why, is it used by anything other than the URL?
>
> Well, having a _VERSION makes the diff for updates easier to read.
> _SOURCE and _URL and _MD5 are always needed.
> And now that I look closer, OPEN62541_MDNSD should be set as well. This and
> _SUFFIX make it clearer that _SOURCE and URL are in sync.

Done in the next iteration of the series.

Best regards
Ulrich
-- 
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 v5 3/3] open62541: new package

2020-03-11 Thread Ulrich Ölmann
On Fri, Feb 14 2020 at 13:50 +0100, Michael Olbrich  
wrote:
> On Wed, Feb 05, 2020 at 11:42:41AM +0100, Ulrich Ölmann wrote:
>> From: 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 
>> [uol: adjusted commit message]
>> Signed-off-by: Ulrich Ölmann 
>> ---
>> v2 --> v3: adjusted commit message
>> 
>> [...]
>> 
>> diff --git a/rules/open62541.make b/rules/open62541.make
>> new file mode 100644
>> index ..62e030ed3752
>> --- /dev/null
>> +++ b/rules/open62541.make
>> @@ -0,0 +1,140 @@
>> +# -*-makefile-*-
>> +#
>> +# Copyright (C) 2018 by Robert Schwebel 
>> +# Copyright (C) 2019 by Bjoern Esser 
>> +#
>> +# See CREDITS for details about who has contributed to this project.
>> +#
>> +# For further information about the PTXdist project and license conditions
>> +# see the README file.
>> +#
>> +
>> +#
>> +# We provide this package
>> +#
>> +PACKAGES-$(PTXCONF_OPEN62541) += open62541
>> +
>> +#
>> +# Paths and names
>> +#
>> +OPEN62541_VERSION   := 1.0
>> +OPEN62541_MD5   := b8e02d7310e8b48faf52efc539fa9496
>> +OPEN62541   := open62541-$(OPEN62541_VERSION)
>> +OPEN62541_SUFFIX:= tar.gz
>> +OPEN62541_URL   := 
>> https://github.com/open62541/open62541/archive/v$(OPEN62541_VERSION)/$(OPEN62541).$(OPEN62541_SUFFIX)
>> +OPEN62541_SOURCE:= $(SRCDIR)/$(OPEN62541).$(OPEN62541_SUFFIX)
>> +OPEN62541_DIR   := $(BUILDDIR)/$(OPEN62541)
>> +OPEN62541_LICENSE   := MPL-2.0
>> +OPEN62541_LICENSE_FILES := 
>> file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad
>> +
>> +OPEN62541_MDNSD_VERSION := 
>> 4bd993e0fdd06d54c8fd0b8f416cda6a8db18585
>> +OPEN62541_MDNSD_MD5 := 0961fc8dc253753ec8ea157104671498
>> +OPEN62541_MDNSD_URL := 
>> https://github.com/Pro/mdnsd/archive/$(OPEN62541_MDNSD_VERSION)/open62541-mdnsd-$(OPEN62541_MDNSD_VERSION).tar.gz
>> +OPEN62541_MDNSD_SOURCE  := 
>> $(SRCDIR)/open62541-mdnsd-$(OPEN62541_MDNSD_VERSION).tar.gz
>
> The suffix deserves a separate variable.

Okay.

>> +$(OPEN62541_MDNSD_SOURCE)   := OPEN62541_MDNSD
>> +OPEN62541_MDNSD_DIR := $(OPEN62541_DIR)/deps/mdnsd
>> +OPEN62541_MDNSD_LICENSE := BSD-3-Clause
>> +OPEN62541_MDNSD_LICENSE_FILES   := 
>> file://LICENSE;md5=3bb4047dc4095cd7336de3e2a9be94f0
>> +
>> +# open62541-mdnsd needs the source dir.
>> +OPEN62541_DEVPKG:= NO
>
> Right now open62541-mdnsd is part of the same package, so the comment
> makes no sense.

Removed in the next iteration of the series.

Best regards
Ulrich
-- 
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 v5 3/3] open62541: new package

2020-03-11 Thread Ulrich Ölmann
On Sat, Feb 15 2020 at 10:58 +0100, Michael Olbrich  
wrote:
> On Wed, Feb 05, 2020 at 11:42:41AM +0100, Ulrich Ölmann wrote:
>> From: 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 
>> [uol: adjusted commit message]
>> Signed-off-by: Ulrich Ölmann 
>> ---
>> v2 --> v3: adjusted commit message
>> 
>> [...]
>> 
>> diff --git a/rules/host-open62541.in b/rules/host-open62541.in
>> new file mode 100644
>> index ..8a432080ed34
>> --- /dev/null
>> +++ b/rules/host-open62541.in
>> @@ -0,0 +1,6 @@
>> +## SECTION=hosttools_noprompt
>> +
>> +config HOST_OPEN62541
>> +tristate
>> +select HOST_CMAKE
>> +select HOST_UA_NODESET
>
> needs
>   select HOST_SYSTEM_PYTHON3
>
> with ptxdist master.

Added in the next iteration of the series.

Best regards
Ulrich
-- 
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 v5 3/3] open62541: new package

2020-02-17 Thread Michael Olbrich
On Mon, Feb 17, 2020 at 10:50:12AM +0100, Roland Hieber wrote:
> On Fri, Feb 14, 2020 at 01:50:23PM +0100, Michael Olbrich wrote:
> > On Wed, Feb 05, 2020 at 11:42:41AM +0100, Ulrich Ölmann wrote:
> 
> [...]
> 
> > > diff --git a/rules/open62541.make b/rules/open62541.make
> > > new file mode 100644
> > > index ..62e030ed3752
> > > --- /dev/null
> > > +++ b/rules/open62541.make
> > > @@ -0,0 +1,140 @@
> > > +# -*-makefile-*-
> > > +#
> > > +# Copyright (C) 2018 by Robert Schwebel 
> > > +# Copyright (C) 2019 by Bjoern Esser 
> > > +#
> > > +# See CREDITS for details about who has contributed to this project.
> > > +#
> > > +# For further information about the PTXdist project and license 
> > > conditions
> > > +# see the README file.
> > > +#
> > > +
> > > +#
> > > +# We provide this package
> > > +#
> > > +PACKAGES-$(PTXCONF_OPEN62541) += open62541
> > > +
> > > +#
> > > +# Paths and names
> > > +#
> > > +OPEN62541_VERSION:= 1.0
> > > +OPEN62541_MD5:= b8e02d7310e8b48faf52efc539fa9496
> > > +OPEN62541:= open62541-$(OPEN62541_VERSION)
> > > +OPEN62541_SUFFIX := tar.gz
> > > +OPEN62541_URL:= 
> > > https://github.com/open62541/open62541/archive/v$(OPEN62541_VERSION)/$(OPEN62541).$(OPEN62541_SUFFIX)
> > > +OPEN62541_SOURCE := $(SRCDIR)/$(OPEN62541).$(OPEN62541_SUFFIX)
> > > +OPEN62541_DIR:= $(BUILDDIR)/$(OPEN62541)
> > > +OPEN62541_LICENSE:= MPL-2.0
> > > +OPEN62541_LICENSE_FILES  := 
> > > file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad
> > > +
> > > +OPEN62541_MDNSD_VERSION  := 
> > > 4bd993e0fdd06d54c8fd0b8f416cda6a8db18585
> > > +OPEN62541_MDNSD_MD5  := 0961fc8dc253753ec8ea157104671498
> > > +OPEN62541_MDNSD_URL  := 
> > > https://github.com/Pro/mdnsd/archive/$(OPEN62541_MDNSD_VERSION)/open62541-mdnsd-$(OPEN62541_MDNSD_VERSION).tar.gz
> > > +OPEN62541_MDNSD_SOURCE   := 
> > > $(SRCDIR)/open62541-mdnsd-$(OPEN62541_MDNSD_VERSION).tar.gz
> > 
> > The suffix deserves a separate variable.
> 
> I'm curious why, is it used by anything other than the URL?

Well, having a _VERSION makes the diff for updates easier to read.
_SOURCE and _URL and _MD5 are always needed.
And now that I look closer, OPEN62541_MDNSD should be set as well. This and
_SUFFIX make it clearer that _SOURCE and URL are in sync.

Michael

-- 
Pengutronix e.K.   | |
Steuerwalder Str. 21   | http://www.pengutronix.de/  |
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 v5 3/3] open62541: new package

2020-02-17 Thread Roland Hieber
On Fri, Feb 14, 2020 at 01:50:23PM +0100, Michael Olbrich wrote:
> On Wed, Feb 05, 2020 at 11:42:41AM +0100, Ulrich Ölmann wrote:

[...]

> > diff --git a/rules/open62541.make b/rules/open62541.make
> > new file mode 100644
> > index ..62e030ed3752
> > --- /dev/null
> > +++ b/rules/open62541.make
> > @@ -0,0 +1,140 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2018 by Robert Schwebel 
> > +# Copyright (C) 2019 by Bjoern Esser 
> > +#
> > +# See CREDITS for details about who has contributed to this project.
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +#
> > +# We provide this package
> > +#
> > +PACKAGES-$(PTXCONF_OPEN62541) += open62541
> > +
> > +#
> > +# Paths and names
> > +#
> > +OPEN62541_VERSION  := 1.0
> > +OPEN62541_MD5  := b8e02d7310e8b48faf52efc539fa9496
> > +OPEN62541  := open62541-$(OPEN62541_VERSION)
> > +OPEN62541_SUFFIX   := tar.gz
> > +OPEN62541_URL  := 
> > https://github.com/open62541/open62541/archive/v$(OPEN62541_VERSION)/$(OPEN62541).$(OPEN62541_SUFFIX)
> > +OPEN62541_SOURCE   := $(SRCDIR)/$(OPEN62541).$(OPEN62541_SUFFIX)
> > +OPEN62541_DIR  := $(BUILDDIR)/$(OPEN62541)
> > +OPEN62541_LICENSE  := MPL-2.0
> > +OPEN62541_LICENSE_FILES:= 
> > file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad
> > +
> > +OPEN62541_MDNSD_VERSION:= 
> > 4bd993e0fdd06d54c8fd0b8f416cda6a8db18585
> > +OPEN62541_MDNSD_MD5:= 0961fc8dc253753ec8ea157104671498
> > +OPEN62541_MDNSD_URL:= 
> > https://github.com/Pro/mdnsd/archive/$(OPEN62541_MDNSD_VERSION)/open62541-mdnsd-$(OPEN62541_MDNSD_VERSION).tar.gz
> > +OPEN62541_MDNSD_SOURCE := 
> > $(SRCDIR)/open62541-mdnsd-$(OPEN62541_MDNSD_VERSION).tar.gz
> 
> The suffix deserves a separate variable.

I'm curious why, is it used by anything other than the URL?

 - Roland

-- 
Roland Hieber, Pengutronix e.K.  | r.hie...@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
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 v5 3/3] open62541: new package

2020-02-15 Thread Michael Olbrich
On Wed, Feb 05, 2020 at 11:42:41AM +0100, Ulrich Ölmann wrote:
> From: 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 
> [uol: adjusted commit message]
> Signed-off-by: Ulrich Ölmann 
> ---
> v2 --> v3: adjusted commit message
> 
>  ...-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 ..0dfd003518ed
> --- /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 

Re: [ptxdist] [PATCH v5 3/3] open62541: new package

2020-02-14 Thread Michael Olbrich
On Wed, Feb 05, 2020 at 11:42:41AM +0100, Ulrich Ölmann wrote:
> From: 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 
> [uol: adjusted commit message]
> Signed-off-by: Ulrich Ölmann 
> ---
> v2 --> v3: adjusted commit message
> 
>  ...-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 ..0dfd003518ed
> --- /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 

[ptxdist] [PATCH v5 3/3] open62541: new package

2020-02-05 Thread Ulrich Ölmann
From: 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 
[uol: adjusted commit message]
Signed-off-by: Ulrich Ölmann 
---
v2 --> v3: adjusted commit message

 ...-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 ..0dfd003518ed
--- /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