diff options
-rw-r--r-- | graphics/tesseract/Makefile | 22 | ||||
-rw-r--r-- | graphics/tesseract/files/patch-configure.ac | 10 | ||||
-rw-r--r-- | graphics/tesseract/files/patch-doc_Makefile.am | 15 | ||||
-rw-r--r-- | graphics/tesseract/pkg-plist | 18 |
4 files changed, 59 insertions, 6 deletions
diff --git a/graphics/tesseract/Makefile b/graphics/tesseract/Makefile index 3aea245b8c22..d3792c5d6965 100644 --- a/graphics/tesseract/Makefile +++ b/graphics/tesseract/Makefile @@ -3,7 +3,7 @@ PORTNAME= tesseract PORTVERSION= 4.0.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MAINTAINER= pkubaj@anongoth.pl @@ -11,14 +11,18 @@ 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 @@ -32,8 +36,17 @@ 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 @@ -42,6 +55,7 @@ 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 diff --git a/graphics/tesseract/files/patch-configure.ac b/graphics/tesseract/files/patch-configure.ac index 668d838431c0..43bbe5a7ca47 100644 --- a/graphics/tesseract/files/patch-configure.ac +++ b/graphics/tesseract/files/patch-configure.ac @@ -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 + # ---------------------------------------- diff --git a/graphics/tesseract/files/patch-doc_Makefile.am b/graphics/tesseract/files/patch-doc_Makefile.am new file mode 100644 index 000000000000..56b3cb9fd5d1 --- /dev/null +++ b/graphics/tesseract/files/patch-doc_Makefile.am @@ -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 $@ $< diff --git a/graphics/tesseract/pkg-plist b/graphics/tesseract/pkg-plist index afead3d32e11..b8911b05316d 100644 --- a/graphics/tesseract/pkg-plist +++ b/graphics/tesseract/pkg-plist @@ -42,3 +42,21 @@ 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 |