[ocr] gocr in mac os x

I needed to do some ocr’ing on the mac and figured i’d go with gocr.
first off i already had libpng, libjpeg and a svn-client installed. if/when you got that covered this is what you can do:
download tiff-3.9.5 from ftp://ftp.remotesensing.org/pub/libtiff. to build it just unpack and

./configure #add --build=x86_64 if you want
make
sudo make install

then download netpbm via svn (for me the super-stable tarball failed, wanting an older version of libpng):

svn checkout http://netpbm.svn.sourceforge.net/svnroot/netpbm/advanced netpbm

it has a special kinda, interactive build process

./configure # interactive, i could hit enter all the way through.
make
# now we first need to build a package
make package pkgdir=/tmp/netpbm
sudo ./installnetpbm # also interactive, again i could just go with enter

now download gocr from http://jocr.sourceforge.net/download.html. this is a simple

./configure #--build=x86_64
make
sudo make install

before you can run it you have to add the netpbm dir to your path

export PATH=/usr/local/netpbm/bin:$PATH

or if you’re (like me) using tcsh

set path = ($path /usr/local/netpbm/bin)

and create a symlink to the netpbm-lib (note that the version may differ for you)

sudo ln -s /usr/local/netpbm/lib/libnetpbm.11.56.dylib /usr/local/lib

thats all there is to it, to run gocr with a gui just type gocr.tcl and get your ocr’ing on!
note that mac os x’s x does not come with xli so there’s no preview available in the gui (aka “show”-btn does not work).

// sluggo

Comment