From 12dee237bbe6f978032611cc7e0d388abb6acab3 Mon Sep 17 00:00:00 2001 From: Marcin Deranek Date: Thu, 28 Jan 2021 13:28:35 +0100 Subject: [media-gfx/iscan] New ebuild --- .../iscan/files/iscan-3.61.0-ijg-libjpeg.patch | 45 +++++++++ .../iscan/files/iscan-3.61.0-imagemagick-7.patch | 54 ++++++++++ .../iscan/files/iscan-3.62.0-boost-1.73.patch | 44 ++++++++ .../iscan/files/iscan-3.62.0-fix-symbols.patch | 34 +++++++ media-gfx/iscan/files/iscan-3.62.0-gcc-10.patch | 20 ++++ .../iscan/files/iscan-3.62.0-tests-boost.patch | 81 +++++++++++++++ .../iscan/files/iscan-3.62.0-tests-linkage.patch | 94 +++++++++++++++++ .../iscan/files/iscan-3.62.0-tests-tesseract.patch | 111 +++++++++++++++++++++ .../iscan/files/iscan-3.63.0-autoconf-2.70.patch | 34 +++++++ 9 files changed, 517 insertions(+) create mode 100644 media-gfx/iscan/files/iscan-3.61.0-ijg-libjpeg.patch create mode 100644 media-gfx/iscan/files/iscan-3.61.0-imagemagick-7.patch create mode 100644 media-gfx/iscan/files/iscan-3.62.0-boost-1.73.patch create mode 100644 media-gfx/iscan/files/iscan-3.62.0-fix-symbols.patch create mode 100644 media-gfx/iscan/files/iscan-3.62.0-gcc-10.patch create mode 100644 media-gfx/iscan/files/iscan-3.62.0-tests-boost.patch create mode 100644 media-gfx/iscan/files/iscan-3.62.0-tests-linkage.patch create mode 100644 media-gfx/iscan/files/iscan-3.62.0-tests-tesseract.patch create mode 100644 media-gfx/iscan/files/iscan-3.63.0-autoconf-2.70.patch (limited to 'media-gfx/iscan/files') diff --git a/media-gfx/iscan/files/iscan-3.61.0-ijg-libjpeg.patch b/media-gfx/iscan/files/iscan-3.61.0-ijg-libjpeg.patch new file mode 100644 index 0000000..2625741 --- /dev/null +++ b/media-gfx/iscan/files/iscan-3.61.0-ijg-libjpeg.patch @@ -0,0 +1,45 @@ +--- a/filters/jpeg.cpp ++++ b/filters/jpeg.cpp +@@ -410,13 +410,13 @@ + cinfo_.image_height = ctx_.height (); + + jpeg_set_defaults (&cinfo_); +- jpeg_set_quality (&cinfo_, quality_, true); ++ jpeg_set_quality (&cinfo_, quality_, TRUE); + + cinfo_.density_unit = 1; // in dpi + cinfo_.X_density = ctx_.x_resolution (); + cinfo_.Y_density = ctx_.y_resolution (); + +- jpeg_start_compress (&cinfo_, true); ++ jpeg_start_compress (&cinfo_, TRUE); + + cache_ = new octet[ctx_.octets_per_line ()]; + cache_size_ = ctx_.octets_per_line (); +@@ -462,7 +462,7 @@ + dmgr_.next_output_byte = jbuf_ + (jbuf_size_ - n); + dmgr_.free_in_buffer = n; + +- return true; ++ return TRUE; + } + + void +@@ -535,7 +535,7 @@ + + //jpegデータの一部が分割されて送られてきても正常に動作するように変更 + +- return false; ++ return FALSE; + } + + void +@@ -580,7 +580,7 @@ + { + if (!header_done_) + { +- if (JPEG_SUSPENDED == jpeg_read_header (&cinfo_, true)) ++ if (JPEG_SUSPENDED == jpeg_read_header (&cinfo_, TRUE)) + { + log::trace ("jpeg_read_header suspended"); + if (!reclaim_space ()) diff --git a/media-gfx/iscan/files/iscan-3.61.0-imagemagick-7.patch b/media-gfx/iscan/files/iscan-3.61.0-imagemagick-7.patch new file mode 100644 index 0000000..9d345a2 --- /dev/null +++ b/media-gfx/iscan/files/iscan-3.61.0-imagemagick-7.patch @@ -0,0 +1,54 @@ +From 222aa3e123ee771d8997f6931997e3143186e0d6 Mon Sep 17 00:00:00 2001 +From: sirjaren +Date: Tue, 20 Feb 2018 13:35:46 -0600 +Subject: [PATCH] media-gfx/utsushi: ImageMagick deskew/crop support + +Fixes to allow utsushi to be built with --magick-pp. According to: + https://github.com/utsushi/utsushi/issues/43 + +The API changes from ImageMagick 6 to 7 means build failures as there +are old API's in use. It seems, that these API's are not actually used +(as in GraphicsMagick doesn't use them), so it may be ok to disable the +checks for them in 'doc-locate.cpp'. + +This is not yet confirmed, but allows building and using deskew in my +own testing. +--- + .../files/utsushi-9999-magick-pp.patch | 33 ++++++++++ + 4 files changed, 111 insertions(+), 8 deletions(-) + create mode 100644 media-gfx/utsushi/files/utsushi-9999-boost.patch + create mode 100644 media-gfx/utsushi/files/utsushi-9999-magick-pp.patch + +diff --git a/filters/doc-locate.cpp b/filters/doc-locate.cpp +index 4b09b29..4508274 100644 +--- a/filters/doc-locate.cpp ++++ b/filters/doc-locate.cpp +@@ -260,17 +260,17 @@ public: + clone.rotate (deskew_angle ()); + + Magick::Geometry rv = bbox (clone); +- if (HAVE_IMAGE_MAGICK_PP) +- { +- if (clone.page ().xNegative ()) +- rv.xOff (rv.xOff () - clone.page ().xOff()); +- else +- rv.xOff (rv.xOff () + clone.page ().xOff()); +- if (clone.page ().yNegative ()) +- rv.yOff (rv.yOff () - clone.page ().yOff()); +- else +- rv.yOff (rv.yOff () + clone.page ().yOff()); +- } ++ /*if (HAVE_IMAGE_MAGICK_PP) ++ *{ ++ * if (clone.page ().xNegative ()) ++ * rv.xOff (rv.xOff () - clone.page ().xOff()); ++ * else ++ * rv.xOff (rv.xOff () + clone.page ().xOff()); ++ * if (clone.page ().yNegative ()) ++ * rv.yOff (rv.yOff () - clone.page ().yOff()); ++ * else ++ * rv.yOff (rv.yOff () + clone.page ().yOff()); ++ }*/ + return scale (rv); + } + diff --git a/media-gfx/iscan/files/iscan-3.62.0-boost-1.73.patch b/media-gfx/iscan/files/iscan-3.62.0-boost-1.73.patch new file mode 100644 index 0000000..da6cc66 --- /dev/null +++ b/media-gfx/iscan/files/iscan-3.62.0-boost-1.73.patch @@ -0,0 +1,44 @@ +diff -urN a/drivers/esci/verify.cpp b/drivers/esci/verify.cpp +--- a/drivers/esci/verify.cpp 2019-11-18 04:08:45.000000000 +0200 ++++ b/drivers/esci/verify.cpp 2020-05-09 20:22:00.899968638 +0300 +@@ -58,6 +58,7 @@ + + using namespace utsushi; + using namespace _drv_::esci; ++using namespace boost::placeholders; + + using std::basic_string; + using std::ios_base; +diff -urN a/lib/monitor.cpp b/lib/monitor.cpp +--- a/lib/monitor.cpp 2019-11-18 04:08:08.000000000 +0200 ++++ b/lib/monitor.cpp 2020-05-09 20:22:26.392174029 +0300 +@@ -49,6 +49,7 @@ + namespace utsushi { + + using boost::filesystem::exists; ++using namespace boost::placeholders; + + class monitor::impl + { +diff -urN a/sane/handle.cpp b/sane/handle.cpp +--- a/sane/handle.cpp 2019-11-18 04:08:08.000000000 +0200 ++++ b/sane/handle.cpp 2020-05-09 20:21:49.559223712 +0300 +@@ -65,6 +65,7 @@ + using utsushi::_flt_::deskew; + using utsushi::_flt_::autocrop; + using utsushi::_flt_::pnm; ++using namespace boost::placeholders; + + namespace sane { + +--- utsushi-0.62.0/gtkmm/pump.cpp.orig 2019-11-18 03:08:48.000000000 +0100 ++++ utsushi-0.62.0/gtkmm/pump.cpp 2020-05-10 21:59:32.986379049 +0200 +@@ -31,6 +31,8 @@ + namespace utsushi { + namespace gtkmm { + ++using namespace boost::placeholders; ++ + pump::pump (idevice::ptr idev) + : utsushi::pump (idev) + , idev_ptr_(idev) diff --git a/media-gfx/iscan/files/iscan-3.62.0-fix-symbols.patch b/media-gfx/iscan/files/iscan-3.62.0-fix-symbols.patch new file mode 100644 index 0000000..4c0d44b --- /dev/null +++ b/media-gfx/iscan/files/iscan-3.62.0-fix-symbols.patch @@ -0,0 +1,34 @@ +commit 4cbb42cc3d2c7e7574dc10f0e6f9f53bdf4d34e8 +Author: blubee +Date: Sun Oct 22 16:22:23 2017 +0800 + + Export correct symbols + + The factory was renamed to scanner_factory in 4b77b4a4. + +diff --git a/drivers/Makefile.am b/drivers/Makefile.am +index 86694ac..282eaa3 100644 +--- a/drivers/Makefile.am ++++ b/drivers/Makefile.am +@@ -28,7 +28,7 @@ driverlibdir = $(pkglibdir) + driverdatadir = $(pkgsysconfdir) + driver_ldflags = $(AM_LDFLAGS) + driver_ldflags += -export-dynamic +-driver_ldflags += -export-symbols-regex libdrv_$(driver)_LTX_factory ++driver_ldflags += -export-symbols-regex libdrv_$(driver)_LTX_scanner_factory + + driverlib_LTLIBRARIES = libdrv-combo.la + +diff --git a/drivers/esci/Makefile.am b/drivers/esci/Makefile.am +index 78ed9be..9cb6bc8 100644 +--- a/drivers/esci/Makefile.am ++++ b/drivers/esci/Makefile.am +@@ -37,7 +37,7 @@ driverlibdir = $(pkglibdir) + driverdatadir = $(pkgdatadir)/drivers/esci + driver_ldflags = $(AM_LDFLAGS) + driver_ldflags += -export-dynamic +-driver_ldflags += -export-symbols-regex libdrv_$(driver)_LTX_factory ++driver_ldflags += -export-symbols-regex libdrv_$(driver)_LTX_scanner_factory + + driverlib_LTLIBRARIES = libdrv-esci.la + diff --git a/media-gfx/iscan/files/iscan-3.62.0-gcc-10.patch b/media-gfx/iscan/files/iscan-3.62.0-gcc-10.patch new file mode 100644 index 0000000..4f8c63c --- /dev/null +++ b/media-gfx/iscan/files/iscan-3.62.0-gcc-10.patch @@ -0,0 +1,20 @@ +--- a/utsushi/string.hpp 2020-05-08 23:20:11.642359134 +0200 ++++ b/utsushi/string.hpp 2020-05-08 23:20:21.834246187 +0200 +@@ -23,6 +23,7 @@ + + #include + #include ++#include + + #include + +--- a/utsushi/toggle.hpp 2019-11-18 03:08:06.000000000 +0100 ++++ b/utsushi/toggle.hpp 2020-05-08 23:23:40.284045167 +0200 +@@ -22,6 +22,7 @@ + #define utsushi_toggle_hpp_ + + #include ++#include + #include + + namespace utsushi { diff --git a/media-gfx/iscan/files/iscan-3.62.0-tests-boost.patch b/media-gfx/iscan/files/iscan-3.62.0-tests-boost.patch new file mode 100644 index 0000000..a559351 --- /dev/null +++ b/media-gfx/iscan/files/iscan-3.62.0-tests-boost.patch @@ -0,0 +1,81 @@ +commit 13f483741fb1da2bf3d5e96286d0fe84a3f77288 +Author: Olaf Meeuwissen +Date: Sun Mar 3 21:25:46 2019 +0900 + + Switch BOOST_MESSAGE usage to use BOOST_TEST_MESSAGE + + The former has been marked as deprecated since Boost 1.34.0 and was + removed in 1.59.0 (released 2015-08-13). + +diff --git a/lib/tests/memory.cpp b/lib/tests/memory.cpp +index 3fa21df..bf523df 100644 +--- a/lib/tests/memory.cpp ++++ b/lib/tests/memory.cpp +@@ -1,5 +1,6 @@ + // memory.cpp -- unit tests for the memory device implementations + // Copyright (C) 2012, 2015 SEIKO EPSON CORPORATION ++// Copyright (C) 2019 Olaf Meeuwissen + // + // License: GPL-3.0+ + // Author : EPSON AVASYS CORPORATION +@@ -145,7 +146,7 @@ constant_octets (octet value) + const streamsize margin = 10; + const octet nul = 0x00; + traits::assign (buffer, size, nul); +- BOOST_MESSAGE ("value: " << value ); ++ BOOST_TEST_MESSAGE ("value: " << value ); + + setmem_idevice dev (shared_ptr + (new const_generator (value))); +diff --git a/sane/tests/backend.cpp b/sane/tests/backend.cpp +index f2ff7ef..e21edd0 100644 +--- a/sane/tests/backend.cpp ++++ b/sane/tests/backend.cpp +@@ -1,5 +1,6 @@ + // backend.cpp -- unit tests for the SANE utsushi backend + // Copyright (C) 2012, 2013, 2015 SEIKO EPSON CORPORATION ++// Copyright (C) 2019 Olaf Meeuwissen + // + // License: GPL-3.0+ + // Author : EPSON AVASYS CORPORATION +@@ -755,8 +756,8 @@ drop_test_suite (const std::string& name) + but::traverse_test_tree (tuid, tcc); + + master.remove (tuid); +- BOOST_MESSAGE ("Disabled \"" << name << "\" test suite for lack of " +- "a mock device (" << tcc.p_count << " test cases)"); ++ BOOST_TEST_MESSAGE ("Disabled \"" << name << "\" test suite for lack of " ++ "a mock device (" << tcc.p_count << " test cases)"); + } + + bool +@@ -766,7 +767,7 @@ init_test_runner () + + but::master_test_suite_t& master (but::framework::master_test_suite ()); + +- BOOST_MESSAGE ("Initializing \"" << master.p_name << "\" test suite"); ++ BOOST_TEST_MESSAGE ("Initializing \"" << master.p_name << "\" test suite"); + + utsushi::monitor mon; // to discover devices + +commit dcd5de24246b8ac5a96f971b6b0adfb910f5c60e +Author: Olaf Meeuwissen +Date: Sun Mar 3 21:40:39 2019 +0900 + + Add headers needed by Boost 1.59.0 and later + +diff --git a/sane/tests/backend.cpp b/sane/tests/backend.cpp +index e21edd0..77fbf96 100644 +--- a/sane/tests/backend.cpp ++++ b/sane/tests/backend.cpp +@@ -27,6 +27,10 @@ + #include + + #include ++#if 105800 <= BOOST_VERSION ++#include ++#include ++#endif + #include + + #include diff --git a/media-gfx/iscan/files/iscan-3.62.0-tests-linkage.patch b/media-gfx/iscan/files/iscan-3.62.0-tests-linkage.patch new file mode 100644 index 0000000..ecdf497 --- /dev/null +++ b/media-gfx/iscan/files/iscan-3.62.0-tests-linkage.patch @@ -0,0 +1,94 @@ +commit 1d58388b6fc4f5055c19d1815e3252625fd8ab3f +Author: Olaf Meeuwissen +Date: Sun Mar 3 21:22:28 2019 +0900 + + Fix link issues with the unit test runners + +diff --git a/drivers/esci/tests/Makefile.am b/drivers/esci/tests/Makefile.am +index d00f129..9c8f766 100644 +--- a/drivers/esci/tests/Makefile.am ++++ b/drivers/esci/tests/Makefile.am +@@ -1,5 +1,6 @@ + ## Makefile.am -- an automake template for Makefile.in + ## Copyright (C) 2012-2015 SEIKO EPSON CORPORATION ++## Copyright (C) 2019 Olaf Meeuwissen + ## + ## License: GPL-3.0+ + ## Author : EPSON AVASYS CORPORATION +@@ -39,16 +40,22 @@ AM_CPPFLAGS += -DESCI_GRAMMAR_TRACE=1 + AM_LDFLAGS += $(BOOST_LDFLAGS) + + LDADD = ../libdrv-esci.la $(LIBUTSUSHI_LIBS) +-grammar_formats_utr_LDADD = $(LDADD) $(BOOST_FILESYSTEM_LIB) +-grammar_utr_LDADD = $(LDADD) $(BOOST_FILESYSTEM_LIB) +-## FIXME: remove once usb connexion is a proper plugin +-setter_utr_LDADD = $(LDADD) ../../../connexions/libcnx-usb.la ++grammar_formats_utr_LDADD = $(LDADD) $(BOOST_FILESYSTEM_LIB) ++grammar_utr_LDADD = $(LDADD) $(BOOST_FILESYSTEM_LIB) ++udev_rules_utr_LDADD = $(BOOST_UNIT_TEST_FRAMEWORK_LIB) ++udev_rules_utr_LDADD += $(BOOST_FILESYSTEM_LIB) ++udev_rules_utr_LDADD += $(BOOST_REGEX_LIB) ++## FIXME: remove when connexions are turned into proper plugins ++setter_utr_LDADD = $(LDADD) ++setter_utr_LDADD += ../../../connexions/libcnx-usb.la ++setter_utr_LDADD += ../../../connexions/libcnx-hexdump.la + grammar_formats_utr_LDADD += ../../../connexions/libcnx-usb.la ++grammar_formats_utr_LDADD += ../../../connexions/libcnx-hexdump.la + grammar_utr_LDADD += ../../../connexions/libcnx-usb.la +-grammar_mechanics_utr_LDADD = $(LDADD) ../../../connexions/libcnx-usb.la +-udev_rules_utr_LDADD = $(BOOST_UNIT_TEST_FRAMEWORK_LIB) +-udev_rules_utr_LDADD += $(BOOST_FILESYSTEM_LIB) +-udev_rules_utr_LDADD += $(BOOST_REGEX_LIB) ++grammar_utr_LDADD += ../../../connexions/libcnx-hexdump.la ++grammar_mechanics_utr_LDADD = $(LDADD) ++grammar_mechanics_utr_LDADD += ../../../connexions/libcnx-usb.la ++grammar_mechanics_utr_LDADD += ../../../connexions/libcnx-hexdump.la + + endif + +diff --git a/filters/tests/Makefile.am b/filters/tests/Makefile.am +index 4d88e48..ac198df 100644 +--- a/filters/tests/Makefile.am ++++ b/filters/tests/Makefile.am +@@ -1,6 +1,6 @@ + ## Makefile.am -- an automake template for Makefile.in + ## Copyright (C) 2012-2014 SEIKO EPSON CORPORATION +-## Copyright (C) 2013, 2015 Olaf Meeuwissen ++## Copyright (C) 2013, 2015, 2019 Olaf Meeuwissen + ## + ## License: GPL-3.0+ + ## Author : EPSON AVASYS CORPORATION +@@ -39,8 +39,9 @@ endif + + LDADD = ../libflt-all.la + LDADD += ../../lib/libutsushi.la $(LIBUTSUSHI_LIBS) +-## FIXME: drop once usb connexion is a proper plugin ++## FIXME: drop when connexions have been turned into proper plugins + LDADD += ../../connexions/libcnx-usb.la ++LDADD += ../../connexions/libcnx-hexdump.la + + if have_libjpeg + check_PROGRAMS += jpeg.utr +diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am +index fc5eeb5..f24a7da 100644 +--- a/lib/tests/Makefile.am ++++ b/lib/tests/Makefile.am +@@ -1,6 +1,6 @@ + ## Makefile.am -- an automake template for Makefile.in + ## Copyright (C) 2012, 2013 SEIKO EPSON CORPORATION +-## Copyright (C) 2015 Olaf Meeuwissen ++## Copyright (C) 2015, 2019 Olaf Meeuwissen + ## + ## License: GPL-3.0+ + ## Author : EPSON AVASYS CORPORATION +@@ -62,8 +62,9 @@ log_no_check_utr_CPPFLAGS += -DUTSUSHI_LOG_ARGUMENT_COUNT_CHECK_ENABLED=false + AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\"" + + LDADD = ../libutsushi.la $(LIBUTSUSHI_LIBS) +-## FIXME: drop once usb connexion is a proper plugin ++## FIXME: drop when connexions have been turned into proper plugins + LDADD += ../../connexions/libcnx-usb.la ++LDADD += ../../connexions/libcnx-hexdump.la + + if have_libtiff + test_runners += tiff.utr diff --git a/media-gfx/iscan/files/iscan-3.62.0-tests-tesseract.patch b/media-gfx/iscan/files/iscan-3.62.0-tests-tesseract.patch new file mode 100644 index 0000000..52f7b18 --- /dev/null +++ b/media-gfx/iscan/files/iscan-3.62.0-tests-tesseract.patch @@ -0,0 +1,111 @@ +commit 9ce60e8df3b613950c483f0ae5ec772afc329104 +Author: Olaf Meeuwissen +Date: Fri Jun 21 22:20:30 2019 +0900 + + Fix tesseract command-line invocation. Re #78 + +diff --git a/filters/get-text-orientation b/filters/get-text-orientation +index 847f2c6..6f0978c 100755 +--- a/filters/get-text-orientation ++++ b/filters/get-text-orientation +@@ -47,26 +47,14 @@ if test $? != 0; then + exit 1 + fi + +-tmpfile=$(mktemp -q .reorient.XXX) +-trap "rm -f $tmpfile" 0 1 2 15 +- + case "$engine" in + */tesseract|tesseract) + +- # Notwithstanding what the manual page says, tesseract +- # doesn't support reading from standard input with the +- # `-psm 0` option. We stuff incoming image data into a +- # temporary file to work around this limitation. +- # See https://github.com/tesseract-ocr/tesseract/issues/85 +- +- cat - > $tmpfile ++ # Tesseract 3.03 outputs the results we want to standard ++ # error; Tesseract 3.04 dumps it on standard output. We ++ # want it on the latter. + +- # We don't care about the "regular" tesseract output so +- # divert that to /dev/null. The output that we do care +- # about ends up on standard error, but our caller looks +- # for it on standard output. Redirect to handle that. +- +- $engine $tmpfile /dev/null -psm 0 -l osd 2>&1 ++ $engine - - -psm 0 -l osd 2>&1 + ;; + + */ocr-engine-getrotate) +@@ -74,6 +62,9 @@ case "$engine" in + # The ocr-engine-getrotate utility expects an uncompressed + # BMP image. + ++ tmpfile=$(mktemp -q .reorient.XXX) ++ trap "rm -f $tmpfile" 0 1 2 15 ++ + $convert - -compress None bmp3:$tmpfile + $engine $tmpfile + ;; + +commit 56f1d8ed51cc7140b961ef8ab8c7501f69d87fd5 +Author: Olaf Meeuwissen +Date: Mon Oct 21 12:41:20 2019 +0900 + + Fix get-text-orientation for newer Tesseract versions. Fixes #86 + +diff --git a/filters/get-text-orientation b/filters/get-text-orientation +index 6f0978c..eb64e4b 100755 +--- a/filters/get-text-orientation ++++ b/filters/get-text-orientation +@@ -51,10 +51,21 @@ case "$engine" in + */tesseract|tesseract) + + # Tesseract 3.03 outputs the results we want to standard +- # error; Tesseract 3.04 dumps it on standard output. We +- # want it on the latter. ++ # error; Tesseract 3.04 dumps it on standard output. So ++ # do later versions. We want it on the latter. ++ # Command-line options changed in 3.05.00. + +- $engine - - -psm 0 -l osd 2>&1 ++ version=$($engine --version 2>&1 | sed -n 's/.*tesseract *//p') ++ ++ case "$version" in ++ 3.0[34].* ) ++ $engine - - -psm 0 -l osd 2>&1 ++ ;; ++ ++ 3.05.* | [45].* ) ++ $engine - - --psm 0 -l osd 2>&1 ++ ;; ++ esac + ;; + + */ocr-engine-getrotate) +commit 9d5edc4c52e5a6b59d61a43ddcc13353b82992f5 +Author: Olaf Meeuwissen +Date: Sun Jun 23 17:22:22 2019 +0900 + + Fix reorientation logic for newer Tesseract versions. Re #78 + +diff --git a/filters/reorient.cpp b/filters/reorient.cpp +index e0c1dc1..60c5173 100644 +--- a/filters/reorient.cpp ++++ b/filters/reorient.cpp +@@ -483,6 +483,13 @@ reorient::finalize (const context& ctx) + log::alert + (format ("unexpected document orientation: %1% degrees") + % degrees); ++ ++ if (engine_ == "tesseract" ++ && !tesseract_version_before_("3.04")) { ++ // Orientation reporting changed direct with 3.04. See #78 ++ /**/ if ( 90 == degrees) rv.orientation (context::left_bottom); ++ else if (270 == degrees) rv.orientation (context::right_top); ++ } + } + return rv; + } diff --git a/media-gfx/iscan/files/iscan-3.63.0-autoconf-2.70.patch b/media-gfx/iscan/files/iscan-3.63.0-autoconf-2.70.patch new file mode 100644 index 0000000..bda9329 --- /dev/null +++ b/media-gfx/iscan/files/iscan-3.63.0-autoconf-2.70.patch @@ -0,0 +1,34 @@ +--- a/configure.ac 2020-10-19 22:50:43.160537331 +0200 ++++ b/configure.ac 2020-10-19 22:56:41.724847150 +0200 +@@ -352,7 +352,7 @@ + AM_CONDITIONAL([have_libusb], [test x != "x$LIBUSB_LIBS"]) + + AS_IF([test xno != "x$with_magick_pp"], +- AS_CASE("x$with_magick_pp", ++ [AS_CASE("x$with_magick_pp", + [xGraphicsMagick], + [PKG_CHECK_MODULES([LIBMAGICK_PP], [GraphicsMagick++], + [AC_DEFINE([HAVE_GRAPHICS_MAGICK_PP], [1])]) +@@ -373,11 +373,11 @@ + ], + [dnl default case + AC_MSG_ERROR([unknown value: --with-magick-pp=$with_magick_pp]) +- ])) ++ ])]) + AM_CONDITIONAL([have_libmagick_pp], [test x != "x$LIBMAGICK_PP_LIBS"]) + + AS_IF([test xno != "x$with_magick"], +- AS_CASE("x$with_magick", ++ [AS_CASE("x$with_magick", + [xGraphicsMagick], + [AC_CHECK_PROGS([MAGICK_CONVERT], [gm]) + AS_IF([test xgm != x$MAGICK_CONVERT], +@@ -408,7 +408,7 @@ + ], + [dnl default case + AC_MSG_ERROR([unknown value: --with-magick=$with_magick]) +- ])) ++ ])]) + AC_DEFINE_UNQUOTED([MAGICK_CONVERT], ["$MAGICK_CONVERT"]) + AM_CONDITIONAL([have_magick], [test x != "x$MAGICK_CONVERT"]) + -- cgit v1.2.3