diff mbox series

[2/2] neatvnc: add new recipe

Message ID 20230823162404.457379-2-leon.anavi@konsulko.com
State New
Headers show
Series [1/2] aml: add new recipe | expand

Commit Message

Leon Anavi Aug. 23, 2023, 4:24 p.m. UTC
Add a new recipe for neatvnc v0.6.0, a liberally licensed VNC
server library with a clean interface. It is required for building
Weston with VNC backend.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
---
 meta/conf/distro/include/maintainers.inc     |  1 +
 meta/recipes-graphics/neatvnc/neatvnc_git.bb | 40 ++++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 meta/recipes-graphics/neatvnc/neatvnc_git.bb

Comments

Alexander Kanavin Aug. 23, 2023, 4:46 p.m. UTC | #1
Both this, and aml recipe should go to meta-oe, unless there is a use
case for having them in oe-core.

Alex

On Wed, 23 Aug 2023 at 18:24, Leon Anavi <leon.anavi@konsulko.com> wrote:
>
> Add a new recipe for neatvnc v0.6.0, a liberally licensed VNC
> server library with a clean interface. It is required for building
> Weston with VNC backend.
>
> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
> ---
>  meta/conf/distro/include/maintainers.inc     |  1 +
>  meta/recipes-graphics/neatvnc/neatvnc_git.bb | 40 ++++++++++++++++++++
>  2 files changed, 41 insertions(+)
>  create mode 100644 meta/recipes-graphics/neatvnc/neatvnc_git.bb
>
> diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
> index 11b47ffe84..f659e24a66 100644
> --- a/meta/conf/distro/include/maintainers.inc
> +++ b/meta/conf/distro/include/maintainers.inc
> @@ -895,3 +895,4 @@ RECIPE_MAINTAINER:pn-zip = "Denys Dmytriyenko <denis@denix.org>"
>  RECIPE_MAINTAINER:pn-zlib = "Denys Dmytriyenko <denis@denix.org>"
>  RECIPE_MAINTAINER:pn-zstd = "Alexander Kanavin <alex.kanavin@gmail.com>"
>  RECIPE_MAINTAINER:pn-aml = "Leon Anavi <leon.anavi@konsulko.com>"
> +RECIPE_MAINTAINER:pn-neatvnc = "Leon Anavi <leon.anavi@konsulko.com>"
> diff --git a/meta/recipes-graphics/neatvnc/neatvnc_git.bb b/meta/recipes-graphics/neatvnc/neatvnc_git.bb
> new file mode 100644
> index 0000000000..dc4678f082
> --- /dev/null
> +++ b/meta/recipes-graphics/neatvnc/neatvnc_git.bb
> @@ -0,0 +1,40 @@
> +SUMMARY = "A liberally licensed VNC server library"
> +DESCRIPTION = "This is a liberally licensed VNC server library that's intended to be fast and neat."
> +HOMEPAGE = "https://github.com/any1/neatvnc"
> +LICENSE = "ISC"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=94fc374e7174f41e3afe0f027ee59ff7"
> +
> +SRC_URI = "git://github.com/any1/neatvnc;branch=master;protocol=https"
> +
> +SRCREV = "8b3dc1ae6099dcfa73aec3ae11df2fdc58540d14"
> +
> +PV = "0.6.0+git${SRCPV}"
> +
> +S = "${WORKDIR}/git"
> +
> +DEPENDS = "libdrm pixman aml zlib"
> +
> +PACKAGECONFIG ??= "tls"
> +PACKAGECONFIG[tls] = "-Dtls=enabled,-Dtls=disabled,gnutls"
> +PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,libjpeg-turbo"
> +PACKAGECONFIG[examples] = "-Dexamples=true,-Dexamples=false,libpng"
> +PACKAGECONFIG[benchmarks] = "-Dbenchmarks=true,-Dbenchmarks=false,libpng"
> +
> +PACKAGE_BEFORE_PN += "${PN}-examples"
> +ALLOW_EMPTY:${PN}-examples = "1"
> +FILES:${PN}-examples = "${bindir}"
> +
> +NEATVNC_EXAMPLES = "draw png-server"
> +
> +inherit meson pkgconfig
> +
> +do_install:append () {
> +       if ${@bb.utils.contains('PACKAGECONFIG', 'examples', 'true', 'false', d)}; then
> +               install -d ${D}${bindir}
> +               for bin in ${NEATVNC_EXAMPLES}; do
> +                       install -m 0755 ${B}/examples/$bin ${D}${bindir}
> +               done
> +       fi
> +}
> +
> +BBCLASSEXTEND = "native"
> --
> 2.39.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#186621): https://lists.openembedded.org/g/openembedded-core/message/186621
> Mute This Topic: https://lists.openembedded.org/mt/100918320/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Khem Raj Aug. 23, 2023, 4:48 p.m. UTC | #2
On 8/23/23 9:24 AM, Leon Anavi wrote:
> Add a new recipe for neatvnc v0.6.0, a liberally licensed VNC
> server library with a clean interface. It is required for building
> Weston with VNC backend.
> 
> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
> ---
>   meta/conf/distro/include/maintainers.inc     |  1 +
>   meta/recipes-graphics/neatvnc/neatvnc_git.bb | 40 ++++++++++++++++++++
>   2 files changed, 41 insertions(+)
>   create mode 100644 meta/recipes-graphics/neatvnc/neatvnc_git.bb
> 
> diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
> index 11b47ffe84..f659e24a66 100644
> --- a/meta/conf/distro/include/maintainers.inc
> +++ b/meta/conf/distro/include/maintainers.inc
> @@ -895,3 +895,4 @@ RECIPE_MAINTAINER:pn-zip = "Denys Dmytriyenko <denis@denix.org>"
>   RECIPE_MAINTAINER:pn-zlib = "Denys Dmytriyenko <denis@denix.org>"
>   RECIPE_MAINTAINER:pn-zstd = "Alexander Kanavin <alex.kanavin@gmail.com>"
>   RECIPE_MAINTAINER:pn-aml = "Leon Anavi <leon.anavi@konsulko.com>"
> +RECIPE_MAINTAINER:pn-neatvnc = "Leon Anavi <leon.anavi@konsulko.com>"
> diff --git a/meta/recipes-graphics/neatvnc/neatvnc_git.bb b/meta/recipes-graphics/neatvnc/neatvnc_git.bb
> new file mode 100644
> index 0000000000..dc4678f082
> --- /dev/null
> +++ b/meta/recipes-graphics/neatvnc/neatvnc_git.bb
> @@ -0,0 +1,40 @@
> +SUMMARY = "A liberally licensed VNC server library"
> +DESCRIPTION = "This is a liberally licensed VNC server library that's intended to be fast and neat."
> +HOMEPAGE = "https://github.com/any1/neatvnc"
> +LICENSE = "ISC"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=94fc374e7174f41e3afe0f027ee59ff7"
> +
> +SRC_URI = "git://github.com/any1/neatvnc;branch=master;protocol=https"
> +
> +SRCREV = "8b3dc1ae6099dcfa73aec3ae11df2fdc58540d14"
> +
> +PV = "0.6.0+git${SRCPV}"
> +
> +S = "${WORKDIR}/git"
> +
> +DEPENDS = "libdrm pixman aml zlib"
> +
> +PACKAGECONFIG ??= "tls"

