Index: head/graphics/tesseract/Makefile =================================================================== --- head/graphics/tesseract/Makefile (revision 497457) +++ head/graphics/tesseract/Makefile (revision 497458) @@ -1,56 +1,70 @@ # Created by: Andrew Pantyukhin # $FreeBSD$ PORTNAME= tesseract PORTVERSION= 4.0.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MAINTAINER= pkubaj@anongoth.pl COMMENT= Commercial quality open source OCR engine LICENSE= APACHE20 +BUILD_DEPENDS= asciidoc:textproc/asciidoc \ + xsltproc:textproc/libxslt \ + ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl LIB_DEPENDS= liblept.so:graphics/leptonica RUN_DEPENDS= tesseract-data>=0:graphics/tesseract-data -USES= autoreconf compiler:c++11-lang gnome localbase libtool pathfix \ - pkgconfig shebangfix -GNU_CONFIGURE= yes +USES= autoreconf compiler:c++11-lang gmake gnome localbase \ + libtool pathfix pkgconfig shebangfix USE_LDCONFIG= yes +GNU_CONFIGURE= yes + USE_GITHUB= yes GH_ACCOUNT= ${PORTNAME}-ocr CONFIGURE_ENV= LIBLEPT_HEADERSDIR="${LOCALBASE}/include/leptonica" DATADIR= ${PREFIX}/share/tessdata PORTDATA= * PORTDOCS= AUTHORS ChangeLog README.md INSTALL_TARGET= install-strip SHEBANG_FILES= src/training/language-specific.sh \ src/training/tesstrain.sh OPTIONS_DEFINE= DOCS TOOLS +OPTIONS_DEFINE_amd64=OPENMP +OPTIONS_DEFINE_i386=OPENMP OPTIONS_DEFAULT=TOOLS +OPTIONS_DEFAULT_amd64=OPENMP +OPTIONS_DEFAULT_i386=OPENMP OPTIONS_SUB= yes + +OPENMP_USES= compiler:openmp +OPENMP_CONFIGURE_ENABLE=openmp +OPENMP_LIB_DEPENDS=libomp.so:devel/openmp + TOOLS_DESC= Include training tools TOOLS_LIB_DEPENDS=libicui18n.so:devel/icu \ libfontconfig.so:x11-fonts/fontconfig TOOLS_USES= compiler:c++11-lib TOOLS_USE= GNOME=cairo,glib20,pango post-patch: @${REINPLACE_CMD} -e 's|-O3 -DNDEBUG||' ${WRKSRC}/configure.ac + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/doc/Makefile.am post-build-TOOLS-on: @cd ${WRKSRC} && ${MAKE} training post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} post-install-TOOLS-on: @cd ${WRKSRC} && ${MAKE} DESTDIR=${STAGEDIR} training-install .include Index: head/graphics/tesseract/files/patch-configure.ac =================================================================== --- head/graphics/tesseract/files/patch-configure.ac (revision 497457) +++ head/graphics/tesseract/files/patch-configure.ac (revision 497458) @@ -1,12 +1,18 @@ 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-03-26 21:58:42 UTC +++ configure.ac -@@ -375,6 +375,7 @@ CXXFLAGS="$OLD_CXXFLAGS" +@@ -375,6 +375,10 @@ CXXFLAGS="$OLD_CXXFLAGS" # ---------------------------------------- AC_SEARCH_LIBS([sem_init], [pthread rt]) +AC_SEARCH_LIBS([pthread_create], [pthread]) - ++if test "$enable_openmp" != no; then ++ AC_SEARCH_LIBS([omp_get_thread_num ], [omp]) ++fi + # ---------------------------------------- Index: head/graphics/tesseract/files/patch-doc_Makefile.am =================================================================== --- head/graphics/tesseract/files/patch-doc_Makefile.am (nonexistent) +++ head/graphics/tesseract/files/patch-doc_Makefile.am (revision 497458) @@ -0,0 +1,15 @@ +--- doc/Makefile.am.orig 2019-03-28 05:11:18 UTC ++++ doc/Makefile.am +@@ -36,7 +36,11 @@ EXTRA_DIST = $(man_MANS) Doxyfile + html: $(patsubst %,%.html,$(man_MANS)) + + %: %.asc +- $(asciidoc) -o $@ $< ++ $(asciidoc) $< ++ $(asciidoc) -b docbook $< ++ %%LOCALBASE%%/bin/xsltproc --nonet --param man.charmap.use.subset "0" \ ++ %%LOCALBASE%%/share/xsl/docbook/manpages/docbook.xsl \ ++ $@.xml + + %.html: %.asc + asciidoc -b html5 -o $@ $< Property changes on: head/graphics/tesseract/files/patch-doc_Makefile.am ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/tesseract/pkg-plist =================================================================== --- head/graphics/tesseract/pkg-plist (revision 497457) +++ head/graphics/tesseract/pkg-plist (revision 497458) @@ -1,44 +1,62 @@ %%TOOLS%%bin/ambiguous_words %%TOOLS%%bin/classifier_tester %%TOOLS%%bin/cntraining %%TOOLS%%bin/combine_lang_model %%TOOLS%%bin/combine_tessdata %%TOOLS%%bin/dawg2wordlist %%TOOLS%%bin/language-specific.sh %%TOOLS%%bin/lstmtraining %%TOOLS%%bin/lstmeval %%TOOLS%%bin/merge_unicharsets %%TOOLS%%bin/mftraining %%TOOLS%%bin/set_unicharset_properties %%TOOLS%%bin/shapeclustering bin/tesseract %%TOOLS%%bin/tesstrain.sh %%TOOLS%%bin/tesstrain_utils.sh %%TOOLS%%bin/text2image %%TOOLS%%bin/unicharset_extractor %%TOOLS%%bin/wordlist2dawg include/tesseract/apitypes.h include/tesseract/baseapi.h include/tesseract/capi.h include/tesseract/genericvector.h include/tesseract/helpers.h include/tesseract/host.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/tesscallback.h include/tesseract/tess_version.h include/tesseract/thresholder.h include/tesseract/unichar.h lib/libtesseract.a lib/libtesseract.so lib/libtesseract.so.4 lib/libtesseract.so.4.0.0 libdata/pkgconfig/tesseract.pc +man/man1/ambiguous_words.1.gz +man/man1/classifier_tester.1.gz +man/man1/cntraining.1.gz +man/man1/combine_lang_model.1.gz +man/man1/combine_tessdata.1.gz +man/man1/dawg2wordlist.1.gz +man/man1/lstmeval.1.gz +man/man1/lstmtraining.1.gz +man/man1/merge_unicharsets.1.gz +man/man1/mftraining.1.gz +man/man1/set_unicharset_properties.1.gz +man/man1/shapeclustering.1.gz +man/man1/tesseract.1.gz +man/man1/text2image.1.gz +man/man1/unicharset_extractor.1.gz +man/man1/wordlist2dawg.1.gz +man/man5/unicharambigs.5.gz +man/man5/unicharset.5.gz