summaryrefslogtreecommitdiffstats
path: root/libraries/cuneiform
diff options
context:
space:
mode:
author Matteo Bernardini2021-08-28 20:51:32 +0200
committer Willy Sudiarto Raharjo2021-08-30 01:55:48 +0200
commit4033fc1c8625a924ed160ae1e632abfb7487a61e (patch)
tree14d47ad7b69fcfece490d1816bb64fa0d85e0897 /libraries/cuneiform
parent37a587107264c6e8c79fe588c0ecbcc7d40b2777 (diff)
downloadslackbuilds-4033fc1c8625a924ed160ae1e632abfb7487a61e.tar.gz
libraries/cuneiform: Patch for the newer gccs.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/cuneiform')
-rw-r--r--libraries/cuneiform/cuneiform.SlackBuild4
-rw-r--r--libraries/cuneiform/gcc11.patch30
2 files changed, 33 insertions, 1 deletions
diff --git a/libraries/cuneiform/cuneiform.SlackBuild b/libraries/cuneiform/cuneiform.SlackBuild
index 87f621b344..c3f9e38b33 100644
--- a/libraries/cuneiform/cuneiform.SlackBuild
+++ b/libraries/cuneiform/cuneiform.SlackBuild
@@ -67,12 +67,14 @@ sed -i 's/\r//g' cuneiform_src/Addfiles/license.txt
patch -p1 < $CWD/strings.patch
# Thanks to ARCH Linux
patch -p1 < $CWD/cuneiform-gcc.patch
+# Thanks to Gentoo
+patch -p1 < $CWD/gcc11.patch
mkdir build
cd build
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS -fcommon" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_SKIP_RPATH:BOOL=YES \
-DCMAKE_BUILD_TYPE=Release ..
diff --git a/libraries/cuneiform/gcc11.patch b/libraries/cuneiform/gcc11.patch
new file mode 100644
index 0000000000..47677507b2
--- /dev/null
+++ b/libraries/cuneiform/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;