summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-18 07:43:40 +0100
committerSam James <sam@gentoo.org>2023-04-18 07:50:49 +0100
commite9df314861d00e9e5f9239ea1741db3129b31d98 (patch)
tree234ef24509cb117d8c4c6bddbc3b9f3f62b6cf3c /dev-libs/libxls
parentnet-misc/netevent: fix build w/ gcc 13 (diff)
downloadgentoo-e9df314861d00e9e5f9239ea1741db3129b31d98.tar.gz
gentoo-e9df314861d00e9e5f9239ea1741db3129b31d98.tar.bz2
gentoo-e9df314861d00e9e5f9239ea1741db3129b31d98.zip
dev-libs/libxls: fix build w/ gcc 13
Seems to affect installed headers too. Closes: https://bugs.gentoo.org/895218 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libxls')
-rw-r--r--dev-libs/libxls/files/libxls-1.6.2-gcc13.patch25
-rw-r--r--dev-libs/libxls/libxls-1.6.2-r1.ebuild (renamed from dev-libs/libxls/libxls-1.6.2.ebuild)3
2 files changed, 27 insertions, 1 deletions
diff --git a/dev-libs/libxls/files/libxls-1.6.2-gcc13.patch b/dev-libs/libxls/files/libxls-1.6.2-gcc13.patch
new file mode 100644
index 000000000000..6958bb63bc65
--- /dev/null
+++ b/dev-libs/libxls/files/libxls-1.6.2-gcc13.patch
@@ -0,0 +1,25 @@
+https://github.com/libxls/libxls/pull/118
+
+From f46aea10c50fb08657c15f8f3e813d5434b8b4d5 Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
+Date: Wed, 18 Jan 2023 05:21:23 -0500
+Subject: [PATCH] Fix header include in C++ mode
+
+This file is included in the toplevel `xls.h` within an `extern "C"`,
+which means including C++ headers in it is completely broken. With GCC
+13, this causes strange errors due to "missing" symbols.
+--- a/include/libxls/xlstypes.h
++++ b/include/libxls/xlstypes.h
+@@ -36,11 +36,7 @@
+ #ifndef XLS_TYPES_INC
+ #define XLS_TYPES_INC
+
+-#ifdef __cplusplus
+-#include <cstdint>
+-#else
+ #include <stdint.h>
+-#endif
+ #include <sys/types.h>
+
+ typedef unsigned char BYTE;
+
diff --git a/dev-libs/libxls/libxls-1.6.2.ebuild b/dev-libs/libxls/libxls-1.6.2-r1.ebuild
index 95af65648371..0ba177446fdc 100644
--- a/dev-libs/libxls/libxls-1.6.2.ebuild
+++ b/dev-libs/libxls/libxls-1.6.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -18,6 +18,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-1.4.0-asprintf.patch
+ "${FILESDIR}"/${PN}-1.6.2-gcc13.patch
)
src_configure() {