From 4716c7ed5e0ee47fbf4301bf89e986e09650aca4 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 1 Mar 2022 18:46:08 +0100 Subject: [PATCH] tesseract-ocr: Update to 5.1.0 Signed-off-by: Stefan Weil --- mingw-w64-tesseract-ocr/PKGBUILD | 26 +++++-------------- .../tesseract-no-as-needed.patch | 22 ---------------- 2 files changed, 6 insertions(+), 42 deletions(-) mode change 100644 => 100755 mingw-w64-tesseract-ocr/PKGBUILD delete mode 100644 mingw-w64-tesseract-ocr/tesseract-no-as-needed.patch diff --git a/mingw-w64-tesseract-ocr/PKGBUILD b/mingw-w64-tesseract-ocr/PKGBUILD old mode 100644 new mode 100755 index 0e6705b080..361813af19 --- a/mingw-w64-tesseract-ocr/PKGBUILD +++ b/mingw-w64-tesseract-ocr/PKGBUILD @@ -4,8 +4,8 @@ _realname=tesseract-ocr pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.1.1 -pkgrel=10 +pkgver=5.1.0 +pkgrel=1 pkgdesc="Tesseract OCR (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') @@ -23,19 +23,12 @@ depends=(${MINGW_PACKAGE_PREFIX}-asciidoc ${MINGW_PACKAGE_PREFIX}-zlib) options=('!libtool' 'strip') source=(${_realname}-${pkgver}.tar.gz::https://github.com/tesseract-ocr/tesseract/archive/${pkgver}.tar.gz - https://github.com/tesseract-ocr/tessdata_fast/raw/main/osd.traineddata - tesseract-no-as-needed.patch) -sha256sums=('2a66ff0d8595bff8f04032165e6c936389b1e5727c3ce5a27b3e059d218db1cb' - '9cf5d576fcc47564f11265841e5ca839001e7e6f38ff7f7aacf46d15a96b00ff' - '69c32136b171cfdcdfed411216b3c8c73c557ddaf096b634beadfdf05a4a0e3b') + https://github.com/tesseract-ocr/tessdata_fast/raw/main/osd.traineddata) +sha256sums=('fdec8528d5a0ecc28ab5fff985e0b8ced60726f6ef33f54126f2868e323d4bd2' + '9cf5d576fcc47564f11265841e5ca839001e7e6f38ff7f7aacf46d15a96b00ff') prepare() { cd "${srcdir}/tesseract-${pkgver}" - patch -p1 -i "${srcdir}/tesseract-no-as-needed.patch" - - sed -e "s|cat VERSION|cat VERSION_|g" -i configure.ac - sed -e "s|-version-info \$(GENERIC_LIBRARY_VERSION) ||g" -i src/api/Makefile.am - mv -f VERSION VERSION_ ./autogen.sh } @@ -50,13 +43,6 @@ build() { extra_config+=( --enable-debug ) fi - case ${MSYSTEM} in - CLANG*) - extra_config+=( --disable-openmp );; - esac - - export LIBLEPT_HEADERSDIR="${MINGW_PREFIX}/include" - ./configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -70,7 +56,7 @@ build() { check() { cd "${srcdir}/build-${MSYSTEM}" - make -j1 check || true + ./tesseract --version } package() { diff --git a/mingw-w64-tesseract-ocr/tesseract-no-as-needed.patch b/mingw-w64-tesseract-ocr/tesseract-no-as-needed.patch deleted file mode 100644 index 8102c9d823..0000000000 --- a/mingw-w64-tesseract-ocr/tesseract-no-as-needed.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- tesseract-4.1.1-orig/configure.ac 2019-12-26 22:21:51 +0800 -+++ tesseract-4.1.1/configure.ac 2021-11-14 00:20:31 +0800 -@@ -88,7 +88,7 @@ - mingw*) - AM_CONDITIONAL([T_WIN], true) - AM_CONDITIONAL([ADD_RT], false) -- AC_SUBST([AM_LDFLAGS], ['-Wl,-no-undefined -Wl,--as-needed']) -+ AC_SUBST([AM_LDFLAGS], ['-no-undefined']) - ;; - cygwin*) - AM_CONDITIONAL([ADD_RT], false) ---- tesseract-4.1.1/src/api/Makefile.am.orig 2021-05-05 11:01:16.091542600 -0700 -+++ tesseract-4.1.1/src/api/Makefile.am 2021-05-05 11:04:58.638484300 -0700 -@@ -103,7 +103,7 @@ - if T_WIN - tesseract_LDADD += -ltiff - tesseract_LDADD += -lws2_32 --libtesseract_la_LDFLAGS += -no-undefined -Wl,--as-needed -lws2_32 -+libtesseract_la_LDFLAGS += -no-undefined -lws2_32 - endif - if ADD_RT - tesseract_LDADD += -lrt