Try out the attached patch that allows you to rebuild tesseract and get
a working copy (complete with the tessdata directory).  I've also fixed
the powerpc build in this patch so that it doesn't segfault.

Bryan
diff -ruN tesseract-1.02.orig/ccutil/host.h tesseract-1.02/ccutil/host.h
--- tesseract-1.02.orig/ccutil/host.h   2006-09-07 22:04:06.000000000 +0000
+++ tesseract-1.02/ccutil/host.h        2006-11-24 22:06:05.000000000 +0000
@@ -50,7 +50,7 @@
 */
 #ifdef HAVE_CONFIG_H
 #include "config_auto.h"
-#ifdef MOTOROLA_BYTE_ORDER
+#ifdef WORDS_BIGENDIAN
 #define __MOTO__  // Big-endian.
 #endif
 #endif
diff -ruN tesseract-1.02.orig/ccutil/mainblk.cpp 
tesseract-1.02/ccutil/mainblk.cpp
--- tesseract-1.02.orig/ccutil/mainblk.cpp      2006-06-16 22:17:05.000000000 
+0000
+++ tesseract-1.02/ccutil/mainblk.cpp   2006-11-24 22:03:31.000000000 +0000
@@ -99,6 +99,14 @@
   if (m_print_variables)
     print_variables(stdout);  /*print them all */
 
+  #ifdef TESSDATA_PREFIX
+  #define _STR(a) #a
+  #define _XSTR(a) _STR(a)
+  datadir = _XSTR(TESSDATA_PREFIX);
+  #undef _XSTR
+  #undef _STR
+  #endif
+
   datadir += m_data_sub_dir;     /*data directory */
 
   #ifdef __UNIX__
diff -ruN tesseract-1.02.orig/configure tesseract-1.02/configure
--- tesseract-1.02.orig/configure       2006-10-04 20:48:51.000000000 +0000
+++ tesseract-1.02/configure    2006-11-24 22:07:56.000000000 +0000
@@ -1326,7 +1326,6 @@
 
 
 
-tesseract
 
 ac_aux_dir=
 for ac_dir in config $srcdir/config; do
diff -ruN tesseract-1.02.orig/debian/rules tesseract-1.02/debian/rules
--- tesseract-1.02.orig/debian/rules    2006-11-24 22:01:57.000000000 +0000
+++ tesseract-1.02/debian/rules 2006-11-24 22:04:41.000000000 +0000
@@ -7,7 +7,7 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-CFLAGS = -Wall -g
+CFLAGS = -Wall -g -DTESSDATA_PREFIX=/usr/share/tesseract-ocr/
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
@@ -17,7 +17,7 @@
 
 config.status: configure
        dh_testdir
-       ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) 
--prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info 
CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
+       ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) 
--prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info 
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
 
 build: build-stamp
 build-stamp:  config.status
@@ -45,6 +45,8 @@
        dh_clean -k 
        dh_installdirs
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tesseract-ocr
+       mkdir -p $(CURDIR)/debian/tesseract-ocr/usr/share/tesseract-ocr
+       cp -a tessdata $(CURDIR)/debian/tesseract-ocr/usr/share/tesseract-ocr
 
 # Build architecture-independent files here.
 binary-indep: build install

Reply via email to