From 29af76660410e062ddef50fa42f6392774acc7a9 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Fri, 21 Jul 2017 13:51:43 -0500 Subject: cuneiform-1.1.0-17.parabola1: gcc5 removal --- libre/cuneiform/PKGBUILD | 14 +++--- libre/cuneiform/build-fix.patch | 95 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 6 deletions(-) create mode 100644 libre/cuneiform/build-fix.patch diff --git a/libre/cuneiform/PKGBUILD b/libre/cuneiform/PKGBUILD index 4d83f3135..0bfc2a183 100644 --- a/libre/cuneiform/PKGBUILD +++ b/libre/cuneiform/PKGBUILD @@ -1,23 +1,26 @@ # $Id: PKGBUILD 200098 2016-12-18 10:27:54Z arojas $ # Maintainer (Arch): Sergej Pupykin # Contributor (Arch): Maxim Vuets -# Maintainer: André Silva +# Maintainer (Hyperbola): André Silva +# Maintainer: Omar Vega Ramos pkgname=cuneiform pkgver=1.1.0 _dpkgver=1.1 -pkgrel=15.parabola1 +pkgrel=17.parabola1 pkgdesc="GNU/Linux port of an OCR system developed in Russia. Supports more than 20 languages, without nonfree data files" arch=('i686' 'x86_64') url="https://launchpad.net/cuneiform-linux" license=('BSD') depends=('imagemagick') -makedepends=('cmake' 'gcc5') +makedepends=('cmake') mksource=(http://launchpad.net/cuneiform-linux/${_dpkgver}/${_dpkgver}/+download/cuneiform-linux-${pkgver}.tar.bz2) source=("https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.tar.bz2" + 'build-fix.patch' 'libre.patch') mksha256sums=('577e0d054de72086c33b4e8ae15033657776509b9a7af6eb272888eefcbdbbad') sha256sums=('714b740d79c4799ec1bd340e3721d17f6d0e09ae54cd5667a01eddc8c4b758b4' + 'd2f746f91c79af8cf15ea1877f39881e3d16d7b15ef99b3106c3c2493acd95a5' '9db29dcd11faf92ed68d4af35c659b6f5e96b0864c15342be8e014817af8be2d') mksource() { @@ -28,12 +31,13 @@ mksource() { prepare() { cd "${srcdir}/${pkgname}-${pkgver}" + sed -i 's#lib64#lib#' install_files.cmake + patch -p1 -i "$srcdir"/build-fix.patch patch -p1 -i ../libre.patch } build() { cd "${srcdir}/${pkgname}-${pkgver}" - sed -i 's#lib64#lib#' install_files.cmake mkdir -p builddir cd builddir @@ -42,8 +46,6 @@ build() { cmake \ -DCMAKE_BUILD_TYPE=release \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_CXX_COMPILER=g++-5 \ - -DCMAKE_C_COMPILER=gcc-5 \ -DImageMagick_Magick++_LIBRARY=$LMAGICK \ -DImageMagick_Magick++_INCLUDE_DIR=/usr/include/ImageMagick-6 \ .. diff --git a/libre/cuneiform/build-fix.patch b/libre/cuneiform/build-fix.patch new file mode 100644 index 000000000..ef3cac29b --- /dev/null +++ b/libre/cuneiform/build-fix.patch @@ -0,0 +1,95 @@ +diff -wbBur cuneiform-linux-1.1.0/cuneiform_src/Kern/include/utf8-tables.h cuneiform-linux-1.1.0.q/cuneiform_src/Kern/include/utf8-tables.h +--- cuneiform-linux-1.1.0/cuneiform_src/Kern/include/utf8-tables.h 2011-04-19 16:49:57.000000000 +0400 ++++ cuneiform-linux-1.1.0.q/cuneiform_src/Kern/include/utf8-tables.h 2017-07-05 16:35:34.338871445 +0300 +@@ -68,7 +68,7 @@ + #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 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 @@ + {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 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 win1257_to_utf8[][4] = { ++const unsigned char win1257_to_utf8[][4] = { + {0, 0, 0, 0}, + {1, 0, 0, 0}, + {2, 0, 0, 0}, +diff -wbBur cuneiform-linux-1.1.0/cuneiform_src/Kern/rfrmt/sources/main/stdafx.h cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rfrmt/sources/main/stdafx.h +--- cuneiform-linux-1.1.0/cuneiform_src/Kern/rfrmt/sources/main/stdafx.h 2011-04-19 16:49:57.000000000 +0400 ++++ cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rfrmt/sources/main/stdafx.h 2017-07-05 16:37:23.528866265 +0300 +@@ -74,6 +74,9 @@ + //отключаем warning о слишком длинных stl'ных именах + #pragma warning(disable:4786) + ++#undef min ++#undef max ++ + #include + typedef std::vector vectorWord; + +diff -wbBur cuneiform-linux-1.1.0/cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp +--- cuneiform-linux-1.1.0/cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp 2011-04-19 16:49:57.000000000 +0400 ++++ cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp 2017-07-05 16:33:02.962211959 +0300 +@@ -594,8 +594,8 @@ + return FALSE; + } + +- wNewHeight = (mbMarginsFlag ? abs(mrMargins.rmBottomMarg - mrMargins.rmTopMarg) : mpSourceDIB->GetLinesNumber()); +- wNewWidth = (mbMarginsFlag ? abs(mrMargins.rmLeftMarg - mrMargins.rmRightMarg) : mpSourceDIB->GetLineWidth()); ++ wNewHeight = (mbMarginsFlag ? std::abs((long int)(mrMargins.rmBottomMarg - mrMargins.rmTopMarg)) : mpSourceDIB->GetLinesNumber()); ++ wNewWidth = (mbMarginsFlag ? std::abs((long int)(mrMargins.rmLeftMarg - mrMargins.rmRightMarg)) : mpSourceDIB->GetLineWidth()); + mpSourceDIB->GetResolutionDPM( &wXResolution, &wYResolution); + + if ( !mpDestinationDIB->CreateDIBBegin( wNewWidth, wNewHeight, BitCount) ) +diff -wbBur cuneiform-linux-1.1.0/cuneiform_src/Kern/rout/src/codetables.cpp cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rout/src/codetables.cpp +--- cuneiform-linux-1.1.0/cuneiform_src/Kern/rout/src/codetables.cpp 2011-04-19 16:49:57.000000000 +0400 ++++ cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rout/src/codetables.cpp 2017-07-05 16:36:05.178869982 +0300 +@@ -939,11 +939,11 @@ + + const 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]; ++ case 1250 : return (const char *)win1250_to_utf8[in]; ++ case 1251 : return (const char *)win1251_to_utf8[in]; ++ case 1252 : return (const char *)win1252_to_utf8[in]; ++ case 1254 : return (const char *)win1254_to_utf8[in]; ++ case 1257 : return (const char *)win1257_to_utf8[in]; + default : return "?"; + } + } -- cgit v1.2.3