From b86c891268704070aad6c5f020a45c54e3e319d6 Mon Sep 17 00:00:00 2001 From: Eloi Torrents Date: Thu, 16 Feb 2023 18:37:44 +0100 Subject: [PATCH 1/3] leptonica: update to 1.83.1. --- common/shlibs | 2 +- .../patches/fix-flaky-test-on-i686.patch | 70 ------------------- srcpkgs/leptonica/template | 24 +++++-- 3 files changed, 20 insertions(+), 76 deletions(-) delete mode 100644 srcpkgs/leptonica/patches/fix-flaky-test-on-i686.patch diff --git a/common/shlibs b/common/shlibs index 0c1d545fbe27..3374f1b695bf 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2300,7 +2300,7 @@ libOkteta3Gui.so.0 okteta-0.26.0_1 libhttp_parser.so.2.9 http-parser-2.9.0_1 libmaa.so.4 libmaa-1.4.2_1 libcodeblocks.so.0 codeblocks-13.12_1 -liblept.so.5 leptonica-1.73_1 +liblept.so.6 leptonica-1.83.1_1 libtesseract.so.4 tesseract-ocr-4.0.0_1 libffmpegthumbnailer.so.4 ffmpegthumbnailer-2.0.10_1 libopenraw.so.7 libopenraw-0.1.0_1 diff --git a/srcpkgs/leptonica/patches/fix-flaky-test-on-i686.patch b/srcpkgs/leptonica/patches/fix-flaky-test-on-i686.patch deleted file mode 100644 index bec1a2482f41..000000000000 --- a/srcpkgs/leptonica/patches/fix-flaky-test-on-i686.patch +++ /dev/null @@ -1,70 +0,0 @@ -From ea2bb8c9cf61d3eba2589cfaac05f59a33b4110d Mon Sep 17 00:00:00 2001 -From: danblooomberg -Date: Sun, 14 Nov 2021 14:52:24 -0800 -Subject: [PATCH] Fix flaky hash_reg test on i686 * The sets that are generated - from *SelectRange() functions can depend on the platform, resulting in - intersection sizes that differ by 1. * So, loosen the comparison to allow a - difference of 1. - ---- - prog/hash_reg.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/prog/hash_reg.c b/prog/hash_reg.c -index 8b408d6d..3414ba90 100644 ---- a/prog/hash_reg.c -+++ b/prog/hash_reg.c -@@ -100,7 +100,7 @@ L_REGPARAMS *rp; - sarrayIntersectionByAset(sa1, sa2, &sa3); - c1 = sarrayGetCount(sa3); - sarrayDestroy(&sa3); -- regTestCompareValues(rp, string_intersection, c1, 0); /* 2 */ -+ regTestCompareValues(rp, string_intersection, c1, 1); /* 2 */ - if (rp->display) lept_stderr(" aset: intersection size = %d\n", c1); - sarrayUnionByAset(sa1, sa2, &sa3); - c1 = sarrayGetCount(sa3); -@@ -123,7 +123,7 @@ L_REGPARAMS *rp; - sarrayIntersectionByHmap(sa1, sa2, &sa3); - c1 = sarrayGetCount(sa3); - sarrayDestroy(&sa3); -- regTestCompareValues(rp, string_intersection, c1, 0); /* 6 */ -+ regTestCompareValues(rp, string_intersection, c1, 1); /* 6 */ - if (rp->display) lept_stderr(" hmap: intersection size = %d\n", c1); - sarrayUnionByHmap(sa1, sa2, &sa3); - c1 = sarrayGetCount(sa3); -@@ -160,7 +160,7 @@ L_REGPARAMS *rp; - ptaIntersectionByAset(pta1, pta2, &pta3); - c1 = ptaGetCount(pta3); - ptaDestroy(&pta3); -- regTestCompareValues(rp, pta_intersection, c1, 0); /* 10 */ -+ regTestCompareValues(rp, pta_intersection, c1, 1); /* 10 */ - if (rp->display) lept_stderr(" aset: intersection size = %d\n", c1); - ptaUnionByAset(pta1, pta2, &pta3); - c1 = ptaGetCount(pta3); -@@ -182,7 +182,7 @@ L_REGPARAMS *rp; - ptaIntersectionByHmap(pta1, pta2, &pta3); - c1 = ptaGetCount(pta3); - ptaDestroy(&pta3); -- regTestCompareValues(rp, pta_intersection, c1, 0); /* 14 */ -+ regTestCompareValues(rp, pta_intersection, c1, 1); /* 14 */ - if (rp->display) lept_stderr(" hmap: intersection size = %d\n", c1); - ptaUnionByHmap(pta1, pta2, &pta3); - c1 = ptaGetCount(pta3); -@@ -220,7 +220,7 @@ L_REGPARAMS *rp; - l_dnaIntersectionByAset(da1, da2, &da3); - c1 = l_dnaGetCount(da3); - l_dnaDestroy(&da3); -- regTestCompareValues(rp, da_intersection, c1, 0); /* 18 */ -+ regTestCompareValues(rp, da_intersection, c1, 1); /* 18 */ - if (rp->display) lept_stderr(" aset: intersection size = %d\n", c1); - l_dnaUnionByAset(da1, da2, &da3); - c1 = l_dnaGetCount(da3); -@@ -242,7 +242,7 @@ L_REGPARAMS *rp; - l_dnaIntersectionByHmap(da1, da2, &da3); - c1 = l_dnaGetCount(da3); - l_dnaDestroy(&da3); -- regTestCompareValues(rp, da_intersection, c1, 0); /* 22 */ -+ regTestCompareValues(rp, da_intersection, c1, 1); /* 22 */ - if (rp->display) lept_stderr(" hmap: intersection size = %d\n", c1); - l_dnaUnionByHmap(da1, da2, &da3); - c1 = l_dnaGetCount(da3); diff --git a/srcpkgs/leptonica/template b/srcpkgs/leptonica/template index 53e939a255ff..b7805c20c8bd 100644 --- a/srcpkgs/leptonica/template +++ b/srcpkgs/leptonica/template @@ -1,18 +1,19 @@ # Template file for 'leptonica' pkgname=leptonica -version=1.82.0 +version=1.83.1 revision=1 -build_style=gnu-configure +build_style=cmake +configure_args="-DBUILD_PROG=ON -DBUILD_SHARED_LIBS=ON" hostmakedepends="pkg-config" makedepends="libopenjpeg2-devel libwebp-devel" checkdepends="which gnuplot" short_desc="Image processing and analysis library" -maintainer="Orphaned " +maintainer="Eloi Torrents " license="BSD-2-Clause" homepage="http://leptonica.org/" changelog="http://leptonica.org/source/version-notes.html" -distfiles="http://leptonica.org/source/${pkgname}-${version}.tar.gz" -checksum=155302ee914668c27b6fe3ca9ff2da63b245f6d62f3061c8f27563774b8ae2d6 +distfiles="https://github.com/DanBloomberg/leptonica/archive/refs/tags/${version}.tar.gz" +checksum=4289d0a4224b614010072253531c0455a33a4d7c7a0017fe7825ed382290c0da post_install() { vdoc moller52.jpg @@ -39,5 +40,18 @@ leptonica-examples_package() { rm -f -r prog/*.{l,}o prog/.deps prog/.libs # binaries, example source, images and data vcopy prog usr/share/leptonica + vbin prog/ps2png + vbin prog/pdf2mtiff + vbin prog/ps2jpeg + vbin prog/ps2png-color + vbin prog/ps2png-binary + vbin prog/pdf2tiff + vbin prog/pdf2jpeg + vbin prog/pdf2png-gray + vbin prog/pdf2png + vbin prog/ps2tiff + vbin prog/pdf2png-color + vbin prog/ps2png-gray + vbin prog/pdf2png-binary } } From 5a83893623302754a2bfe70ce5c14a4be9912277 Mon Sep 17 00:00:00 2001 From: Eloi Torrents Date: Fri, 17 Feb 2023 14:33:29 +0100 Subject: [PATCH 2/3] ccextractor: rebuild for leptonica. --- srcpkgs/ccextractor/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/ccextractor/template b/srcpkgs/ccextractor/template index 9abcd82852b2..7fe2ba4f27b6 100644 --- a/srcpkgs/ccextractor/template +++ b/srcpkgs/ccextractor/template @@ -1,7 +1,7 @@ # Template file for 'ccextractor' pkgname=ccextractor version=0.93 -revision=1 +revision=2 build_wrksrc="linux" build_style=gnu-configure configure_args="--enable-ocr --enable-hardsubx" From 4276771e6cdc6c5f388ebbe78077de523768d259 Mon Sep 17 00:00:00 2001 From: Eloi Torrents Date: Fri, 17 Feb 2023 14:33:39 +0100 Subject: [PATCH 3/3] tesseract-ocr: rebuild for leptonica. --- srcpkgs/tesseract-ocr/template | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/srcpkgs/tesseract-ocr/template b/srcpkgs/tesseract-ocr/template index 394f82aea2a8..3aea6d24bfee 100644 --- a/srcpkgs/tesseract-ocr/template +++ b/srcpkgs/tesseract-ocr/template @@ -1,7 +1,7 @@ # Template file for 'tesseract-ocr' pkgname=tesseract-ocr version=4.1.1 -revision=7 +revision=8 _tessdataver=4.0.0 create_wrksrc=yes build_style=gnu-configure @@ -62,7 +62,6 @@ post_install() { mv ${DESTDIR}/usr/share/man/man1/tesseract{,-ocr}.1 vdoc ChangeLog vdoc README.md - vlicense ${FILESDIR}/COPYING LICENSE-tessdata # Move the pseudo languges "equ" (math / equation detection) and # "osd" (orientation and script detection) to the main package for lang in equ osd; do