Can you check if it can support tls without gnutls/nettle ?
if not then can we keep the default to not enable it.

> +PACKAGECONFIG[tls] = "-Dtls=enabled,-Dtls=disabled,gnutls"
> +PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,libjpeg-turbo"
> +PACKAGECONFIG[examples] = "-Dexamples=true,-Dexamples=false,libpng"
> +PACKAGECONFIG[benchmarks] = "-Dbenchmarks=true,-Dbenchmarks=false,libpng"
> +
> +PACKAGE_BEFORE_PN += "${PN}-examples"
> +ALLOW_EMPTY:${PN}-examples = "1"
> +FILES:${PN}-examples = "${bindir}"
> +
> +NEATVNC_EXAMPLES = "draw png-server"
> +
> +inherit meson pkgconfig
> +
> +do_install:append () {
> +	if ${@bb.utils.contains('PACKAGECONFIG', 'examples', 'true', 'false', d)}; then
> +		install -d ${D}${bindir}
> +		for bin in ${NEATVNC_EXAMPLES}; do
> +			install -m 0755 ${B}/examples/$bin ${D}${bindir}
> +		done
> +	fi
> +}
> +
> +BBCLASSEXTEND = "native"
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#186621): https://lists.openembedded.org/g/openembedded-core/message/186621
> Mute This Topic: https://lists.openembedded.org/mt/100918320/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Leon Anavi Aug. 24, 2023, 8:38 a.m. UTC | #3
Hi Alex,

On 23.08.23 г. 19:46 ч., Alexander Kanavin wrote:
> Both this, and aml recipe should go to meta-oe, unless there is a use
> case for having them in oe-core.
Without these 2 recipes Weston 12 fails to build if PACKAGECONFIG 
includes vnc:

