# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # print/tesseract-ocr # print/tesseract-ocr/files # print/tesseract-ocr/files/patch-configure # print/tesseract-ocr/files/patch-ccutil_platform.h # print/tesseract-ocr/files/patch-cutil_listio.cpp # print/tesseract-ocr/files/patch-cutil_util.cpp # print/tesseract-ocr/files/patch-cutil_variables.cpp # print/tesseract-ocr/Makefile # print/tesseract-ocr/distinfo # print/tesseract-ocr/pkg-descr # print/tesseract-ocr/pkg-plist # echo c - print/tesseract-ocr mkdir -p print/tesseract-ocr > /dev/null 2>&1 echo c - print/tesseract-ocr/files mkdir -p print/tesseract-ocr/files > /dev/null 2>&1 echo x - print/tesseract-ocr/files/patch-configure sed 's/^X//' >print/tesseract-ocr/files/patch-configure << 'END-of-print/tesseract-ocr/files/patch-configure' X--- configure.orig Wed Oct 4 22:48:51 2006 X+++ configure Sun Jan 28 23:11:42 2007 X@@ -1326,8 +1326,6 @@ X X X X-tesseract X- X ac_aux_dir= X for ac_dir in config $srcdir/config; do X if test -f $ac_dir/install-sh; then X@@ -3907,128 +3905,6 @@ X ac_debug=no X fi; X OPTS= X- X- # Note: the /Za option might be nice to have, but it is X- # incompatible with , which some packages X- # (like the tiff library) require X- VCOPTS_COMMON="/nologo /G5 /Zp1 /W3" X- saved_CXXFLAGS="$CXXFLAGS" X- saved_CFLAGS="$CFLAGS" X- CXXFLAGS= X- CFLAGS= X- for opt in $saved_CXXFLAGS ; do X- case $opt in X- -g*) test $ac_debug != no && OPTS="$OPTS $opt" ;; X- -O*) ;; X- *) CXXFLAGS="$CXXFLAGS $opt" ;; X- esac X- done X- for opt in $saved_CFLAGS ; do X- case $opt in X- -O*|-g*) ;; X- *) CFLAGS="$CFLAGS $opt" ;; X- esac X- done X- if test x$ac_debug = xno ; then X- OPTS=-DNDEBUG X- if test x$CXX = xcl.exe ; then X- OPTS="$OPTS $VCOPTS_COMMON /Ow /O2" X- else X- X- opt="-O3" X- echo "$as_me:$LINENO: checking if $CXX accepts $opt" >&5 X-echo $ECHO_N "checking if $CXX accepts $opt... $ECHO_C" >&6 X- echo 'void f(){}' > conftest.cc X- if test -z "`${CXX} ${CXXFLAGS} ${OPTS} $opt -c conftest.cc 2>&1`"; then X- echo "$as_me:$LINENO: result: yes" >&5 X-echo "${ECHO_T}yes" >&6 X- rm conftest.* X- OPTS="$OPTS -O3" X- else X- echo "$as_me:$LINENO: result: no" >&5 X-echo "${ECHO_T}no" >&6 X- rm conftest.* X- X- opt="-O2" X- echo "$as_me:$LINENO: checking if $CXX accepts $opt" >&5 X-echo $ECHO_N "checking if $CXX accepts $opt... $ECHO_C" >&6 X- echo 'void f(){}' > conftest.cc X- if test -z "`${CXX} ${CXXFLAGS} ${OPTS} $opt -c conftest.cc 2>&1`"; then X- echo "$as_me:$LINENO: result: yes" >&5 X-echo "${ECHO_T}yes" >&6 X- rm conftest.* X- OPTS="$OPTS -O2" X- else X- echo "$as_me:$LINENO: result: no" >&5 X-echo "${ECHO_T}no" >&6 X- rm conftest.* X- X- fi X- X- fi X- X- cpu=`uname -m 2>/dev/null` X- test -z "$cpu" && cpu=${host_cpu} X- case "${host_cpu}" in X- i?86) X- opt="-mcpu=${host_cpu}" X- X- opt="$opt" X- echo "$as_me:$LINENO: checking if $CXX accepts $opt" >&5 X-echo $ECHO_N "checking if $CXX accepts $opt... $ECHO_C" >&6 X- echo 'void f(){}' > conftest.cc X- if test -z "`${CXX} ${CXXFLAGS} ${OPTS} $opt -c conftest.cc 2>&1`"; then X- echo "$as_me:$LINENO: result: yes" >&5 X-echo "${ECHO_T}yes" >&6 X- rm conftest.* X- OPTS="$OPTS $opt" X- else X- echo "$as_me:$LINENO: result: no" >&5 X-echo "${ECHO_T}no" >&6 X- rm conftest.* X- X- fi X- X- ;; X- esac X- fi X- else X- if test x$CXX = xcl.exe ; then X- OPTS="$OPTS $VCOPTS_COMMON /Od /Z7" X- fi X- X-cat >>confdefs.h <<\_ACEOF X-#define DEBUG_MODE 1 X-_ACEOF X- X- fi X- if test x$CXX != xcl.exe ; then X- X- opt="-Wall" X- echo "$as_me:$LINENO: checking if $CXX accepts $opt" >&5 X-echo $ECHO_N "checking if $CXX accepts $opt... $ECHO_C" >&6 X- echo 'void f(){}' > conftest.cc X- if test -z "`${CXX} ${CXXFLAGS} ${OPTS} $opt -c conftest.cc 2>&1`"; then X- echo "$as_me:$LINENO: result: yes" >&5 X-echo "${ECHO_T}yes" >&6 X- rm conftest.* X- OPTS="$OPTS -Wall" X- else X- echo "$as_me:$LINENO: result: no" >&5 X-echo "${ECHO_T}no" >&6 X- rm conftest.* X- X- fi X- X- fi X- case x"$ac_debug" in X- x[0-9]) OPTS="$OPTS -DDEBUGLVL=$ac_debug" ;; X- xr*) OPTS="$OPTS -DRUNTIME_DEBUG_ONLY" ;; X- esac X- CXXFLAGS="$CXXFLAGS $OPTS" X- CFLAGS="$CFLAGS $OPTS" X- X- X X echo "$as_me:$LINENO: checking whether the compiler recognizes bool as a built-in type" >&5 X echo $ECHO_N "checking whether the compiler recognizes bool as a built-in type... $ECHO_C" >&6 END-of-print/tesseract-ocr/files/patch-configure echo x - print/tesseract-ocr/files/patch-ccutil_platform.h sed 's/^X//' >print/tesseract-ocr/files/patch-ccutil_platform.h << 'END-of-print/tesseract-ocr/files/patch-ccutil_platform.h' X--- ./ccutil/platform.h.orig Sat Jun 17 00:17:05 2006 X+++ ./ccutil/platform.h Sun Jan 28 23:30:44 2007 X@@ -4,7 +4,11 @@ X #define SIGNED X #else X #define __UNIX__ X-#include X+#if defined(__FreeBSD__) X+# include X+#else X+# include X+#endif X #define MAX_PATH PATH_MAX X #define SIGNED signed X #endif END-of-print/tesseract-ocr/files/patch-ccutil_platform.h echo x - print/tesseract-ocr/files/patch-cutil_listio.cpp sed 's/^X//' >print/tesseract-ocr/files/patch-cutil_listio.cpp << 'END-of-print/tesseract-ocr/files/patch-cutil_listio.cpp' X--- ./cutil/listio.cpp.orig Sat Jun 17 00:17:07 2006 X+++ ./cutil/listio.cpp Sun Jan 28 23:35:32 2007 X@@ -30,7 +30,11 @@ X X #include X #include X-#include X+#if defined(__FreeBSD__) X+# include X+#else X+# include X+#endif X #include "listio.h" X X /*--------------------------------------------------------------------------- END-of-print/tesseract-ocr/files/patch-cutil_listio.cpp echo x - print/tesseract-ocr/files/patch-cutil_util.cpp sed 's/^X//' >print/tesseract-ocr/files/patch-cutil_util.cpp << 'END-of-print/tesseract-ocr/files/patch-cutil_util.cpp' X--- ./cutil/util.cpp.orig Sat Jun 17 00:17:07 2006 X+++ ./cutil/util.cpp Mon Jan 29 20:53:10 2007 X@@ -42,7 +42,7 @@ X #include "util.h" X #include "callcpp.h" X X-#if MAC_OR_DOS X+#if MAC_OR_DOS || defined(__FreeBSD__) X #include /* Mac file */ X #else X #include /* Unix file */ X@@ -61,17 +61,11 @@ X * it pretty often. X **********************************************************************/ X long long_rand(long limit) { X- static long seed; X X- long num; X- num = (long) rand () << 16; X- num |= rand () & 0xffff; X- seed ^= num; X- long result = num % limit; X- while (result < 0) { X- result += limit; X- } X- return result; X+ /* X+ See X+ */ X+ return (long)((double)limit * rand()/(RAND_MAX + 1.0)); X } X X END-of-print/tesseract-ocr/files/patch-cutil_util.cpp echo x - print/tesseract-ocr/files/patch-cutil_variables.cpp sed 's/^X//' >print/tesseract-ocr/files/patch-cutil_variables.cpp << 'END-of-print/tesseract-ocr/files/patch-cutil_variables.cpp' X--- ./cutil/variables.cpp.orig Sat Jun 17 01:19:53 2006 X+++ ./cutil/variables.cpp Sun Jan 28 23:42:26 2007 X@@ -26,7 +26,11 @@ X I n c l u d e s X ----------------------------------------------------------------------*/ X #include X-#include X+#if defined(__FreeBSD__) X+# include X+#else X+# include X+#endif X X #include "variables.h" X #include "callcpp.h" END-of-print/tesseract-ocr/files/patch-cutil_variables.cpp echo x - print/tesseract-ocr/Makefile sed 's/^X//' >print/tesseract-ocr/Makefile << 'END-of-print/tesseract-ocr/Makefile' X# New ports collection makefile for: tesseract-ocr X# Date created: Sun 28 jan 2007 X# Whom: thierry@pompo.net X# X# $FreeBSD$ X# X XPORTNAME= tesseract-ocr XPORTVERSION= 1.02 XCATEGORIES= print textproc XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR= ${PORTNAME} XDISTNAME= tesseract-${PORTVERSION} X XMAINTAINER= thierry@FreeBSD.org XCOMMENT= A commercial quality OCR engine X XLIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff X XGNU_CONFIGURE= yes XCONFIGURE_ENV= LIBTIFF_CFLAGS=-I${LOCALBASE}/include XCONFIGURE_ARGS= --with-extra-includes=${LOCALBASE}/include \ X --with-extra-libraries=${LOCALBASE}/lib XCONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} X Xdo-install: X ${DO_NADA} # TODO X# To test: X# cd ${WRKSRC} X# cp ./ccmain/tesseract . X# ./tesseract phototest.tif result X# cat result.txt X X.include END-of-print/tesseract-ocr/Makefile echo x - print/tesseract-ocr/distinfo sed 's/^X//' >print/tesseract-ocr/distinfo << 'END-of-print/tesseract-ocr/distinfo' XMD5 (tesseract-1.02.tar.gz) = 473389c9f447b081ac199ba3a0e55b27 XSHA256 (tesseract-1.02.tar.gz) = 79744891dbcaad53d0592bfb5ee1994ac4df46676e3bcbf942c19bed4b1bc511 XSIZE (tesseract-1.02.tar.gz) = 2774930 END-of-print/tesseract-ocr/distinfo echo x - print/tesseract-ocr/pkg-descr sed 's/^X//' >print/tesseract-ocr/pkg-descr << 'END-of-print/tesseract-ocr/pkg-descr' XA commercial quality OCR engine originally developed at HP between 1985 and X1995. In 1995, this engine was among the top 3 evaluated by UNLV. It was Xopen-sourced by HP and UNLV in 2005. X XThis code is a raw OCR engine. It has NO PAGE LAYOUT ANALYSIS, NO OUTPUT XFORMATTING, and NO UI. It can only process an image of a single column Xand create text from it. It can detect fixed pitch vs proportional text. XHaving said that, in 1995, this engine was in the top 3 in terms of character Xaccuracy, and it compiles and runs on both Linux and Windows. Another current Xlimitation is that it only recognizes English and its character set is only XUS-ASCII. Training code IS included in the open source release however, and Xwill be included in a future release. X XWWW: http://sourceforge.net/projects/tesseract-ocr END-of-print/tesseract-ocr/pkg-descr echo x - print/tesseract-ocr/pkg-plist sed 's/^X//' >print/tesseract-ocr/pkg-plist << 'END-of-print/tesseract-ocr/pkg-plist' X@comment TODO END-of-print/tesseract-ocr/pkg-plist exit