git: 2cd8835b6b6d - main - x11/libxkbcommon: Fix build with non-default options setting

From: Hiroki Tagato <tagattie_at_FreeBSD.org>
Date: Wed, 24 Dec 2025 08:09:27 UTC
The branch main has been updated by tagattie:

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

commit 2cd8835b6b6d74e30a541eb0a9fce185f4a27636
Author:     Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2025-12-24 08:04:28 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2025-12-24 08:09:18 +0000

    x11/libxkbcommon: Fix build with non-default options setting
    
    Installation of xkbcli-dump-keymap and xkbcli-interactive should be
    conditionalized based on selected port options.
    
    PR:             291825
    Reported by:    Ivan Rozhuk <rozhuk.im@gmail.com>,
                    Michael Muenz <m.muenz@gmail.com>
    Tested by:      Ivan Rozhuk <rozhuk.im@gmail.com>
    Approved by:    portmgr (build fix blanket)
    Fixes:          90d358a2edc4 (x11/libxkbcommon: Update to 1.13.0)
---
 x11/libxkbcommon/Makefile  | 11 +++++++++++
 x11/libxkbcommon/pkg-plist |  2 --
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/x11/libxkbcommon/Makefile b/x11/libxkbcommon/Makefile
index a70bcbd43cd2..aef2b12b0e69 100644
--- a/x11/libxkbcommon/Makefile
+++ b/x11/libxkbcommon/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	libxkbcommon
 DISTVERSIONPREFIX=	xkbcommon-
 DISTVERSION=	1.13.0
+PORTREVISION=	1
 CATEGORIES=	x11
 
 MAINTAINER=	x11@FreeBSD.org
@@ -44,4 +45,14 @@ X11_USES=	xorg
 X11_USE=	XORG=xcb
 X11_MESON_TRUE=	enable-x11
 
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MEVDEV} || ${PORT_OPTIONS:MWAYLAND} || ${PORT_OPTIONS:MX11}
+PLIST_FILES+=	libexec/xkbcommon/xkbcli-interactive
+.endif
+
+.if ${PORT_OPTIONS:MWAYLAND} || ${PORT_OPTIONS:MX11}
+PLIST_FILES+=	libexec/xkbcommon/xkbcli-dump-keymap
+.endif
+
 .include <bsd.port.mk>
diff --git a/x11/libxkbcommon/pkg-plist b/x11/libxkbcommon/pkg-plist
index 75539c13c78f..8c8cd1cf33f2 100644
--- a/x11/libxkbcommon/pkg-plist
+++ b/x11/libxkbcommon/pkg-plist
@@ -20,11 +20,9 @@ libdata/pkgconfig/xkbcommon.pc
 libdata/pkgconfig/xkbregistry.pc
 libexec/xkbcommon/xkbcli-compile-compose
 libexec/xkbcommon/xkbcli-compile-keymap
-libexec/xkbcommon/xkbcli-dump-keymap
 %%WAYLAND%%libexec/xkbcommon/xkbcli-dump-keymap-wayland
 %%X11%%libexec/xkbcommon/xkbcli-dump-keymap-x11
 libexec/xkbcommon/xkbcli-how-to-type
-libexec/xkbcommon/xkbcli-interactive
 %%EVDEV%%libexec/xkbcommon/xkbcli-interactive-evdev
 %%WAYLAND%%libexec/xkbcommon/xkbcli-interactive-wayland
 %%X11%%libexec/xkbcommon/xkbcli-interactive-x11