Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Dec 2021 03:39:01 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 6faa3a6267ad - main - graphics/tesseract: update to 5.0.0
Message-ID:  <202112020339.1B23d1OS056529@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6faa3a6267adeb4e80ae789529c41fe970124577

commit 6faa3a6267adeb4e80ae789529c41fe970124577
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-12-02 03:35:39 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-12-02 03:35:39 +0000

    graphics/tesseract: update to 5.0.0
    
    1. Switch OPENMP on for amd64, i386, powerpc64 and powerpc64le - other architectures untested.
    2. Remove stale patch-configure.ac, the port uses cmake now.
    3. Remove stale patch-src_ccutil_ocrclass.h, that doesn't apply.
    4. Manually install libraries used by training tools, they are not installed automatically.
---
 graphics/tesseract/Makefile                        | 41 ++++++++++++----------
 graphics/tesseract/distinfo                        |  6 ++--
 graphics/tesseract/files/patch-configure.ac        | 17 ---------
 .../tesseract/files/patch-src_ccutil_ocrclass.h    | 10 ------
 graphics/tesseract/pkg-plist                       | 25 ++++++-------
 5 files changed, 36 insertions(+), 63 deletions(-)

diff --git a/graphics/tesseract/Makefile b/graphics/tesseract/Makefile
index 0c16872a40c9..6e8d3eec200a 100644
--- a/graphics/tesseract/Makefile
+++ b/graphics/tesseract/Makefile
@@ -1,7 +1,7 @@
 # Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
 
 PORTNAME=	tesseract
-PORTVERSION=	4.1.3
+PORTVERSION=	5.0.0
 CATEGORIES=	graphics
 
 MAINTAINER=	pkubaj@FreeBSD.org
@@ -15,12 +15,13 @@ BUILD_DEPENDS=	asciidoc:textproc/asciidoc \
 LIB_DEPENDS=	liblept.so:graphics/leptonica \
 		libtiff.so:graphics/tiff \
 		libharfbuzz.so:print/harfbuzz \
-		libfreetype.so:print/freetype2
+		libfreetype.so:print/freetype2 \
+		libcurl.so:ftp/curl
 
 RUN_DEPENDS=	tesseract-data>=0:graphics/tesseract-data
 
 USES=		compiler:c++11-lang cmake cpe gnome libarchive libtool \
-		localbase pathfix pkgconfig shebangfix
+		localbase pathfix pkgconfig
 USE_LDCONFIG=	yes
 
 GNU_CONFIGURE=	yes
@@ -30,29 +31,23 @@ CPE_VENDOR=	tesseract_project
 USE_GITHUB=	yes
 GH_ACCOUNT=	${PORTNAME}-ocr
 
-CONFIGURE_ENV=	LIBLEPT_HEADERSDIR="${LOCALBASE}/include/leptonica"
-
+CMAKE_ON=	BUILD_SHARED_LIBS
 DATADIR=	${PREFIX}/share/tessdata
+LDFLAGS+=	-pthread
 PORTDATA=	*
 PORTDOCS=	AUTHORS ChangeLog README.md
-SHEBANG_FILES=	src/training/language-specific.sh \
-		src/training/tesstrain.sh
-
-OPTIONS_DEFINE=	DOCS TOOLS
-#OPTIONS_DEFINE_amd64=	OPENMP
-#OPTIONS_DEFINE_i386=	OPENMP
-#OPTIONS_DEFINE_powerpc64=	OPENMP
-#OPTIONS_DEFINE_powerpc64le=	OPENMP
+
+OPTIONS_DEFINE=	DOCS OPENMP TOOLS
 OPTIONS_DEFAULT=	TOOLS
-#OPTIONS_DEFAULT_amd64=	OPENMP
-#OPTIONS_DEFAULT_i386=	OPENMP
-#OPTIONS_DEFAULT_powerpc64=	OPENMP
-#OPTIONS_DEFAULT_powerpc64le=	OPENMP
+OPTIONS_DEFAULT_amd64=	OPENMP
+OPTIONS_DEFAULT_i386=	OPENMP
+OPTIONS_DEFAULT_powerpc64=	OPENMP
+OPTIONS_DEFAULT_powerpc64le=	OPENMP
 OPTIONS_SUB=	yes
 
-#OPENMP_CMAKE_BOOL=	OPENMP_BUILD
+OPENMP_CMAKE_BOOL=	OPENMP_BUILD
 
-TOOLS_CMAKE_ON=	BUILD_TRAINING_TOOLS
+TOOLS_CMAKE_BOOL=	BUILD_TRAINING_TOOLS
 TOOLS_DESC=	Include training tools
 TOOLS_LIB_DEPENDS=libicui18n.so:devel/icu \
 		libfontconfig.so:x11-fonts/fontconfig
@@ -68,4 +63,12 @@ post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
 
+post-install-TOOLS-on:
+	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/src/training/libcommon_training.so \
+		${STAGEDIR}${PREFIX}/lib/
+	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/src/training/libpango_training.so \
+		${STAGEDIR}${PREFIX}/lib/
+	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/src/training/libunicharset_training.so \
+		${STAGEDIR}${PREFIX}/lib/
+
 .include <bsd.port.mk>