Missing or unbuildable dependency chain was: ['weston', 'neatvnc']

In this case neatvnc and aml are dependencies of weston and in my 
opinion they should be in the same layer. However, if you insist I can 
submit the patches to meta-oe.

Best regards,
Leon
>
> Alex
>
> On Wed, 23 Aug 2023 at 18:24, Leon Anavi <leon.anavi@konsulko.com> wrote:
>> Add a new recipe for neatvnc v0.6.0, a liberally licensed VNC
>> server library with a clean interface. It is required for building
>> Weston with VNC backend.
>>
>> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
>> ---
>>   meta/conf/distro/include/maintainers.inc     |  1 +
>>   meta/recipes-graphics/neatvnc/neatvnc_git.bb | 40 ++++++++++++++++++++
>>   2 files changed, 41 insertions(+)
>>   create mode 100644 meta/recipes-graphics/neatvnc/neatvnc_git.bb
>>
>> diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
>> index 11b47ffe84..f659e24a66 100644
>> --- a/meta/conf/distro/include/maintainers.inc
>> +++ b/meta/conf/distro/include/maintainers.inc
>> @@ -895,3 +895,4 @@ RECIPE_MAINTAINER:pn-zip = "Denys Dmytriyenko <denis@denix.org>"
>>   RECIPE_MAINTAINER:pn-zlib = "Denys Dmytriyenko <denis@denix.org>"
>>   RECIPE_MAINTAINER:pn-zstd = "Alexander Kanavin <alex.kanavin@gmail.com>"
>>   RECIPE_MAINTAINER:pn-aml = "Leon Anavi <leon.anavi@konsulko.com>"
>> +RECIPE_MAINTAINER:pn-neatvnc = "Leon Anavi <leon.anavi@konsulko.com>"
>> diff --git a/meta/recipes-graphics/neatvnc/neatvnc_git.bb b/meta/recipes-graphics/neatvnc/neatvnc_git.bb
>> new file mode 100644
>> index 0000000000..dc4678f082
>> --- /dev/null
>> +++ b/meta/recipes-graphics/neatvnc/neatvnc_git.bb
>> @@ -0,0 +1,40 @@
>> +SUMMARY = "A liberally licensed VNC server library"
>> +DESCRIPTION = "This is a liberally licensed VNC server library that's intended to be fast and neat."
>> +HOMEPAGE = "https://github.com/any1/neatvnc"
>> +LICENSE = "ISC"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=94fc374e7174f41e3afe0f027ee59ff7"
>> +
>> +SRC_URI = "git://github.com/any1/neatvnc;branch=master;protocol=https"
>> +
>> +SRCREV = "8b3dc1ae6099dcfa73aec3ae11df2fdc58540d14"
>> +
>> +PV = "0.6.0+git${SRCPV}"
>> +
>> +S = "${WORKDIR}/git"
>> +
>> +DEPENDS = "libdrm pixman aml zlib"
>> +
>> +PACKAGECONFIG ??= "tls"
>> +PACKAGECONFIG[tls] = "-Dtls=enabled,-Dtls=disabled,gnutls"
>> +PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,libjpeg-turbo"
>> +PACKAGECONFIG[examples] = "-Dexamples=true,-Dexamples=false,libpng"
>> +PACKAGECONFIG[benchmarks] = "-Dbenchmarks=true,-Dbenchmarks=false,libpng"
>> +
>> +PACKAGE_BEFORE_PN += "${PN}-examples"
>> +ALLOW_EMPTY:${PN}-examples = "1"
>> +FILES:${PN}-examples = "${bindir}"
>> +
>> +NEATVNC_EXAMPLES = "draw png-server"
>> +
>> +inherit meson pkgconfig
>> +
>> +do_install:append () {
>> +       if ${@bb.utils.contains('PACKAGECONFIG', 'examples', 'true', 'false', d)}; then
>> +               install -d ${D}${bindir}
>> +               for bin in ${NEATVNC_EXAMPLES}; do
>> +                       install -m 0755 ${B}/examples/$bin ${D}${bindir}
>> +               done
>> +       fi
>> +}
>> +
>> +BBCLASSEXTEND = "native"
>> --
>> 2.39.2
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#186621): https://lists.openembedded.org/g/openembedded-core/message/186621
>> Mute This Topic: https://lists.openembedded.org/mt/100918320/1686489
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Alexander Kanavin Aug. 24, 2023, 8:45 a.m. UTC | #4
On Thu, 24 Aug 2023 at 10:38, Leon Anavi <leon.anavi@konsulko.com> wrote:
> Without these 2 recipes Weston 12 fails to build if PACKAGECONFIG
> includes vnc:
>
> Missing or unbuildable dependency chain was: ['weston', 'neatvnc']
>
> In this case neatvnc and aml are dependencies of weston and in my
> opinion they should be in the same layer. However, if you insist I can
> submit the patches to meta-oe.

