diff --git a/srcpkgs/tesseract-ocr/patches/musl-sys-time.patch b/srcpkgs/tesseract-ocr/patches/musl-sys-time.patch new file mode 100644 index 0000000000..5226c72a08 --- /dev/null +++ b/srcpkgs/tesseract-ocr/patches/musl-sys-time.patch @@ -0,0 +1,12 @@ +--- src/ccutil/ocrclass.h 2019-07-07 14:34:08.000000000 +0200 ++++ src/ccutil/ocrclass.h 2019-07-08 10:47:15.347415888 +0200 +@@ -31,6 +31,9 @@ + #ifdef _WIN32 + #include // for timeval + #endif ++#ifndef __GLIBC__ ++#include ++#endif + + /********************************************************************** + * EANYCODE_CHAR diff --git a/srcpkgs/tesseract-ocr/template b/srcpkgs/tesseract-ocr/template index 27f1b30536..f77a53a901 100644 --- a/srcpkgs/tesseract-ocr/template +++ b/srcpkgs/tesseract-ocr/template @@ -1,22 +1,27 @@ # Template file for 'tesseract-ocr' pkgname=tesseract-ocr -version=4.0.0 +version=4.1.0 revision=1 +_tessdataver=4.0.0 wrksrc="tesseract-${version}" build_style=gnu-configure -configure_args="LIBLEPT_HEADERSDIR=${XBPS_CROSS_BASE}/usr/include" +configure_args="LIBLEPT_HEADERSDIR=${XBPS_CROSS_BASE}/usr/include $(vopt_with openmp)" hostmakedepends="automake libtool pkg-config leptonica libxslt asciidoc" -makedepends="cairo-devel pango-devel leptonica-devel icu-devel" +makedepends="cairo-devel pango-devel leptonica-devel $(vopt_if openmp libgomp-devel) icu-devel" short_desc="Tesseract Open Source OCR engine" maintainer="Jürgen Buchmüller " license="Apache-2.0" homepage="https://github.com/tesseract-ocr/tesseract" distfiles=" https://github.com/tesseract-ocr/tesseract/archive/${version}.tar.gz>${pkgname}-${version}.tar.gz - https://github.com/tesseract-ocr/tessdata/archive/${version}.tar.gz>tessdata-${version}.tar.gz" -checksum="a1f5422ca49a32e5f35c54dee5112b11b99928fc9f4ee6695cdc6768d69f61dd + https://github.com/tesseract-ocr/tessdata/archive/${version}.tar.gz>tessdata-${_tessdataver}.tar.gz" +checksum="5c5ed5f1a76888dc57a83704f24ae02f8319849f5c4cf19d254296978a1a1961 38c637d3a1763f6c3d32e8f1d979f045668676ec5feb8ee1869ee77cedd31b08" +build_options="openmp" +build_options_default="openmp" +desc_option_openmp="Enable Open MP (gomp)" + # Create a package for one specific language $1 pkg_lang() { local f lang=$1 @@ -30,8 +35,8 @@ pkg_lang() { } post_extract() { - mv ${XBPS_BUILDDIR}/tessdata-${version}/* ${wrksrc}/tessdata - rmdir ${XBPS_BUILDDIR}/tessdata-${version} + mv ${XBPS_BUILDDIR}/tessdata-${_tessdataver}/* ${wrksrc}/tessdata + rmdir ${XBPS_BUILDDIR}/tessdata-${_tessdataver} } pre_configure() { NOCONFIGURE=1 ./autogen.sh