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"