gscan2pdf: update to 2.9.0.

This commit is contained in:
Helmut Pozimski 2020-09-24 20:04:10 +02:00
parent 6a9201694c
commit 3ff20876b2
2 changed files with 16 additions and 34 deletions

View File

@ -1,6 +1,6 @@
--- lib/Gscan2pdf/Tesseract.pm.orig 2020-07-12 21:27:40.576078589 +0200 --- lib/Gscan2pdf/Tesseract.pm.orig 2020-09-21 18:00:10.368568923 +0200
+++ lib/Gscan2pdf/Tesseract.pm 2020-07-12 21:27:58.302854959 +0200 +++ lib/Gscan2pdf/Tesseract.pm 2020-09-21 18:02:36.797305878 +0200
@@ -22,25 +22,25 @@ @@ -52,25 +52,25 @@
return $installed if $setup; return $installed if $setup;
( undef, my $exe ) = ( undef, my $exe ) =
@ -22,7 +22,7 @@
+ elsif ( $out =~ /^tesseract-ocr[ ]([\d.]+)/xsm ) { + elsif ( $out =~ /^tesseract-ocr[ ]([\d.]+)/xsm ) {
$version = $1; $version = $1;
} }
if ( not $version ) { return } if ( not $version ) { return }
if ( $version !~ /^\d+[.]\d+$/xsm ) { $version = 'v' . $version } if ( $version !~ /^\d+[.]\d+$/xsm ) { $version = 'v' . $version }
$version = version->parse($version); $version = version->parse($version);
if ( $version > version->parse('v3.02.00') ) { if ( $version > version->parse('v3.02.00') ) {
@ -31,8 +31,8 @@
$setup = 1; $setup = 1;
return $installed; return $installed;
} }
@@ -101,14 +101,14 @@ @@ -84,7 +84,7 @@
if ( not %languages ) {
my @codes; my @codes;
my ( undef, $out, $err ) = my ( undef, $out, $err ) =
- Gscan2pdf::Document::exec_command( [ 'tesseract', '--list-langs' ] ); - Gscan2pdf::Document::exec_command( [ 'tesseract', '--list-langs' ] );
@ -40,29 +40,12 @@
@codes = split /\n/xsm, $err ? $err : $out; @codes = split /\n/xsm, $err ? $err : $out;
if ( $codes[0] =~ /^List[ ]of[ ]available[ ]languages/xsm ) { if ( $codes[0] =~ /^List[ ]of[ ]available[ ]languages/xsm ) {
shift @codes; shift @codes;
} @@ -97,7 +97,7 @@
if ( not defined $name ) {
for (@codes) { $name = $code;
- $logger->info("Found tesseract language $_");
+ $logger->info("Found tesseract-ocr language $_");
if ( defined $iso639{$_} ) {
$languages{$_} = $iso639{$_};
} }
@@ -163,7 +163,7 @@ - $logger->info("Found tesseract language $code ($name)");
} + $logger->info("Found tesseract-ocr language $code ($name)");
if ( $version > version->parse('v3.05.00') ) { $languages{$code} = $name;
$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',
];
} }

View File

@ -1,8 +1,7 @@
# Template file for 'gscan2pdf'. # Template file for 'gscan2pdf'.
pkgname=gscan2pdf pkgname=gscan2pdf
version=2.8.2 version=2.9.0
revision=1 revision=1
archs=noarch
build_style=perl-module build_style=perl-module
hostmakedepends="perl gettext" hostmakedepends="perl gettext"
makedepends="ImageMagick djvulibre libmagick-perl perl-Config-General 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-Gtk3-SimpleList perl-HTML-Parser perl-IO-String perl-Image-Sane
perl-Linux-Distribution perl-List-MoreUtils perl-Locale-gettext perl-Linux-Distribution perl-List-MoreUtils perl-Locale-gettext
perl-Log-Log4perl perl-PDF-API2 perl-Pango perl-Proc-ProcessTable perl-Readonly 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" depends="$makedepends sane"
short_desc="GUI to produce PDFs or DjVus from scanned documents" short_desc="GUI to produce PDFs or DjVus from scanned documents"
maintainer="Helmut Pozimski <helmut@pozimski.eu>" maintainer="Helmut Pozimski <helmut@pozimski.eu>"
license="GPL-3.0-or-later" license="GPL-3.0-or-later"
homepage="http://gscan2pdf.sourceforge.net" homepage="http://gscan2pdf.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.xz" distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
checksum=4328433f62bb9c7a9182a2c80f0d6b748f4c39b01c2e6b8a1733c34403e7df36 checksum=efa2a08c1b92e3dfb58421dc5d443c51f786cd72c7b7247e3d7ee76c30ecae29
nocross=yes nocross=yes
do_check() { do_check() {