diff options
author | 2013-02-10 00:37:35 +0000 | |
---|---|---|
committer | 2013-02-10 00:37:35 +0000 | |
commit | c6a6cde3fb90349f9c5c00244e05db92f3d295a4 (patch) | |
tree | 67a3f36410c1d6048ad8bd8130305aa90b9e7181 /app-text | |
parent | Does not build with KDE 4.10 (diff) | |
download | gentoo-2-c6a6cde3fb90349f9c5c00244e05db92f3d295a4.tar.gz gentoo-2-c6a6cde3fb90349f9c5c00244e05db92f3d295a4.tar.bz2 gentoo-2-c6a6cde3fb90349f9c5c00244e05db92f3d295a4.zip |
Fix bug 454884 by using autotools-utils and bug 454886 by upstream patch
(Portage version: 2.1.11.50/cvs/Linux x86_64, signed Manifest commit with key 0x89DEB219565C32BC)
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/tesseract/ChangeLog | 9 | ||||
-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 |
5 files changed, 367 insertions, 12 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/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/* +} |