git: ff448828ec8b - main - accessibility/at-spi2-core: make X11 optional

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 03 Jun 2023 14:58:33 UTC
The branch main has been updated by jbeich:

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

commit ff448828ec8b5c05319802194860ba8c3aa613b6
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-06-03 14:28:42 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-06-03 14:56:34 +0000

    accessibility/at-spi2-core: make X11 optional
    
    Already supported by gtk3 and gtk4 which started to directly depend on
    at-spi2-core since fa81a4f5f8ed.
---
 accessibility/at-spi2-core/Makefile  | 11 ++++++++---
 accessibility/at-spi2-core/pkg-plist |  4 ++--
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/accessibility/at-spi2-core/Makefile b/accessibility/at-spi2-core/Makefile
index 6cab5ba9dbf8..7bd4330b472e 100644
--- a/accessibility/at-spi2-core/Makefile
+++ b/accessibility/at-spi2-core/Makefile
@@ -14,17 +14,22 @@ LIB_DEPENDS=	libxkbcommon.so:x11/libxkbcommon
 
 PORTSCOUT=	limitw:1,even
 
-USES=		gettext gnome localbase meson pkgconfig tar:xz xorg
+USES=		gettext gnome localbase meson pkgconfig tar:xz
 USE_GNOME=	glib20 introspection:build
-USE_XORG=	ice sm x11 xi xtst xext
 USE_LDCONFIG=	yes
 
-OPTIONS_DEFINE=	ATKONLY
+OPTIONS_DEFINE=	ATKONLY X11
+OPTIONS_DEFAULT=X11
 OPTIONS_SUB=	yes
+
 ATKONLY_DESC=	Build only ATK (no atspi or at-spi2-atk, unsupported by upstream)
 ATKONLY_LIB_DEPENDS_OFF=	libdbus-1.so:devel/dbus
 ATKONLY_MESON_TRUE= atk_only
 
+X11_USES=		xorg
+X11_USE=		XORG=ice,sm,x11,xext,xi,xtst
+X11_MESON_ENABLED=	x11
+
 post-install:
 	${RM} -r ${STAGEDIR}${PREFIX}/lib/systemd
 
diff --git a/accessibility/at-spi2-core/pkg-plist b/accessibility/at-spi2-core/pkg-plist
index 6eecc4916bb7..e2c9f82c1b55 100644
--- a/accessibility/at-spi2-core/pkg-plist
+++ b/accessibility/at-spi2-core/pkg-plist
@@ -1,4 +1,4 @@
-%%NO_ATKONLY%%etc/xdg/Xwayland-session.d/00-at-spi
+%%NO_ATKONLY%%%%X11%%etc/xdg/Xwayland-session.d/00-at-spi
 %%NO_ATKONLY%%etc/xdg/autostart/at-spi-dbus-bus.desktop
 %%NO_ATKONLY%%include/at-spi-2.0/atspi/atspi-accessible.h
 %%NO_ATKONLY%%include/at-spi-2.0/atspi/atspi-action.h
@@ -8,7 +8,7 @@
 %%NO_ATKONLY%%include/at-spi-2.0/atspi/atspi-constants.h
 %%NO_ATKONLY%%include/at-spi-2.0/atspi/atspi-device-legacy.h
 %%NO_ATKONLY%%include/at-spi-2.0/atspi/atspi-device-listener.h
-%%NO_ATKONLY%%include/at-spi-2.0/atspi/atspi-device-x11.h
+%%NO_ATKONLY%%%%X11%%include/at-spi-2.0/atspi/atspi-device-x11.h
 %%NO_ATKONLY%%include/at-spi-2.0/atspi/atspi-device.h
 %%NO_ATKONLY%%include/at-spi-2.0/atspi/atspi-document.h
 %%NO_ATKONLY%%include/at-spi-2.0/atspi/atspi-editabletext.h