diff --git a/graphics/tesseract/distinfo b/graphics/tesseract/distinfo
index fcca3ec163ad..8cd4c1026170 100644
--- a/graphics/tesseract/distinfo
+++ b/graphics/tesseract/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1636999899
-SHA256 (tesseract-ocr-tesseract-4.1.3_GH0.tar.gz) = 83dc56b544be938983f528c777e4e1d906205b0f6dc0110afc223f2cc1cec6d3
-SIZE (tesseract-ocr-tesseract-4.1.3_GH0.tar.gz) = 1975331
+TIMESTAMP = 1638329691
+SHA256 (tesseract-ocr-tesseract-5.0.0_GH0.tar.gz) = 72467b7876dc0c39ef7fbcb0f793f73aee1c78d9fabab3ab19cbac1eb42e9fed
+SIZE (tesseract-ocr-tesseract-5.0.0_GH0.tar.gz) = 1919742
diff --git a/graphics/tesseract/files/patch-configure.ac b/graphics/tesseract/files/patch-configure.ac
deleted file mode 100644
index df7bb4812e2c..000000000000
--- a/graphics/tesseract/files/patch-configure.ac
+++ /dev/null
@@ -1,17 +0,0 @@
-sem_init(3) is part of libc on FreeBSD, so we ended up not linking against
-libpthread. Look for a symbol that causes us to load it.
-libtesseract.so is not linked against libomp if openmp is enabled,
-which makes dependent ports fail. This adds a workaround by linking
-directly against libomp.
---- configure.ac.orig	2019-07-07 12:34:08 UTC
-+++ configure.ac
-@@ -372,6 +372,9 @@ esac
- # ----------------------------------------
- 
- AC_SEARCH_LIBS([pthread_create], [pthread])
-+if test "$enable_openmp" != no; then
-+  AC_SEARCH_LIBS([omp_get_thread_num ], [omp])
-+fi
- 
- 
- # ----------------------------------------
diff --git a/graphics/tesseract/files/patch-src_ccutil_ocrclass.h b/graphics/tesseract/files/patch-src_ccutil_ocrclass.h
deleted file mode 100644
index 32e7ffb2844f..000000000000
--- a/graphics/tesseract/files/patch-src_ccutil_ocrclass.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/ccutil/ocrclass.h.orig	2019-07-08 13:00:14 UTC
-+++ src/ccutil/ocrclass.h
-@@ -31,6 +31,7 @@
- #ifdef _WIN32
- #include <winsock2.h> // for timeval
- #endif
-+#include <sys/time.h>
- 
- /**********************************************************************
-  * EANYCODE_CHAR
diff --git a/graphics/tesseract/pkg-plist b/graphics/tesseract/pkg-plist
index e33b4922f8de..f7eadfd4b4c5 100644
--- a/graphics/tesseract/pkg-plist
+++ b/graphics/tesseract/pkg-plist
@@ -6,6 +6,7 @@
 %%TOOLS%%bin/dawg2wordlist
 %%TOOLS%%bin/lstmeval
 %%TOOLS%%bin/lstmtraining
+%%TOOLS%%bin/merge_unicharsets
 %%TOOLS%%bin/mftraining
 %%TOOLS%%bin/set_unicharset_properties
 %%TOOLS%%bin/shapeclustering
@@ -13,29 +14,25 @@ bin/tesseract
 %%TOOLS%%bin/text2image
 %%TOOLS%%bin/unicharset_extractor
 %%TOOLS%%bin/wordlist2dawg
-cmake/TesseractConfig-version.cmake
-cmake/TesseractConfig.cmake
-cmake/TesseractTargets-%%CMAKE_BUILD_TYPE%%.cmake
-cmake/TesseractTargets.cmake
-include/tesseract/apitypes.h
 include/tesseract/baseapi.h
 include/tesseract/capi.h
-include/tesseract/genericvector.h
-include/tesseract/helpers.h
+include/tesseract/export.h
 include/tesseract/ltrresultiterator.h
 include/tesseract/ocrclass.h
 include/tesseract/osdetect.h
 include/tesseract/pageiterator.h
-include/tesseract/platform.h
 include/tesseract/publictypes.h
 include/tesseract/renderer.h
 include/tesseract/resultiterator.h
-include/tesseract/serialis.h
-include/tesseract/strngs.h
-include/tesseract/tess_version.h
-include/tesseract/tesscallback.h
-include/tesseract/thresholder.h
 include/tesseract/unichar.h
+include/tesseract/version.h
+%%TOOLS%%lib/libcommon_training.so
+%%TOOLS%%lib/libpango_training.so
 lib/libtesseract.so
-lib/libtesseract.so.4.1.3
+lib/libtesseract.so.5.0.0
+lib/libunicharset_training.so
+lib/cmake/tesseract/TesseractConfig.cmake
+lib/cmake/tesseract/TesseractConfigVersion.cmake
+lib/cmake/tesseract/TesseractTargets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/tesseract/TesseractTargets.cmake
 libdata/pkgconfig/tesseract.pc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112020339.1B23d1OS056529>