[gentoo-commits] repo/gentoo:master commit in: app-text/cuneiform/files/, app-text/cuneiform/

2021-05-23 Thread Andrew Savchenko
commit: fd8e596c6a5eab634656e265c3da5241f5ceee8c
Author: Andrew Savchenko  gentoo  org>
AuthorDate: Sun May 23 08:14:00 2021 +
Commit: Andrew Savchenko  gentoo  org>
CommitDate: Sun May 23 08:32:43 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd8e596c

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  gentoo.org>

 app-text/cuneiform/cuneiform-1.1.0-r3.ebuild   |  1 +
 .../cuneiform/files/cuneiform-1.1.0-gcc11.patch| 30 ++
 2 files changed, 31 insertions(+)

diff --git a/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild 
b/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild
index 3874e69f95e..16ad43b3ac4 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 000..47677507b26
--- /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 
+#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&>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;



[gentoo-commits] repo/gentoo:master commit in: app-text/cuneiform/files/, app-text/cuneiform/

2021-02-12 Thread Ben Kohler
commit: e81771fa9ff1f899e22c045f20cb724815db8a43
Author: Jakov Smolic  sartura  hr>
AuthorDate: Thu Feb 11 19:34:23 2021 +
Commit: Ben Kohler  gentoo  org>
CommitDate: Fri Feb 12 13:44:36 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e81771fa

app-text/cuneiform: Port to EAPI 7

* Apply gcc-10 workaround (dead upstream)

Closes: https://bugs.gentoo.org/729530
Closes: https://bugs.gentoo.org/760830
Closes: https://bugs.gentoo.org/707636
Signed-off-by: Jakov Smolic  sartura.hr>
Signed-off-by: Ben Kohler  gentoo.org>

 app-text/cuneiform/cuneiform-1.1.0-r3.ebuild   | 40 --
 ...-assert.diff => cuneiform-1.1.0-c-assert.patch} |  6 +---
 .../cuneiform-1.1.0-fix_buffer_overflow.patch  |  3 --
 .../cuneiform-1.1.0-fix_buffer_overflow_2.patch|  9 ++---
 .../cuneiform/files/cuneiform-1.1.0-gcc6.patch |  1 -
 .../cuneiform/files/cuneiform-1.1.0-gcc7.patch | 25 ++
 ...k.diff => cuneiform-1.1.0-graphicsmagick.patch} |  3 --
 .../{libm.diff => cuneiform-1.1.0-libm.patch}  |  3 --
 .../cuneiform/files/cuneiform-1.1.0-typos.patch|  1 -
 9 files changed, 35 insertions(+), 56 deletions(-)

diff --git a/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild 
b/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild
index 53d1efd18b7..3874e69f95e 100644
--- a/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild
+++ b/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-inherit cmake-utils versionator
+inherit cmake flag-o-matic
 
-PV_MAJ=$(get_version_component_range 1-2)
+PV_MAJ=$(ver_cut 1-2)
 MY_P=${PN}-linux-${PV}
 
 DESCRIPTION="An enterprise quality OCR engine by Cognitive Technologies"
@@ -15,7 +15,6 @@ 
SRC_URI="https://launchpad.net/${PN}-linux/${PV_MAJ}/${PV_MAJ}/+download/${MY_P}
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-
 IUSE="debug graphicsmagick"
 
 RDEPEND="
@@ -25,21 +24,20 @@ DEPEND="${RDEPEND}"
 
 S=${WORKDIR}/${MY_P}
 
-DOCS=( readme.txt )
 PATCHES=(
# From Fedora
-   "${FILESDIR}/c-assert.diff"
-   "${FILESDIR}/libm.diff"
-   "${FILESDIR}/${P}-fix_buffer_overflow.patch"
-   "${FILESDIR}/${P}-fix_buffer_overflow_2.patch"
-   "${FILESDIR}/${P}-gcc6.patch"
-   "${FILESDIR}/${P}-gcc7.patch"
-   "${FILESDIR}/${P}-typos.patch"
+   "${FILESDIR}"/${P}-c-assert.patch
+   "${FILESDIR}"/${P}-libm.patch
+   "${FILESDIR}"/${P}-fix_buffer_overflow.patch
+   "${FILESDIR}"/${P}-fix_buffer_overflow_2.patch
+   "${FILESDIR}"/${P}-gcc6.patch
+   "${FILESDIR}"/${P}-gcc7.patch
+   "${FILESDIR}"/${P}-typos.patch
 )
 
 src_prepare() {
-   use graphicsmagick && PATCHES+=( "${FILESDIR}/graphicsmagick.diff" )
-   cmake-utils_src_prepare
+   use graphicsmagick && PATCHES+=( 
"${FILESDIR}"/${P}-graphicsmagick.patch )
+   cmake_src_prepare
 
# respect LDFLAGS
sed -i 's:\(set[(]CMAKE_SHARED_LINKER_FLAGS "[^"]*\):\1 $ENV{LDFLAGS}:' 
\
@@ -48,12 +46,16 @@ src_prepare() {
# Fix automagic dependencies / linking
if use graphicsmagick; then
sed -i "s:find_package(ImageMagick COMPONENTS 
Magick++):#DONOTFIND:" \
-   cuneiform_src/CMakeLists.txt \
-   || die "Sed for ImageMagick automagic dependency 
failed."
+   cuneiform_src/CMakeLists.txt || die
fi
 }
 
+src_configure() {
+   append-flags -fcommon
+   cmake_src_configure
+}
+
 src_install() {
-   cmake-utils_src_install
-   doman "${FILESDIR}/${PN}.1"
+   cmake_src_install
+   doman "${FILESDIR}"/${PN}.1
 }

diff --git a/app-text/cuneiform/files/c-assert.diff 
b/app-text/cuneiform/files/cuneiform-1.1.0-c-assert.patch
similarity index 97%
rename from app-text/cuneiform/files/c-assert.diff
rename to app-text/cuneiform/files/cuneiform-1.1.0-c-assert.patch
index 0abf1b11734..5241960f840 100644
--- a/app-text/cuneiform/files/c-assert.diff
+++ b/app-text/cuneiform/files/cuneiform-1.1.0-c-assert.patch
@@ -1,9 +1,5 @@
-Description: Use the standard C assert() macro, rather than custom Cuneiform
-  one.
+Description: Use the standard C assert() macro, rather than custom Cuneiform 
one.
 Author: Jakub Wilk 
-Forwarded: no
-Last-Update: 2011-04-30
-
 --- a/cuneiform_src/Kern/lns32/src/myassert.h
 +++ b/cuneiform_src/Kern/lns32/src/myassert.h
 @@ -60,6 +60,8 @@

diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow.patch 
b/app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow.patch
index 8e9811540cd..15454e6e691 100644
--- a/app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow.patch
+++ b/app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow.patch
@@ -1,8 +1,5 @@
 Description: Fix buffer overflow during crash when using user supplied image.
 Author: SÅ‚awomir Nizio
-Forwarded: no