aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/tesseract
diff options
context:
space:
mode:
authorsat <sat@FreeBSD.org>2007-07-18 20:59:54 +0800
committersat <sat@FreeBSD.org>2007-07-18 20:59:54 +0800
commit004ceb4457f7f6b2ea075c612f6f56023acf7095 (patch)
tree9520474422e13f038c6fb7254775e3ba0f1ea90b /graphics/tesseract
parentda3559610a04fd78cb1eacf62165dd90c64dde39 (diff)
downloadfreebsd-ports-gnome-004ceb4457f7f6b2ea075c612f6f56023acf7095.tar.gz
freebsd-ports-gnome-004ceb4457f7f6b2ea075c612f6f56023acf7095.tar.zst
freebsd-ports-gnome-004ceb4457f7f6b2ea075c612f6f56023acf7095.zip
Add port graphics/tesseract:
The Tesseract OCR engine was one of the top 3 engines in the 1995 UNLV Accuracy test. Between 1995 and 2006 it had little work done on it, but it is probably one of the most accurate open source OCR engines available. The source code will read a binary, grey or color image and output text. WWW: http://code.google.com/p/tesseract-ocr/ Based on: pkgsrc package
Diffstat (limited to 'graphics/tesseract')
-rw-r--r--graphics/tesseract/Makefile30
-rw-r--r--graphics/tesseract/distinfo3
-rw-r--r--graphics/tesseract/files/patch-configure12
-rw-r--r--graphics/tesseract/files/patch-cutil__globals.h14
-rw-r--r--graphics/tesseract/files/patch-cutil__tordvars.h13
-rw-r--r--graphics/tesseract/pkg-descr7
-rw-r--r--graphics/tesseract/pkg-plist280
7 files changed, 359 insertions, 0 deletions
diff --git a/graphics/tesseract/Makefile b/graphics/tesseract/Makefile
new file mode 100644
index 000000000000..d1e1fb9d4d0f
--- /dev/null
+++ b/graphics/tesseract/Makefile
@@ -0,0 +1,30 @@
+# New ports collection makefile for: tesseract
+# Date created: 18 July 2007
+# Whom: Andrew Pantyukhin <infofarmer@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= tesseract
+DISTVERSION= 1.04b
+CATEGORIES= graphics
+MASTER_SITES= http://tesseract-ocr.googlecode.com/files/ CENKES
+
+MAINTAINER= infofarmer@FreeBSD.org
+COMMENT= Commercial quality open source OCR engine
+
+LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff
+RUN_DEPENDS= xterm:${PORTSDIR}/x11/xterm
+
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= LIBTIFF_CFLAGS="-I${LOCALBASE}/include"\
+ LIBTIFF_LIBS="-L${LOCALBASE}/lib -ltiff"
+WRKSRC= ${WRKDIR}/${DISTNAME:S/b$//}
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|/usr/bin/X11/xterm|${LOCALBASE}/bin/xterm|'\
+ ${WRKSRC}/ccutil/debugwin.cpp
+
+# fuzplist: cntraining mftraining tessdata
+
+.include <bsd.port.mk>
diff --git a/graphics/tesseract/distinfo b/graphics/tesseract/distinfo
new file mode 100644
index 000000000000..d8a0e80c9777
--- /dev/null
+++ b/graphics/tesseract/distinfo
@@ -0,0 +1,3 @@
+MD5 (tesseract-1.04b.tar.gz) = c6f015f2f2c37b3e7e31b64eb295f798
+SHA256 (tesseract-1.04b.tar.gz) = 4dcbddbed71b1b27f7260413dd5d1498b835954128192acb0ab93c0d835c1c0c
+SIZE (tesseract-1.04b.tar.gz) = 2899276
diff --git a/graphics/tesseract/files/patch-configure b/graphics/tesseract/files/patch-configure
new file mode 100644
index 000000000000..d10a9328a6e5
--- /dev/null
+++ b/graphics/tesseract/files/patch-configure
@@ -0,0 +1,12 @@
+--- ./configure.orig 2007-05-17 04:28:33.000000000 +0400
++++ ./configure 2007-07-18 15:54:41.000000000 +0400
+@@ -6491,7 +6491,8 @@
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_fork_works=cross
+ else
+- cat >conftest.$ac_ext <<_ACEOF
++ cat confdefs.h >conftest.$ac_ext
++ cat >>conftest.$ac_ext <<_ACEOF
+ /* By Ruediger Kuhlmann. */
+ #include <sys/types.h>
+ #if HAVE_UNISTD_H
diff --git a/graphics/tesseract/files/patch-cutil__globals.h b/graphics/tesseract/files/patch-cutil__globals.h
new file mode 100644
index 000000000000..b34e42a3aea3
--- /dev/null
+++ b/graphics/tesseract/files/patch-cutil__globals.h
@@ -0,0 +1,14 @@
+--- ./cutil/globals.h.orig 2007-05-16 05:13:26.000000000 +0400
++++ ./cutil/globals.h 2007-07-18 15:54:41.000000000 +0400
+@@ -45,9 +45,11 @@
+ extern int debugs[MAXPROC]; /*debug flags */
+ extern int plots[MAXPROC]; /*plot flags */
+ extern int corners[4]; /*corners of scan window */
++extern "C" {
+ extern int optind; /*option index */
+ extern char *optarg; /*option argument */
+ /*image file name */
++}
+ extern char imagefile[FILENAMESIZE];
+ /* main directory */
+ extern char directory[FILENAMESIZE];
diff --git a/graphics/tesseract/files/patch-cutil__tordvars.h b/graphics/tesseract/files/patch-cutil__tordvars.h
new file mode 100644
index 000000000000..d0aaed146cbd
--- /dev/null
+++ b/graphics/tesseract/files/patch-cutil__tordvars.h
@@ -0,0 +1,13 @@
+--- ./cutil/tordvars.h.orig 2007-05-17 01:33:53.000000000 +0400
++++ ./cutil/tordvars.h 2007-07-18 15:54:41.000000000 +0400
+@@ -45,8 +45,8 @@
+ extern int similarity_debug; /* Level of debug output */
+ extern int write_raw_output; /* Text before context */
+ extern int write_output; /* Text file output */
+-//extern "C" { extern int display_ratings; } /* Show the ratings */
+-extern int display_ratings; /* Show the ratings */
++extern "C" { extern int display_ratings; } /* Show the ratings */
++//extern int display_ratings; /* Show the ratings */
+ extern int show_bold; /* Use bold text */
+ extern int display_text; /* Show word text */
+ extern int display_blocks; /* Show word as boxes */
diff --git a/graphics/tesseract/pkg-descr b/graphics/tesseract/pkg-descr
new file mode 100644
index 000000000000..69e030eab4e7
--- /dev/null
+++ b/graphics/tesseract/pkg-descr
@@ -0,0 +1,7 @@
+The Tesseract OCR engine was one of the top 3 engines in the 1995 UNLV
+Accuracy test. Between 1995 and 2006 it had little work done on it, but
+it is probably one of the most accurate open source OCR engines
+available. The source code will read a binary, grey or color image and
+output text.
+
+WWW: http://code.google.com/p/tesseract-ocr/
diff --git a/graphics/tesseract/pkg-plist b/graphics/tesseract/pkg-plist
new file mode 100644
index 000000000000..4a3ad1067455
--- /dev/null
+++ b/graphics/tesseract/pkg-plist
@@ -0,0 +1,280 @@
+bin/cntraining
+bin/mftraining
+bin/tesseract
+include/tesseract/adaptions.h
+include/tesseract/adaptive.h
+include/tesseract/adaptmatch.h
+include/tesseract/applybox.h
+include/tesseract/associate.h
+include/tesseract/badwords.h
+include/tesseract/baseapi.h
+include/tesseract/basedir.h
+include/tesseract/baseline.h
+include/tesseract/bestfirst.h
+include/tesseract/bits16.h
+include/tesseract/bitstrm.h
+include/tesseract/bitvec.h
+include/tesseract/blckerr.h
+include/tesseract/blkocc.h
+include/tesseract/blobbox.h
+include/tesseract/blobclass.h
+include/tesseract/blobcmp.h
+include/tesseract/blobcmpl.h
+include/tesseract/blobs.h
+include/tesseract/blread.h
+include/tesseract/callcpp.h
+include/tesseract/callnet.h
+include/tesseract/charcut.h
+include/tesseract/charsample.h
+include/tesseract/chartoname.h
+include/tesseract/choicearr.h
+include/tesseract/choices.h
+include/tesseract/chop.h
+include/tesseract/chopper.h
+include/tesseract/closed.h
+include/tesseract/clst.h
+include/tesseract/cluster.h
+include/tesseract/clusttool.h
+include/tesseract/cmndwin.h
+include/tesseract/cnTraining.dsp
+include/tesseract/const.h
+include/tesseract/context.h
+include/tesseract/control.h
+include/tesseract/coutln.h
+include/tesseract/crakedge.h
+include/tesseract/cutil.h
+include/tesseract/cutoffs.h
+include/tesseract/danerror.h
+include/tesseract/dawg.h
+include/tesseract/debug.h
+include/tesseract/debugwin.h
+include/tesseract/djmenus.h
+include/tesseract/dlltest.cpp
+include/tesseract/dlltest.dsp
+include/tesseract/docqual.h
+include/tesseract/drawedg.h
+include/tesseract/drawfx.h
+include/tesseract/drawtord.h
+include/tesseract/edgblob.h
+include/tesseract/edgloop.h
+include/tesseract/efio.h
+include/tesseract/elst.h
+include/tesseract/elst2.h
+include/tesseract/emalloc.h
+include/tesseract/errcode.h
+include/tesseract/evntlst.h
+include/tesseract/evnts.h
+include/tesseract/expandblob.h
+include/tesseract/extern.h
+include/tesseract/extract.h
+include/tesseract/featdefs.h
+include/tesseract/fileerr.h
+include/tesseract/findseam.h
+include/tesseract/fixspace.h
+include/tesseract/fixxht.h
+include/tesseract/flexfx.h
+include/tesseract/float2int.h
+include/tesseract/fpchop.h
+include/tesseract/fpoint.h
+include/tesseract/freelist.h
+include/tesseract/funcdefs.h
+include/tesseract/fxdefs.h
+include/tesseract/fxid.h
+include/tesseract/gap_map.h
+include/tesseract/genblob.h
+include/tesseract/general.h
+include/tesseract/globaloc.h
+include/tesseract/globals.h
+include/tesseract/gradechop.h
+include/tesseract/grphics.h
+include/tesseract/grphshm.h
+include/tesseract/hashfn.h
+include/tesseract/heuristic.h
+include/tesseract/hideedge.h
+include/tesseract/host.h
+include/tesseract/hosthplb.h
+include/tesseract/hpddef.h
+include/tesseract/hpdsizes.h
+include/tesseract/hyphen.h
+include/tesseract/img.h
+include/tesseract/imgbmp.h
+include/tesseract/imgerrs.h
+include/tesseract/imgio.h
+include/tesseract/imgs.h
+include/tesseract/imgscale.h
+include/tesseract/imgtiff.h
+include/tesseract/imgunpk.h
+include/tesseract/intfx.h
+include/tesseract/intmatcher.h
+include/tesseract/intproto.h
+include/tesseract/ipoints.h
+include/tesseract/kdtree.h
+include/tesseract/labls.h
+include/tesseract/linlsq.h
+include/tesseract/listio.h
+include/tesseract/lmedsq.h
+include/tesseract/lsterr.h
+include/tesseract/mainblk.h
+include/tesseract/makechop.h
+include/tesseract/makerow.h
+include/tesseract/matchdefs.h
+include/tesseract/matchtab.h
+include/tesseract/matmatch.h
+include/tesseract/matrix.h
+include/tesseract/measure.h
+include/tesseract/memblk.h
+include/tesseract/memry.h
+include/tesseract/memryerr.h
+include/tesseract/mergenf.h
+include/tesseract/metrics.h
+include/tesseract/mf.h
+include/tesseract/mfTraining.dsp
+include/tesseract/mfcpch.cpp
+include/tesseract/mfcpch.h
+include/tesseract/mfdefs.h
+include/tesseract/mfoutline.h
+include/tesseract/mfvars.h
+include/tesseract/mfx.h
+include/tesseract/minmax.h
+include/tesseract/mod128.h
+include/tesseract/msmenus.h
+include/tesseract/name2char.h
+include/tesseract/ndminx.h
+include/tesseract/normalis.h
+include/tesseract/normfeat.h
+include/tesseract/normmatch.h
+include/tesseract/notdll.h
+include/tesseract/nwmain.h
+include/tesseract/ocrblock.h
+include/tesseract/ocrclass.h
+include/tesseract/ocrfeatures.h
+include/tesseract/ocrrow.h
+include/tesseract/ocrshell.h
+include/tesseract/oldbasel.h
+include/tesseract/oldheap.h
+include/tesseract/oldlist.h
+include/tesseract/olutil.h
+include/tesseract/outfeat.h
+include/tesseract/outlines.h
+include/tesseract/output.h
+include/tesseract/pageblk.h
+include/tesseract/pageres.h
+include/tesseract/pagewalk.h
+include/tesseract/paircmp.h
+include/tesseract/pdblock.h
+include/tesseract/pdclass.h
+include/tesseract/permdawg.h
+include/tesseract/permnum.h
+include/tesseract/permute.h
+include/tesseract/pgedit.h
+include/tesseract/pgeditx.h
+include/tesseract/picofeat.h
+include/tesseract/pieces.h
+include/tesseract/pithsync.h
+include/tesseract/pitsync1.h
+include/tesseract/platform.h
+include/tesseract/plotedges.h
+include/tesseract/plotseg.h
+include/tesseract/points.h
+include/tesseract/polyaprx.h
+include/tesseract/polyblk.h
+include/tesseract/polyblob.h
+include/tesseract/polyvert.h
+include/tesseract/poutline.h
+include/tesseract/protos.h
+include/tesseract/quadlsq.h
+include/tesseract/quadratc.h
+include/tesseract/quspline.h
+include/tesseract/ratngs.h
+include/tesseract/rect.h
+include/tesseract/rejctmap.h
+include/tesseract/reject.h
+include/tesseract/render.h
+include/tesseract/rwpoly.h
+include/tesseract/sbdmenu.h
+include/tesseract/sbgconst.h
+include/tesseract/sbgdefs.h
+include/tesseract/sbgtypes.h
+include/tesseract/scaleimg.h
+include/tesseract/scanedg.h
+include/tesseract/scanutils.cpp
+include/tesseract/scanutils.h
+include/tesseract/seam.h
+include/tesseract/secname.h
+include/tesseract/serialis.h
+include/tesseract/showim.h
+include/tesseract/sigmenu.h
+include/tesseract/sortflts.h
+include/tesseract/speckle.h
+include/tesseract/split.h
+include/tesseract/states.h
+include/tesseract/statistc.h
+include/tesseract/stderr.h
+include/tesseract/stepblob.h
+include/tesseract/stopper.h
+include/tesseract/strngs.h
+include/tesseract/structures.h
+include/tesseract/submen.h
+include/tesseract/tally.h
+include/tesseract/tessarray.h
+include/tesseract/tessbox.h
+include/tesseract/tessclas.h
+include/tesseract/tessedit.h
+include/tesseract/tessembedded.h
+include/tesseract/tesseractmain.h
+include/tesseract/tessinit.h
+include/tesseract/tessio.h
+include/tesseract/tessopt.h
+include/tesseract/tessout.h
+include/tesseract/tessvars.h
+include/tesseract/tface.h
+include/tesseract/tfacep.h
+include/tesseract/tfacepp.h
+include/tesseract/topitch.h
+include/tesseract/tordmain.h
+include/tesseract/tordvars.h
+include/tesseract/tospace.h
+include/tesseract/tovars.h
+include/tesseract/tprintf.h
+include/tesseract/training.h
+include/tesseract/trie.h
+include/tesseract/tstruct.h
+include/tesseract/txtregn.h
+include/tesseract/underlin.h
+include/tesseract/unichar.h
+include/tesseract/unicharmap.h
+include/tesseract/unicharset.h
+include/tesseract/varable.h
+include/tesseract/varabled.h
+include/tesseract/varblmen.h
+include/tesseract/varblwin.h
+include/tesseract/variables.h
+include/tesseract/vecfuncs.h
+include/tesseract/werd.h
+include/tesseract/werdit.h
+include/tesseract/wordclass.h
+include/tesseract/wordseg.h
+include/tesseract/xform2d.h
+lib/libtesseract_ccstruct.a
+lib/libtesseract_ccutil.a
+lib/libtesseract_classify.a
+lib/libtesseract_cutil.a
+lib/libtesseract_dict.a
+lib/libtesseract_display.a
+lib/libtesseract_image.a
+lib/libtesseract_main.a
+lib/libtesseract_textord.a
+lib/libtesseract_training.a
+lib/libtesseract_viewer.a
+lib/libtesseract_wordrec.a
+share/tessdata/confsets
+share/tessdata/eng.DangAmbigs
+share/tessdata/eng.freq-dawg
+share/tessdata/eng.inttemp
+share/tessdata/eng.normproto
+share/tessdata/eng.pffmtable
+share/tessdata/eng.unicharset
+share/tessdata/eng.user-words
+share/tessdata/eng.word-dawg
+@dirrm include/tesseract
+@dirrm share/tessdata