Created attachment 248777 [details] patch for net-im/telegram-desktop/Makefile This patch adds two options for select between X11 or Wayland desktop integrations. I'll tested build in my local poudriere with success.
Why do you use OPTIONS_SINGLE here? Having support for both X11 and wayland works as that is the current behaviour, additional this would be a regression for package users on wayland, as you made X11 the default, so the package would miss wayland support for them. How about using OPTIONS_MULTI and having both X11 and WAYLAND as default option?
(In reply to Benjamin Takacs from comment #1) Regarding regression for users of wayland packages, I think that this is not the case. Because now the port is built without wayland support: CMAKE_ON= DESKTOP_APP_USE_PACKAGED DESKTOP_APP_DISABLE_CRASH_REPORTS \ DESKTOP_APP_DISABLE_SCUDO\ DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION About OPTIONS_MULTI and its defaults - need to test
ah, yes. I was thinking about whatever USE_QT=wayland influences here, but maybe it is a no-op with these CMAKE_ARGS. So it should be checked that telegram doesn't regress here if build for X11 and run on wayland and without having qt*-wayland installed (which would be possible with this if telegram was the only thing depending on qt*-wayland installed)
According to ${WRKSRC}/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp mainly affects https://wayland.app/protocols/kde-plasma-shell but Plasma/Wayland fell into disrepair on FreeBSD due to lack of dogfooding by kde@ team. Otherwise, the port seems to work fine on Wayland (wlroots) but I've only tested login screen (don't have a Telegram account, so can't test screen sharing). USE_QT=wayland is a generic way to enable Wayland support in Qt applications. Without it GUI apps would use Xwayland which can introduce glitches (e.g., copy/paste). Also, the binary packages appear to use qt?-wayland directly: $ pkg install telegram-desktop $ pkg delete -f qt5-wayland ld-elf.so.1: Shared object "libQt5WaylandCompositor.so.5" not found, required by "telegram-desktop" $ pkg install telegram-desktop-qt6 $ pkg delete -f qt6-wayland ld-elf.so.1: Shared object "libQt6WaylandCompositor.so.6" not found, required by "telegram-desktop"
Created attachment 248808 [details] patch for net-im/telegram-desktop/Makefile Replacing OPTION_SINGLE with OPTION_MULTI for the DESKTOP option Test build with both X11 and WAYLAND selected completed successfully. Any ideas about defaults are welcome.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0d0c98e2c6f25d3532045f90d5def8dbe1c2318a commit 0d0c98e2c6f25d3532045f90d5def8dbe1c2318a Author: Dima Panov <fluffy@FreeBSD.org> AuthorDate: 2024-11-05 16:40:11 +0000 Commit: Dima Panov <fluffy@FreeBSD.org> CommitDate: 2024-11-05 18:06:12 +0000 net-im/telegram-desktop: add ability to build TD without X11 or Wayland (+) Bring on two new OPTIONs here: X11 and WAYLAND which enable corresponding dependencies. Set both ON by default to mimics previous behaviour. PR: 277344 (based on) net-im/telegram-desktop/Makefile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-)
Shipped with adjustments, thanks!