gscan2pdf: update to 2.8.0.
This commit is contained in:
parent
9ff9323c0f
commit
5c6f96dc7b
@ -1,6 +1,6 @@
|
||||
--- lib/Gscan2pdf/Tesseract.pm.orig
|
||||
+++ lib/Gscan2pdf/Tesseract.pm
|
||||
@@ -23,14 +23,14 @@
|
||||
--- lib/Gscan2pdf/Tesseract.pm.orig 2020-07-12 13:36:35.561949445 +0200
|
||||
+++ lib/Gscan2pdf/Tesseract.pm 2020-07-12 13:36:42.433470852 +0200
|
||||
@@ -23,28 +23,28 @@
|
||||
return $installed if $setup;
|
||||
|
||||
( undef, my $exe ) =
|
||||
@ -13,11 +13,20 @@
|
||||
# we can use --list-langs and not bother with tessdata
|
||||
( undef, my $out, my $err ) =
|
||||
- Gscan2pdf::Document::exec_command( [ 'tesseract', '-v' ] );
|
||||
- if ( $err =~ /^tesseract[ ]([\d.]+)/xsm ) {
|
||||
+ Gscan2pdf::Document::exec_command( [ 'tesseract-ocr', '-v' ] );
|
||||
if ( $err =~ /^tesseract[ ]([\d.]+)/xsm ) {
|
||||
+ if ( $err =~ /^tesseract-ocr[ ]([\d.]+)/xsm ) {
|
||||
$version = $1;
|
||||
}
|
||||
@@ -44,7 +44,7 @@
|
||||
- elsif ( $out =~ /^tesseract[ ]([\d.]+)/xsm ) {
|
||||
+ elsif ( $out =~ /^tesseract-ocr[ ]([\d.]+)/xsm ) {
|
||||
$version = $1;
|
||||
}
|
||||
if ( $version and version->parse("v$version") > version->parse('v3.02') ) {
|
||||
- $logger->info("Found tesseract version $version.");
|
||||
+ $logger->info("Found tesseract-ocr version $version.");
|
||||
$setup = 1;
|
||||
return $installed;
|
||||
}
|
||||
|
||||
( $out, $err ) =
|
||||
@ -26,6 +35,24 @@
|
||||
( $tessdata, $version, $datasuffix ) = parse_tessdata( $out . $err );
|
||||
|
||||
if ( not defined $tessdata ) {
|
||||
@@ -53,7 +53,7 @@
|
||||
{
|
||||
( undef, my $lib ) =
|
||||
Gscan2pdf::Document::exec_command( [ 'ldd', $exe ] );
|
||||
- if ( $lib =~ /libtesseract[.]so[.]\d+[ ]=>[ ]([\/\w\-.]+)[ ]/xsm ) {
|
||||
+ if ( $lib =~ /libtesseract-ocr[.]so[.]\d+[ ]=>[ ]([\/\w\-.]+)[ ]/xsm ) {
|
||||
( undef, $out ) =
|
||||
Gscan2pdf::Document::exec_command( [ 'strings', $1 ] );
|
||||
$tessdata = parse_strings($out);
|
||||
@@ -68,7 +68,7 @@
|
||||
}
|
||||
|
||||
$logger->info(
|
||||
- "Found tesseract version $version. Using tessdata at $tessdata");
|
||||
+ "Found tesseract-ocr version $version. Using tessdata at $tessdata");
|
||||
$setup = 1;
|
||||
return $installed;
|
||||
}
|
||||
@@ -162,7 +162,7 @@
|
||||
if ( version->parse("v$version") > version->parse('v3.02') ) {
|
||||
my ( undef, $out, $err ) =
|
||||
@ -35,6 +62,15 @@
|
||||
@codes = split /\n/xsm, $err ? $err : $out;
|
||||
if ( $codes[0] =~ /^List[ ]of[ ]available[ ]languages/xsm ) {
|
||||
shift @codes;
|
||||
@@ -181,7 +181,7 @@
|
||||
}
|
||||
|
||||
for (@codes) {
|
||||
- $logger->info("Found tesseract language $_");
|
||||
+ $logger->info("Found tesseract-ocr language $_");
|
||||
if ( defined $iso639{$_} ) {
|
||||
$languages{$_} = $iso639{$_};
|
||||
}
|
||||
@@ -246,21 +246,21 @@
|
||||
}
|
||||
if ( version->parse("v$version") >= version->parse('v3.02.02') ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user