aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/tesseract
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2016-08-16 22:41:00 +0800
committerpawel <pawel@FreeBSD.org>2016-08-16 22:41:00 +0800
commitb328f52ee7639f13b900983042ea000840b9d704 (patch)
tree8d7cf13d0ea17c1cbeb126afc944194b9c2e050d /graphics/tesseract
parentd65f0c7327eda3be32ac7380fe2a8f6d64b96f2d (diff)
downloadfreebsd-ports-gnome-b328f52ee7639f13b900983042ea000840b9d704.tar.gz
freebsd-ports-gnome-b328f52ee7639f13b900983042ea000840b9d704.tar.zst
freebsd-ports-gnome-b328f52ee7639f13b900983042ea000840b9d704.zip
- Update graphics/tesseract to version 3.04.01
- Add TOOLS option for training tools - Update graphics/tesseract-data to version 3.04.00 - Now hosted on GitHub - Take maintainership of both ports PR: 211799 Submitted by: Piotr Kubaj
Diffstat (limited to 'graphics/tesseract')
-rw-r--r--graphics/tesseract/Makefile41
-rw-r--r--graphics/tesseract/distinfo7
-rw-r--r--graphics/tesseract/files/patch-ccstruct_matrix.h11
-rw-r--r--graphics/tesseract/pkg-plist27
4 files changed, 53 insertions, 33 deletions
diff --git a/graphics/tesseract/Makefile b/graphics/tesseract/Makefile
index 4e3e62a01b41..111624ab483e 100644
--- a/graphics/tesseract/Makefile
+++ b/graphics/tesseract/Makefile
@@ -2,38 +2,38 @@
# $FreeBSD$
PORTNAME= tesseract
-PORTVERSION= 3.02.02
-PORTREVISION= 3
+PORTVERSION= 3.04.01
CATEGORIES= graphics
-MASTER_SITES= GOOGLE_CODE
-DISTFILES= tesseract-ocr-${PORTVERSION}${EXTRACT_SUFX}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= pkubaj@anongoth.pl
COMMENT= Commercial quality open source OCR engine
-OPTIONS_DEFINE= DOCS EXAMPLES
-
LICENSE= APACHE20
LIB_DEPENDS= liblept.so:graphics/leptonica
-DIST_SUBDIR= ${PORTNAME}
-PROJECTHOST= tesseract-ocr
-WRKSRC= ${WRKDIR}/tesseract-ocr
-
-USES= libtool
+USES= localbase libtool
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
+USE_GITHUB= yes
+GH_ACCOUNT= ${PORTNAME}-ocr
+
CONFIGURE_ENV= LIBLEPT_HEADERSDIR="${LOCALBASE}/include/leptonica"
-LIBS+= -L${LOCALBASE}/lib
DATADIR= ${PREFIX}/share/tessdata
PORTDATA= *
-PORTDOCS= AUTHORS ChangeLog README ReleaseNotes html
+PORTDOCS= AUTHORS ChangeLog README.md ReleaseNotes
PORTEXAMPLES= eurotext.tif phototest.tif
+INSTALL_TARGET= install-strip
-DOCS_DISTFILES= tesseract-ocr-${PORTVERSION}-doc-html${EXTRACT_SUFX}
+OPTIONS_DEFINE= DOCS EXAMPLES TOOLS
+OPTIONS_SUB= yes
+TOOLS_DESC= Include training tools
+TOOLS_LIB_DEPENDS=libicui18n.so:devel/icu \
+ libfontconfig.so:x11-fonts/fontconfig
+TOOLS_USES= pkgconfig
+TOOLS_USE= GNOME=cairo,glib20,pango
post-patch:
@${REINPLACE_CMD} -e 's|-O3 -DNDEBUG||' ${WRKSRC}/configure
@@ -41,12 +41,17 @@ post-patch:
's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' \
${WRKSRC}/Makefile.in
+post-build-TOOLS-on:
+ @cd ${WRKSRC} && ${MAKE} training
+
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
- cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS:Nhtml} ${STAGEDIR}${DOCSDIR}
- cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}
+ @cd ${WRKSRC} && ${INSTALL_DATA} testing/eurotext.tif \
+ testing/phototest.tif ${STAGEDIR}${EXAMPLESDIR}
+post-install-TOOLS-on:
+ @cd ${WRKSRC} && ${MAKE} DESTDIR=${STAGEDIR} training-install
.include <bsd.port.mk>
diff --git a/graphics/tesseract/distinfo b/graphics/tesseract/distinfo
index ad6abad46c81..a996ece8eddd 100644
--- a/graphics/tesseract/distinfo
+++ b/graphics/tesseract/distinfo
@@ -1,4 +1,3 @@
-SHA256 (tesseract/tesseract-ocr-3.02.02.tar.gz) = 26cd39cb3f2a6f6f1bf4050d1cc0aae35edee49eb49a92df3cb7f9487caa013d
-SIZE (tesseract/tesseract-ocr-3.02.02.tar.gz) = 3890393
-SHA256 (tesseract/tesseract-ocr-3.02.02-doc-html.tar.gz) = e7ffd3082005345a682268740140bfdde73461528d6f2da019fef29539477a7b
-SIZE (tesseract/tesseract-ocr-3.02.02-doc-html.tar.gz) = 10635901
+TIMESTAMP = 1470939746
+SHA256 (tesseract-ocr-tesseract-3.04.01_GH0.tar.gz) = 57f63e1b14ae04c3932a2683e4be4954a2849e17edd638ffe91bc5a2156adc6a
+SIZE (tesseract-ocr-tesseract-3.04.01_GH0.tar.gz) = 2269105
diff --git a/graphics/tesseract/files/patch-ccstruct_matrix.h b/graphics/tesseract/files/patch-ccstruct_matrix.h
new file mode 100644
index 000000000000..67b186fa6f85
--- /dev/null
+++ b/graphics/tesseract/files/patch-ccstruct_matrix.h
@@ -0,0 +1,11 @@
+--- ccstruct/matrix.h.orig 2016-08-11 18:32:41 UTC
++++ ccstruct/matrix.h
+@@ -30,7 +30,7 @@
+
+ class BLOB_CHOICE_LIST;
+
+-#define NOT_CLASSIFIED reinterpret_cast<BLOB_CHOICE_LIST*>(NULL)
++#define NOT_CLASSIFIED reinterpret_cast<BLOB_CHOICE_LIST*>(0)
+
+ // A generic class to hold a 2-D matrix with entries of type T, but can also
+ // act as a base class for other implementations, such as a triangular or
diff --git a/graphics/tesseract/pkg-plist b/graphics/tesseract/pkg-plist
index d7b93e709ca4..3b49a02c2298 100644
--- a/graphics/tesseract/pkg-plist
+++ b/graphics/tesseract/pkg-plist
@@ -1,13 +1,15 @@
-bin/ambiguous_words
-bin/classifier_tester
-bin/cntraining
-bin/combine_tessdata
-bin/dawg2wordlist
-bin/mftraining
-bin/shapeclustering
+%%TOOLS%%bin/ambiguous_words
+%%TOOLS%%bin/classifier_tester
+%%TOOLS%%bin/cntraining
+%%TOOLS%%bin/combine_tessdata
+%%TOOLS%%bin/dawg2wordlist
+%%TOOLS%%bin/mftraining
+%%TOOLS%%bin/set_unicharset_properties
+%%TOOLS%%bin/shapeclustering
bin/tesseract
-bin/unicharset_extractor
-bin/wordlist2dawg
+%%TOOLS%%bin/text2image
+%%TOOLS%%bin/unicharset_extractor
+%%TOOLS%%bin/wordlist2dawg
include/tesseract/apitypes.h
include/tesseract/baseapi.h
include/tesseract/basedir.h
@@ -20,10 +22,13 @@ include/tesseract/host.h
include/tesseract/ltrresultiterator.h
include/tesseract/memry.h
include/tesseract/ndminx.h
+include/tesseract/ocrclass.h
+include/tesseract/osdetect.h
include/tesseract/pageiterator.h
include/tesseract/params.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
@@ -35,7 +40,8 @@ include/tesseract/unicharset.h
lib/libtesseract.a
lib/libtesseract.so
lib/libtesseract.so.3
-lib/libtesseract.so.3.0.2
+lib/libtesseract.so.3.0.4
+libdata/pkgconfig/tesseract.pc
man/man1/ambiguous_words.1.gz
man/man1/cntraining.1.gz
man/man1/combine_tessdata.1.gz
@@ -47,4 +53,3 @@ man/man1/unicharset_extractor.1.gz
man/man1/wordlist2dawg.1.gz
man/man5/unicharambigs.5.gz
man/man5/unicharset.5.gz
-libdata/pkgconfig/tesseract.pc