1 |
commit: bdc0a00e11351d7c09f9ca49cd1bd7236b308cb0 |
2 |
Author: Marcin Deranek <marcin.deranek <AT> booking <DOT> com> |
3 |
AuthorDate: Mon Aug 3 08:40:53 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 15 09:29:45 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdc0a00e |
7 |
|
8 |
media-gfx/iscan: Version bump to 3.63 with tests support |
9 |
|
10 |
Closes: https://bugs.gentoo.org/733148 |
11 |
Closes: https://bugs.gentoo.org/708368 |
12 |
Signed-off-by: Marcin Deranek <marcin.deranek <AT> slonko.net> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/16970 |
14 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
15 |
|
16 |
media-gfx/iscan/Manifest | 1 + |
17 |
.../iscan/files/iscan-3.62.0-fix-symbols.patch | 34 +++++++ |
18 |
.../iscan/files/iscan-3.62.0-tests-boost.patch | 81 +++++++++++++++ |
19 |
.../iscan/files/iscan-3.62.0-tests-linkage.patch | 94 +++++++++++++++++ |
20 |
.../iscan/files/iscan-3.62.0-tests-tesseract.patch | 111 +++++++++++++++++++++ |
21 |
media-gfx/iscan/iscan-3.63.0.ebuild | 98 ++++++++++++++++++ |
22 |
6 files changed, 419 insertions(+) |
23 |
|
24 |
diff --git a/media-gfx/iscan/Manifest b/media-gfx/iscan/Manifest |
25 |
index 858c9d2c1c7..20ecfd545e7 100644 |
26 |
--- a/media-gfx/iscan/Manifest |
27 |
+++ b/media-gfx/iscan/Manifest |
28 |
@@ -1,4 +1,5 @@ |
29 |
DIST imagescan_3.62.0.orig.tar.gz 12650003 BLAKE2B 732283eb8370192fdd0fba8939bc81e277a7a227b024f14856b8d3d5c562b7320c7b40aa48cfa627e23dc654544c9bac27d35add5e10bf0ca65ab0279290b90c SHA512 3b6188013d162c605a3ce1bcac9e5a7b16b1af6363bc7ef4b257aed1c0d3e3dfd402a048ec699b6b6cc42883d0b26f50f0c6f1bd0ddc917baed4ce8902a9d8fa |
30 |
+DIST imagescan_3.63.0.orig.tar.gz 12776113 BLAKE2B d1a9f1d60ba4a2239c6ed74f7f9e0da078e2743e78e0abb67a69506bf90ac35b069f84b5a092a6eb8fd73f60eb668e78b4c7fae56b3a65b6b3d8600f082c064a SHA512 3c9b18e630d6fb1c042244542675e89a8b467469d7212ab684f72100810d1f7d0ec16d13c472a83ca05a3a4fc44e366f692a36cd6b0e81c9a332dd3b40de9535 |
31 |
DIST iscan_2.30.4-2.tar.gz 1236167 BLAKE2B 598e55aa7099f7973b38f5c3227415c8ddfa7e8c645521981b4e8979047ab692427f5c1719fd83fe0635f2d4604f32f0baff8542f3e1a333298799c4cad7b980 SHA512 b12f374ff8ee1e1879fc6dbc579de39d7bcd4777ec7ad6e4345046f77b4ec13ae45ebdc2803d6907bc2747776aa7e32c313866138c7b8c7bcb53110a214154d2 |
32 |
DIST userg_revQ_e.pdf 627189 BLAKE2B ff57871c58dc541e30d65127bd8f4cc2a20ec5341c1d0914116f7ec4ae002d896853b99488eec71e5f8cb150e6b63d353efb9be11977de26d017701bc051014a SHA512 b09d5143855a759e0fa3e74794762566b6fbf734642f9d7f712e5f2f20e3dce6b830465fd65f83f9cc368292ce7a2c0cec709b0eba6356d95e1ba5114b3348fc |
33 |
DIST userg_revQ_j.pdf 734920 BLAKE2B ed2cffdc2dbf0a2403dcbd93cef3349b9e35afb305f9b36f92b8f11bd42b5281fc7bfbec108703f327fb538868c530418406d37505e6eb6afa621d2d49d007ba SHA512 d5cb0cebaae0ac36951379cad516f0575e85e0bb509cf88549239e300c7d6c6a4996497145acaa9e9783de6b08c6e352c7ffbedb23ed04c15eefbe9c3cf0bc90 |
34 |
|
35 |
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 |
36 |
new file mode 100644 |
37 |
index 00000000000..4c0d44bf9ee |
38 |
--- /dev/null |
39 |
+++ b/media-gfx/iscan/files/iscan-3.62.0-fix-symbols.patch |
40 |
@@ -0,0 +1,34 @@ |
41 |
+commit 4cbb42cc3d2c7e7574dc10f0e6f9f53bdf4d34e8 |
42 |
+Author: blubee <gurenchan@×××××.com> |
43 |
+Date: Sun Oct 22 16:22:23 2017 +0800 |
44 |
+ |
45 |
+ Export correct symbols |
46 |
+ |
47 |
+ The factory was renamed to scanner_factory in 4b77b4a4. |
48 |
+ |
49 |
+diff --git a/drivers/Makefile.am b/drivers/Makefile.am |
50 |
+index 86694ac..282eaa3 100644 |
51 |
+--- a/drivers/Makefile.am |
52 |
++++ b/drivers/Makefile.am |
53 |
+@@ -28,7 +28,7 @@ driverlibdir = $(pkglibdir) |
54 |
+ driverdatadir = $(pkgsysconfdir) |
55 |
+ driver_ldflags = $(AM_LDFLAGS) |
56 |
+ driver_ldflags += -export-dynamic |
57 |
+-driver_ldflags += -export-symbols-regex libdrv_$(driver)_LTX_factory |
58 |
++driver_ldflags += -export-symbols-regex libdrv_$(driver)_LTX_scanner_factory |
59 |
+ |
60 |
+ driverlib_LTLIBRARIES = libdrv-combo.la |
61 |
+ |
62 |
+diff --git a/drivers/esci/Makefile.am b/drivers/esci/Makefile.am |
63 |
+index 78ed9be..9cb6bc8 100644 |
64 |
+--- a/drivers/esci/Makefile.am |
65 |
++++ b/drivers/esci/Makefile.am |
66 |
+@@ -37,7 +37,7 @@ driverlibdir = $(pkglibdir) |
67 |
+ driverdatadir = $(pkgdatadir)/drivers/esci |
68 |
+ driver_ldflags = $(AM_LDFLAGS) |
69 |
+ driver_ldflags += -export-dynamic |
70 |
+-driver_ldflags += -export-symbols-regex libdrv_$(driver)_LTX_factory |
71 |
++driver_ldflags += -export-symbols-regex libdrv_$(driver)_LTX_scanner_factory |
72 |
+ |
73 |
+ driverlib_LTLIBRARIES = libdrv-esci.la |
74 |
+ |
75 |
|
76 |
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 |
77 |
new file mode 100644 |
78 |
index 00000000000..a5593512c0b |
79 |
--- /dev/null |
80 |
+++ b/media-gfx/iscan/files/iscan-3.62.0-tests-boost.patch |
81 |
@@ -0,0 +1,81 @@ |
82 |
+commit 13f483741fb1da2bf3d5e96286d0fe84a3f77288 |
83 |
+Author: Olaf Meeuwissen <paddy-hack@××××××××××.org> |
84 |
+Date: Sun Mar 3 21:25:46 2019 +0900 |
85 |
+ |
86 |
+ Switch BOOST_MESSAGE usage to use BOOST_TEST_MESSAGE |
87 |
+ |
88 |
+ The former has been marked as deprecated since Boost 1.34.0 and was |
89 |
+ removed in 1.59.0 (released 2015-08-13). |
90 |
+ |
91 |
+diff --git a/lib/tests/memory.cpp b/lib/tests/memory.cpp |
92 |
+index 3fa21df..bf523df 100644 |
93 |
+--- a/lib/tests/memory.cpp |
94 |
++++ b/lib/tests/memory.cpp |
95 |
+@@ -1,5 +1,6 @@ |
96 |
+ // memory.cpp -- unit tests for the memory device implementations |
97 |
+ // Copyright (C) 2012, 2015 SEIKO EPSON CORPORATION |
98 |
++// Copyright (C) 2019 Olaf Meeuwissen |
99 |
+ // |
100 |
+ // License: GPL-3.0+ |
101 |
+ // Author : EPSON AVASYS CORPORATION |
102 |
+@@ -145,7 +146,7 @@ constant_octets (octet value) |
103 |
+ const streamsize margin = 10; |
104 |
+ const octet nul = 0x00; |
105 |
+ traits::assign (buffer, size, nul); |
106 |
+- BOOST_MESSAGE ("value: " << value ); |
107 |
++ BOOST_TEST_MESSAGE ("value: " << value ); |
108 |
+ |
109 |
+ setmem_idevice dev (shared_ptr<setmem_idevice::generator> |
110 |
+ (new const_generator (value))); |
111 |
+diff --git a/sane/tests/backend.cpp b/sane/tests/backend.cpp |
112 |
+index f2ff7ef..e21edd0 100644 |
113 |
+--- a/sane/tests/backend.cpp |
114 |
++++ b/sane/tests/backend.cpp |
115 |
+@@ -1,5 +1,6 @@ |
116 |
+ // backend.cpp -- unit tests for the SANE utsushi backend |
117 |
+ // Copyright (C) 2012, 2013, 2015 SEIKO EPSON CORPORATION |
118 |
++// Copyright (C) 2019 Olaf Meeuwissen |
119 |
+ // |
120 |
+ // License: GPL-3.0+ |
121 |
+ // Author : EPSON AVASYS CORPORATION |
122 |
+@@ -755,8 +756,8 @@ drop_test_suite (const std::string& name) |
123 |
+ but::traverse_test_tree (tuid, tcc); |
124 |
+ |
125 |
+ master.remove (tuid); |
126 |
+- BOOST_MESSAGE ("Disabled \"" << name << "\" test suite for lack of " |
127 |
+- "a mock device (" << tcc.p_count << " test cases)"); |
128 |
++ BOOST_TEST_MESSAGE ("Disabled \"" << name << "\" test suite for lack of " |
129 |
++ "a mock device (" << tcc.p_count << " test cases)"); |
130 |
+ } |
131 |
+ |
132 |
+ bool |
133 |
+@@ -766,7 +767,7 @@ init_test_runner () |
134 |
+ |
135 |
+ but::master_test_suite_t& master (but::framework::master_test_suite ()); |
136 |
+ |
137 |
+- BOOST_MESSAGE ("Initializing \"" << master.p_name << "\" test suite"); |
138 |
++ BOOST_TEST_MESSAGE ("Initializing \"" << master.p_name << "\" test suite"); |
139 |
+ |
140 |
+ utsushi::monitor mon; // to discover devices |
141 |
+ |
142 |
+commit dcd5de24246b8ac5a96f971b6b0adfb910f5c60e |
143 |
+Author: Olaf Meeuwissen <paddy-hack@××××××××××.org> |
144 |
+Date: Sun Mar 3 21:40:39 2019 +0900 |
145 |
+ |
146 |
+ Add headers needed by Boost 1.59.0 and later |
147 |
+ |
148 |
+diff --git a/sane/tests/backend.cpp b/sane/tests/backend.cpp |
149 |
+index e21edd0..77fbf96 100644 |
150 |
+--- a/sane/tests/backend.cpp |
151 |
++++ b/sane/tests/backend.cpp |
152 |
+@@ -27,6 +27,10 @@ |
153 |
+ #include <cstring> |
154 |
+ |
155 |
+ #include <boost/test/unit_test.hpp> |
156 |
++#if 105800 <= BOOST_VERSION |
157 |
++#include <boost/test/tree/test_case_counter.hpp> |
158 |
++#include <boost/test/tree/traverse.hpp> |
159 |
++#endif |
160 |
+ #include <boost/preprocessor/cat.hpp> |
161 |
+ |
162 |
+ #include <ltdl.h> |
163 |
|
164 |
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 |
165 |
new file mode 100644 |
166 |
index 00000000000..ecdf497fcb3 |
167 |
--- /dev/null |
168 |
+++ b/media-gfx/iscan/files/iscan-3.62.0-tests-linkage.patch |
169 |
@@ -0,0 +1,94 @@ |
170 |
+commit 1d58388b6fc4f5055c19d1815e3252625fd8ab3f |
171 |
+Author: Olaf Meeuwissen <paddy-hack@××××××××××.org> |
172 |
+Date: Sun Mar 3 21:22:28 2019 +0900 |
173 |
+ |
174 |
+ Fix link issues with the unit test runners |
175 |
+ |
176 |
+diff --git a/drivers/esci/tests/Makefile.am b/drivers/esci/tests/Makefile.am |
177 |
+index d00f129..9c8f766 100644 |
178 |
+--- a/drivers/esci/tests/Makefile.am |
179 |
++++ b/drivers/esci/tests/Makefile.am |
180 |
+@@ -1,5 +1,6 @@ |
181 |
+ ## Makefile.am -- an automake template for Makefile.in |
182 |
+ ## Copyright (C) 2012-2015 SEIKO EPSON CORPORATION |
183 |
++## Copyright (C) 2019 Olaf Meeuwissen |
184 |
+ ## |
185 |
+ ## License: GPL-3.0+ |
186 |
+ ## Author : EPSON AVASYS CORPORATION |
187 |
+@@ -39,16 +40,22 @@ AM_CPPFLAGS += -DESCI_GRAMMAR_TRACE=1 |
188 |
+ AM_LDFLAGS += $(BOOST_LDFLAGS) |
189 |
+ |
190 |
+ LDADD = ../libdrv-esci.la $(LIBUTSUSHI_LIBS) |
191 |
+-grammar_formats_utr_LDADD = $(LDADD) $(BOOST_FILESYSTEM_LIB) |
192 |
+-grammar_utr_LDADD = $(LDADD) $(BOOST_FILESYSTEM_LIB) |
193 |
+-## FIXME: remove once usb connexion is a proper plugin |
194 |
+-setter_utr_LDADD = $(LDADD) ../../../connexions/libcnx-usb.la |
195 |
++grammar_formats_utr_LDADD = $(LDADD) $(BOOST_FILESYSTEM_LIB) |
196 |
++grammar_utr_LDADD = $(LDADD) $(BOOST_FILESYSTEM_LIB) |
197 |
++udev_rules_utr_LDADD = $(BOOST_UNIT_TEST_FRAMEWORK_LIB) |
198 |
++udev_rules_utr_LDADD += $(BOOST_FILESYSTEM_LIB) |
199 |
++udev_rules_utr_LDADD += $(BOOST_REGEX_LIB) |
200 |
++## FIXME: remove when connexions are turned into proper plugins |
201 |
++setter_utr_LDADD = $(LDADD) |
202 |
++setter_utr_LDADD += ../../../connexions/libcnx-usb.la |
203 |
++setter_utr_LDADD += ../../../connexions/libcnx-hexdump.la |
204 |
+ grammar_formats_utr_LDADD += ../../../connexions/libcnx-usb.la |
205 |
++grammar_formats_utr_LDADD += ../../../connexions/libcnx-hexdump.la |
206 |
+ grammar_utr_LDADD += ../../../connexions/libcnx-usb.la |
207 |
+-grammar_mechanics_utr_LDADD = $(LDADD) ../../../connexions/libcnx-usb.la |
208 |
+-udev_rules_utr_LDADD = $(BOOST_UNIT_TEST_FRAMEWORK_LIB) |
209 |
+-udev_rules_utr_LDADD += $(BOOST_FILESYSTEM_LIB) |
210 |
+-udev_rules_utr_LDADD += $(BOOST_REGEX_LIB) |
211 |
++grammar_utr_LDADD += ../../../connexions/libcnx-hexdump.la |
212 |
++grammar_mechanics_utr_LDADD = $(LDADD) |
213 |
++grammar_mechanics_utr_LDADD += ../../../connexions/libcnx-usb.la |
214 |
++grammar_mechanics_utr_LDADD += ../../../connexions/libcnx-hexdump.la |
215 |
+ |
216 |
+ endif |
217 |
+ |
218 |
+diff --git a/filters/tests/Makefile.am b/filters/tests/Makefile.am |
219 |
+index 4d88e48..ac198df 100644 |
220 |
+--- a/filters/tests/Makefile.am |
221 |
++++ b/filters/tests/Makefile.am |
222 |
+@@ -1,6 +1,6 @@ |
223 |
+ ## Makefile.am -- an automake template for Makefile.in |
224 |
+ ## Copyright (C) 2012-2014 SEIKO EPSON CORPORATION |
225 |
+-## Copyright (C) 2013, 2015 Olaf Meeuwissen |
226 |
++## Copyright (C) 2013, 2015, 2019 Olaf Meeuwissen |
227 |
+ ## |
228 |
+ ## License: GPL-3.0+ |
229 |
+ ## Author : EPSON AVASYS CORPORATION |
230 |
+@@ -39,8 +39,9 @@ endif |
231 |
+ |
232 |
+ LDADD = ../libflt-all.la |
233 |
+ LDADD += ../../lib/libutsushi.la $(LIBUTSUSHI_LIBS) |
234 |
+-## FIXME: drop once usb connexion is a proper plugin |
235 |
++## FIXME: drop when connexions have been turned into proper plugins |
236 |
+ LDADD += ../../connexions/libcnx-usb.la |
237 |
++LDADD += ../../connexions/libcnx-hexdump.la |
238 |
+ |
239 |
+ if have_libjpeg |
240 |
+ check_PROGRAMS += jpeg.utr |
241 |
+diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am |
242 |
+index fc5eeb5..f24a7da 100644 |
243 |
+--- a/lib/tests/Makefile.am |
244 |
++++ b/lib/tests/Makefile.am |
245 |
+@@ -1,6 +1,6 @@ |
246 |
+ ## Makefile.am -- an automake template for Makefile.in |
247 |
+ ## Copyright (C) 2012, 2013 SEIKO EPSON CORPORATION |
248 |
+-## Copyright (C) 2015 Olaf Meeuwissen |
249 |
++## Copyright (C) 2015, 2019 Olaf Meeuwissen |
250 |
+ ## |
251 |
+ ## License: GPL-3.0+ |
252 |
+ ## Author : EPSON AVASYS CORPORATION |
253 |
+@@ -62,8 +62,9 @@ log_no_check_utr_CPPFLAGS += -DUTSUSHI_LOG_ARGUMENT_COUNT_CHECK_ENABLED=false |
254 |
+ AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\"" |
255 |
+ |
256 |
+ LDADD = ../libutsushi.la $(LIBUTSUSHI_LIBS) |
257 |
+-## FIXME: drop once usb connexion is a proper plugin |
258 |
++## FIXME: drop when connexions have been turned into proper plugins |
259 |
+ LDADD += ../../connexions/libcnx-usb.la |
260 |
++LDADD += ../../connexions/libcnx-hexdump.la |
261 |
+ |
262 |
+ if have_libtiff |
263 |
+ test_runners += tiff.utr |
264 |
|
265 |
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 |
266 |
new file mode 100644 |
267 |
index 00000000000..52f7b18e6b8 |
268 |
--- /dev/null |
269 |
+++ b/media-gfx/iscan/files/iscan-3.62.0-tests-tesseract.patch |
270 |
@@ -0,0 +1,111 @@ |
271 |
+commit 9ce60e8df3b613950c483f0ae5ec772afc329104 |
272 |
+Author: Olaf Meeuwissen <paddy-hack@××××××××××.org> |
273 |
+Date: Fri Jun 21 22:20:30 2019 +0900 |
274 |
+ |
275 |
+ Fix tesseract command-line invocation. Re #78 |
276 |
+ |
277 |
+diff --git a/filters/get-text-orientation b/filters/get-text-orientation |
278 |
+index 847f2c6..6f0978c 100755 |
279 |
+--- a/filters/get-text-orientation |
280 |
++++ b/filters/get-text-orientation |
281 |
+@@ -47,26 +47,14 @@ if test $? != 0; then |
282 |
+ exit 1 |
283 |
+ fi |
284 |
+ |
285 |
+-tmpfile=$(mktemp -q .reorient.XXX) |
286 |
+-trap "rm -f $tmpfile" 0 1 2 15 |
287 |
+- |
288 |
+ case "$engine" in |
289 |
+ */tesseract|tesseract) |
290 |
+ |
291 |
+- # Notwithstanding what the manual page says, tesseract |
292 |
+- # doesn't support reading from standard input with the |
293 |
+- # `-psm 0` option. We stuff incoming image data into a |
294 |
+- # temporary file to work around this limitation. |
295 |
+- # See https://github.com/tesseract-ocr/tesseract/issues/85 |
296 |
+- |
297 |
+- cat - > $tmpfile |
298 |
++ # Tesseract 3.03 outputs the results we want to standard |
299 |
++ # error; Tesseract 3.04 dumps it on standard output. We |
300 |
++ # want it on the latter. |
301 |
+ |
302 |
+- # We don't care about the "regular" tesseract output so |
303 |
+- # divert that to /dev/null. The output that we do care |
304 |
+- # about ends up on standard error, but our caller looks |
305 |
+- # for it on standard output. Redirect to handle that. |
306 |
+- |
307 |
+- $engine $tmpfile /dev/null -psm 0 -l osd 2>&1 |
308 |
++ $engine - - -psm 0 -l osd 2>&1 |
309 |
+ ;; |
310 |
+ |
311 |
+ */ocr-engine-getrotate) |
312 |
+@@ -74,6 +62,9 @@ case "$engine" in |
313 |
+ # The ocr-engine-getrotate utility expects an uncompressed |
314 |
+ # BMP image. |
315 |
+ |
316 |
++ tmpfile=$(mktemp -q .reorient.XXX) |
317 |
++ trap "rm -f $tmpfile" 0 1 2 15 |
318 |
++ |
319 |
+ $convert - -compress None bmp3:$tmpfile |
320 |
+ $engine $tmpfile |
321 |
+ ;; |
322 |
+ |
323 |
+commit 56f1d8ed51cc7140b961ef8ab8c7501f69d87fd5 |
324 |
+Author: Olaf Meeuwissen <paddy-hack@××××××××××.org> |
325 |
+Date: Mon Oct 21 12:41:20 2019 +0900 |
326 |
+ |
327 |
+ Fix get-text-orientation for newer Tesseract versions. Fixes #86 |
328 |
+ |
329 |
+diff --git a/filters/get-text-orientation b/filters/get-text-orientation |
330 |
+index 6f0978c..eb64e4b 100755 |
331 |
+--- a/filters/get-text-orientation |
332 |
++++ b/filters/get-text-orientation |
333 |
+@@ -51,10 +51,21 @@ case "$engine" in |
334 |
+ */tesseract|tesseract) |
335 |
+ |
336 |
+ # Tesseract 3.03 outputs the results we want to standard |
337 |
+- # error; Tesseract 3.04 dumps it on standard output. We |
338 |
+- # want it on the latter. |
339 |
++ # error; Tesseract 3.04 dumps it on standard output. So |
340 |
++ # do later versions. We want it on the latter. |
341 |
++ # Command-line options changed in 3.05.00. |
342 |
+ |
343 |
+- $engine - - -psm 0 -l osd 2>&1 |
344 |
++ version=$($engine --version 2>&1 | sed -n 's/.*tesseract *//p') |
345 |
++ |
346 |
++ case "$version" in |
347 |
++ 3.0[34].* ) |
348 |
++ $engine - - -psm 0 -l osd 2>&1 |
349 |
++ ;; |
350 |
++ |
351 |
++ 3.05.* | [45].* ) |
352 |
++ $engine - - --psm 0 -l osd 2>&1 |
353 |
++ ;; |
354 |
++ esac |
355 |
+ ;; |
356 |
+ |
357 |
+ */ocr-engine-getrotate) |
358 |
+commit 9d5edc4c52e5a6b59d61a43ddcc13353b82992f5 |
359 |
+Author: Olaf Meeuwissen <paddy-hack@××××××××××.org> |
360 |
+Date: Sun Jun 23 17:22:22 2019 +0900 |
361 |
+ |
362 |
+ Fix reorientation logic for newer Tesseract versions. Re #78 |
363 |
+ |
364 |
+diff --git a/filters/reorient.cpp b/filters/reorient.cpp |
365 |
+index e0c1dc1..60c5173 100644 |
366 |
+--- a/filters/reorient.cpp |
367 |
++++ b/filters/reorient.cpp |
368 |
+@@ -483,6 +483,13 @@ reorient::finalize (const context& ctx) |
369 |
+ log::alert |
370 |
+ (format ("unexpected document orientation: %1% degrees") |
371 |
+ % degrees); |
372 |
++ |
373 |
++ if (engine_ == "tesseract" |
374 |
++ && !tesseract_version_before_("3.04")) { |
375 |
++ // Orientation reporting changed direct with 3.04. See #78 |
376 |
++ /**/ if ( 90 == degrees) rv.orientation (context::left_bottom); |
377 |
++ else if (270 == degrees) rv.orientation (context::right_top); |
378 |
++ } |
379 |
+ } |
380 |
+ return rv; |
381 |
+ } |
382 |
|
383 |
diff --git a/media-gfx/iscan/iscan-3.63.0.ebuild b/media-gfx/iscan/iscan-3.63.0.ebuild |
384 |
new file mode 100644 |
385 |
index 00000000000..38ffdbed8e3 |
386 |
--- /dev/null |
387 |
+++ b/media-gfx/iscan/iscan-3.63.0.ebuild |
388 |
@@ -0,0 +1,98 @@ |
389 |
+# Copyright 1999-2020 Gentoo Authors |
390 |
+# Distributed under the terms of the GNU General Public License v2 |
391 |
+ |
392 |
+EAPI=7 |
393 |
+ |
394 |
+inherit autotools desktop flag-o-matic udev xdg-utils |
395 |
+ |
396 |
+DESCRIPTION="EPSON Image Scan v3 for Linux" |
397 |
+HOMEPAGE="https://support.epson.net/linux/en/imagescanv3.php https://gitlab.com/utsushi/utsushi" |
398 |
+SRC_URI="https://support.epson.net/linux/src/scanner/imagescanv3/common/imagescan_${PV}.orig.tar.gz" |
399 |
+ |
400 |
+LICENSE="GPL-3+" |
401 |
+SLOT="0" |
402 |
+IUSE="graphicsmagick gui test" |
403 |
+KEYWORDS="~amd64 ~x86" |
404 |
+ |
405 |
+BDEPEND="virtual/pkgconfig" |
406 |
+RDEPEND=" |
407 |
+ dev-libs/boost:= |
408 |
+ media-gfx/sane-backends |
409 |
+ media-libs/tiff |
410 |
+ virtual/jpeg |
411 |
+ virtual/libusb:1 |
412 |
+ graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] ) |
413 |
+ !graphicsmagick? ( media-gfx/imagemagick:=[cxx] ) |
414 |
+ gui? ( dev-cpp/gtkmm:2.4 ) |
415 |
+" |
416 |
+# Disable opencl as during reorient.utr test it produces inconsistent results |
417 |
+DEPEND="${RDEPEND} |
418 |
+ test? ( app-text/tesseract[training,-opencl] ) |
419 |
+" |
420 |
+RESTRICT="!test? ( test )" |
421 |
+S="${WORKDIR}/utsushi-0.$(ver_cut 2-3)" |
422 |
+ |
423 |
+PATCHES=( |
424 |
+ "${FILESDIR}"/${PN}-3.61.0-ijg-libjpeg.patch |
425 |
+ "${FILESDIR}"/${PN}-3.61.0-imagemagick-7.patch |
426 |
+ "${FILESDIR}"/${PN}-3.62.0-gcc-10.patch |
427 |
+ "${FILESDIR}"/${PN}-3.62.0-boost-1.73.patch |
428 |
+ "${FILESDIR}"/${PN}-3.62.0-fix-symbols.patch |
429 |
+ "${FILESDIR}"/${PN}-3.62.0-tests-boost.patch |
430 |
+ "${FILESDIR}"/${PN}-3.62.0-tests-tesseract.patch |
431 |
+ "${FILESDIR}"/${PN}-3.62.0-tests-linkage.patch |
432 |
+) |
433 |
+ |
434 |
+src_prepare() { |
435 |
+ default |
436 |
+ |
437 |
+ # Remove vendored libraries |
438 |
+ rm -r upstream/boost || die |
439 |
+ # Workaround for deprecation warnings: |
440 |
+ # https://gitlab.com/utsushi/utsushi/issues/90 |
441 |
+ sed -e 's|=-Werror|="-Werror -Wno-error=deprecated-declarations"|g' -i configure.ac || die |
442 |
+ # Disable check-soname test |
443 |
+ sed -e '/SANE_BACKEND_SANITY_CHECKS +=/d' -i sane/Makefile.am || die |
444 |
+ eautoreconf |
445 |
+} |
446 |
+ |
447 |
+src_configure() { |
448 |
+ # Workaround for: |
449 |
+ # /usr/lib64/utsushi/libutsushi.so.0: undefined symbol: libcnx_usb_LTX_factory |
450 |
+ append-ldflags $(no-as-needed) |
451 |
+ # https://bugs.gentoo.org/720994 |
452 |
+ append-ldflags -pthread |
453 |
+ local myconf=( |
454 |
+ $(use_with gui gtkmm) |
455 |
+ --enable-sane-config |
456 |
+ --enable-udev-config |
457 |
+ --with-boost=yes |
458 |
+ --with-jpeg |
459 |
+ --with-magick=$(usex graphicsmagick GraphicsMagick ImageMagick) |
460 |
+ --with-magick-pp=$(usex graphicsmagick GraphicsMagick ImageMagick) |
461 |
+ --with-sane |
462 |
+ --with-tiff |
463 |
+ --with-udev-confdir="$(get_udevdir)" |
464 |
+ ) |
465 |
+ econf "${myconf[@]}" |
466 |
+} |
467 |
+ |
468 |
+src_install() { |
469 |
+ default |
470 |
+ dodoc lib/devices.conf |
471 |
+ find "${ED}" -name '*.la' -delete || die |
472 |
+ if use gui; then |
473 |
+ newicon -s scalable doc/icon.svg "${PN}".svg |
474 |
+ make_desktop_entry utsushi "Image Scan" |
475 |
+ fi |
476 |
+} |
477 |
+ |
478 |
+pkg_postinst() { |
479 |
+ use gui && xdg_icon_cache_update |
480 |
+ elog "If you encounter problems with media-gfx/xsane when scanning (e.g., bad resolution)," |
481 |
+ elog "please try the built-in GUI and kde-misc/skanlite first before reporting bugs." |
482 |
+} |
483 |
+ |
484 |
+pkg_postrm() { |
485 |
+ use gui && xdg_icon_cache_update |
486 |
+} |