summaryrefslogtreecommitdiff
path: root/app-text/cuneiform
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/cuneiform')
-rw-r--r--app-text/cuneiform/Manifest13
-rw-r--r--app-text/cuneiform/cuneiform-1.1.0-r3.ebuild61
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-c-assert.patch79
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow.patch24
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow_2.patch15
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-gcc11.patch30
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-gcc6.patch176
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-gcc7.patch97
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-graphicsmagick.patch40
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-libm.patch22
-rw-r--r--app-text/cuneiform/files/cuneiform-1.1.0-typos.patch53
-rw-r--r--app-text/cuneiform/files/cuneiform.1166
-rw-r--r--app-text/cuneiform/metadata.xml8
13 files changed, 0 insertions, 784 deletions
diff --git a/app-text/cuneiform/Manifest b/app-text/cuneiform/Manifest
deleted file mode 100644
index da02bace52e8..000000000000
--- a/app-text/cuneiform/Manifest
+++ /dev/null
@@ -1,13 +0,0 @@
-AUX cuneiform-1.1.0-c-assert.patch 2012 BLAKE2B e1c71e4b1be912ce604b43b1b09f96b299d9cb7dd553ed818203a2c06f7227e2c140095064accab3f90a32b16948276abd05e3451aaef1e3f66d87e219828424 SHA512 8c05e27e425c5221e6bb47eb8655e21e9f4ecd311679cd1b80a04e255371ffc907a9bca3337e78af6c88f23a3c6cf474971e1e94b6c6f1d30f206d01fb9a3a95
-AUX cuneiform-1.1.0-fix_buffer_overflow.patch 1089 BLAKE2B df9be625fee6806634c56fabe2ea27d0e3457b5c5090a7ff20aad79827fa7e6c25382cc0a230c31c4da3987eaba88de3628adedf2286ca317820134b04980134 SHA512 b701573177788575c540bb2203dab4d3f7ccc150bb71a53a13ac61971b357a4bfa67764f9880fd042798a94d79b70bff85c13b8e6005be344eb51c1bcd9311ab
-AUX cuneiform-1.1.0-fix_buffer_overflow_2.patch 888 BLAKE2B 9185e7190120138cdc0fc943b41878b9036cfedcb71fe47910b6f2c41e2865915570501a20d512c7ca0cacc09ece9e9cf688dc0d57963e76f1e923545fabc9f6 SHA512 182e1756adcbb71bd052fef7caf9b638b448bf995e2a6d2d5646737d22cacedf90840fbabc84e580450e92cb08ae357ff862aab977b8e34459dcc479fb92a292
-AUX cuneiform-1.1.0-gcc11.patch 1214 BLAKE2B 9350442a9061fca2fe377e85e89fd44defde241c1b66f3edbf910f8542d855237ed6db769e09380fec28278ea1542a6134c79f7f3052c950f1fec669a8779c73 SHA512 35b813c3096a6f1277e860a6aaaeb14837b20618ac216dac73a8bc07cdd24f58058e2b58cbc1f4371352959cd5355be5359c47d8bf22f71da519dab96ea99226
-AUX cuneiform-1.1.0-gcc6.patch 6080 BLAKE2B c9cf22db876320005c78f5b96330a11782d2d521fd1dd3024345f61bebb7a7d357c280d30d71193a5f94fee7cdd934351ced1f2073bf69047e8a090bbce66818 SHA512 277cc973a1934d7f722e7a3e30c981cbe57cf268b1553f3f552e15eebcf4c191c7457a8f8c3562f7fb1629b3405c37b10298293c047b8d3b0e67bb0cf72462f4
-AUX cuneiform-1.1.0-gcc7.patch 2814 BLAKE2B fef51b014790b27acd042b5e46e1ff79111a983b869d9591ed16cdbaa36139748987d5b3c91e5dfcac77b1495edb6ccb93ce4e922b8eb1fb49da22d6ea789e9b SHA512 4b164868c4612c28f0f1460ec4fb417a015840705e5fe5aa44c6ee2e350506fe1f7a7cb8f24e29f54b449c2893ff83bbdafd7df8733154bf8759c89e67902088
-AUX cuneiform-1.1.0-graphicsmagick.patch 1500 BLAKE2B 36a9e1292bc889596468f96aa6e515fba1368d9f6f451e3b0f2d51e91032a3093d74fa6496f1360385d1f18a39159a3eaf055e4b748520ac7b7767bdee13b47a SHA512 c3cbd03fd93c172d0b02a49c7f470348f60a46e09413872aefd7e581ac4934e41a75210afefb93f83b28cf2733dd0d025b1198ce6e28a9b950e54097adf33af3
-AUX cuneiform-1.1.0-libm.patch 595 BLAKE2B 7c9bba013f4e3560149eb05504ebb9f600aba8dfcb225be435ad5ba0ce0d2f0aa87835c370977deccce53a1618c5656b484de9f3724a2d15c946812909ec3837 SHA512 ea7468fdb4a0ac4195d9b48bbac43e8854310982118d66a3b829fcda4a912ab47220c68eb7da07dd98f8db8f3b8209d45c1d0dbc7da77c933fadf91b6d350846
-AUX cuneiform-1.1.0-typos.patch 1757 BLAKE2B b02ad10370a7bfed3201905c3282f5419e05845382084d70d4ce531722098bc1e225b3cb2bc6f6bd9978bea17903a9c2837e093b78935a5ddf1f05e29598b280 SHA512 5b8a1151b85cd2d5e0672b4ca125500047365051c9171bad49354d6e064d1fbe59631aa088183b9b0a3c9859b297cfc61055ab2f0fbfc3df669d3d6fa91ee4ce
-AUX cuneiform.1 2844 BLAKE2B ed7d68de70ebd50caf35bb22ebd23ef7ecf00633be22f237e19830456c1efe83a6c546dd27dcf776e91bdb9189236b48690cdf2b172602e2a0528c12de9b1532 SHA512 55dfaa6fd759a24c1a49ed1455a6f04e63c40f048872bc8309b770942747006bb5ed4704171a53490552c4170471934dcaeeb692921ebbc020f012f84afc6d77
-DIST cuneiform-linux-1.1.0.tar.bz2 26388511 BLAKE2B 9a9406d42b96d814b7342c48b384b7d46b529116e37f9946da6b1158bd223d2e4be0158bd0101f0b9821b7d63374758190e60232483779bdb6a4164d1b06034e SHA512 82395f43aae9f4b1301fb47b8d46613affb0ccb09c92d64ac3d77a593618cd56824225b0306176e4d8b90eb468abf6b9f534e97f28dabd4bba81cb7977b79b56
-EBUILD cuneiform-1.1.0-r3.ebuild 1527 BLAKE2B 7cc3429c3d29b4888b795b1e061d55e0016ca5001773361988b61f856b2610afb023b2102a96e49efd25ed40e79e534d8a980b9c418e5beddd7f9985fd2cd41e SHA512 e8f30fcad0fbde68fee61b10d8bab08d0348b312a226864eb7323b48fdaf151603b85f29054cc78c39aad4e06770c316c9cc6f79b014f5d9b85588960de13d70
-MISC metadata.xml 251 BLAKE2B 2748c5048ec243147dcc2b9add8e8a6cd467c5848a95392933240750bbeea8ac01314d735db1a824a671a3949b8fefb6734792143ae3c1f61100f9e0c37af360 SHA512 5ee6ef3d97172b9ae569e949aee3c72ffa258ba766e85b26e39840fe8dd29ff240ff97b567b7bda1b3c00178093f1c184551fea567e06f7b41e2287b121186ff
diff --git a/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild b/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild
deleted file mode 100644
index f1c79faecb48..000000000000
--- a/app-text/cuneiform/cuneiform-1.1.0-r3.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake flag-o-matic
-
-PV_MAJ=$(ver_cut 1-2)
-MY_P=${PN}-linux-${PV}
-
-DESCRIPTION="Enterprise quality OCR engine by Cognitive Technologies"
-HOMEPAGE="https://launchpad.net/cuneiform-linux"
-SRC_URI="https://launchpad.net/${PN}-linux/${PV_MAJ}/${PV_MAJ}/+download/${MY_P}.tar.bz2"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug graphicsmagick"
-
-RDEPEND="
- !graphicsmagick? ( media-gfx/imagemagick:= )
- graphicsmagick? ( media-gfx/graphicsmagick:= )"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- # From Fedora
- "${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
- "${FILESDIR}"/${P}-gcc11.patch
-)
-
-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}:' \
- cuneiform_src/CMakeLists.txt || die "failed to sed for LDFLAGS"
-
- # Fix automagic dependencies / linking
- if use graphicsmagick; then
- sed -i "s:find_package(ImageMagick COMPONENTS Magick++):#DONOTFIND:" \
- cuneiform_src/CMakeLists.txt || die
- fi
-}
-
-src_configure() {
- append-flags -fcommon
- cmake_src_configure
-}
-
-src_install() {
- cmake_src_install
- doman "${FILESDIR}"/${PN}.1
-}
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-c-assert.patch b/app-text/cuneiform/files/cuneiform-1.1.0-c-assert.patch
deleted file mode 100644
index 5241960f8405..000000000000
--- a/app-text/cuneiform/files/cuneiform-1.1.0-c-assert.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-Description: Use the standard C assert() macro, rather than custom Cuneiform one.
-Author: Jakub Wilk <jwilk@debian.org>
---- a/cuneiform_src/Kern/lns32/src/myassert.h
-+++ b/cuneiform_src/Kern/lns32/src/myassert.h
-@@ -60,6 +60,8 @@
- BC++, v3.1 was used as base
- */
-
-+#include <assert.h>
-+
- #ifdef __MYASSERT_H
- # Error: Do not specify MYASSERT.H directly - use SLANG.H. Postnikov.
- #else
-@@ -73,45 +75,3 @@
- #else
- # define WRONG() (assert(0),FALSE)
- #endif
--
--#ifdef __cplusplus
--extern "C" {
--#endif
--
--#ifndef MY_DEBUG_LEVEL
-- void __assertfail( char *__msg,
-- char *__cond,
-- char *__file,
-- int __line);
--#else
-- void my_assert_fail(const char *cond, const char *__file, int __line);
--#endif
--
--
--#ifdef __cplusplus
--}
--#endif
--
--#undef assert
--
--#ifdef NDEBUG
--# define assert(p) ((void)0)
--#else
--# ifdef _Windows
--# define _ENDL
--# else
--# define _ENDL "\n"
--# endif
-- #ifdef MY_DEBUG_LEVEL
-- # define assert(p) \
-- ((p)) ? \
-- (void)0 : \
-- (void) my_assert_fail( #p, __FILE__, __LINE__)
-- #else
-- # define assert(p) \
-- ((p) ? \
-- (void)0 : \
-- (void) __assertfail( "Assertion failed: %s, file %s, line %d" _ENDL, \
-- #p, __FILE__, __LINE__ ) )
-- #endif
--#endif
---- a/cuneiform_src/Kern/std/CMakeLists.txt
-+++ b/cuneiform_src/Kern/std/CMakeLists.txt
-@@ -3,7 +3,6 @@
- add_library(std32 ${LIBTYPE}
- src/std.cpp
- #src/Std.rc
--src/stdassrt.cpp
- src/stdbits.cpp
- src/stdconsl.cpp
- src/stderror.cpp
---- a/cuneiform_src/Kern/lns32/CMakeLists.txt
-+++ b/cuneiform_src/Kern/lns32/CMakeLists.txt
-@@ -14,7 +14,6 @@
- src/lns.cpp
- src/lnscheck.cpp
- src/lnsini.cpp
--src/myassert.cpp
- src/procline.cpp
- src/puanso.cpp
- src/rbambuk.cpp
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
deleted file mode 100644
index 15454e6e6916..000000000000
--- a/app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Description: Fix buffer overflow during crash when using user supplied image.
-Author: Sławomir Nizio
---- 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))
-
- strcpy(decode_ASCII_to_[(uchar)liga_i ], "_i_");
- strcpy(decode_ASCII_to_[(uchar)liga_exm ], "_!_");
-- strcpy(decode_ASCII_to_[(uchar)liga_inv_exm], "_!!_");
-+ strcpy(decode_ASCII_to_[(uchar)liga_inv_exm], "_!_");
- strcpy(decode_ASCII_to_[(uchar)right_quocket], "\xbb");
- strcpy(decode_ASCII_to_[(uchar)liga_CC ], "\xa9");
- strcpy(decode_ASCII_to_[(uchar)liga_CR ], "\xae");
---- a/cuneiform_src/Kern/rstr/src/match_wd.c
-+++ b/cuneiform_src/Kern/rstr/src/match_wd.c
-@@ -484,7 +484,7 @@
- str_raster->w=(int32_t)(right-left);
- str_raster->h=(int32_t)(bottom-top);
-
-- if (str_raster->w > LINE_WIDTH || str_raster->h > LINE_HEIGHT)
-+ if ((str_raster->w+7) > LINE_WIDTH || str_raster->h > LINE_HEIGHT)
- return FALSE;
-
- memset(&str_raster->pict,0,(str_raster->w+7)/8*str_raster->h);
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
deleted file mode 100644
index 2057aa584dea..000000000000
--- a/app-text/cuneiform/files/cuneiform-1.1.0-fix_buffer_overflow_2.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Split original patch by Slawomir and update the same to apply neatly.
-Author: Bhavani Shankar <bhavi@ubuntu.com>
---- 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 ], "_!_");
- strcpy(decode_ASCII_to_[(uchar)liga_qm ], "_?_");
-- strcpy(decode_ASCII_to_[(uchar)liga_inv_exm], "_!!_");
-- strcpy(decode_ASCII_to_[(uchar)liga_inv_qm ], "_??_");
-+ strcpy(decode_ASCII_to_[(uchar)liga_inv_exm], "_!_");
-+ strcpy(decode_ASCII_to_[(uchar)liga_inv_qm ], "_?_");
- strcpy(decode_ASCII_to_[(uchar)liga_bull ], "\xB0");
- strcpy(decode_ASCII_to_[(uchar)left_quocket], "");
- strcpy(decode_ASCII_to_[(uchar)right_quocket], "");
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-gcc11.patch b/app-text/cuneiform/files/cuneiform-1.1.0-gcc11.patch
deleted file mode 100644
index 47677507b261..000000000000
--- a/app-text/cuneiform/files/cuneiform-1.1.0-gcc11.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- 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;
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-gcc6.patch b/app-text/cuneiform/files/cuneiform-1.1.0-gcc6.patch
deleted file mode 100644
index 5e7b6d80df05..000000000000
--- a/app-text/cuneiform/files/cuneiform-1.1.0-gcc6.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-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
- return FALSE;
- }
-
-- wNewHeight = (mbMarginsFlag ? abs(mrMargins.rmBottomMarg - mrMargins.rmTopMarg) : mpSourceDIB->GetLinesNumber());
-- wNewWidth = (mbMarginsFlag ? abs(mrMargins.rmLeftMarg - mrMargins.rmRightMarg) : mpSourceDIB->GetLineWidth());
-+ wNewHeight = (mbMarginsFlag ? std::abs(int32_t(mrMargins.rmBottomMarg) - int32_t(mrMargins.rmTopMarg)) : mpSourceDIB->GetLinesNumber());
-+ wNewWidth = (mbMarginsFlag ? std::abs(int32_t(mrMargins.rmLeftMarg) - int32_t(mrMargins.rmRightMarg)) : mpSourceDIB->GetLineWidth());
- mpSourceDIB->GetResolutionDPM( &wXResolution, &wYResolution);
-
- if ( !mpDestinationDIB->CreateDIBBegin( wNewWidth, wNewHeight, BitCount) )
---- a/cuneiform_src/Kern/include/minmax.h
-+++ b/cuneiform_src/Kern/include/minmax.h
-@@ -67,6 +67,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- #define MAX(a,b) (((a)>(b))?(a):(b))
- #endif
-
-+#ifndef __cplusplus
-+
- #ifndef min
- #define min(a,b) (((a)>(b))?(b):(a))
- #endif
-@@ -75,3 +77,5 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- #endif
-
- #endif
-+
-+#endif
---- a/cuneiform_src/Kern/rcutp/sources/main/rcutp_func.cpp
-+++ b/cuneiform_src/Kern/rcutp/sources/main/rcutp_func.cpp
-@@ -902,8 +902,8 @@ int16_t i,ver_byte,interval,l1,r1,minl
- if(l1<0 || r1<0) return -1;
- if(i>0)
- {
-- minl=MIN(minl,l1); minr=min(minr,r1);
-- maxl=MAX(maxl,l1); maxr=max(maxr,r1);
-+ minl=MIN(minl,l1); minr=MIN(minr,r1);
-+ maxl=MAX(maxl,l1); maxr=MAX(maxr,r1);
- }
- else
- {
---- a/cuneiform_src/Kern/lns32/src/xydim.h
-+++ b/cuneiform_src/Kern/lns32/src/xydim.h
-@@ -86,8 +86,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- );
- };
- void expandX( int l, int r ){
-- left = min( left, l );
-- right = max( right, r);
-+ left = MIN( left, l );
-+ right = MAX( right, r);
- };
-
- };
-@@ -115,8 +115,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- );
- };
- void expandY( int b, int t ){
-- bottom = min( bottom, b );
-- top = max( top, t );
-+ bottom = MIN( bottom, b );
-+ top = MAX( top, t );
- };
-
- };
-@@ -145,10 +145,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- );
- };
- void restrictXY( int x1, int x2, int y1, int y2 ){
-- left = max( left, x1 );
-- right = min( right, x2 );
-- bottom = max(bottom, y1);
-- top = min(top, y2);
-+ left = MAX( left, x1 );
-+ right = MIN( right, x2 );
-+ bottom = MAX(bottom, y1);
-+ top = MIN(top, y2);
- };
- void expandXY( TXYDim* brother ){
- expandX( brother->left, brother->right );
---- a/cuneiform_src/Kern/rcorrkegl/src/cpp/cor_kegl.cpp
-+++ b/cuneiform_src/Kern/rcorrkegl/src/cpp/cor_kegl.cpp
-@@ -75,6 +75,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- #include "cor_kegl.h"
- #include "garbage.h"
- #include "ligas.h"
-+#include "minmax.h"
-
- #ifndef MAXINT32
- #define MAXINT32 0x7FFFFFFF
-@@ -1563,7 +1564,7 @@ static int32_t rect_dist(Rect32 *main, R
- int32_t y2=test->top-main->bottom;
- if (x1>0 || x2>0 || y1>0 || y2>0) //не пересекаютс
- {
-- x=MAX(x1,x2); y=max(y1,y2);
-+ x=MAX(x1,x2); y=MAX(y1,y2);
- if (x<0) return y;
- if (y<0) return x;
- return MIN(x,y);
-@@ -1574,7 +1575,7 @@ static int32_t rect_dist(Rect32 *main, R
- x2=test->right-main->right;
- y1=main->top-test->top;
- y2=test->bottom-main->bottom;
-- x=MAX(x1,x2); y=max(y1,y2);
-+ x=MAX(x1,x2); y=MAX(y1,y2);
- x=MAX(x,y);
- return (x>0) ? x : 0;
- }
---- a/cuneiform_src/Kern/rcutp/sources/main/rcutp_mainfunc.cpp
-+++ b/cuneiform_src/Kern/rcutp/sources/main/rcutp_mainfunc.cpp
-@@ -73,13 +73,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-
- extern int16_t minrow,bbs1,bbs2,bbs3,bbs4,Nb1,Nb2,Nb3;
- extern uchar language;
--#ifndef max
--#define MAX(a,b) (((a) > (b)) ? (a) : (b))
--#endif
--
--#ifndef min
--#define MIN(a,b) (((a) < (b)) ? (a) : (b))
--#endif
-
- extern int16_t up_position,dw_position;
- uchar MemForCutPoints[65536];
---- a/cuneiform_src/Kern/hhh/lst3_win.h
-+++ b/cuneiform_src/Kern/hhh/lst3_win.h
-@@ -845,7 +845,7 @@ int WidthPRS,MaxShtrih;
- dist+=par.kv*dv; \
- }
-
--#define DIST_V(u1,d1,u2,d2) (min(d1,d2)-max(u1,u2))
-+#define DIST_V(u1,d1,u2,d2) (MIN(d1,d2)-MAX(u1,u2))
-
- #define DV_FRM(a,b) DIST_V(a->up,a->down,b->up,b->down)
-
---- a/cuneiform_src/Kern/lns32/src/lns.cpp
-+++ b/cuneiform_src/Kern/lns32/src/lns.cpp
-@@ -190,8 +190,8 @@ void __RejectNearBound(LinesTotalInfo*
- break; // keep lines, if lack
- if (li.Flags & LI_NOISE)
- continue;
-- Point32 Mn; Mn.x = MIN(li.A.x,li.B.x); Mn.y = min(li.A.y,li.B.y);
-- Point32 Mx; Mx.x = MAX(li.A.x,li.B.x); Mx.y = max(li.A.y,li.B.y);
-+ Point32 Mn; Mn.x = MIN(li.A.x,li.B.x); Mn.y = MIN(li.A.y,li.B.y);
-+ Point32 Mx; Mx.x = MAX(li.A.x,li.B.x); Mx.y = MAX(li.A.y,li.B.y);
- if ((Mn.y < imgrect.top + 50) || (Mx.y > imgrect.bottom - 50))
- {
- if (!__HasCorners(li, plti, TRUE))
-@@ -213,8 +213,8 @@ void __RejectNearBound(LinesTotalInfo*
- continue;
- if (vcnt < 5)
- break; // keep lines, if lack
-- Point32 Mn; Mn.x = MIN(li.A.x,li.B.x); Mn.y = min(li.A.y,li.B.y);
-- Point32 Mx; Mx.x = MAX(li.A.x,li.B.x); Mx.y = max(li.A.y,li.B.y);
-+ Point32 Mn; Mn.x = MIN(li.A.x,li.B.x); Mn.y = MIN(li.A.y,li.B.y);
-+ Point32 Mx; Mx.x = MAX(li.A.x,li.B.x); Mx.y = MAX(li.A.y,li.B.y);
- if ((Mn.x < imgrect.left + 50) || (Mx.x > imgrect.right - 50))
- {
- if (!__HasCorners(li, plti, FALSE))
---- a/cuneiform_src/Kern/lns32/src/lnscheck.cpp
-+++ b/cuneiform_src/Kern/lns32/src/lnscheck.cpp
-@@ -66,8 +66,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- #include "decl.h"
-
- typedef Point16 XPoint16;
--#define maxi max
--#define mini min
-+#define maxi MAX
-+#define mini MIN
- #define PPSArray TArray
-
- #define CONSOLE /* This can also be printf. */
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-gcc7.patch b/app-text/cuneiform/files/cuneiform-1.1.0-gcc7.patch
deleted file mode 100644
index 25fb846924ed..000000000000
--- a/app-text/cuneiform/files/cuneiform-1.1.0-gcc7.patch
+++ /dev/null
@@ -1,97 +0,0 @@
---- 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"
- # include "c_types.h"
-+# include "cttypes.h"
-
- struct _String;
- typedef struct _String STRING;
---- 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
-
-
--const char win1250_to_utf8[][4] = {
-+const unsigned char win1250_to_utf8[][4] = {
- {0, 0, 0, 0},
- {1, 0, 0, 0},
- {2, 0, 0, 0},
-@@ -328,7 +328,7 @@ const char win1250_to_utf8[][4] = {
- };
-
-
--const char win1251_to_utf8[][4] = {
-+const unsigned char win1251_to_utf8[][4] = {
- {0, 0, 0, 0},
- {1, 0, 0, 0},
- {2, 0, 0, 0},
-@@ -587,7 +587,7 @@ const char win1251_to_utf8[][4] = {
- {209, 143, 0, 0},
- };
-
--const char win1252_to_utf8[][4] = {
-+const unsigned char win1252_to_utf8[][4] = {
- {0, 0, 0, 0},
- {1, 0, 0, 0},
- {2, 0, 0, 0},
-@@ -847,7 +847,7 @@ const char win1252_to_utf8[][4] = {
- };
-
-
--const char win1254_to_utf8[][4] = {
-+const unsigned char win1254_to_utf8[][4] = {
- {0, 0, 0, 0},
- {1, 0, 0, 0},
- {2, 0, 0, 0},
-@@ -1107,7 +1107,7 @@ const char win1254_to_utf8[][4] = {
- };
-
-
--const char win1257_to_utf8[][4] = {
-+const unsigned char win1257_to_utf8[][4] = {
- {0, 0, 0, 0},
- {1, 0, 0, 0},
- {2, 0, 0, 0},
---- 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.
- */
-
--const char * getUTF8Str(const unsigned char in, const int codepage) {
-+const unsigned char * getUTF8Str(const unsigned char in, const int codepage) {
- switch(codepage) {
- case 1250 : return win1250_to_utf8[in];
- case 1251 : return win1251_to_utf8[in];
- case 1252 : return win1252_to_utf8[in];
- case 1254 : return win1254_to_utf8[in];
- case 1257 : return win1257_to_utf8[in];
-- default : return "?";
-+ default : return (const unsigned char *) "?";
- }
- }
---- 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();
- long GetCodePage();
--const char * getUTF8Str(const unsigned char in, const int codepage);
-+const unsigned char * getUTF8Str(const unsigned char in, const int codepage);
-
- //*****************************************************************
- // Rout.cpp
---- 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;
- }
- else {
-- const char *utfchar;
-+ const unsigned char *utfchar;
- utfchar = getUTF8Str((char )c2, GetCodePage());
- int i;
- for(i=0; utfchar[i] != '\0' ;i++){
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-graphicsmagick.patch b/app-text/cuneiform/files/cuneiform-1.1.0-graphicsmagick.patch
deleted file mode 100644
index ae1d8242b1fa..000000000000
--- a/app-text/cuneiform/files/cuneiform-1.1.0-graphicsmagick.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Description: Use GraphicsMagick instead of ImageMagick.
-Author: Jakub Wilk <jwilk@debian.org>
---- a/cuneiform_src/cli/cuneiform-cli.cpp
-+++ b/cuneiform_src/cli/cuneiform-cli.cpp
-@@ -341,6 +341,10 @@
- Magick::InitializeMagick("");
- #endif
-
-+#ifdef USE_MAGICK
-+ Magick::InitializeMagick("");
-+#endif
-+
- dib = read_file(infilename);
- if(!dib) // Error msg is already printed so just get out.
- return 1;
---- a/cuneiform_src/CMakeLists.txt
-+++ b/cuneiform_src/CMakeLists.txt
-@@ -34,15 +34,16 @@
-
- add_definitions(-D_USE_RVERLINE_)
-
--find_package(ImageMagick COMPONENTS Magick++)
--if(ImageMagick_Magick++_FOUND)
-+include(FindPkgConfig)
-+pkg_check_modules(GraphicsMagick QUIET GraphicsMagick++)
-+if(GraphicsMagick_FOUND)
- set(USE_MAGICK TRUE)
-- include_directories(${ImageMagick_Magick++_INCLUDE_DIR})
-- message(STATUS "ImageMagick++ found at ${ImageMagick_Magick++_INCLUDE_DIR}.")
-- set(cli_ext_libs ${ImageMagick_Magick++_LIBRARY})
-+ include_directories(${GraphicsMagick_INCLUDE_DIRS})
-+ message(STATUS "GraphicsMagick++ found at ${GraphicsMagick_INCLUDE_DIRS}.")
-+ set(cli_ext_libs ${GraphicsMagick_LIBRARIES})
- else()
- set(USE_MAGICK FALSE)
-- message(STATUS "ImageMagick++ not found. Only uncompressed BMP images supported.")
-+ message(STATUS "GraphicsMagick++ not found. Only uncompressed BMP images supported.")
- endif()
-
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Kern/include/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Kern/include/config.h)
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-libm.patch b/app-text/cuneiform/files/cuneiform-1.1.0-libm.patch
deleted file mode 100644
index 88347abbb04d..000000000000
--- a/app-text/cuneiform/files/cuneiform-1.1.0-libm.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Description: Link the leo and r35 libraries with libm.
-Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>, Jakub Wilk <jwilk@debian.org>
---- a/cuneiform_src/Kern/leo/CMakeLists.txt
-+++ b/cuneiform_src/Kern/leo/CMakeLists.txt
-@@ -23,6 +23,7 @@
- msk32
- r3532
- std32
-+m
- )
-
- library_hook(leo32)
---- a/cuneiform_src/Kern/r35/CMakeLists.txt
-+++ b/cuneiform_src/Kern/r35/CMakeLists.txt
-@@ -3,6 +3,6 @@
-
- set_property(TARGET r3532 PROPERTY COMPILE_DEFINITIONS __R35__)
-
--target_link_libraries(r3532 mmx32 std32 cfcompat)
-+target_link_libraries(r3532 mmx32 std32 cfcompat m)
-
- library_hook(r3532)
diff --git a/app-text/cuneiform/files/cuneiform-1.1.0-typos.patch b/app-text/cuneiform/files/cuneiform-1.1.0-typos.patch
deleted file mode 100644
index 3e5fcf21c8d2..000000000000
--- a/app-text/cuneiform/files/cuneiform-1.1.0-typos.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-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;
- # ifdef LT_DEBUG
- //if (LT_DebugGraphicsLevel >= 2)
- if(!LDPUMA_Skip(hFirstDustAbsorbtion))
-- LT_GraphicsBlocksOutput ("After first dust absorbtion");
-+ LT_GraphicsBlocksOutput ("After first dust absorption");
- # endif
-
- PageMatrixExcludeSeparators (TRUE);
-@@ -368,7 +368,7 @@ i=0; i=i;
- # ifdef LT_DEBUG
- //if (LT_DebugGraphicsLevel >= 2)
- if(!LDPUMA_Skip(hSecondDustAbsorbtion))
-- LT_GraphicsBlocksOutput ("After second dust absorbtion");
-+ LT_GraphicsBlocksOutput ("After second dust absorption");
- # endif
-
- if (cut_page_left || cut_page_right)
---- a/cuneiform_src/Kern/rstr/src/pass3.c
-+++ b/cuneiform_src/Kern/rstr/src/pass3.c
-@@ -648,7 +648,7 @@ ready_BL:;
- {
- if (snap_activity('d'))
- {
-- snap_show_text("Skiped as dust");
-+ snap_show_text("Skipped as dust");
- snap_monitor();
- }
-
-@@ -3135,7 +3135,7 @@ Bool match_word_prepare(CSTR_line ln, uc
- {
- if (snap_activity('n'))
- {
-- snap_show_text("Skiped as dust");
-+ snap_show_text("Skipped as dust");
- snap_monitor();
- }
- return FALSE;
---- a/cuneiform_src/Kern/rstr/src/snap.c
-+++ b/cuneiform_src/Kern/rstr/src/snap.c
-@@ -542,7 +542,7 @@ if( short_spell_re(wrd,lang) )
- else
- strcat(buf," n");
-
--strcat(buf," new agressive : ");
-+strcat(buf," new aggressive : ");
- if( _spell_agressive(wrd,lang) )
- strcat(buf,"y ");
- else
diff --git a/app-text/cuneiform/files/cuneiform.1 b/app-text/cuneiform/files/cuneiform.1
deleted file mode 100644
index 93fd25030a80..000000000000
--- a/app-text/cuneiform/files/cuneiform.1
+++ /dev/null
@@ -1,166 +0,0 @@
-.TH CUNEIFORM 1 "2010-09-14" "1.0.0" "multi-language OCR system"
-
-.SH NAME
-cuneiform \- multi-language OCR system
-
-.SH SYNOPSIS
-\fBcuneiform\fR [\-\-dotmatrix] [\-\-fax] [\-\-singlecolumn] [\-f \fIformat\fR] [\-l \fIlanguage\fR] [\-o \fIoutput\fR] \fIinput\fR
-
-.SH DESCRIPTION
-Cuneiform is an OCR system. In addition to text recognition it also does layout analysis and text format recognition. Cuneiform supports several languages.
-
-.SH OPTIONS
-.IP "\fB\-\-dotmatrix\fR" 4
-Use recognition mode optimized for text printed with a dot matrix printer.
-.IP "\fB\-\-fax\fR" 4
-Use recognition mode optimized for text that has been faxed.
-.IP "\fB\-\-singlecolumn\fR" 4
-Disable page layout analysis and assumes that the image consists of only one column of text.
-.IP "\fB\-f\fR \fIformat\fR" 4
-Select output format. The following formats are available:
-\fBhtml\fR (HTML format),
-\fBhocr\fR (hOCR HTML format),
-\fBnative\fR (native Cuneiform 2000),
-\fBrtf\fR (RTF format),
-\fBsmarttext\fR (plain text with TeX paragraphs),
-\fBtext\fR (plain text).
-The default is plain text.
-.IP "\fB\-l\fR \fIlanguage\fR" 4
-By default Cuneiform recognizes English text. To change the language use the command line switch \fB\-l\fR followed by a language code (typically an ISO 639-2 three-letter code). The following languages are supported:
-.TS
-ll.
-T{
-\fBbul\fR
-T} T{
-Bulgarian
-T}
-T{
-\fBcze\fR
-T} T{
-Czech
-T}
-T{
-\fBdan\fR
-T} T{
-Danish
-T}
-T{
-\fBdut\fR
-T} T{
-Dutch
-T}
-T{
-\fBeng\fR
-T} T{
-English
-T}
-T{
-\fBest\fR
-T} T{
-Estonian
-T}
-T{
-\fBfra\fR
-T} T{
-French
-T}
-T{
-\fBger\fR
-T} T{
-German
-T}
-T{
-\fBhrv\fR
-T} T{
-Croatian
-T}
-T{
-\fBhun\fR
-T} T{
-Hungarian
-T}
-T{
-\fBita\fR
-T} T{
-Italian
-T}
-T{
-\fBlav\fR
-T} T{
-Latvian
-T}
-T{
-\fBlit\fR
-T} T{
-Lithuanian
-T}
-T{
-\fBpol\fR
-T} T{
-Polish
-T}
-T{
-\fBpor\fR
-T} T{
-Portugese
-T}
-T{
-\fBrum\fR
-T} T{
-Romanian
-T}
-T{
-\fBrus\fR
-T} T{
-Russian
-T}
-T{
-\fBruseng\fR
-T} T{
-mixed Russian/English
-T}
-T{
-\fBslv\fR
-T} T{
-Slovenian
-T}
-T{
-\fBspa\fR
-T} T{
-Spanish
-T}
-T{
-\fBsrp\fR
-T} T{
-Serbian
-T}
-T{
-\fBswe\fR
-T} T{
-Swedish
-T}
-T{
-\fBtur\fR
-T} T{
-Turkish
-T}
-T{
-\fBukr\fR
-T} T{
-Ukrainian
-T}
-.TE
-.
-.IP "\fB\-o\fR \fIoutput\fR" 4
-If you do not define an output file with the \fB\-o\fR switch, Cuneiform writes the result to a file \[oq]cuneiform-out.\fIformat\fR\[cq]. The file extension depends on your output format.
-
-.SH INPUT FORMAT
-Cuneiform can process any single-page image that GraphicsMagick knows how to open. Please consult the \fBgm\fR(1) manual page for the comprehensive list of supported image formats.
-
-.SH HOMEPAGE
-More information about cuneiform can be found at <\fIhttp://launchpad.net/cuneiform-linux/\fR>.
-
-.SH AUTHOR
-cuneiform was written by Cognitive Technologies and Jussi Pakkanen <\fIjpakkane@gmail.com\fR>.
-.PP
-This manual page was written by Daniel Baumann <\fIdaniel@debian.org\fR>, for the Debian project (but may be used by others).
diff --git a/app-text/cuneiform/metadata.xml b/app-text/cuneiform/metadata.xml
deleted file mode 100644
index 003d130a6b55..000000000000
--- a/app-text/cuneiform/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="launchpad">cuneiform-linux</remote-id>
- </upstream>
-</pkgmetadata>