maintainer-feedback requested: [Bug 271930] graphics/mesa-dri: i915_dri.so not installed

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 09 Jun 2023 23:09:44 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-x11 (Nobody)
<x11@FreeBSD.org> for maintainer-feedback:
Bug 271930: graphics/mesa-dri: i915_dri.so not installed
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271930



--- Description ---
mesa-dri should install /usr/local/lib/dri/i915_dri.so but it doesn't.
This file is needed by libglvnd (OpenGL) which in turn is used by numerous
applications.
When it's missing, they emit a barrage of error messages:

$ telegram-desktop 

(telegram-desktop:40602): Telegram-WARNING **: 22:54:23.721: Application was
built without embedded fonts, this may lead to font issues.
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: MESA-LOADER: failed to open i915: Cannot open
"/usr/local/lib/dri/i915_dri.so" (search paths /usr/local/lib/dri, suffix _dri)
libGL error: failed to load driver: i915
error: : cannot open
error: : cannot open
error: : cannot open
...

When something goes wrong later on, the fault is given to the "broken libGL" no
matter what, see: https://github.com/telegramdesktop/tdesktop/issues/26387

As recently discussed in
https://forums.freebsd.org/threads/mesa-missing-i915-driver.88338/ the mesa-dri
port contains everything to build the crucial i915_dri.so, but the port is not
set up to install them. I tried to get it there e.g. by adding "INTEL" to the
ALL_GALLIUM_DRIVERS=... line, but then I get an error:
meson.build:1704:6: ERROR: Dependency "libdrm_nouveau" not found, tried
pkgconfig and cmake

Knowing nothing about meson or drivers, I am unable to fix this myself. The
compiled file provided in the aforementioned discussion doesn't work for me,
probably because it was built on i386 whereas my FreeBSD is amd64. Also, my
FreeBSD version is 12.4-STABLE, while theirs is 13.

Please can you get the port to compile and install the file.