diff --git a/srcpkgs/gscan2pdf/patches/tesseract.patch b/srcpkgs/gscan2pdf/patches/tesseract.patch index a2d20a67cd5..b9450e03654 100644 --- a/srcpkgs/gscan2pdf/patches/tesseract.patch +++ b/srcpkgs/gscan2pdf/patches/tesseract.patch @@ -1,6 +1,6 @@ ---- lib/Gscan2pdf/Tesseract.pm.orig 2020-07-12 21:27:40.576078589 +0200 -+++ lib/Gscan2pdf/Tesseract.pm 2020-07-12 21:27:58.302854959 +0200 -@@ -22,25 +22,25 @@ +--- lib/Gscan2pdf/Tesseract.pm.orig 2020-09-21 18:00:10.368568923 +0200 ++++ lib/Gscan2pdf/Tesseract.pm 2020-09-21 18:02:36.797305878 +0200 +@@ -52,25 +52,25 @@ return $installed if $setup; ( undef, my $exe ) = @@ -22,7 +22,7 @@ + elsif ( $out =~ /^tesseract-ocr[ ]([\d.]+)/xsm ) { $version = $1; } - if ( not $version ) { return } + if ( not $version ) { return } if ( $version !~ /^\d+[.]\d+$/xsm ) { $version = 'v' . $version } $version = version->parse($version); if ( $version > version->parse('v3.02.00') ) { @@ -31,8 +31,8 @@ $setup = 1; return $installed; } -@@ -101,14 +101,14 @@ - +@@ -84,7 +84,7 @@ + if ( not %languages ) { my @codes; my ( undef, $out, $err ) = - Gscan2pdf::Document::exec_command( [ 'tesseract', '--list-langs' ] ); @@ -40,29 +40,12 @@ @codes = split /\n/xsm, $err ? $err : $out; if ( $codes[0] =~ /^List[ ]of[ ]available[ ]languages/xsm ) { shift @codes; - } - - for (@codes) { -- $logger->info("Found tesseract language $_"); -+ $logger->info("Found tesseract-ocr language $_"); - if ( defined $iso639{$_} ) { - $languages{$_} = $iso639{$_}; +@@ -97,7 +97,7 @@ + if ( not defined $name ) { + $name = $code; } -@@ -163,7 +163,7 @@ - } - if ( $version > version->parse('v3.05.00') ) { - $cmd = [ -- 'tesseract', $tif, -+ 'tesseract-ocr', $tif, - $path . $name, '--dpi', $options{dpi}, '-l', - $options{language}, '-c', - 'tessedit_create_hocr=1', -@@ -172,7 +172,7 @@ - } - else { - $cmd = [ -- 'tesseract', $tif, $path . $name, '-l', -+ 'tesseract-ocr', $tif, $path . $name, '-l', - $options{language}, '-c', 'tessedit_create_hocr=1', - ]; +- $logger->info("Found tesseract language $code ($name)"); ++ $logger->info("Found tesseract-ocr language $code ($name)"); + $languages{$code} = $name; + } } diff --git a/srcpkgs/gscan2pdf/template b/srcpkgs/gscan2pdf/template index 6e01328a391..ce646ad1aef 100644 --- a/srcpkgs/gscan2pdf/template +++ b/srcpkgs/gscan2pdf/template @@ -1,8 +1,7 @@ # Template file for 'gscan2pdf'. pkgname=gscan2pdf -version=2.8.2 +version=2.9.0 revision=1 -archs=noarch build_style=perl-module hostmakedepends="perl gettext" makedepends="ImageMagick djvulibre libmagick-perl perl-Config-General @@ -10,14 +9,14 @@ makedepends="ImageMagick djvulibre libmagick-perl perl-Config-General perl-Gtk3-SimpleList perl-HTML-Parser perl-IO-String perl-Image-Sane perl-Linux-Distribution perl-List-MoreUtils perl-Locale-gettext perl-Log-Log4perl perl-PDF-API2 perl-Pango perl-Proc-ProcessTable perl-Readonly - perl-Set-IntSpan perl-Try-Tiny unpaper xdg-utils" + perl-Set-IntSpan perl-Try-Tiny unpaper xdg-utils perl-Locale-Codes" depends="$makedepends sane" short_desc="GUI to produce PDFs or DjVus from scanned documents" maintainer="Helmut Pozimski " license="GPL-3.0-or-later" homepage="http://gscan2pdf.sourceforge.net" distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.xz" -checksum=4328433f62bb9c7a9182a2c80f0d6b748f4c39b01c2e6b8a1733c34403e7df36 +checksum=efa2a08c1b92e3dfb58421dc5d443c51f786cd72c7b7247e3d7ee76c30ecae29 nocross=yes do_check() {