1 |
Hi, |
2 |
|
3 |
On 21/07/14 21:42, Michał Górny wrote: |
4 |
> Dnia 2014-07-21, o godz. 13:23:46 |
5 |
> Thomas Kahle <tomka@g.o> napisał(a): |
6 |
> |
7 |
>> the OCR software tesseract has many different plugins for |
8 |
>> language packs used for OCR for different languages. The ebuild |
9 |
>> uses the LINGUAS variable to pass the choice of which packages to |
10 |
>> install to the user. |
11 |
>> |
12 |
>> A reverse dependency is app-text/pdfsandwich which roughly puts |
13 |
>> OCR'ed text in a scanned pdf. Since it uses tesseract it |
14 |
>> supports exactly those languages that tesseract supports. |
15 |
> |
16 |
> Do I understand correctly that pdfsandwich doesn't have any explicit |
17 |
> switches for language support? In other words, adding support for |
18 |
> another language requires rebuilding tesseract and not pdfsandwich? |
19 |
|
20 |
Exactly, pdfsandwich combines tesseract with some postprocessing |
21 |
that is not language specific. |
22 |
|
23 |
>> Should its ebuild have LINGUAS use flags and then depend on |
24 |
>> tesseract with at least those flags set? |
25 |
>> |
26 |
>> While it seems consistent to put the LINGUAS choice in the most |
27 |
>> user facing package, in this case I would actually not put it in |
28 |
>> here. It would introduces a point of failure and maintenance |
29 |
>> work for the each tesseract upgrade (since the language set |
30 |
>> slightly changes from time to time). A typical user would set |
31 |
>> LINGUAS in her make.conf anyway. In this case the same choice |
32 |
>> applies to both packages anyway. Maybe an einfo is sufficient to |
33 |
>> inform the user it? |
34 |
> |
35 |
> I have no idea where did you get the 'most user facing' idea from but |
36 |
> this is not really true or useful. The whole idea of libraries like |
37 |
> imagemagick is about hiding unnecessary dependencies under single |
38 |
> interface -- now imagine every package using imagemagick declaring |
39 |
> flags for all the formats supported by it... |
40 |
|
41 |
If I don't know anything about tesseract but only install |
42 |
pdfsandwich and then try to scan japanese it won't work out of |
43 |
the box. How should the user know that she has to put japanese |
44 |
in ther LINGUAS variable and rebuild tesseract afterwards? |
45 |
|
46 |
Probably a simple einfo in pdfsandwich should do it. |
47 |
|
48 |
> If pdfsandwich itself doesn't do anything with LINGUAS, don't declare |
49 |
> it. The rule about USE flags not doing anything applies here. |
50 |
> Moreover, LINGUAS are usually set globally so scope is not |
51 |
> really an issue here. |
52 |
|
53 |
I agree. |
54 |
|
55 |
Cheers, |
56 |
Thomas |
57 |
|
58 |
|
59 |
|
60 |
-- |
61 |
Thomas Kahle |
62 |
http://dev.gentoo.org/~tomka/ |