Date: Wed, 20 May 2009 02:30:11 +0900 (JST) From: Hiroto Kagotani <hiroto.kagotani@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/134720: [NEW PORT] japanese/nhocr: OCR engine for Japanese language Message-ID: <200905191730.n4JHUBoP082492@luna3.auto.infsys.cne.okayama-u.ac.jp> Resent-Message-ID: <200905191740.n4JHe1ag008283@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 134720 >Category: ports >Synopsis: [NEW PORT] japanese/nhocr: OCR engine for Japanese language >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue May 19 17:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Hiroto Kagotani >Release: FreeBSD 7.1-RELEASE-p4 i386 >Organization: >Environment: System: FreeBSD myhost.mydomain 7.1-RELEASE-p4 FreeBSD 7.1-RELEASE-p4 #0: Sun Mar 22 12:35:36 UTC 2009 >Description: OCR engine for Japanese language WWW: http://code.google.com/p/nhocr Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- nhocr-0.16.shar begins here --- # 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: # # nhocr # nhocr/Makefile # nhocr/distinfo # nhocr/pkg-descr # nhocr/pkg-plist # nhocr/files # nhocr/files/patch-libnhocr__ocrbase.cpp # nhocr/files/patch-libnhocr__nhrec.cpp # nhocr/files/patch-ocropus__rec-nhocr-0.3.lua # nhocr/pkg-message # echo c - nhocr mkdir -p nhocr > /dev/null 2>&1 echo x - nhocr/Makefile sed 's/^X//' >nhocr/Makefile << 'a8c50dd5b398e25d6339c8981bd6c65b' X# New ports collection makefile for: nhocr X# Date created: 2009-05-20 X# Whom: Hiroto Kagotani <hiroto.kagotani@gmail.com> X# X# $FreeBSD$ X# X XPORTNAME= nhocr XPORTVERSION= 0.16 XCATEGORIES= japanese graphics XMASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} X XMAINTAINER= hiroto.kagotani@gmail.com XCOMMENT= OCR engine for Japanese language X XBUILD_DEPENDS= ${LOCALBASE}/lib/libsip.a:${PORTSDIR}/graphics/O2-tools X XMAKE_JOBS_SAFE= yes XGNU_CONFIGURE= yes XCONFIGURE_ARGS= --with-O2tools=${LOCALBASE} --datadir=${DATADIR} X Xpost-install: X ${MKDIR} ${PREFIX}/share/ocropus/scripts X ${INSTALL_DATA} ${WRKSRC}/ocropus/rec-nhocr-0.3.lua ${PREFIX}/share/ocropus/scripts/rec-nhocr.lua X @${CAT} ${PKGMESSAGE} X X.include <bsd.port.mk> a8c50dd5b398e25d6339c8981bd6c65b echo x - nhocr/distinfo sed 's/^X//' >nhocr/distinfo << 'a02e06ae4bb62ac594c13a903706a299' XMD5 (nhocr-0.16.tar.gz) = 3b3f08b4ccc052fa7e0f7a7838e3c89d XSHA256 (nhocr-0.16.tar.gz) = 68369747a0f5989df5a69969f3933e919d70ddd4e8dbdd70629bb06512d459f2 XSIZE (nhocr-0.16.tar.gz) = 5775971 a02e06ae4bb62ac594c13a903706a299 echo x - nhocr/pkg-descr sed 's/^X//' >nhocr/pkg-descr << '5af87af2452dbef6e37caab01ca1ea24' XOCR engine for Japanese language X XWWW: http://code.google.com/p/nhocr 5af87af2452dbef6e37caab01ca1ea24 echo x - nhocr/pkg-plist sed 's/^X//' >nhocr/pkg-plist << '88a637aa332bc76545977e1f7261bfbe' Xbin/nhocr X%%DATADIR%%/PLM.dic X%%DATADIR%%/cctable.utf-8 Xinclude/nhocr.h Xinclude/ocrbase.h Xinclude/codelist.h Xlib/libnhocr.a Xshare/ocropus/scripts/rec-nhocr.lua X@dirrm %%DATADIR%% X@dirrmtry share/ocropus/scripts 88a637aa332bc76545977e1f7261bfbe echo c - nhocr/files mkdir -p nhocr/files > /dev/null 2>&1 echo x - nhocr/files/patch-libnhocr__ocrbase.cpp sed 's/^X//' >nhocr/files/patch-libnhocr__ocrbase.cpp << 'd52907745697d9542064c718cd7266d9' X--- ./libnhocr/ocrbase.cpp.orig 2009-05-15 15:55:20.000000000 +0900 X+++ ./libnhocr/ocrbase.cpp 2009-05-19 19:24:48.000000000 +0900 X@@ -9,7 +9,7 @@ X #include <stdlib.h> X #include <string.h> X #include <math.h> X-#include <values.h> X+#include <float.h> X X #if defined (__SVR4) && defined (__sun) X #include <float.h> d52907745697d9542064c718cd7266d9 echo x - nhocr/files/patch-libnhocr__nhrec.cpp sed 's/^X//' >nhocr/files/patch-libnhocr__nhrec.cpp << 'a206f49bac17428992058207bea8665c' X--- ./libnhocr/nhrec.cpp.orig 2009-05-10 23:56:11.000000000 +0900 X+++ ./libnhocr/nhrec.cpp 2009-05-19 19:24:48.000000000 +0900 X@@ -45,7 +45,7 @@ X X X // default file/path names X-static char *nhocrlibdir0 = "/opt/nhocr/share"; X+static char *nhocrlibdir0 = "/usr/local/share/nhocr"; X static char *cctablefile0 = "cctable.utf-8"; X static char *dicfile0 = "PLM.dic"; X a206f49bac17428992058207bea8665c echo x - nhocr/files/patch-ocropus__rec-nhocr-0.3.lua sed 's/^X//' >nhocr/files/patch-ocropus__rec-nhocr-0.3.lua << '7606e55dd514e6bfa689cd251e773558' X--- ./ocropus/rec-nhocr-0.3.lua.orig 2009-05-15 17:17:07.000000000 +0900 X+++ ./ocropus/rec-nhocr-0.3.lua 2009-05-19 19:34:47.000000000 +0900 X@@ -41,6 +41,6 @@ X for i = 1,regions:length()-1 do X regions:extract(line_image,page_image,i,1) X write_image_gray("line.pgm", line_image) X- os.execute("/opt/nhocr/bin/nhocr -line -o - line.pgm ; rm line.pgm") X+ os.execute("nhocr -line -o - line.pgm ; rm line.pgm") X end X end 7606e55dd514e6bfa689cd251e773558 echo x - nhocr/pkg-message sed 's/^X//' >nhocr/pkg-message << '891bfaa44894ebe810ef4a4870910949' X******************************************************************** XThe current version of nhocr supports only "-line" recognition mode. XYou may want to install graphics/ocropus, document layout analyzer, Xand use nhocr as a plugin recognizer for ocropus. X X% ocroscript rec-nhocr input.pgm >output.txt X******************************************************************** 891bfaa44894ebe810ef4a4870910949 exit --- nhocr-0.16.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905191730.n4JHUBoP082492>