Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jan 2025 12:04:23 GMT
From:      Gerald Pfeifer <gerald@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 2acb6e55988b - main - emulators/wine-devel: Enable Wayland support
Message-ID:  <202501121204.50CC4Nvd008315@gitrepo.freebsd.org>

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

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

commit 2acb6e55988b6fc62015ce70132c885dc2d620a2
Author:     tatarataratatan@gmail.com <tatarataratatan@gmail.com>
AuthorDate: 2025-01-12 11:54:40 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2025-01-12 12:03:48 +0000

    emulators/wine-devel: Enable Wayland support
    
    This is not on by default (yet).
    
    PR:             282825
    Reviewed by:    Thibault Payet <monwarez@mailoo.org>
---
 emulators/wine-devel/Makefile             | 19 ++++++++++++++++---
 emulators/wine-devel/files/pkg-message.in |  8 ++++++++
 emulators/wine-devel/pkg-plist            |  2 ++
 3 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/emulators/wine-devel/Makefile b/emulators/wine-devel/Makefile
index 5cf273979ec8..93e9ec36d6e9 100644
--- a/emulators/wine-devel/Makefile
+++ b/emulators/wine-devel/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	wine
 DISTVERSION=	10.0-rc4
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	emulators
 MASTER_SITES=	https://dl.winehq.org/wine/source/10.0/
@@ -53,8 +54,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)
@@ -72,7 +72,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 WINEMAKER X11 GECKO MONO WAYLAND
 OPTIONS_DEFAULT=ALSA GNUTLS X11
 OPTIONS_RADIO=	AUDIO
 OPTIONS_RADIO_AUDIO=	ALSA OSS
@@ -82,6 +82,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
 
 ALSA_CONFIGURE_WITH=	alsa
 ALSA_USES=		gnome gstreamer
@@ -101,6 +102,10 @@ GNUTLS_LIB_DEPENDS=	libgnutls.so:security/gnutls
 
 MONO_RUN_DEPENDS=	wine-mono-devel>0:emulators/wine-mono-devel
 
+WAYLAND_BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto
+WAYLAND_LIB_DEPENDS=	libwayland-client.so:graphics/wayland \
+			libxkbcommon.so:x11/libxkbcommon
+
 OSS_CONFIGURE_WITH=	oss
 OSS_USES=		gnome gstreamer
 OSS_USE=		GNOME=glib20
@@ -128,6 +133,14 @@ CONFIGURE_ARGS+=	--without-gstreamer
 PLIST_SUB+=		GSTREAMER="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MWAYLAND}
+CONFIGURE_ARGS+=	--with-wayland
+PLIST_SUB+=		WAYLAND=""
+.else
+CONFIGURE_ARGS+=	--without-wayland
+PLIST_SUB+=		WAYLAND="@comment "
+.endif
+
 .if ${ARCH} == amd64
 # Wine is composed of three parts:
 #  - wine (aka this port on FreeBSD/i386) is the 32-bit component
diff --git a/emulators/wine-devel/files/pkg-message.in b/emulators/wine-devel/files/pkg-message.in
index a8632c68958b..18639d47533e 100644
--- a/emulators/wine-devel/files/pkg-message.in
+++ b/emulators/wine-devel/files/pkg-message.in
@@ -8,6 +8,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  <<EOF
+Windows Registry Editor Version 5.00
+[HKEY_CURRENT_USER\Software\Wine\Drivers]
+"Graphics"="x11,wayland"
+EOF
+$ wine64 regedit wayland.reg
 EOM
 }
 ]
diff --git a/emulators/wine-devel/pkg-plist b/emulators/wine-devel/pkg-plist
index 16179ca8d9a6..0bfd77c65e01 100644
--- a/emulators/wine-devel/pkg-plist
+++ b/emulators/wine-devel/pkg-plist
@@ -1637,6 +1637,7 @@ lib/wine/%%WINEARCH%%-unix/winedmo.so
 %%OSS%%lib/wine/%%WINEARCH%%-unix/wineoss.so
 lib/wine/%%WINEARCH%%-unix/wineps.so
 lib/wine/%%WINEARCH%%-unix/winevulkan.so
+%%WAYLAND%%lib/wine/%%WINEARCH%%-unix/winewayland.so
 %%X11%%lib/wine/%%WINEARCH%%-unix/winex11.so
 lib/wine/%%WINEARCH%%-unix/winspool.so
 lib/wine/%%WINEARCH%%-unix/ws2_32.so
@@ -2584,6 +2585,7 @@ lib/wine/%%WINEARCH%%-windows/wineps.drv
 %%WINE32%%lib/wine/%%WINEARCH%%-windows/wineps16.drv16
 %%WINE32%%lib/wine/%%WINEARCH%%-windows/winevdm.exe
 lib/wine/%%WINEARCH%%-windows/winevulkan.dll
+%%WAYLAND%%lib/wine/%%WINEARCH%%-windows/winewayland.drv
 %%X11%%lib/wine/%%WINEARCH%%-windows/winex11.drv
 %%X11%%lib/wine/%%WINEARCH%%-windows/winexinput.sys
 %%WINE32%%lib/wine/%%WINEARCH%%-windows/wing.dll16



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