From 8ad1a9300a3f2d42a7c8a13e54ec4a11b9592d7d Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Fri, 11 Apr 2025 12:50:57 +0000 Subject: [PATCH] emulators/wine: Add Wayland support This backports commits cb6e55988b6fc6 and 29221231247728 from emulators/wine-devel, just sorts in additions a bit more logically. Wayland support is not on by default (yet). PR: 282825 --- emulators/wine/Makefile | 11 ++++++++--- emulators/wine/files/pkg-message.in | 8 ++++++++ emulators/wine/pkg-plist | 2 ++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/emulators/wine/Makefile b/emulators/wine/Makefile index 57d01c5c7851..8f32e166e982 100644 --- a/emulators/wine/Makefile +++ b/emulators/wine/Makefile @@ -52,8 +52,7 @@ CONFIGURE_ARGS+=--verbose \ --with-sdl \ --without-udev \ --without-unwind \ - --without-usb \ - --without-wayland + --without-usb CONFIGURE_ENV= CPPBIN="${CPP}" FLEX="${LOCALBASE}/bin/flex" WINELIBDIR= ${PREFIX}/lib .if !defined(USE_LDCONFIG32) @@ -71,7 +70,7 @@ PIE_UNSAFE= yes PORTDATA= wine.inf -OPTIONS_DEFINE= CUPS DOCS DOSBOX GNUTLS V4L WINEMAKER X11 GECKO MONO +OPTIONS_DEFINE= CUPS DOCS DOSBOX GNUTLS V4L WAYLAND WINEMAKER X11 GECKO MONO OPTIONS_DEFAULT=ALSA GNUTLS X11 OPTIONS_RADIO= AUDIO OPTIONS_RADIO_AUDIO= ALSA OSS @@ -81,6 +80,7 @@ DOSBOX_DESC= Use DOSBox to run MS-DOS programs WINEMAKER_DESC= Fully support winemaker (requires Perl) GECKO_DESC= Bundle Gecko MSI package for Wine MONO_DESC= Bundle Mono MSI package for Wine +WAYLAND_DESC= Wayland Support PORTSCOUT= limit:^9\.0 @@ -110,6 +110,11 @@ V4L_CONFIGURE_WITH= v4l2 V4L_BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l +WAYLAND_CONFIGURE_WITH= wayland +WAYLAND_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto +WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland \ + libxkbcommon.so:x11/libxkbcommon + WINEMAKER_RUN_DEPENDS= p5-XML-LibXML>0:textproc/p5-XML-LibXML X11_CONFIGURE_WITH= x fontconfig freetype opengl xinerama xinput2 xrandr xrender diff --git a/emulators/wine/files/pkg-message.in b/emulators/wine/files/pkg-message.in index bb865c0c874c..a9dc35157bec 100644 --- a/emulators/wine/files/pkg-message.in +++ b/emulators/wine/files/pkg-message.in @@ -11,6 +11,14 @@ is KVA_PAGES=500, which should still be enough for ZFS. The port also installs some of Wine's documentation which describes additional programs that are not in the manual pages under %%PREFIX%%/share/doc/wine + +To enable Wayland run the following two commands: +$ cat > wayland.reg <