diff options
-rw-r--r-- | app-text/tesseract/ChangeLog | 9 | ||||
-rw-r--r-- | app-text/tesseract/Manifest | 12 | ||||
-rw-r--r-- | app-text/tesseract/files/sanitize-configure-file.patch | 237 | ||||
-rw-r--r-- | app-text/tesseract/files/sanitize-pkgconfig-file.patch | 15 | ||||
-rw-r--r-- | app-text/tesseract/files/tesseract-3.02-automake-compat.patch | 11 | ||||
-rw-r--r-- | app-text/tesseract/tesseract-3.02-r1.ebuild | 107 |
6 files changed, 374 insertions, 17 deletions
diff --git a/app-text/tesseract/ChangeLog b/app-text/tesseract/ChangeLog index 7348c23c1b89..e7f45e880d4e 100644 --- a/app-text/tesseract/ChangeLog +++ b/app-text/tesseract/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-text/tesseract # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/tesseract/ChangeLog,v 1.39 2013/01/30 08:02:15 tomka Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/tesseract/ChangeLog,v 1.40 2013/02/10 00:37:35 tomka Exp $ + +*tesseract-3.02-r1 (10 Feb 2013) + + 10 Feb 2013; Thomas Kahle <tomka@gentoo.org> + +files/sanitize-configure-file.patch, +files/sanitize-pkgconfig-file.patch, + +tesseract-3.02-r1.ebuild, -files/tesseract-3.02-automake-compat.patch: + Fix bug 454884 by using autotools-utils and bug 454886 by upstream patch 30 Jan 2013; Thomas Kahle <tomka@gentoo.org> +files/tesseract-3.02-automake-compat.patch, -tesseract-3.01.ebuild, diff --git a/app-text/tesseract/Manifest b/app-text/tesseract/Manifest index 40e166252a4e..697a9df65045 100644 --- a/app-text/tesseract/Manifest +++ b/app-text/tesseract/Manifest @@ -1,9 +1,10 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +AUX sanitize-configure-file.patch 7250 SHA256 ded937baa0b285064d7f5ee2d65d7392ddf3cc17fa2ed9955e45da6e4c50ff5e SHA512 03fd84cf4fa3e42761520a644824e12d41aba35deb96130f677bfe6b998200dbf4dfa80774fc9abc71b7fa18e37aee3cc40a4bbc578df82daca8ae40b31886b6 WHIRLPOOL f5b2ed5e6a2a0d33b99eccfa8b5f939dfbfa173af05031093b4c83f6ad5dfaf814a1231f284fb0bc7e8c7c109cdedeaf952c352ab931797ce941243e8a62a6f9 +AUX sanitize-pkgconfig-file.patch 627 SHA256 1cb2a2b16415f8dcb6c4672a4ea97b617d58acae0f5883f05a1e6db7a65056e8 SHA512 4f6bdc9bc6896289b31a25b59b1a0ee5af7de8105950fc85a38d0f35afc3ba825f96b2932e42669cda863523b3050511027b289d1d6a7549eccb05bf8e0de0bc WHIRLPOOL c7ce0e7b4832bbf26409e51e44f947ccc9c60af2fb04f3e8121c852b701f096054729e2c36cbcd0e7f4876c1daed1a4382188d78b96ed1162c39ed77ba2365d5 AUX tesseract-2.04-gcc44.patch 440 SHA256 f0e0004621a0be2ba475bafa812fbe7af13dd187fd6d55650df0569831383025 SHA512 4d1538d0a124de7c89d4a2a6c8cd3f38b623e9c5405affe8c59d9d8a3be1df10853a4a794197453e516965a99f898dc2a0552c7a23e68182e444c8d85802b8f6 WHIRLPOOL 1eba35e9579b26c7a92cd3dbacd81e869f73db2231c324c1d751c6320eae5be828c136dbcecdd1cc584aa032f1c97d0f0bbc55dc93b7a31c9eaaf12b43da1976 AUX tesseract-2.04-gcc47.patch 289 SHA256 746c23a72b12df832d7b4a4c5d5be2307ae628960a57f517a3f11e8106cb28c4 SHA512 fc4cf373b97369063a3034f4155c6c314902f5c33e5bae4df89e7aea8b1843ee25a62787a32d377d893622a1bbdc6fe44759ec0d034df5c0200fb75e4028db59 WHIRLPOOL a7a124671f1dc97811b18abea06b892e91469233eb52bf7a89d23840a0f014481ae230c93a15208c9dcb0b38b7a7f7de2eefb767aad253311dbfaf149b45c1ba -AUX tesseract-3.02-automake-compat.patch 407 SHA256 ac7e8e96fea7fb9421d600f4967fd8e828a133551cc79e7944c40747c3991b27 SHA512 07081b6d083a335d5243c04e6e00f7d476f76074dc2c1ddd878c9f746a254a7a9962b21a85a8888ca42068b6e9a8d62b5a5f44e87f211a154df67e48934604be WHIRLPOOL c0491da0227045c8d7a0c7ffe0263049cb63fbb33e821ba11d9180811a665e3f3f012cd57263f4c1aa55f06dfad2a6dc5a7efa30cad4508ebc3332672707d56e DIST bul.traineddata.gz 848731 SHA256 fc3c650568d014f2337052658e9ddd8efaff6ac74c9a90952d740eafdf400e2d SHA512 69dca9b285da3985142fc3e8d2a75d7fb217308c077114004c274972491c8cd8aebd60e27ffb26c9906a6ae78e05e19bbc5fd24ab97b961df5882cbd295f747a WHIRLPOOL a331336952140946bae38c59f9005d131dc9f7976358ff06a4458311ac0e5e10102868d0c37a41eae3f73a27d6a9a253c599e53167dbdf6c7c086ba8418f0624 DIST cat.traineddata.gz 995008 SHA256 dcc52db7522c67d2629117b7fde4c114ca51677f7f1efbedc12bf1e7319acde2 SHA512 603286de44dba701b53a0e4e7c9ba7e4e871bbadbc582f644417246ceb58155f826555fd8f53b58dca48cfa96633509cdde3cab6c0c5d3b43f5998d231ed54bb WHIRLPOOL efa6696ecc48d1bda4ff6efc01b5230cdf3cdb57e13f9b6b2adc9b50798e38b30fce0f9595d61f23e144c7b5c36301beb1de4c0753492213d7be8f447b33acbe DIST ces.traineddata.gz 1059966 SHA256 9848a4c137be45659e29f4aa07ccb6357fd4401307478cce0ed5f8e6686480d2 SHA512 5dba38364a423bdced1ef8edcb0d05adc02d5b4db77f31e31df571d75430e88a6b3d1d3c0ed43dac71c444bd716799e2d7346aa2d6baca788d27707f327d6fb8 WHIRLPOOL 1bfe54cbd9a8085f8a34018abf26d9e6b0ae650d5378db4fad27bd3b5d27af6662171db6417422d13a57416d2a22e37c21078e131283952a73964c5e445c57e3 @@ -62,13 +63,14 @@ DIST tur.traineddata.gz 933401 SHA256 cb4e187f6c25c145252c88a576f3e3c9204c1d77e1 DIST ukr.traineddata.gz 927741 SHA256 a54f0ce0843c863f102bfe135939200fc18702ce61ae6ebc571ab49460849365 SHA512 78f24a43246330b30090fc89b5434e9fb0c79c7ad114c7dd2caa265f3d48b87e91238181f230682bcdce0501b5a17d197ae4791fb9de1dc167e8713c2a45fc28 WHIRLPOOL 665172eaa31913424b66d0b0173b7a9787a73fec8bf031ecd669061814cae55a8bbd4d806efba909b98b982723d419e49bb85f6eb3c6f0ad1106dd33c7687f9c DIST vie.traineddata.gz 1575539 SHA256 5f61c32daf9a7071ff0dc95415aed75276538813398e3debb3849bba70bda713 SHA512 1843cb5628544794eab9d78aa87ded3c156a553627537b7e0ec5b5ceb402c723469e525c634ef92924de75ac9f9a4a2b8737b8d0932cae582b0d4d72fc39393e WHIRLPOOL 83d2bbf14d4b7a1d1f846fb053986d1e9f537faf8626e71ac0f83cd120074c58fb5baeff78dd3beec8fab98b2c456ad2b6d2c11c0fb8a56b6b8ecb8741057ad2 EBUILD tesseract-2.04-r1.ebuild 2728 SHA256 f92d34a25a4124fdc22160c2dca0685eb4037b75d8812681c9ceb50af83e33f8 SHA512 2768705c7d50e86ba2b26915aceae591856482b0c0c98531afd22459456bb91cbffc93e71b3a90468847d4713a76c3d2c838ada1132edecc7aeb7dc957c2e06f WHIRLPOOL b795eb0c124e998ce83bf1c428c98364ee33e0806343a82beec658775c28a521fbe0b32b42341b2b0748454a35523bde3af0a0cc91be5c5ffaf02501b74cae83 +EBUILD tesseract-3.02-r1.ebuild 4224 SHA256 0504f1ba166ad2d630e0d097d5f683676bc5e996ff51e0c0f62a4324af88a933 SHA512 2798b0e9087e3e4f26916836cb91849a58ceb7c54dd83fa22fe25fa60de61f6e818667a47c9ea3c0d91bdffabf64b4007d471e0a9d409d3ad5a1fa6b82e66096 WHIRLPOOL 0a4ddee5e0608fd3bfb4be8bf5f88419cc582af009e5f15c1ed3494a04f97a9530d5ab180198acda7128fd4f2d10b99126cf492dd5613f1e03f7e8bc9f69fec5 EBUILD tesseract-3.02.ebuild 4152 SHA256 cc55ade6361a6c39eca59a107663f946c9dd5ae639650de49f9c87917798db0c SHA512 f2776cb9d90d67ab99e4d439f03572c70757d9ac44821c9317c09401206a9097bbf9aa5222fc23108337096a6a5d01366a1d55a750d0c798930a8885890e15b6 WHIRLPOOL 34bde7f194d8c4097df5cc84528e297d1b4ba8820ab19b43fc07e516619fa74c876ce9e832b1529c237924d98683503f039c2761d0ca969315b14b0cef3b584b -MISC ChangeLog 6068 SHA256 af5daec1b4ab03c2ea8dab7da627798f5a5fba0c0e914551cd1c081282806745 SHA512 9667c212e222cec7603f64200c24f756acbfa8ec59b1b755ef3e4d63f09b6d54a347b9ef68cfb1c66aaa4844bbea0c4277b2d4d4a3a11e785dc76cd1ac32f7de WHIRLPOOL 061f678066c95b78ddf969f240fada765bfe489420c85f01c4084b1b4e72921762c113c01f560b3293b63a4e8c4b216fb8ba2aead23daaad5102ab352f4d1b81 +MISC ChangeLog 6377 SHA256 1feef09254fa2b8c3a0f0de201275569fbdc02203e0aa0c4f85a35f7685173cf SHA512 72010dfeaee7bcedff6fd313257e706f248cc75f71a95aae0f3e98c9f99ce93624c50046ffcc52a4623a995ca065a52107b398c3d8ccd96520930f29411d0594 WHIRLPOOL 5467620efe4b7d9e198154d37c701cfd4f23019b691c1bcf0dbc947f6b71780a4deb6a802ed768a4c22af456dc5d66902af7ec54bc170212195c7da318253eb5 MISC metadata.xml 1242 SHA256 111c447c81afeb2102dfad56bf2a2571f7e14372c9846727c2efcf60ac60a8b9 SHA512 f43fdad2b4326b51c90e28d253d1a61121762a9f97f60a69475b8b9568fbedafa2814c05fbbd35f5cb08447e18ad0ebaec3e8ad91d605d01391f29c0fb1bb159 WHIRLPOOL d0f45d90f779f549bfb9934ba58d3fda76544cac60d74a9d5b20221e4b6ee3cb2338e3aadcbcd9523a6306dfa28dcf4a4080a979925c1e4c42d388aa06fa7e04 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iF4EAREIAAYFAlEI04kACgkQid6yGVZcMrzrogEAyDWzwv9E20euELXa5IUDo3rJ -sNOPlMgxkomarzYBussA/i42owh/U99j/J9ejdCpWuP0pDEptpc7F2qd5iwggkAC -=BS4b +iF4EAREIAAYFAlEW69AACgkQid6yGVZcMry8uwEA4OKefWEwRL9b8nVYQGBXg5O6 +D0ice3J7CuJ7yLm53EkA/1Ux/LLj2l4LtJwBEaBKsAq7OGpShaTCsOJ6P8iWJ7+A +=Nh2O -----END PGP SIGNATURE----- diff --git a/app-text/tesseract/files/sanitize-configure-file.patch b/app-text/tesseract/files/sanitize-configure-file.patch new file mode 100644 index 000000000000..c1677f08ee55 --- /dev/null +++ b/app-text/tesseract/files/sanitize-configure-file.patch @@ -0,0 +1,237 @@ +Index: configure.ac +=================================================================== +--- configure.ac (revision 822) ++++ configure.ac (revision 823) +@@ -56,6 +56,8 @@ + AM_CONDITIONAL(MINGW, false) + AM_CONDITIONAL(GRAPHICS_DISABLED, false) + ++ ++############################# + # + # Platform specific setup + # +@@ -75,24 +77,6 @@ + + includedir="${includedir}/tesseract" + +-AC_ARG_WITH(extra-includes, +- AC_HELP_STRING([--with-extra-includes=DIR], +- [Define an additional directory for include files]), +- [ if test -d "$withval" ; then +- CFLAGS="$CFLAGS -I$withval" +- else +- AC_MSG_ERROR([Cannot stat directory $withval]) +- fi ] ) +- +-AC_ARG_WITH(extra-libraries, +- AC_HELP_STRING([--with-extra-libraries=DIR], +- [Define an additional directory for library files]), +- [ if test -d "$withval" ; then +- LDFLAGS="$LDFLAGS -L$withval" +- else +- AC_MSG_ERROR([Cannot stat directory $withval]) +- fi ] ) +- + AC_MSG_CHECKING(--enable-graphics argument) + AC_ARG_ENABLE([graphics], + [AC_HELP_STRING([--enable-graphics],[enable graphics (ScrollView) (default)]) +@@ -208,27 +192,19 @@ + # ---------------------------------------- + + # Define order of compilers +-AC_PROG_CXX(cl.exe g++) +-# Not needed +-# AC_PROG_CC ++AC_PROG_CXX(g++) + + AC_PROG_LIBTOOL + ++# ---------------------------------------- + # Automake configuration + # ---------------------------------------- + +-# Note: may need to configure automake to use ZIP as a distribution +-# format because of an apparent bug with GZIP, which results in bogus +-# archives. +-# TODO(luc) Resolve this issue. +-#AM_INIT_AUTOMAKE(dist-zip) + AM_INIT_AUTOMAKE +-AM_CONFIG_HEADER(config_auto.h:config/config.h.in) +-#AM_PROG_CC_C_O ++AC_CONFIG_HEADERS(config_auto.h:config/config.h.in) + AM_MAINTAINER_MODE +-# Need to tell automake if Visual C++ is being used: +-AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' ) + ++# ---------------------------------------- + # Additional checking of compiler characteristics + # ---------------------------------------- + +@@ -245,108 +221,22 @@ + # Check where all the following programs are and set + # variables accordingly: + LT_INIT +-# AC_PROG_LN_S +-# AC_PATH_PROG(MV, mv) +-# AC_PATH_PROG(CP, cp) +-# AC_PATH_PROG(RM, rm) +-# AC_PATH_PROG(AR, ar) +-# AC_PATH_PROG(TOUCH, touch) +-# AC_PATH_PROG(SED, sed) +-# AC_PATH_PROG(BASH, bash, ,[$PATH:/usr/bin:/util/tools/bin]) +-# # To use substitution in makefiles, use something like: +-# AC_SUBST(BASH) + +-# TODO(luc) Handle documentation. None of the following +-# is really needed until then +-# +-# AC_PROG_DOXYGEN_VERSION(1.3.2,[DOXYGEN_OK=1]) +-# AC_PATH_PROG(DOT, dot) +-# AC_PATH_PROG(LATEX, latex) +-# AC_PATH_PROG(DVIPS, dvips) +-# AC_PATH_PROG(MAKEINDEX, makeindex) +-# AC_PATH_PROG(PDFLATEX, pdflatex) +-# AC_PATH_PROG(GZIP, gzip) +-# +-# if test -z "$DOXYGEN_OK" -o -z "$DOT"; then +-# AC_MSG_WARN([------------------------------------ +-# *** Disabling automatic documentation generation for this +-# *** package. Please check that you have 'doxygen' (version +-# *** $ac_doxygen_version or later) and 'graphviz' (aka, 'dot') +-# *** installed on your system. In addition, to generate +-# *** PostScript and PDF documentation, you will need to have +-# *** LaTeX and PdfLaTeX respectively. Re-run this configuration +-# *** script after you have updated your environment. +-# --------------------------------------------------------]) +-# +-# # We have appropriate version of doxygen and dot, so we +-# # can generate documentation. It remains to be seen whether +-# # we can generate PDF and PostScript documentation.. +-# else +-# GENERATE_DOCUMENTATION="true" +-# +-# # Determine if PostScript documentation is generated: +-# if test -z "$LATEX" -o -z "$DVIPS" -o -z "$MAKEINDEX"; then +-# AC_MSG_WARN([Disabling generation of PostScript documentation]) +-# else +-# GENERATE_PS_DOCUMENTATION="true" +-# fi +-# +-# # Determine if PDF documentation is generated: +-# if test -z "$PDFLATEX" -o -z "$MAKEINDEX"; then +-# AC_MSG_WARN([Disabling generation of PDF documentation]) +-# else +-# GENERATE_PDF_DOCUMENTATION="true" +-# fi +-# fi +-# +-# # These substitutions could be inside the 'else' +-# # conditionals above, but it is not necessary and would +-# # only cause some confusion... +-# AC_SUBST(DOXYGEN) +-# AC_SUBST(DOT) +-# AC_SUBST(LATEX) +-# AC_SUBST(DVIPS) +-# AC_SUBST(MAKEINDEX) +-# AC_SUBST(PDFLATEX) +-# AC_SUBST(GZIP) +-# +-# # Adjust makefiles based on the kind of documentation that +-# # is being generated, +-# AM_CONDITIONAL(GENERATE_DOCUMENTATION, test -n "$GENERATE_DOCUMENTATION") +-# AM_CONDITIONAL(GENERATE_PS_DOCUMENTATION, test -n "$GENERATE_PS_DOCUMENTATION") +-# AM_CONDITIONAL(GENERATE_PDF_DOCUMENTATION, test -n "$GENERATE_PDF_DOCUMENTATION") + +- +-# Test for GNUWIN32 tools (only useful under windows) +-# AC_PATH_GNUWIN32 +- + # ---------------------------------------- + # C++ related options + # ---------------------------------------- + + AC_LANG_CPLUSPLUS + +-# Enable --enable-debug or --disable-debug and set +-# compile options accordingly. We are supposed to be either +-# in debug mode or in optimize mode. Note that in debug mode, +-# DEBUG_MODE will be set by this macro +-# AC_CXX_OPTIMIZE +-# AC_CXX_BOOL +-# AC_CXX_TYPENAME +-# AC_CXX_STDINCLUDES +-# AC_CXX_RPO + + # ---------------------------------------- + # Check for libraries + # ---------------------------------------- + +-# This option seems to always add -lm to the link line, +-# which causes unnecessary warnings with Visual C++. +-# Comment it out for now. +-#AC_CHECK_LIB(m,sqrt) + AC_SEARCH_LIBS(sem_init,pthread rt) +-#AC_CHECK_LIB(pthread,sem_init) + ++ + # ---------------------------------------- + # Checks for header files. + # ---------------------------------------- +@@ -356,7 +246,6 @@ + AC_HEADER_SYS_WAIT + AC_CHECK_HEADERS(sys/ipc.h sys/shm.h) + AC_CHECK_HEADERS(limits.h malloc.h) +-AC_CHECK_HEADERS(allheaders.h) + # Enable use of system-defined bool type if available: + AC_HEADER_STDBOOL + +@@ -370,27 +259,9 @@ + # ---------------------------------------- + + AC_CHECK_TYPES(wchar_t) +-AC_CHECK_TYPES(long long int) + AC_CHECK_TYPES(mbstate_t,,,[#include "wchar.h"]) + +-#AC_TYPE_MODE_T +-#AC_TYPE_OFF_T +-AC_TYPE_SIZE_T +-#AC_TYPE_PID_T +- +- + # ---------------------------------------- +-# Checks for library functions. +-# ---------------------------------------- +- +-AC_FUNC_MMAP +-AC_FUNC_FORK +-AC_CHECK_FUNCS(strerror vsnprintf) +-AC_CHECK_FUNCS(gethostname) +-AC_CHECK_FUNCS(strchr memcpy) +-AC_CHECK_FUNCS(acos asin) +- +-# ---------------------------------------- + # Test auxilliary packages + # ---------------------------------------- + +@@ -423,11 +294,6 @@ + # Final Tasks and Output + # ---------------------------------------- + +-# Define installation paths +-# AC_DEFINE_INSTALL_PATHS +-# Redundant with PACKAGE_VERSION - comment out +-# AC_DEFINE_UNQUOTED(TESSERACT_VERSION,["${PACKAGE_VERSION}"],[version string]) +- + # Output files + AC_CONFIG_FILES([Makefile tesseract.pc]) + #if test "$enable_gettext" = "yes"; then +@@ -470,8 +336,6 @@ + echo "" + echo "Configuration is done." + echo "You can now build $PACKAGE_NAME by running:" +-# test x$GXX = xyes && \ +-# echo "% make depend [optional]" + echo "" + echo "% make" + diff --git a/app-text/tesseract/files/sanitize-pkgconfig-file.patch b/app-text/tesseract/files/sanitize-pkgconfig-file.patch new file mode 100644 index 000000000000..d206bac1410a --- /dev/null +++ b/app-text/tesseract/files/sanitize-pkgconfig-file.patch @@ -0,0 +1,15 @@ +Index: tesseract.pc.in +=================================================================== +--- tesseract.pc.in (revision 816) ++++ tesseract.pc.in (revision 817) +@@ -10,6 +10,7 @@ + Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. + URL: https://code.google.com/p/tesseract-ocr + Version: @VERSION@ +-# Requires: lept ## leptonica do not provide lept.pc +-Libs: -L${libdir} -ltesseract @LDFLAGS@ @LIBS@ +-Cflags: -I${includedir} @CFLAGS@ @CPPFLAGS@ @CXXFLAGS@ @DEFS@ ++# Requires.private: lept ++Libs: -L${libdir} -ltesseract ++Libs.private: -lpthread -llept ++Cflags: -I${includedir} diff --git a/app-text/tesseract/files/tesseract-3.02-automake-compat.patch b/app-text/tesseract/files/tesseract-3.02-automake-compat.patch deleted file mode 100644 index 40e601c814ca..000000000000 --- a/app-text/tesseract/files/tesseract-3.02-automake-compat.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.ac.ORIG 2013-01-25 10:24:52.713068658 +0100 -+++ configure.ac 2013-01-29 12:05:31.582491749 +0100 -@@ -223,7 +223,7 @@ - # TODO(luc) Resolve this issue. - #AM_INIT_AUTOMAKE(dist-zip) - AM_INIT_AUTOMAKE --AM_CONFIG_HEADER(config_auto.h:config/config.h.in) -+AC_CONFIG_HEADERS(config_auto.h:config/config.h.in) - #AM_PROG_CC_C_O - AM_MAINTAINER_MODE - # Need to tell automake if Visual C++ is being used: diff --git a/app-text/tesseract/tesseract-3.02-r1.ebuild b/app-text/tesseract/tesseract-3.02-r1.ebuild new file mode 100644 index 000000000000..5b069989f998 --- /dev/null +++ b/app-text/tesseract/tesseract-3.02-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/tesseract/tesseract-3.02-r1.ebuild,v 1.1 2013/02/10 00:37:35 tomka Exp $ + +EAPI=4 + +MY_PN="${PN}-ocr" +MY_P="${MY_PN}-${PV}" +URI_PREFIX="http://${MY_PN}.googlecode.com/files" + +inherit eutils autotools autotools-utils versionator + +MY_MINOR=$(get_after_major_version) +S="${WORKDIR}/${P}.${MY_MINOR}" + +DESCRIPTION="An OCR Engine that was developed at HP and now at Google" +HOMEPAGE="http://code.google.com/p/tesseract-ocr/" +SRC_URI="${URI_PREFIX}/${P}.${MY_MINOR}.tar.gz + ${URI_PREFIX}/${MY_P}.eng.tar.gz + doc? ( ${URI_PREFIX}/${MY_P}.${MY_MINOR}-doc-html.tar.gz ) + linguas_ar? ( ${URI_PREFIX}/${MY_P}.ara.tar.gz ) + linguas_bg? ( ${URI_PREFIX}/bul.traineddata.gz ) + linguas_ca? ( ${URI_PREFIX}/cat.traineddata.gz ) + linguas_chr? ( ${URI_PREFIX}/chr.traineddata.gz ) + linguas_cs? ( ${URI_PREFIX}/ces.traineddata.gz ) + linguas_de? ( ${URI_PREFIX}/deu.traineddata.gz + ${URI_PREFIX}/deu-frak.traineddata.gz ) + linguas_da? ( ${URI_PREFIX}/dan.traineddata.gz + ${URI_PREFIX}/dan-frak.traineddata.gz ) + linguas_el? ( ${URI_PREFIX}/ell.traineddata.gz ) + linguas_es? ( ${URI_PREFIX}/spa.traineddata.gz ) + linguas_fi? ( ${URI_PREFIX}/fin.traineddata.gz ) + linguas_fr? ( ${URI_PREFIX}/fra.traineddata.gz ) + linguas_he? ( ${URI_PREFIX}/${MY_P}.heb.tar.gz + ${URI_PREFIX}/${MY_PN}-3.01.heb-com.tar.gz ) + linguas_hi? ( ${URI_PREFIX}/${MY_P}.hin.tar.gz ) + linguas_hu? ( ${URI_PREFIX}/hun.traineddata.gz ) + linguas_id? ( ${URI_PREFIX}/ind.traineddata.gz ) + linguas_it? ( ${URI_PREFIX}/ita.traineddata.gz ) + linguas_jp? ( ${URI_PREFIX}/jpn.traineddata.gz ) + linguas_ko? ( ${URI_PREFIX}/kor.traineddata.gz ) + linguas_lt? ( ${URI_PREFIX}/lit.traineddata.gz ) + linguas_lv? ( ${URI_PREFIX}/lav.traineddata.gz ) + linguas_nl? ( ${URI_PREFIX}/nld.traineddata.gz ) + linguas_no? ( ${URI_PREFIX}/nor.traineddata.gz ) + linguas_pl? ( ${URI_PREFIX}/pol.traineddata.gz ) + linguas_pt? ( ${URI_PREFIX}/por.traineddata.gz ) + linguas_ro? ( ${URI_PREFIX}/ron.traineddata.gz ) + linguas_ru? ( ${URI_PREFIX}/rus.traineddata.gz ) + linguas_sk? ( ${URI_PREFIX}/slk.traineddata.gz + ${URI_PREFIX}/${MY_PN}-3.01.slk-frak.tar.gz ) + linguas_sl? ( ${URI_PREFIX}/slv.traineddata.gz ) + linguas_sr? ( ${URI_PREFIX}/srp.traineddata.gz ) + linguas_sv? ( ${URI_PREFIX}/swe.traineddata.gz + ${URI_PREFIX}/swe-frak.traineddata.gz ) + linguas_th? ( ${URI_PREFIX}/${MY_P}.tha.tar.gz ) + linguas_tl? ( ${URI_PREFIX}/tgl.traineddata.gz ) + linguas_tr? ( ${URI_PREFIX}/tur.traineddata.gz ) + linguas_uk? ( ${URI_PREFIX}/ukr.traineddata.gz ) + linguas_vi? ( ${URI_PREFIX}/vie.traineddata.gz ) + linguas_zh_CN? ( ${URI_PREFIX}/chi_sim.traineddata.gz ) + linguas_zh_TW? ( ${URI_PREFIX}/chi_tra.traineddata.gz ) + osd? ( ${URI_PREFIX}/${MY_PN}-3.01.osd.tar.gz ) +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" + +IUSE="doc examples jpeg png tiff -webp +scrollview static-libs linguas_ar linguas_bg linguas_ca linguas_chr linguas_cs linguas_de linguas_da linguas_el linguas_es linguas_fi linguas_fr linguas_he linguas_hi linguas_hu linguas_id linguas_it linguas_jp linguas_ko linguas_lt linguas_lv linguas_nl linguas_no linguas_pl linguas_pt linguas_ro linguas_ru linguas_sk linguas_sl linguas_sr linguas_sv linguas_th linguas_tl linguas_tr linguas_uk linguas_vi linguas_zh_CN linguas_zh_TW osd" + +DEPEND="media-libs/leptonica[zlib,tiff?,jpeg?,png?,webp?]" +RDEPEND="${DEPEND}" + +DOCS=(AUTHORS ChangeLog NEWS README ReleaseNotes ) + +PATCHES=( + "${FILESDIR}/tesseract-2.04-gcc47.patch" + "${FILESDIR}/sanitize-pkgconfig-file.patch" + "${FILESDIR}/sanitize-configure-file.patch" +) + +src_configure() { + local myeconfargs=( + $(use_enable scrollview graphics) \ + --disable-dependency-tracking + ) + autotools-utils_src_configure +} + +src_install() { + autotools-utils_src_install + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins eurotext.tif phototest.tif + fi + + if use doc; then + dohtml -r "${WORKDIR}"/"${MY_PN}"/doc/html/* + fi + + # install language files + insinto /usr/share/tessdata + find "${WORKDIR}" -maxdepth 1 -type f -name "*.traineddata" -exec doins '{}' + + doins "${WORKDIR}"/"${MY_PN}"/tessdata/* +} |