import tesseract-4.1.1-2.el8

This commit is contained in:
CentOS Sources 2021-11-09 05:03:06 -05:00 committed by Stepan Oksanichenko
parent 96a0c4d805
commit ad03662bb4
4 changed files with 167 additions and 48 deletions

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/tessdata-3.04.00.tar.gz
SOURCES/tesseract-3.05.01.tar.gz
SOURCES/tessdata-4.0.0.tar.gz
SOURCES/tesseract-4.1.1.tar.gz

View File

@ -1,2 +1,2 @@
6ea24cccf0e823da98589ccc75d51f0950618236 SOURCES/tessdata-3.04.00.tar.gz
a9a70bf84a597cb3c228d73c70a590e7b032b6ce SOURCES/tesseract-3.05.01.tar.gz
94557a6ecdf8ff8bec131598759e7d3b0bca1911 SOURCES/tessdata-4.0.0.tar.gz
25318bb3f57ef72d5736730739451673f4a66f51 SOURCES/tesseract-4.1.1.tar.gz

View File

@ -1,35 +1,48 @@
diff -rupN tesseract-3.05.00/ccutil/Makefile.am tesseract-3.05.00-new/ccutil/Makefile.am
--- tesseract-3.05.00/ccutil/Makefile.am 2017-02-16 18:59:48.000000000 +0100
+++ tesseract-3.05.00-new/ccutil/Makefile.am 2017-02-19 22:52:00.793171387 +0100
@@ -3,7 +3,7 @@ SUBDIRS =
AM_CXXFLAGS =
diff -rupN --no-dereference tesseract-4.1.1/src/ccutil/Makefile.am tesseract-4.1.1-new/src/ccutil/Makefile.am
--- tesseract-4.1.1/src/ccutil/Makefile.am 2019-12-26 15:21:51.000000000 +0100
+++ tesseract-4.1.1-new/src/ccutil/Makefile.am 2019-12-27 21:19:53.950010557 +0100
@@ -2,7 +2,7 @@ AM_CXXFLAGS =
AM_CPPFLAGS =
if !NO_TESSDATA_PREFIX
-AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@/
-AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@
+AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@/tesseract/
endif
if VISIBILITY
diff -rupN tesseract-3.05.00/tessdata/configs/Makefile.am tesseract-3.05.00-new/tessdata/configs/Makefile.am
--- tesseract-3.05.00/tessdata/configs/Makefile.am 2017-02-16 18:59:48.000000000 +0100
+++ tesseract-3.05.00-new/tessdata/configs/Makefile.am 2017-02-19 22:52:00.793171387 +0100
@@ -1,3 +1,3 @@
diff -rupN --no-dereference tesseract-4.1.1/src/lstm/Makefile.am tesseract-4.1.1-new/src/lstm/Makefile.am
--- tesseract-4.1.1/src/lstm/Makefile.am 2019-12-26 15:21:51.000000000 +0100
+++ tesseract-4.1.1-new/src/lstm/Makefile.am 2019-12-27 21:19:53.950010557 +0100
@@ -16,7 +16,7 @@ AM_CPPFLAGS += -I/usr/include/tensorflow
endif
if !NO_TESSDATA_PREFIX
-AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@
+AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@/tesseract/
endif
if DISABLED_LEGACY_ENGINE
diff -rupN --no-dereference tesseract-4.1.1/tessdata/configs/Makefile.am tesseract-4.1.1-new/tessdata/configs/Makefile.am
--- tesseract-4.1.1/tessdata/configs/Makefile.am 2019-12-26 15:21:51.000000000 +0100
+++ tesseract-4.1.1-new/tessdata/configs/Makefile.am 2019-12-27 21:19:53.950010557 +0100
@@ -1,4 +1,4 @@
-datadir = @datadir@/tessdata/configs
+datadir = @datadir@/tesseract/tessdata/configs
data_DATA = inter makebox box.train unlv ambigs.train api_config kannada box.train.stderr quiet logfile digits hocr tsv linebox pdf rebox strokewidth bigram txt
EXTRA_DIST = inter makebox box.train unlv ambigs.train api_config kannada box.train.stderr quiet logfile digits hocr tsv linebox pdf rebox strokewidth bigram txt
diff -rupN tesseract-3.05.00/tessdata/Makefile.am tesseract-3.05.00-new/tessdata/Makefile.am
--- tesseract-3.05.00/tessdata/Makefile.am 2017-02-16 18:59:48.000000000 +0100
+++ tesseract-3.05.00-new/tessdata/Makefile.am 2017-02-19 22:52:00.794171385 +0100
data_DATA = inter makebox box.train unlv ambigs.train lstm.train lstmdebug
data_DATA += api_config kannada box.train.stderr quiet logfile digits get.images
data_DATA += lstmbox wordstrbox
diff -rupN --no-dereference tesseract-4.1.1/tessdata/Makefile.am tesseract-4.1.1-new/tessdata/Makefile.am
--- tesseract-4.1.1/tessdata/Makefile.am 2019-12-26 15:21:51.000000000 +0100
+++ tesseract-4.1.1-new/tessdata/Makefile.am 2019-12-27 21:19:53.950010557 +0100
@@ -1,4 +1,4 @@
-datadir = @datadir@/tessdata
+datadir = @datadir@/tesseract/tessdata
data_DATA = pdf.ttf
EXTRA_DIST = $(data_DATA)
diff -rupN tesseract-3.05.00/tessdata/tessconfigs/Makefile.am tesseract-3.05.00-new/tessdata/tessconfigs/Makefile.am
--- tesseract-3.05.00/tessdata/tessconfigs/Makefile.am 2017-02-16 18:59:48.000000000 +0100
+++ tesseract-3.05.00-new/tessdata/tessconfigs/Makefile.am 2017-02-19 22:52:00.794171385 +0100
diff -rupN --no-dereference tesseract-4.1.1/tessdata/tessconfigs/Makefile.am tesseract-4.1.1-new/tessdata/tessconfigs/Makefile.am
--- tesseract-4.1.1/tessdata/tessconfigs/Makefile.am 2019-12-26 15:21:51.000000000 +0100
+++ tesseract-4.1.1-new/tessdata/tessconfigs/Makefile.am 2019-12-27 21:19:53.951010558 +0100
@@ -1,3 +1,3 @@
-datadir = @datadir@/tessdata/tessconfigs
+datadir = @datadir@/tesseract/tessdata/tessconfigs

