diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2024-01-29 09:50:10 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2024-01-29 10:59:43 +0000 |
commit | 94a4803c442c16aa3a53ad2c03624dd19c62fbed (patch) | |
tree | f4f815182fe83704731eecec2a02b2fc01cc7ce1 | |
parent | 367a49562bc9dcda92e4e49fa1fcd2ba1277cf8c (diff) | |
download | ports-94a4803c442c16aa3a53ad2c03624dd19c62fbed.tar.gz ports-94a4803c442c16aa3a53ad2c03624dd19c62fbed.zip |
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.
-rw-r--r-- | x11-toolkits/libdecor/Makefile | 26 | ||||
-rw-r--r-- | 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 |