Snap: fix breakage on new distros with NVIDIA graphics
Snap: fix breakage on new distros with NVIDIA graphics

In yet another example of poorly thought-out design, Snap attempts to
provide accelerated OpenGL by importing GL libraries from the host if
NVIDIA proprietary drivers are in use - while at the same time refusing
to use host glibc. This predictably leads to problems when the drivers
are inevitably compiled against a newer glibc version than the one
available within the snap:

  /snap/poedit/31/bin/poedit: /lib/x86_64-linux-gnu/libc.so.6:
  version `GLIBC_2.33' not found
  (required by /var/lib/snapd/lib/gl/libEGL.so.1)

For Poedit, this became a problem with version 3.0 which started using
WebKit runtime (which links against OpenGL) to show source code.

To fix this, sabotage snapd's misguided attempt by LD_PRELOADing
libEGL from a known-good location. We loose GL acceleration, but our use
of WebKit doesn't need it.

See https://bugs.launchpad.net/snapd/+bug/1916745

nawawi/poedit,alexhenrie/poedit,alexhenrie/poedit,vslavik/poedit,vslavik/poedit,alexhenrie/poedit,PKRoma/poedit,nawawi/poedit,alexhenrie/poedit,nawawi/poedit,PKRoma/poedit,vslavik/poedit,nawawi/poedit,PKRoma/poedit,vslavik/poedit,vslavik/poedit,PKRoma/poedit,alexhenrie/poedit,nawawi/poedit,PKRoma/poedit