diff --git a/x11-libs/motif/files/motif-2.5.2-DrawLine.patch b/x11-libs/motif/files/motif-2.5.2-DrawLine.patch new file mode 100644 index 0000000000000..fd67b392f31bc --- /dev/null +++ b/x11-libs/motif/files/motif-2.5.2-DrawLine.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/983119 +Patch backported from upstream + +commit f2c490cc233d2d55cd7c1eade9431d9711de375d +Author: Tim Hentenaar +Date: Mon, 4 May 2026 07:29:32 +0000 + + XmString: DrawLine: If there's only a single segment, don't deref + +--- motif-2.5.2/lib/Xm/XmString.c ++++ motif-2.5.2/lib/Xm/XmString.c +@@ -3737,7 +3737,9 @@ + Boolean set_direction = False; + XmDirection lay_dir = prim_dir; /* layout direction of this line */ + +- seg = _XmEntrySegmentGet(line)[seg_index]; ++ if (_XmEntryMultiple(line)) ++ seg = _XmEntrySegment(line)[seg_index]; ++ else seg = (_XmStringNREntry)line; + + if (_XmEntryType(seg) != XmSTRING_ENTRY_OPTIMIZED) { + lay_dir = _XmEntryLayoutGet(seg, prim_dir); diff --git a/x11-libs/motif/motif-2.5.2-r1.ebuild b/x11-libs/motif/motif-2.5.2-r2.ebuild similarity index 97% rename from x11-libs/motif/motif-2.5.2-r1.ebuild rename to x11-libs/motif/motif-2.5.2-r2.ebuild index 012efb7473aa8..74e5bffa23653 100644 --- a/x11-libs/motif/motif-2.5.2-r1.ebuild +++ b/x11-libs/motif/motif-2.5.2-r2.ebuild @@ -49,7 +49,10 @@ DEPEND="${RDEPEND} BDEPEND="sys-devel/flex dev-util/byacc" -PATCHES=( "${FILESDIR}/${P}-configure-posix.patch" ) +PATCHES=( + "${FILESDIR}/${P}-configure-posix.patch" +# "${FILESDIR}/${P}-DrawLine.patch" +) src_prepare() { default