The criteria for oe-core are:
a) core feature needed for a typical embedded system
b) hard dependency of something in a)

Optional features go to meta-oe typically. Otherwise, oe-core would
just grow uncontrollably.

Alex
Leon Anavi Aug. 24, 2023, 8:46 a.m. UTC | #5
Hi Khem,

On 23.08.23 г. 19:48 ч., Khem Raj wrote:
> On 8/23/23 9:24 AM, Leon Anavi wrote:
>> Add a new recipe for neatvnc v0.6.0, a liberally licensed VNC
>> server library with a clean interface. It is required for building
>> Weston with VNC backend.
>>
>> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
>> ---
>>   meta/conf/distro/include/maintainers.inc     |  1 +
>>   meta/recipes-graphics/neatvnc/neatvnc_git.bb | 40 ++++++++++++++++++++
>>   2 files changed, 41 insertions(+)
>>   create mode 100644 meta/recipes-graphics/neatvnc/neatvnc_git.bb
>>
>> diff --git a/meta/conf/distro/include/maintainers.inc 
>> b/meta/conf/distro/include/maintainers.inc
>> index 11b47ffe84..f659e24a66 100644
>> --- a/meta/conf/distro/include/maintainers.inc
>> +++ b/meta/conf/distro/include/maintainers.inc
>> @@ -895,3 +895,4 @@ RECIPE_MAINTAINER:pn-zip = "Denys Dmytriyenko 
>> <denis@denix.org>"
>>   RECIPE_MAINTAINER:pn-zlib = "Denys Dmytriyenko <denis@denix.org>"
>>   RECIPE_MAINTAINER:pn-zstd = "Alexander Kanavin 
>> <alex.kanavin@gmail.com>"
>>   RECIPE_MAINTAINER:pn-aml = "Leon Anavi <leon.anavi@konsulko.com>"
>> +RECIPE_MAINTAINER:pn-neatvnc = "Leon Anavi <leon.anavi@konsulko.com>"
>> diff --git a/meta/recipes-graphics/neatvnc/neatvnc_git.bb 
>> b/meta/recipes-graphics/neatvnc/neatvnc_git.bb
>> new file mode 100644
>> index 0000000000..dc4678f082
>> --- /dev/null
>> +++ b/meta/recipes-graphics/neatvnc/neatvnc_git.bb
>> @@ -0,0 +1,40 @@
>> +SUMMARY = "A liberally licensed VNC server library"
>> +DESCRIPTION = "This is a liberally licensed VNC server library 
>> that's intended to be fast and neat."
>> +HOMEPAGE = "https://github.com/any1/neatvnc"
>> +LICENSE = "ISC"
>> +LIC_FILES_CHKSUM = 
>> "file://COPYING;md5=94fc374e7174f41e3afe0f027ee59ff7"
>> +
>> +SRC_URI = "git://github.com/any1/neatvnc;branch=master;protocol=https"
>> +
>> +SRCREV = "8b3dc1ae6099dcfa73aec3ae11df2fdc58540d14"
>> +
>> +PV = "0.6.0+git${SRCPV}"
>> +
>> +S = "${WORKDIR}/git"
>> +
>> +DEPENDS = "libdrm pixman aml zlib"
>> +
>> +PACKAGECONFIG ??= "tls"
>
> Can you check if it can support tls without gnutls/nettle ?
> if not then can we keep the default to not enable it.

Sorry, do_configure of neatvnc fails if tls is in PACKAGECONFIG without 
gnutls:

ERROR: Dependency "gnutls" not found, tried pkgconfig

In order to get VNC backend in Weston 12 working we need tls enabled in 
neatvnc. Because of this I added tls by default in PACKAGECONFIG of 
neatvnc. Should I remove it regarding these circumstances?

Best regards,
Leon

