repo/proj/guru:dev commit in: sci-chemistry/xcrysden/files/, sci-chemistry/xcrysden/
"Patrick Taylor" <[email protected]> Mon, 03 Aug 2026 16:23:12 +0000 (UTC)
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1785773503.eb8e7a519caff49e028c09e9d77fa01f04fcbfcf.patrick.joseph.taylor@gentoo> |
commit: eb8e7a519caff49e028c09e9d77fa01f04fcbfcf
Author: Patrick J. Taylor <patrick.joseph.taylor <AT> gmail <DOT> com>
AuthorDate: Mon Aug 3 16:11:43 2026 +0000
Commit: Patrick Taylor <patrick.joseph.taylor <AT> gmail <DOT> com>
CommitDate: Mon Aug 3 16:11:43 2026 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=eb8e7a51
sci-chemistry/xcrysden: manage OpenGL accumulation buffer at runtime
The previous revision of this ebuild applied a patch to prevent Togl
from requesting an OpenGL accumulation buffer when XCrySDen is launched,
which can cause crashes when running under XWayland. Unfortunately, it
turns out that this also disables antialiasing, which is clearly not
desirable when running under X11 if this fix is not strictly
necessary. The new patch ensures that we only disable the accumulation
buffer (at runtime) if we are more or less certainly running within a
Wayland session.
Signed-off-by: Patrick J. Taylor <patrick.joseph.taylor <AT> gmail.com>
.../files/xcrysden-1.6.2-accumulation-buffer.patch | 20 ++++++++++++++++++++
.../files/xcrysden-1.6.2-disable-accum-buffer.patch | 15 ---------------
...sden-1.6.2-r2.ebuild => xcrysden-1.6.2-r3.ebuild} | 2 +-
3 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/sci-chemistry/xcrysden/files/xcrysden-1.6.2-accumulation-buffer.patch b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-accumulation-buffer.patch
new file mode 100644
index 0000000000..d3a6abd0ea
--- /dev/null
+++ b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-accumulation-buffer.patch
@@ -0,0 +1,20 @@
+Disable OpenGL accumulation buffer when running under XWayland
+
+diff --git a/Tcl/custom-definitions b/Tcl/custom-definitions
+index 5267760..2635452 100644
+--- a/Tcl/custom-definitions
++++ b/Tcl/custom-definitions
+@@ -18,7 +18,12 @@
+ # $XCRYSDEN_TOPDIR/Tcl/toglOpt.tcl
+ # ------------------------------------------------------------------------
+
+-#set toglOpt(accum) false
++if {[info exists ::env(XDG_SESSION_TYPE)] &&
++ $::env(XDG_SESSION_TYPE) eq "wayland"} {
++ set toglOpt(accum) false
++} elseif {[info exists ::env(WAYLAND_DISPLAY)]} {
++ set toglOpt(accum) false
++}
+ #set toglOpt(stereo) none
+
+
diff --git a/sci-chemistry/xcrysden/files/xcrysden-1.6.2-disable-accum-buffer.patch b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-disable-accum-buffer.patch
deleted file mode 100644
index bb11ec7678..0000000000
--- a/sci-chemistry/xcrysden/files/xcrysden-1.6.2-disable-accum-buffer.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Disable OpenGL accumulation buffer for XWayland compatibility
-
-diff --git a/Tcl/custom-definitions b/Tcl/custom-definitions
-index 5267760..1221749 100644
---- a/Tcl/custom-definitions
-+++ b/Tcl/custom-definitions
-@@ -18,7 +18,7 @@
- # $XCRYSDEN_TOPDIR/Tcl/toglOpt.tcl
- # ------------------------------------------------------------------------
-
--#set toglOpt(accum) false
-+set toglOpt(accum) false
- #set toglOpt(stereo) none
-
-
diff --git a/sci-chemistry/xcrysden/xcrysden-1.6.2-r2.ebuild b/sci-chemistry/xcrysden/xcrysden-1.6.2-r3.ebuild
similarity index 96%
rename from sci-chemistry/xcrysden/xcrysden-1.6.2-r2.ebuild
rename to sci-chemistry/xcrysden/xcrysden-1.6.2-r3.ebuild
index a1c29be4c5..2a1d5111bd 100644
--- a/sci-chemistry/xcrysden/xcrysden-1.6.2-r2.ebuild
+++ b/sci-chemistry/xcrysden/xcrysden-1.6.2-r3.ebuild
@@ -25,7 +25,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}/${P}-c23.patch"
- "${FILESDIR}/${P}-disable-accum-buffer.patch"
+ "${FILESDIR}/${P}-accumulation-buffer.patch"
"${FILESDIR}/${P}-ext-bwidget.patch"
"${FILESDIR}/${P}-LDFLAGS.patch"
"${FILESDIR}/${P}-Togl-lib.patch"