summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2021-02-11 20:34:23 +0100
committerBen Kohler <bkohler@gentoo.org>2021-02-12 07:44:36 -0600
commite81771fa9ff1f899e22c045f20cb724815db8a43 (patch)
treef75bf45ff854b684e4789a0e33c5bb926b70a70a /app-text/cuneiform
parentapp-crypt/dieharder: Apply gcc-10 workaround and cross-compile patch (diff)
downloadgentoo-e81771fa9ff1f899e22c045f20cb724815db8a43.tar.gz
gentoo-e81771fa9ff1f899e22c045f20cb724815db8a43.tar.bz2
gentoo-e81771fa9ff1f899e22c045f20cb724815db8a43.zip
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 <jakov.smolic@sartura.hr> Signed-off-by: Ben Kohler <bkohler@gentoo.org>
Diffstat (limited to 'app-text/cuneiform')
-rw-r--r--app-text/cuneiform/cuneiform-1.1.0-r3.ebuild40
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-c-assert.patch (renamed from app-text/cuneiform/files/c-assert.diff)6
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow.patch3
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow_2.patch9
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-gcc6.patch1
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-gcc7.patch25
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-graphicsmagick.patch (renamed from app-text/cuneiform/files/graphicsmagick.diff)3
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-libm.patch (renamed from app-text/cuneiform/files/libm.diff)3
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-typos.patch1
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 53d1efd18b7b..3874e69f95e6 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
index 0abf1b117343..5241960f8405 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 <jwilk@debian.org>
-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 8e9811540cd6..15454e6e6916 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
-Last-Update: 2017-04-05
-
--- a/cuneiform_src/Kern/rstr/src/acc_tabs.c
+++ b/cuneiform_src/Kern/rstr/src/acc_tabs.c
@@ -1233,7 +1233,7 @@ if(is_cen_language(language))
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow_2.patch b/app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow_2.patch
index c64b42fc8933..2057aa584dea 100644
--- a/app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow_2.patch
+++ b/app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow_2.patch
@@ -1,10 +1,7 @@
-Description: Split original patch by Slawomir and update the same to apply
-neatly.
+Description: Split original patch by Slawomir and update the same to apply neatly.
Author: Bhavani Shankar <bhavi@ubuntu.com>
-
-
---- cuneiform-1.1.0+dfsg.orig/cuneiform_src/Kern/rstr/src/acc_tabs.c
-+++ cuneiform-1.1.0+dfsg/cuneiform_src/Kern/rstr/src/acc_tabs.c
+--- a/cuneiform_src/Kern/rstr/src/acc_tabs.c
++++ b/cuneiform_src/Kern/rstr/src/acc_tabs.c
@@ -2821,8 +2821,8 @@ if( CodePages[language]==CSTR_EASTEUROPE
strcpy(decode_ASCII_to_[(uchar)liga_j ], "_j_");
strcpy(decode_ASCII_to_[(uchar)liga_exm ], "_!_");
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-gcc6.patch b/app-text/cuneiform/files/cuneiform-1.1.0-gcc6.patch
index e45768e90f29..5e7b6d80df05 100644
--- a/app-text/cuneiform/files/cuneiform-1.1.0-gcc6.patch
+++ b/app-text/cuneiform/files/cuneiform-1.1.0-gcc6.patch
@@ -1,6 +1,5 @@
Description: fix FTBFS with GCC 6
Author: Andreas Beckmann <anbe@debian.org>
-
--- a/cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp
+++ b/cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp
@@ -594,8 +594,8 @@ Bool32 CRIControl::CreateDestinatonDIB(u
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-gcc7.patch b/app-text/cuneiform/files/cuneiform-1.1.0-gcc7.patch
index 01530ab4b1d3..25fb846924ed 100644
--- a/app-text/cuneiform/files/cuneiform-1.1.0-gcc7.patch
+++ b/app-text/cuneiform/files/cuneiform-1.1.0-gcc7.patch
@@ -1,6 +1,5 @@
-diff -urp cuneiform-1.1.0/cuneiform_src/Kern/hhh/tigerh/h/strings.h cuneiform-1.1.0-char/cuneiform_src/Kern/hhh/tigerh/h/strings.h
---- cuneiform-1.1.0/cuneiform_src/Kern/hhh/tigerh/h/strings.h 2017-11-30 11:25:24.409125695 +0700
-+++ cuneiform-1.1.0-char/cuneiform_src/Kern/hhh/tigerh/h/strings.h 2017-11-30 12:09:26.033501963 +0700
+--- a/cuneiform_src/Kern/hhh/tigerh/h/strings.h
++++ b/cuneiform_src/Kern/hhh/tigerh/h/strings.h
@@ -80,6 +80,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# include "ltconfig.h"
@@ -9,9 +8,8 @@ diff -urp cuneiform-1.1.0/cuneiform_src/Kern/hhh/tigerh/h/strings.h cuneiform-1.
struct _String;
typedef struct _String STRING;
-diff -urp cuneiform-1.1.0/cuneiform_src/Kern/include/utf8-tables.h cuneiform-1.1.0-char/cuneiform_src/Kern/include/utf8-tables.h
---- cuneiform-1.1.0/cuneiform_src/Kern/include/utf8-tables.h 2017-11-30 11:25:24.410125673 +0700
-+++ cuneiform-1.1.0-char/cuneiform_src/Kern/include/utf8-tables.h 2017-11-30 11:32:05.974413875 +0700
+--- a/cuneiform_src/Kern/include/utf8-tables.h
++++ b/cuneiform_src/Kern/include/utf8-tables.h
@@ -68,7 +68,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
#endif
@@ -57,9 +55,8 @@ diff -urp cuneiform-1.1.0/cuneiform_src/Kern/include/utf8-tables.h cuneiform-1.1
{0, 0, 0, 0},
{1, 0, 0, 0},
{2, 0, 0, 0},
-diff -urp cuneiform-1.1.0/cuneiform_src/Kern/rout/src/codetables.cpp cuneiform-1.1.0-char/cuneiform_src/Kern/rout/src/codetables.cpp
---- cuneiform-1.1.0/cuneiform_src/Kern/rout/src/codetables.cpp 2017-11-30 11:25:24.411125651 +0700
-+++ cuneiform-1.1.0-char/cuneiform_src/Kern/rout/src/codetables.cpp 2017-11-30 11:47:51.856189912 +0700
+--- a/cuneiform_src/Kern/rout/src/codetables.cpp
++++ b/cuneiform_src/Kern/rout/src/codetables.cpp
@@ -937,13 +937,13 @@ CP_TO_CP tab[] = {
* codepage.
*/
@@ -76,9 +73,8 @@ diff -urp cuneiform-1.1.0/cuneiform_src/Kern/rout/src/codetables.cpp cuneiform-1
+ default : return (const unsigned char *) "?";
}
}
-diff -urp cuneiform-1.1.0/cuneiform_src/Kern/rout/src/rout_own.h cuneiform-1.1.0-char/cuneiform_src/Kern/rout/src/rout_own.h
---- cuneiform-1.1.0/cuneiform_src/Kern/rout/src/rout_own.h 2017-11-30 11:25:24.411125651 +0700
-+++ cuneiform-1.1.0-char/cuneiform_src/Kern/rout/src/rout_own.h 2017-11-30 11:40:01.457220419 +0700
+--- a/cuneiform_src/Kern/rout/src/rout_own.h
++++ b/cuneiform_src/Kern/rout/src/rout_own.h
@@ -458,7 +458,7 @@ Bool SetTableTextSeparators(char* s);
void ResetCodeTables();
Bool UpdateActiveCodeTable();
@@ -88,9 +84,8 @@ diff -urp cuneiform-1.1.0/cuneiform_src/Kern/rout/src/rout_own.h cuneiform-1.1.0
//*****************************************************************
// Rout.cpp
-diff -urp cuneiform-1.1.0/cuneiform_src/Kern/rout/src/text.cpp cuneiform-1.1.0-char/cuneiform_src/Kern/rout/src/text.cpp
---- cuneiform-1.1.0/cuneiform_src/Kern/rout/src/text.cpp 2017-11-30 11:25:24.411125651 +0700
-+++ cuneiform-1.1.0-char/cuneiform_src/Kern/rout/src/text.cpp 2017-11-30 11:40:43.571320319 +0700
+--- a/cuneiform_src/Kern/rout/src/text.cpp
++++ b/cuneiform_src/Kern/rout/src/text.cpp
@@ -310,7 +310,7 @@ Bool OneChar(Handle charHandle)
*gMemCur++ = c2;
}
diff --git a/app-text/cuneiform/files/graphicsmagick.diff b/app-text/cuneiform/files/cuneiform-1.1.0-graphicsmagick.patch
index 265190f40c8a..ae1d8242b1fa 100644
--- a/app-text/cuneiform/files/graphicsmagick.diff
+++ b/app-text/cuneiform/files/cuneiform-1.1.0-graphicsmagick.patch
@@ -1,8 +1,5 @@
Description: Use GraphicsMagick instead of ImageMagick.
Author: Jakub Wilk <jwilk@debian.org>
-Forwarded: not-needed
-Last-Update: 2011-01-21
-
--- a/cuneiform_src/cli/cuneiform-cli.cpp
+++ b/cuneiform_src/cli/cuneiform-cli.cpp
@@ -341,6 +341,10 @@
diff --git a/app-text/cuneiform/files/libm.diff b/app-text/cuneiform/files/cuneiform-1.1.0-libm.patch
index 0ab16d58274f..88347abbb04d 100644
--- a/app-text/cuneiform/files/libm.diff
+++ b/app-text/cuneiform/files/cuneiform-1.1.0-libm.patch
@@ -1,8 +1,5 @@
Description: Link the leo and r35 libraries with libm.
Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>, Jakub Wilk <jwilk@debian.org>
-Forwarded: no
-Last-Update: 2011-07-04
-
--- a/cuneiform_src/Kern/leo/CMakeLists.txt
+++ b/cuneiform_src/Kern/leo/CMakeLists.txt
@@ -23,6 +23,7 @@
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-typos.patch b/app-text/cuneiform/files/cuneiform-1.1.0-typos.patch
index 3439760d79d8..3e5fcf21c8d2 100644
--- a/app-text/cuneiform/files/cuneiform-1.1.0-typos.patch
+++ b/app-text/cuneiform/files/cuneiform-1.1.0-typos.patch
@@ -1,6 +1,5 @@
Description: fix typos
Author: Andreas Beckmann <anbe@debian.org>
-
--- a/cuneiform_src/Kern/rblock/sources/c/ltmain.c
+++ b/cuneiform_src/Kern/rblock/sources/c/ltmain.c
@@ -344,7 +344,7 @@ i=0; i=i;