Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jan 2024 11:06:32 GMT
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 94a4803c442c - main - x11-toolkits/libdecor: convert cairo plugin to port option
Message-ID:  <202401291106.40TB6WkC049953@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jbeich:

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

commit 94a4803c442c16aa3a53ad2c03624dd19c62fbed
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-01-29 09:50:10 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-01-29 10:59:43 +0000

    x11-toolkits/libdecor: convert cairo plugin to port option
    
    libdecor is under MIT but Cairo, Pango, DBus are under GPL variants.
    GPL may not be permitted with LICENSES_REJECTED, so let users opt out
    when libdecor support cannot be disabled in consumers.
---
 x11-toolkits/libdecor/Makefile  | 26 ++++++++++++++++++--------
 x11-toolkits/libdecor/pkg-plist |  2 +-
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/x11-toolkits/libdecor/Makefile b/x11-toolkits/libdecor/Makefile
index aec021e758fb..b9e865b8e4bf 100644
--- a/x11-toolkits/libdecor/Makefile
+++ b/x11-toolkits/libdecor/Makefile
@@ -9,25 +9,35 @@ WWW=		https://gitlab.freedesktop.org/libdecor/libdecor
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	evdev-proto>0:devel/evdev-proto \
-		wayland-protocols>=1.15:graphics/wayland-protocols
+BUILD_DEPENDS=	wayland-protocols>=1.15:graphics/wayland-protocols
 LIB_DEPENDS=	libwayland-client.so:graphics/wayland
 
-USES=		gnome meson pkgconfig
+USES=		meson pkgconfig
 USE_GITLAB=	yes
-USE_GNOME=	cairo pango
 USE_LDCONFIG=	yes
 GL_SITE=	https://gitlab.freedesktop.org
 MESON_ARGS=	-Ddemo=false
 
-OPTIONS_DEFINE=	DBUS GTK3
-OPTIONS_DEFAULT=DBUS GTK3
+OPTIONS_DEFINE=	CAIRO DBUS GTK3
+OPTIONS_DEFAULT=CAIRO DBUS GTK3
 OPTIONS_SUB=	yes
 
-DBUS_LIB_DEPENDS=	libdbus-1.so:devel/dbus
+CAIRO_BUILD_DEPENDS=	evdev-proto>0:devel/evdev-proto
+CAIRO_USES=		gnome
+CAIRO_USE=		GNOME=cairo,pango
+
+# Unused by the main library
+DBUS_LIB_DEPENDS=	${"${PORT_OPTIONS:NDBUS}":?libdbus-1.so\:devel/dbus:}
 DBUS_MESON_ENABLED=	dbus
 
-GTK3_USE=		GNOME=gtk30
+GTK3_BUILD_DEPENDS=	evdev-proto>0:devel/evdev-proto
+GTK3_USES=		gnome
+GTK3_USE=		GNOME=cairo,gtk30
 GTK3_MESON_ENABLED=	gtk
 
+post-patch-CAIRO-off:
+	@${REINPLACE_CMD} '/cairo/d' ${WRKSRC}/src/plugins/meson.build
+	@${REINPLACE_CMD} "s/'cairo'/&, required: false, disabler: true/" \
+		${WRKSRC}/src/plugins/common/meson.build
+
 .include <bsd.port.mk>
diff --git a/x11-toolkits/libdecor/pkg-plist b/x11-toolkits/libdecor/pkg-plist
index b8d3ea54c4b1..fb2f6f8ec583 100644
--- a/x11-toolkits/libdecor/pkg-plist
+++ b/x11-toolkits/libdecor/pkg-plist
@@ -2,6 +2,6 @@ include/libdecor-0/libdecor.h
 lib/libdecor-0.so
 lib/libdecor-0.so.0
 lib/libdecor-0.so.0.200.2
-lib/libdecor/plugins-1/libdecor-cairo.so
+%%CAIRO%%lib/libdecor/plugins-1/libdecor-cairo.so
 %%GTK3%%lib/libdecor/plugins-1/libdecor-gtk.so
 libdata/pkgconfig/libdecor-0.pc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401291106.40TB6WkC049953>