git: bc458f82047a - main - x11-toolkits/libdecor: install demo programs

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Tue, 30 Jan 2024 13:32:22 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bc458f82047a045e24ec2a75af5fe65804436ac6

commit bc458f82047a045e24ec2a75af5fe65804436ac6
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-01-30 13:16:52 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-01-30 13:31:56 +0000

    x11-toolkits/libdecor: install demo programs
---
 x11-toolkits/libdecor/Makefile           | 15 ++++++++++++---
 x11-toolkits/libdecor/pkg-descr.examples |  5 +++++
 x11-toolkits/libdecor/pkg-plist          |  3 +++
 3 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/x11-toolkits/libdecor/Makefile b/x11-toolkits/libdecor/Makefile
index 4bad8153f93d..68a2bbfd3320 100644
--- a/x11-toolkits/libdecor/Makefile
+++ b/x11-toolkits/libdecor/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	libdecor
 DISTVERSION=	0.2.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	x11-toolkits
 
 MAINTAINER=	jbeich@FreeBSD.org
@@ -17,9 +17,8 @@ USES=		meson pkgconfig
 USE_GITLAB=	yes
 USE_LDCONFIG=	yes
 GL_SITE=	https://gitlab.freedesktop.org
-MESON_ARGS=	-Ddemo=false
 
-OPTIONS_DEFINE=	CAIRO DBUS GTK3
+OPTIONS_DEFINE=	EXAMPLES CAIRO DBUS GTK3
 OPTIONS_DEFAULT=CAIRO DBUS GTK3
 OPTIONS_SUB=	yes
 
@@ -34,9 +33,19 @@ SELF_DEPENDS.cairo=	main
 
 # Unused by the main library
 LIB_DEPENDS.cairo+=	${"${PORT_OPTIONS:MDBUS}":?libdbus-1.so\:devel/dbus:}
+LIB_DEPENDS.examples+=	${"${PORT_OPTIONS:MDBUS}":?libdbus-1.so\:devel/dbus:}
 LIB_DEPENDS.gtk3+=	${"${PORT_OPTIONS:MDBUS}":?libdbus-1.so\:devel/dbus:}
 DBUS_MESON_ENABLED=	dbus
 
+EXAMPLES_SUBPACKAGES=	examples
+EXAMPLES_MESON_TRUE=	demo install_demo
+EXAMPLES_BUILD_DEPENDS=	evdev-proto>0:devel/evdev-proto
+LIB_DEPENDS.examples+=	libxkbcommon.so:x11/libxkbcommon
+#USES.examples=		gl
+#USE_GL.examples=	egl opengl
+LIB_DEPENDS.examples+=	libEGL.so:graphics/libglvnd
+SELF_DEPENDS.examples=	main
+
 GTK3_SUBPACKAGES=	gtk3
 GTK3_BUILD_DEPENDS=	evdev-proto>0:devel/evdev-proto
 #USES.gtk3=		gnome
diff --git a/x11-toolkits/libdecor/pkg-descr.examples b/x11-toolkits/libdecor/pkg-descr.examples
new file mode 100644
index 000000000000..05d84930c209
--- /dev/null
+++ b/x11-toolkits/libdecor/pkg-descr.examples
@@ -0,0 +1,5 @@
+libdecor is a library that can help Wayland clients draw window
+decorations for them. It aims to provide multiple backends that
+implements the decoration drawing.
+
+This package provides libdecor demo programs.
diff --git a/x11-toolkits/libdecor/pkg-plist b/x11-toolkits/libdecor/pkg-plist
index 4851ff6605b2..13954b500574 100644
--- a/x11-toolkits/libdecor/pkg-plist
+++ b/x11-toolkits/libdecor/pkg-plist
@@ -1,3 +1,6 @@
+%%EXAMPLES%%@@examples@@bin/libdecor-c++-demo
+%%EXAMPLES%%@@examples@@bin/libdecor-demo
+%%EXAMPLES%%@@examples@@bin/libdecor-egl
 include/libdecor-0/libdecor.h
 lib/libdecor-0.so
 lib/libdecor-0.so.0