qt/aqt/__init__.py: Skip GL library workaround for FreeBSD (#3071)

* qt/aqt/__init__.py: Skip GL library workaround for FreeBSD

The workaround to load explicitly "libGL.so.1" isn't required for
FreeBSD and leads to segmentation faults if used in environments that
have nVidia drivers loaded.

See also FreeBSD bug 270778 for further details. [1]

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270778

* Update CONTRIBUTORS
This commit is contained in:
Kai Knoblich 2024-03-12 09:50:21 +01:00 committed by GitHub
parent 1d4d7ee7ed
commit 057733d02e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -157,7 +157,7 @@ Marko Sisovic <msisovic13@gmail.com>
Viktor Ricci <ricci@primateer.de>
Harvey Randall <harveyrandall2001@gmail.com>
Pedro Lameiras <pedrolameiras@tecnico.ulisboa.pt>
Kai Knoblich <kai@FreeBSD.org>
Kai Knoblich <kai@FreeBSD.org>
Lucas Scharenbroch <lucasscharenbroch@gmail.com>
Antonio Cavallo <a.cavallo@cavallinux.eu>
Han Yeong-woo <han@yeongwoo.dev>

View file

@ -414,7 +414,7 @@ def setupGL(pm: aqt.profiles.ProfileManager) -> None:
driver_failed = False
# work around pyqt loading wrong GL library
if is_lin:
if is_lin and not sys.platform.startswith("freebsd"):
import ctypes
ctypes.CDLL("libGL.so.1", ctypes.RTLD_GLOBAL)