commit:     32e2c9bed0d5f4d0182a1acb2ee7198c8998bf60
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  5 17:29:39 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Tue Dec  5 17:31:45 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32e2c9be

x11-libs/libXaw3dXft: fix building with gcc 14

Fix building with gcc 14.
Update EAPI 7 -> 8.
Remove useless `unicode` flag (make it always on).

Closes: https://bugs.gentoo.org/919239
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 .../files/libXaw3dXft-1.6.2h-fix-gcc-14.patch      | 17 +++++++++
 x11-libs/libXaw3dXft/libXaw3dXft-1.6.2h-r1.ebuild  | 44 ++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/x11-libs/libXaw3dXft/files/libXaw3dXft-1.6.2h-fix-gcc-14.patch 
b/x11-libs/libXaw3dXft/files/libXaw3dXft-1.6.2h-fix-gcc-14.patch
new file mode 100644
index 000000000000..ae69a5dccba1
--- /dev/null
+++ b/x11-libs/libXaw3dXft/files/libXaw3dXft-1.6.2h-fix-gcc-14.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/919239
+
+Fix compilation with gcc 14 [-Wincompatible-pointer-types]
+
+buffer_return is a char* cast to wchar_t* at call site.
+
+--- a/src/XawIm.c
++++ b/src/XawIm.c
+@@ -1522,7 +1522,7 @@
+     if ((vw = SearchVendorShell(inwidg)) && (ve = GetExtPart(vw)) &&
+       ve->im.xim && (p = GetIcTableShared(inwidg, ve)) && p->xic) {
+           if (_Xaw3dXft->encoding == -1)
+-            ret = Xutf8LookupString (p->xic, event, buffer_return, 
bytes_buffer, keysym_return, status_return);
++            ret = Xutf8LookupString (p->xic, event, (char*)buffer_return, 
bytes_buffer, keysym_return, status_return);
+           else
+             ret = XwcLookupString(p->xic, event, buffer_return, bytes_buffer,
+                                keysym_return, status_return);

diff --git a/x11-libs/libXaw3dXft/libXaw3dXft-1.6.2h-r1.ebuild 
b/x11-libs/libXaw3dXft/libXaw3dXft-1.6.2h-r1.ebuild
new file mode 100644
index 000000000000..114a134a8408
--- /dev/null
+++ b/x11-libs/libXaw3dXft/libXaw3dXft-1.6.2h-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit xorg-3
+
+DESCRIPTION="Xaw3dXft library"
+HOMEPAGE="https://sourceforge.net/projects/sf-xpaint/";
+SRC_URI="https://downloads.sourceforge.net/project/sf-xpaint/${PN,,}/${P}.tar.bz2";
+
+KEYWORDS="~amd64 ~x86"
+IUSE="xpm"
+
+RDEPEND="
+       x11-libs/libX11
+       x11-libs/libXext
+       x11-libs/libXft
+       x11-libs/libXmu
+       x11-libs/libXt
+       xpm? ( x11-libs/libXpm )"
+DEPEND="${RDEPEND}
+       x11-base/xorg-proto"
+BDEPEND="
+       sys-devel/flex
+       app-alternatives/yacc
+       x11-misc/util-macros"
+
+QA_PKGCONFIG_VERSION="${PV//[!0-9.]}"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-fix-gcc-14.patch
+)
+
+src_configure() {
+       local XORG_CONFIGURE_OPTIONS=(
+               $(usev xpm --enable-multiplane-bitmaps)
+
+               --enable-internationalization
+               --enable-arrow-scrollbars
+               --enable-gray-stipples
+       )
+       xorg-3_src_configure
+}

Reply via email to