[arch-commits] Commit in cuneiform/trunk (PKGBUILD gcc11.patch)

Antonio Rojas arojas at gemini.archlinux.org
Mon Mar 21 08:06:01 UTC 2022


    Date: Monday, March 21, 2022 @ 08:05:59
  Author: arojas
Revision: 1166657

Fix build with GCC 11 (FS#74179)

Added:
  cuneiform/trunk/gcc11.patch
Modified:
  cuneiform/trunk/PKGBUILD

-------------+
 PKGBUILD    |    9 ++++++---
 gcc11.patch |   30 ++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-03-21 07:10:35 UTC (rev 1166656)
+++ PKGBUILD	2022-03-21 08:05:59 UTC (rev 1166657)
@@ -4,7 +4,7 @@
 
 pkgname=cuneiform
 pkgver=1.1.0
-pkgrel=21
+pkgrel=22
 pkgdesc="Linux port of an OCR system developed in Russia. Supports more than 20 languages"
 arch=('x86_64')
 url="https://launchpad.net/cuneiform-linux"
@@ -12,13 +12,16 @@
 depends=('libmagick')
 makedepends=('cmake')
 source=(https://launchpad.net/cuneiform-linux/${pkgver%.*}/${pkgver%.*}/+download/$pkgname-linux-$pkgver.tar.bz2
-	build-fix.patch)
+	build-fix.patch
+        gcc11.patch)
 sha256sums=('577e0d054de72086c33b4e8ae15033657776509b9a7af6eb272888eefcbdbbad'
-            '3d9f4d923ec6ca5555550819096b7d66e364a8aeb74a9d1f0d961784d267642b')
+            '3d9f4d923ec6ca5555550819096b7d66e364a8aeb74a9d1f0d961784d267642b'
+            '2766d073e3fbf4c08e0ecb3e48cf3517f635e1d72f07f5dbb5fdd1dd88137791')
 
 prepare() {
   cd $pkgname-linux-$pkgver
   patch -Np1 -i ../build-fix.patch
+  patch -p1 -i ../gcc11.patch # Fix build with GCC 11 (Gentoo)
   sed -i 's/lib64/lib/' install_files.cmake
 # Don't override LDFLAGS
   sed -e '/CMAKE_SHARED_LINKER_FLAGS/d' -i cuneiform_src/CMakeLists.txt

Added: gcc11.patch
===================================================================
--- gcc11.patch	                        (rev 0)
+++ gcc11.patch	2022-03-21 08:05:59 UTC (rev 1166657)
@@ -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;



More information about the arch-commits mailing list