View File

@ -1,8 +1,8 @@
%global tessdata_version 3.04.00
%global tessdata_version 4.0.0
Name: tesseract
Version: 3.05.01
Release: 6%{?dist}
Version: 4.1.1
Release: 2%{?dist}
Summary: Raw OCR Engine
License: ASL 2.0
@ -21,6 +21,8 @@ BuildRequires: cairo-devel
BuildRequires: libicu-devel
BuildRequires: pango-devel
BuildRequires: automake libtool
# Required for building manpages
BuildRequires: asciidoc libxslt
%description
@ -40,7 +42,8 @@ developing applications that use %{name}.
%package osd
Summary: Orientation & Script Detection Data for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
%description osd
Orientation & Script Detection Data for %{name}
@ -69,6 +72,28 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{langcode})}\
%files langpack-%{macrolang}\
%{_datadir}/%{name}/tessdata/%{macrolang}.*
# define script_subpkg macro
# s: script name
# n: package name
#
%define script_subpkg(s:n:) \
%define scriptname %{-s:%{-s*}}%{!-s:%{error:Script name defined}} \
%define filename %{-n:%{-n*}}%{!-n:%{error:Package name not defined}} \
%define pkgname %(echo %filename | tr '[:upper:]' '[:lower:]') \
\
%package -n script-%{pkgname}\
Summary: %{scriptname} script data for %{name}\
BuildArch: noarch\
Requires: %{name} = %{version}-%{release}\
\
%description -n script-%{pkgname}\
This package contains the fast integer version of the %{scriptname} script \
trained models for the Tesseract Open Source OCR Engine.\
\
%files -n script-%{pkgname}\
%dir %{_datadir}/tesseract/tessdata/script/\
%{_datadir}/tesseract/tessdata/script/%{filename}.*
# see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
# and https://en.wikipedia.org/wiki/ISO_639_macrolanguage
%lang_subpkg -m afr -l af -n Afrikaans
@ -76,106 +101,167 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{langcode})}\
%lang_subpkg -m ara -l ar -n Arabic
%lang_subpkg -m asm -l as -n Assamese
%lang_subpkg -m aze -l az -n Azerbaijani
%lang_subpkg -m aze_cyrl -n "Azerbaijani (Cyrilic)"
%lang_subpkg -m aze_cyrl -n %{quote:Azerbaijani (Cyrilic)}
%lang_subpkg -m bel -l bel -n Belarusian
%lang_subpkg -m ben -l bn -n Bengali
%lang_subpkg -m bod -l bo -n "Tibetan (Standard)"
%lang_subpkg -m bod -l bo -n %{quote:Tibetan (Standard)}
%lang_subpkg -m bos -l bs -n Bosnian
%lang_subpkg -m bre -l br -n Breton
%lang_subpkg -m bul -l bg -n Bulgarian
%lang_subpkg -m cat -l ca -n Catalan
%lang_subpkg -m ceb -n Cebuano
%lang_subpkg -m ces -l cs -n Czech
%lang_subpkg -m chi_sim -l zh_CN -n "Chinese (Simplified)"
%lang_subpkg -m chi_tra -l zh_TW -n "Chinese (Traditional)"
%lang_subpkg -m chi_sim -l zh_CN -n %{quote:Chinese (Simplified)}
%lang_subpkg -m chi_sim_vert -l zh_CN -n %{quote:Chinese (Simplified, Vertical)}
%lang_subpkg -m chi_tra -l zh_TW -n %{quote:Chinese (Traditional)}
%lang_subpkg -m chi_tra_vert -l zh_TW -n %{quote:Chinese (Traditional, Vertical)}
%lang_subpkg -m chr -n Cherokee
%lang_subpkg -m cos -l co -n Corsican
%lang_subpkg -m cym -l cy -n Welsh
%lang_subpkg -m dan -l da -n Danish
%lang_subpkg -m dan_frak -n "Danish (Fraktur)"
%lang_subpkg -m dan_frak -n %{quote:Danish (Fraktur)}
%lang_subpkg -m deu -l de -n German
%lang_subpkg -m deu_frak -n "German (Fraktur)"
%lang_subpkg -m deu_frak -n %{quote:German (Fraktur)}
%lang_subpkg -m div -l dv -n %{quote:Dhivehi; Maldivian}
%lang_subpkg -m dzo -n Dzongkha
%lang_subpkg -m ell -l el -n Greek
%lang_subpkg -m enm -n "Middle English (1100-1500)"
%lang_subpkg -m enm -n %{quote:Middle English (1100-1500)}
%lang_subpkg -m epo -l eo -n Esperanto
%lang_subpkg -m equ -n "Math / equation"
%lang_subpkg -m equ -n %{quote:Math / equation}
%lang_subpkg -m est -l et -n Estonian
%lang_subpkg -m eus -l eu -n Basque
%lang_subpkg -m fas -l fa -n "Persian (Farsi)"
%lang_subpkg -m fao -l fo -n Faroese
%lang_subpkg -m fas -l fa -n %{quote:Persian (Farsi)}
%lang_subpkg -m fil -n %{quote:Filipino; Pilipino}
%lang_subpkg -m fin -l fi -n Finnish
%lang_subpkg -m fra -l fr -n French
%lang_subpkg -m frk -n Frankish
%lang_subpkg -m frm -n "Middle French (ca. 1400-1600)"
%lang_subpkg -m frk -n Fraktur
%lang_subpkg -m frm -n %{quote:Middle French (ca. 1400-1600)}
%lang_subpkg -m fry -l fy -n %{quote:Western Frisian}
%lang_subpkg -m gla -l gd -n %{quote:Gaelic; Scottish Gaelic}
%lang_subpkg -m gle -l ga -n Irish
%lang_subpkg -m glg -l gl -n Galician
%lang_subpkg -m grc -n "Ancient Greek"
%lang_subpkg -m grc -n %{quote:Ancient Greek}
%lang_subpkg -m guj -l gu -n Gujarati
%lang_subpkg -m hat -l ht -n Haitian
%lang_subpkg -m heb -l he -n Hebrew
%lang_subpkg -m hin -l hi -n Hindi
%lang_subpkg -m hrv -l hr -n Croatian
%lang_subpkg -m hun -l hu -n Hungarian
%lang_subpkg -m hye -l hy -n Armenian
%lang_subpkg -m iku -l iu -n Inuktitut
%lang_subpkg -m ind -l id -n Indonesian
%lang_subpkg -m isl -l is -n Icelandic
%lang_subpkg -m ita -l it -n Italian
%lang_subpkg -m ita_old -n "Italian (Old)"
%lang_subpkg -m ita_old -n %{quote:Italian (Old)}
%lang_subpkg -m jav -l jav -n Javanese
%lang_subpkg -m jpn -l ja -n Japanese
%lang_subpkg -m jpn_vert -l ja -n %{quote:Japanese (Vertical)}
%lang_subpkg -m kan -l kn -n Kannada
%lang_subpkg -m kat -l ka -n Georgian
%lang_subpkg -m kat_old -n "Georgian (Old)"
%lang_subpkg -m kat_old -n %{quote:Georgian (Old)}
%lang_subpkg -m kaz -l kk -n Kazakh
%lang_subpkg -m khm -l km -n Khmer
%lang_subpkg -m kir -l ky -n Kyrgyz
%lang_subpkg -m kor -l ko -n Korean
%lang_subpkg -m kor_vert -l ko -n %{quote:Korean (Vertical)}
%lang_subpkg -m kur -l ku -n Kurdish
%lang_subpkg -m kur_ara -l ku -n %{quote:Kurdish (Arabic)}
%lang_subpkg -m lao -l lo -n Lao
%lang_subpkg -m lat -l lat -n Latin
%lang_subpkg -m lav -l lv -n Latvian
%lang_subpkg -m lit -l lt -n Lithuanian
%lang_subpkg -m ltz -l lb -n Luxembourgish
%lang_subpkg -m mal -l ml -n Malayalam
%lang_subpkg -m mar -l mr -n Marathi
%lang_subpkg -m mkd -l mk -n Macedonian
%lang_subpkg -m mlt -l mt -n Maltese
%lang_subpkg -m mon -l mn -n Mongolian
%lang_subpkg -m mri -l mi -n Maori
%lang_subpkg -m msa -l ms -n Malay
%lang_subpkg -m mya -l my -n Burmese
%lang_subpkg -m nep -l ne -n Nepali
%lang_subpkg -m nld -l nl -n Dutch
%lang_subpkg -m nor -l no -n Norwegian
%lang_subpkg -m oci -l oc -n Occitan
%lang_subpkg -m ori -l or -n Oriya
%lang_subpkg -m pan -l pa -n Panjabi
%lang_subpkg -m pol -l pl -n Polish
%lang_subpkg -m por -l pt -n Portuguese
%lang_subpkg -m pus -l ps -n Pashto
%lang_subpkg -m que -l qu -n Quechuan
%lang_subpkg -m ron -l ro -n Romanian
%lang_subpkg -m rus -l ru -n Russian
%lang_subpkg -m san -l sa -n Sanskrit
%lang_subpkg -m sin -l si -n Sinhala
%lang_subpkg -m slk -l sk -n Slovakian
%lang_subpkg -m slk_frak -n "Slovakian (Fraktur)"
%lang_subpkg -m slk_frak -n %{quote:Slovakian (Fraktur)}
%lang_subpkg -m slv -l sl -n Slovenian
%lang_subpkg -m snd -l sd -n Sindhi
%lang_subpkg -m spa -l es -n Spanish
%lang_subpkg -m spa_old -n "Spanish (Old)"
%lang_subpkg -m spa_old -n %{quote:Spanish (Old)}
%lang_subpkg -m sqi -l sq -n Albanian
%lang_subpkg -m srp -l sr -n Serbian
%lang_subpkg -m srp_latn -n "Serbian (Latin)"
%lang_subpkg -m srp_latn -n %{quote:Serbian (Latin)}
%lang_subpkg -m sun -l su -n Sundanese
%lang_subpkg -m swa -l sw -n Swahili
%lang_subpkg -m swe -l sv -n Swedish
%lang_subpkg -m syr -l ar_SY -n Syriac
%lang_subpkg -m tam -l ta -n Tamil
%lang_subpkg -m tat -l tt -n Tatar
%lang_subpkg -m tel -l te -n Telugu
%lang_subpkg -m tgk -l tg -n Tajik
%lang_subpkg -m tgl -l tl -n Tagalog
%lang_subpkg -m tha -l th -n Thai
%lang_subpkg -m tir -l ti -n Tigrinya
%lang_subpkg -m ton -l to -n Tongan
%lang_subpkg -m tur -l tr -n Turkish
%lang_subpkg -m uig -l ug -n Uyghur
%lang_subpkg -m ukr -l uk -n Ukrainian
%lang_subpkg -m urd -l ur -n Urdu
%lang_subpkg -m uzb -l uz -n Uzbek
%lang_subpkg -m uzb_cyrl -n "Uzbek (Cyrillic)"
%lang_subpkg -m uzb_cyrl -n %{quote:Uzbek (Cyrillic)}
%lang_subpkg -m vie -l vi -n Vietnamese
%lang_subpkg -m yid -l yi -n Yiddish
%lang_subpkg -m yor -l yo -n Yoruba
%script_subpkg -n Arabic -s Arabic
%script_subpkg -n Armenian -s Armenian
%script_subpkg -n Bengali -s Bengali
%script_subpkg -n Canadian_Aboriginal -s %{quote:Canadian (Aboriginal)}
%script_subpkg -n Cherokee -s Cherokee
%script_subpkg -n Cyrillic -s Cyrillic
%script_subpkg -n Devanagari -s Devanagari
%script_subpkg -n Ethiopic -s Ethiopic
%script_subpkg -n Fraktur -s Fraktur
%script_subpkg -n Georgian -s Georgian
%script_subpkg -n Greek -s Greek
%script_subpkg -n Gujarati -s Gujarati
%script_subpkg -n Gurmukhi -s Gurmukhi
%script_subpkg -n HanS -s %{quote:Han (Simplified)}
%script_subpkg -n HanS_vert -s %{quote:Han (Simplified, Vertical)}
%script_subpkg -n HanT -s %{quote:Han (Traditional)}
%script_subpkg -n HanT_vert -s %{quote:Han (Traditional, Vertical)}
%script_subpkg -n Hangul -s Hangul
%script_subpkg -n Hangul_vert -s %{quote:Hangul (Vertical)}
%script_subpkg -n Hebrew -s Hebrew
%script_subpkg -n Japanese -s Japanese
%script_subpkg -n Japanese_vert -s %{quote:Japanese (Vertical)}
%script_subpkg -n Kannada -s Kannada
%script_subpkg -n Khmer -s Khmer
%script_subpkg -n Lao -s Lao
%script_subpkg -n Latin -s Latin
%script_subpkg -n Malayalam -s Malayalam
%script_subpkg -n Myanmar -s Myanmar
%script_subpkg -n Oriya -s Oriya
%script_subpkg -n Sinhala -s Sinhala
%script_subpkg -n Syriac -s Syriac
%script_subpkg -n Tamil -s Tamil
%script_subpkg -n Telugu -s Telugu
%script_subpkg -n Thaana -s Thaana
%script_subpkg -n Thai -s Thai
%script_subpkg -n Tibetan -s Tibetan
%script_subpkg -n Vietnamese -s Vietnamese
%prep
@ -197,7 +283,7 @@ autoreconf -ifv
find %{buildroot}%{_libdir} -type f -name '*.la' -delete
install -pm 0644 tessdata-%{tessdata_version}/* %{buildroot}/%{_datadir}/%{name}/tessdata/
cp -av tessdata-%{tessdata_version}/* %{buildroot}%{_datadir}/%{name}/tessdata
%post -p /sbin/ldconfig
@ -205,14 +291,20 @@ install -pm 0644 tessdata-%{tessdata_version}/* %{buildroot}/%{_datadir}/%{name}
%files
%license COPYING
%doc AUTHORS ChangeLog NEWS README.md testing/eurotext.tif testing/phototest.tif
%license LICENSE
%doc AUTHORS ChangeLog README.md
%{_bindir}/ambiguous_words
%{_bindir}/classifier_tester
%{_bindir}/combine_lang_model
%{_bindir}/combine_tessdata
%{_bindir}/dawg2wordlist
%{_bindir}/language-specific.sh
%{_bindir}/lstmeval
%{_bindir}/merge_unicharsets
%{_bindir}/set_unicharset_properties
%{_bindir}/shapeclustering
%{_bindir}/tesstrain.sh
%{_bindir}/tesstrain_utils.sh
%{_bindir}/*training
%{_bindir}/%{name}
%{_bindir}/text2image
@ -222,9 +314,11 @@ install -pm 0644 tessdata-%{tessdata_version}/* %{buildroot}/%{_datadir}/%{name}
%dir %{_datadir}/%{name}/tessdata
%{_datadir}/%{name}/tessdata/configs/
%{_datadir}/%{name}/tessdata/tessconfigs/
%{_datadir}/%{name}/tessdata/COPYING
%{_datadir}/%{name}/tessdata/README.md
%{_datadir}/%{name}/tessdata/eng.*
%{_datadir}/%{name}/tessdata/pdf.ttf
%{_libdir}/lib%{name}*.so.3*
%{_libdir}/lib%{name}*.so.4*
%{_mandir}/man1/*
%{_mandir}/man5/*
@ -238,6 +332,18 @@ install -pm 0644 tessdata-%{tessdata_version}/* %{buildroot}/%{_datadir}/%{name}
%changelog
* Fri Aug 06 2021 Jiri Kucera <jkucera@redhat.com> - 4.1.1-2
- Fix subpackages deps
Related: #1826085
* Thu Aug 05 2021 Jiri Kucera <jkucera@redhat.com> - 4.1.1-1
- Rebase to 4.1.1
Related: #1826085
* Thu Jul 01 2021 Jiri Kucera <jkucera@redhat.com> - 3.05.01-7
- Rebuild
Resolves: #1826085
* Mon Feb 19 2018 Sandro Mani <manisandro@gmail.coM> - 3.05.01-6
- Add missing BR: gcc-c++, make