msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.24k stars 1.21k forks source link

Provide .pc files for EGL/GL etc #16956

Open elmarco opened 1 year ago

elmarco commented 1 year ago

Description / Steps to reproduce the issue

There is no .pc files for EGL/GL libraries

Expected behavior

Ex:

$ pkg-config --libs egl
-lEGL

Actual behavior

NA

Verification

Windows Version

MINGW64_NT-10.0-22621

MINGW environments affected

Are you willing to submit a PR?

possibly

elmarco commented 1 year ago

fwiw, on Fedora Linux, those are provided by libglvnd

computermouth commented 1 year ago

What would this resolve to on Windows though, ANGLE? As far as I know, there's no vendor-agnostic GL/ES userspace libraries that dispatch calls to vendor drivers.

elmarco commented 1 year ago

Hmm, I guess ANGLE could provide them. It's a bit annoying that we ship headers from different packages though, but that's just how weird EGL/GL API "logic" is..

lb90 commented 1 year ago

There are two projects providing GLES on Windows: ANGLE and MESA/d3d12. Both install a libGLESv2.dll library, so they are in conflict. One should install either angleproject or mesa-gles (note: as of now we don't build MESA GLES, but I plan to prepare a PR soon).

We can ship .pc files. For angleproject we have to manually author the .pc files as upstream dev don't bother with pkg-config, I believe. MESA generates them instead (in absence of glvnd): https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-23.0.3/src/egl/meson.build?ref_type=tags#L216