diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2009-06-01 06:34:54 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2009-06-01 06:34:54 +0800 |
commit | 2ff34db50ff88b971ac22ab254b1145df4f6035f (patch) | |
tree | 3369f0ca043a497e023adf0c7898420b153a0fb5 | |
parent | c73b5c41b752275feb0f04520d3f06aad95b4838 (diff) | |
download | freebsd-ports-gnome-2ff34db50ff88b971ac22ab254b1145df4f6035f.tar.gz freebsd-ports-gnome-2ff34db50ff88b971ac22ab254b1145df4f6035f.tar.zst freebsd-ports-gnome-2ff34db50ff88b971ac22ab254b1145df4f6035f.zip |
OCR engine for Japanese language
WWW: http://code.google.com/p/nhocr
PR: 134720
Submitted by: Hiroto Kagotani <hiroto.kagotani@gmail.com>
-rw-r--r-- | japanese/Makefile | 1 | ||||
-rw-r--r-- | japanese/nhocr/Makefile | 27 | ||||
-rw-r--r-- | japanese/nhocr/distinfo | 3 | ||||
-rw-r--r-- | japanese/nhocr/files/patch-libnhocr__nhrec.cpp | 11 | ||||
-rw-r--r-- | japanese/nhocr/files/patch-libnhocr__ocrbase.cpp | 11 | ||||
-rw-r--r-- | japanese/nhocr/files/patch-ocropus__rec-nhocr-0.3.lua | 10 | ||||
-rw-r--r-- | japanese/nhocr/pkg-descr | 3 | ||||
-rw-r--r-- | japanese/nhocr/pkg-message | 7 | ||||
-rw-r--r-- | japanese/nhocr/pkg-plist | 11 |
9 files changed, 84 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile index 70229f349836..10578a08829f 100644 --- a/japanese/Makefile +++ b/japanese/Makefile @@ -204,6 +204,7 @@ SUBDIR += ng-canna SUBDIR += ng-devel SUBDIR += ngraph-fonts + SUBDIR += nhocr SUBDIR += nkf SUBDIR += nvi-euc-jp SUBDIR += nvi-iso-2022-jp diff --git a/japanese/nhocr/Makefile b/japanese/nhocr/Makefile new file mode 100644 index 000000000000..7cc7d2424089 --- /dev/null +++ b/japanese/nhocr/Makefile @@ -0,0 +1,27 @@ +# New ports collection makefile for: nhocr +# Date created: 2009-05-20 +# Whom: Hiroto Kagotani <hiroto.kagotani@gmail.com> +# +# $FreeBSD$ +# + +PORTNAME= nhocr +PORTVERSION= 0.16 +CATEGORIES= japanese graphics +MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} + +MAINTAINER= hiroto.kagotani@gmail.com +COMMENT= OCR engine for Japanese language + +BUILD_DEPENDS= ${LOCALBASE}/lib/libsip.a:${PORTSDIR}/graphics/O2-tools + +MAKE_JOBS_SAFE= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-O2tools=${LOCALBASE} --datadir=${DATADIR} + +post-install: + ${MKDIR} ${PREFIX}/share/ocropus/scripts + ${INSTALL_DATA} ${WRKSRC}/ocropus/rec-nhocr-0.3.lua ${PREFIX}/share/ocropus/scripts/rec-nhocr.lua + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/japanese/nhocr/distinfo b/japanese/nhocr/distinfo new file mode 100644 index 000000000000..5e236c882f36 --- /dev/null +++ b/japanese/nhocr/distinfo @@ -0,0 +1,3 @@ +MD5 (nhocr-0.16.tar.gz) = 3b3f08b4ccc052fa7e0f7a7838e3c89d +SHA256 (nhocr-0.16.tar.gz) = 68369747a0f5989df5a69969f3933e919d70ddd4e8dbdd70629bb06512d459f2 +SIZE (nhocr-0.16.tar.gz) = 5775971 diff --git a/japanese/nhocr/files/patch-libnhocr__nhrec.cpp b/japanese/nhocr/files/patch-libnhocr__nhrec.cpp new file mode 100644 index 000000000000..9ac795bb14c2 --- /dev/null +++ b/japanese/nhocr/files/patch-libnhocr__nhrec.cpp @@ -0,0 +1,11 @@ +--- ./libnhocr/nhrec.cpp.orig 2009-05-10 23:56:11.000000000 +0900 ++++ ./libnhocr/nhrec.cpp 2009-05-19 19:24:48.000000000 +0900 +@@ -45,7 +45,7 @@ + + + // default file/path names +-static char *nhocrlibdir0 = "/opt/nhocr/share"; ++static char *nhocrlibdir0 = "/usr/local/share/nhocr"; + static char *cctablefile0 = "cctable.utf-8"; + static char *dicfile0 = "PLM.dic"; + diff --git a/japanese/nhocr/files/patch-libnhocr__ocrbase.cpp b/japanese/nhocr/files/patch-libnhocr__ocrbase.cpp new file mode 100644 index 000000000000..9d1c7599adab --- /dev/null +++ b/japanese/nhocr/files/patch-libnhocr__ocrbase.cpp @@ -0,0 +1,11 @@ +--- ./libnhocr/ocrbase.cpp.orig 2009-05-15 15:55:20.000000000 +0900 ++++ ./libnhocr/ocrbase.cpp 2009-05-19 19:24:48.000000000 +0900 +@@ -9,7 +9,7 @@ + #include <stdlib.h> + #include <string.h> + #include <math.h> +-#include <values.h> ++#include <float.h> + + #if defined (__SVR4) && defined (__sun) + #include <float.h> diff --git a/japanese/nhocr/files/patch-ocropus__rec-nhocr-0.3.lua b/japanese/nhocr/files/patch-ocropus__rec-nhocr-0.3.lua new file mode 100644 index 000000000000..cdcc23383add --- /dev/null +++ b/japanese/nhocr/files/patch-ocropus__rec-nhocr-0.3.lua @@ -0,0 +1,10 @@ +--- ./ocropus/rec-nhocr-0.3.lua.orig 2009-05-15 17:17:07.000000000 +0900 ++++ ./ocropus/rec-nhocr-0.3.lua 2009-05-19 19:34:47.000000000 +0900 +@@ -41,6 +41,6 @@ + for i = 1,regions:length()-1 do + regions:extract(line_image,page_image,i,1) + write_image_gray("line.pgm", line_image) +- os.execute("/opt/nhocr/bin/nhocr -line -o - line.pgm ; rm line.pgm") ++ os.execute("nhocr -line -o - line.pgm ; rm line.pgm") + end + end diff --git a/japanese/nhocr/pkg-descr b/japanese/nhocr/pkg-descr new file mode 100644 index 000000000000..63cebd41f6c7 --- /dev/null +++ b/japanese/nhocr/pkg-descr @@ -0,0 +1,3 @@ +OCR engine for Japanese language + +WWW: http://code.google.com/p/nhocr diff --git a/japanese/nhocr/pkg-message b/japanese/nhocr/pkg-message new file mode 100644 index 000000000000..d64c5a3d8398 --- /dev/null +++ b/japanese/nhocr/pkg-message @@ -0,0 +1,7 @@ +******************************************************************** +The current version of nhocr supports only "-line" recognition mode. +You may want to install graphics/ocropus, document layout analyzer, +and use nhocr as a plugin recognizer for ocropus. + +% ocroscript rec-nhocr input.pgm >output.txt +******************************************************************** diff --git a/japanese/nhocr/pkg-plist b/japanese/nhocr/pkg-plist new file mode 100644 index 000000000000..4b4d9275764a --- /dev/null +++ b/japanese/nhocr/pkg-plist @@ -0,0 +1,11 @@ +bin/nhocr +%%DATADIR%%/PLM.dic +%%DATADIR%%/cctable.utf-8 +include/nhocr.h +include/ocrbase.h +include/codelist.h +lib/libnhocr.a +share/ocropus/scripts/rec-nhocr.lua +@dirrm %%DATADIR%% +@dirrmtry share/ocropus/scripts +@dirrmtry share/ocropus |