>
>> +PACKAGECONFIG[tls] = "-Dtls=enabled,-Dtls=disabled,gnutls"
>> +PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,libjpeg-turbo"
>> +PACKAGECONFIG[examples] = "-Dexamples=true,-Dexamples=false,libpng"
>> +PACKAGECONFIG[benchmarks] = 
>> "-Dbenchmarks=true,-Dbenchmarks=false,libpng"
>> +
>> +PACKAGE_BEFORE_PN += "${PN}-examples"
>> +ALLOW_EMPTY:${PN}-examples = "1"
>> +FILES:${PN}-examples = "${bindir}"
>> +
>> +NEATVNC_EXAMPLES = "draw png-server"
>> +
>> +inherit meson pkgconfig
>> +
>> +do_install:append () {
>> +    if ${@bb.utils.contains('PACKAGECONFIG', 'examples', 'true', 
>> 'false', d)}; then
>> +        install -d ${D}${bindir}
>> +        for bin in ${NEATVNC_EXAMPLES}; do
>> +            install -m 0755 ${B}/examples/$bin ${D}${bindir}
>> +        done
>> +    fi
>> +}
>> +
>> +BBCLASSEXTEND = "native"
>>
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#186621): 
>> https://lists.openembedded.org/g/openembedded-core/message/186621
>> Mute This Topic: https://lists.openembedded.org/mt/100918320/1997914
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
>> [raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Leon Anavi Aug. 24, 2023, 8:53 a.m. UTC | #6
On 24.08.23 г. 11:45 ч., Alexander Kanavin wrote:
> On Thu, 24 Aug 2023 at 10:38, Leon Anavi <leon.anavi@konsulko.com> wrote:
>> Without these 2 recipes Weston 12 fails to build if PACKAGECONFIG
>> includes vnc:
>>
>> Missing or unbuildable dependency chain was: ['weston', 'neatvnc']
>>
>> In this case neatvnc and aml are dependencies of weston and in my
>> opinion they should be in the same layer. However, if you insist I can
>> submit the patches to meta-oe.
> The criteria for oe-core are:
> a) core feature needed for a typical embedded system
> b) hard dependency of something in a)
>
> Optional features go to meta-oe typically. Otherwise, oe-core would
> just grow uncontrollably.
OK, I will wait for Khem's reply about tls in neatvnc and resubmit the 
patches to meta-oe.

Best regards, Leon

>
> Alex
diff mbox series

Patch

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 11b47ffe84..f659e24a66 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -895,3 +895,4 @@  RECIPE_MAINTAINER:pn-zip = "Denys Dmytriyenko <denis@denix.org>"
 RECIPE_MAINTAINER:pn-zlib = "Denys Dmytriyenko <denis@denix.org>"
 RECIPE_MAINTAINER:pn-zstd = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER:pn-aml = "Leon Anavi <leon.anavi@konsulko.com>"
+RECIPE_MAINTAINER:pn-neatvnc = "Leon Anavi <leon.anavi@konsulko.com>"
diff --git a/meta/recipes-graphics/neatvnc/neatvnc_git.bb b/meta/recipes-graphics/neatvnc/neatvnc_git.bb
new file mode 100644
index 0000000000..dc4678f082
--- /dev/null
+++ b/meta/recipes-graphics/neatvnc/neatvnc_git.bb
@@ -0,0 +1,40 @@ 
+SUMMARY = "A liberally licensed VNC server library"
+DESCRIPTION = "This is a liberally licensed VNC server library that's intended to be fast and neat."
+HOMEPAGE = "https://github.com/any1/neatvnc"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94fc374e7174f41e3afe0f027ee59ff7"
+
+SRC_URI = "git://github.com/any1/neatvnc;branch=master;protocol=https"
+
+SRCREV = "8b3dc1ae6099dcfa73aec3ae11df2fdc58540d14"
+
+PV = "0.6.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "libdrm pixman aml zlib"
+
+PACKAGECONFIG ??= "tls"
+PACKAGECONFIG[tls] = "-Dtls=enabled,-Dtls=disabled,gnutls"
+PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,libjpeg-turbo"
+PACKAGECONFIG[examples] = "-Dexamples=true,-Dexamples=false,libpng"
+PACKAGECONFIG[benchmarks] = "-Dbenchmarks=true,-Dbenchmarks=false,libpng"
+
+PACKAGE_BEFORE_PN += "${PN}-examples"
+ALLOW_EMPTY:${PN}-examples = "1"
+FILES:${PN}-examples = "${bindir}"
+
+NEATVNC_EXAMPLES = "draw png-server"
+
+inherit meson pkgconfig
+
+do_install:append () {
+	if ${@bb.utils.contains('PACKAGECONFIG', 'examples', 'true', 'false', d)}; then
+		install -d ${D}${bindir}
+		for bin in ${NEATVNC_EXAMPLES}; do
+			install -m 0755 ${B}/examples/$bin ${D}${bindir}
+		done
+	fi
+}
+
+BBCLASSEXTEND = "native"