summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gentoo.org>2021-05-23 11:14:00 +0300
committerAndrew Savchenko <bircoph@gentoo.org>2021-05-23 11:32:43 +0300
commitfd8e596c6a5eab634656e265c3da5241f5ceee8c (patch)
tree003f8c1ec02ed19856463b4e90e274c0140de3bc /app-text
parentsys-apps/coreutils: Enable up to py3.10 (diff)
downloadgentoo-fd8e596c6a5eab634656e265c3da5241f5ceee8c.tar.gz
gentoo-fd8e596c6a5eab634656e265c3da5241f5ceee8c.tar.bz2
gentoo-fd8e596c6a5eab634656e265c3da5241f5ceee8c.zip
app-text/cuneiform: Fix build with g++-11
Closes: https://bugs.gentoo.org/786657 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r--app-text/cuneiform/cuneiform-1.1.0-r3.ebuild1
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-gcc11.patch30
2 files changed, 31 insertions, 0 deletions
diff --git a/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild b/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild
index 3874e69f95e6..16ad43b3ac40 100644
--- a/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild
+++ b/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild
@@ -33,6 +33,7 @@ PATCHES=(
"${FILESDIR}"/${P}-gcc6.patch
"${FILESDIR}"/${P}-gcc7.patch
"${FILESDIR}"/${P}-typos.patch
+ "${FILESDIR}"/${P}-gcc11.patch
)
src_prepare() {
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-gcc11.patch b/app-text/cuneiform/files/cuneiform-1.1.0-gcc11.patch
new file mode 100644
index 000000000000..47677507b261
--- /dev/null
+++ b/app-text/cuneiform/files/cuneiform-1.1.0-gcc11.patch
@@ -0,0 +1,30 @@
+--- cuneiform-linux-1.1.0/cuneiform_src/Kern/hh/internal.h.orig 2021-05-23 10:45:12.714043888 +0300
++++ cuneiform-linux-1.1.0/cuneiform_src/Kern/hh/internal.h 2021-05-23 10:45:47.233178549 +0300
+@@ -84,6 +84,7 @@
+ #endif
+
+ #if !defined(__MATH_H) && !defined(_INC_MATH)
++ #undef _GLIBCXX_USE_STD_SPEC_FUNCS
+ #include <math.h>
+ #endif
+
+--- cuneiform-linux-1.1.0/cuneiform_src/Kern/ced/sources/main/ced_func_rtf.cpp.orig 2021-05-23 10:51:00.757379453 +0300
++++ cuneiform-linux-1.1.0/cuneiform_src/Kern/ced/sources/main/ced_func_rtf.cpp 2021-05-23 10:51:22.445461911 +0300
+@@ -212,7 +212,7 @@
+ }
+ */
+ // write the text lines
+- for (;sect>0;sect=sect->next)
++ for (;sect;sect=sect->next)
+ {
+ if (!WriteRtfSection(rtf,sect)) goto WRITE_END; //write section properties
+ // int sectNum=0;
+@@ -897,7 +897,7 @@
+ // if (curChar->fontNum>=rtf->page->fontsUsed || (prevChar&&prevChar->fontNum>=rtf->page->fontsUsed)) return TRUE;
+
+ // extract value for comparison
+- if (prevChar>0) {
++ if (prevChar) {
+ // lstrcpy(PrevTypeFace,TerFont[PrevFont].TypeFace);
+ PrevFamily=rtf->table[rtf->page->GetFontByNum(prevChar->fontNum)];
+ PrevStyle=prevChar->fontAttribs;