- Update to version 0.7
- SIZEify PR: ports/63606 Submitted by: maintainer
This commit is contained in:
parent
aa91ea54d1
commit
3b7f0533c5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=102674
6 changed files with 55 additions and 165 deletions
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= ocrad
|
||||
PORTVERSION= 0.6
|
||||
PORTVERSION= 0.7
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= ${MASTER_SITE_GNU}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
|
@ -18,32 +18,23 @@ USE_BZIP2= yes
|
|||
HAS_CONFIGURE= yes
|
||||
USE_GETOPT_LONG= yes
|
||||
USE_REINPLACE= yes
|
||||
USE_GCC= 3.2
|
||||
|
||||
CONFIGURE_ARGS= --prefix=${PREFIX}
|
||||
MAKE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" \
|
||||
INSTALL_PROGRAM="${INSTALL_PROGRAM}"
|
||||
CXX=${CXX}
|
||||
|
||||
DOCS= AUTHORS ChangeLog NEWS README TODO
|
||||
INFO= ocrad
|
||||
MAN1= ocrad.1
|
||||
|
||||
STD_PATCH= textline.cc recognize2.cc bitmap.cc main.cc
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
post-patch:
|
||||
.if ${OSVERSION} < 500000
|
||||
.for file in ${STD_PATCH}
|
||||
@${REINPLACE_CMD} -e 's/std::isspace/isspace/g; s/std::getc/getc/g' \
|
||||
-e 's/std::ungetc/ungetc/g; s/std::feof/feof/g' \
|
||||
-e 's/std::ferror/ferror/g' ${WRKSRC}/${file}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/ocrad ${PREFIX}/bin
|
||||
.if !defined(NOPORTDOCS)
|
||||
post-install:
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
|
||||
@${INSTALL_MAN} ${FILESDIR}/ocrad.1 ${PREFIX}/man/man1
|
||||
@${MKDIR} ${DOCSDIR} && cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
|
||||
@${INSTALL_MAN} ${WRKSRC}/doc/ocrad.1 ${PREFIX}/man/man1
|
||||
@${INSTALL_DATA} ${WRKSRC}/doc/ocrad.info ${PREFIX}/info
|
||||
@install-info ${PREFIX}/info/ocrad.info ${PREFIX}/info/dir
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
MD5 (ocrad-0.6.tar.bz2) = ebcefd3512a4f9d870d302167d8b8ec9
|
||||
MD5 (ocrad-0.7.tar.bz2) = 1893a8b8c3b6848392160e47be2b1de6
|
||||
SIZE (ocrad-0.7.tar.bz2) = 52718
|
||||
|
|
|
@ -1,114 +0,0 @@
|
|||
.TH OCRAD 1 "30 December 2003" "0.6" "GNU Ocrad"
|
||||
.SH NAME
|
||||
ocrad \- Optical Character Recognition
|
||||
.SH SYNOPSIS
|
||||
.I ocrad
|
||||
\-afhivV \-b NUMBER \-l MODE \-o FILE \-x FILE [FILES ...]
|
||||
.Sh DESCRIPTION
|
||||
.LP
|
||||
.I ocrad
|
||||
is an OCR (Optical Character Recognition) program
|
||||
implemented as a filter and based on a feature extraction method. It
|
||||
reads a bitmap image in pbm format and outputs text in ISO\-8859\-1
|
||||
(Latin\-1) charset. Also includes a layout analyser able to separate
|
||||
the columns or blocks of text normally found on printed pages. It can
|
||||
be used as a stand\-alone console application, or as a backend to other
|
||||
programs.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.I "\-a", "\-\-append"
|
||||
Append generated text to the output file instead of overwriting it.
|
||||
.TP
|
||||
.I "\-b NUMBER", "\-\-block=NUMBER"
|
||||
Process only the specified text block, beginning from 1.
|
||||
Is only useful when used in conjunction with layout analysis (see below).
|
||||
.TP
|
||||
.I "\-D LEVEL", "\-\-debug=LEVEL"
|
||||
The Levels are:
|
||||
.nf
|
||||
100 - Show raw block list, unordered
|
||||
99 - Show recursive block list, unordered
|
||||
98 - Show main block list, unordered
|
||||
97 - Show recursive block list, ordered
|
||||
96 - Show main block list, ordered
|
||||
95..90 - reserved
|
||||
89 - Show all blocks from every character
|
||||
88 - Show main black blocks from every character
|
||||
87 - Show guess list for every character
|
||||
86 - Show best guess for every character
|
||||
.fi
|
||||
.TP
|
||||
.I "\-f", "\-\-force"
|
||||
Force overwrite of output file.
|
||||
.TP
|
||||
.I "\-h", "\-\-help"
|
||||
Print an informative help message describing the options and then exit.
|
||||
.TP
|
||||
.I "\-i", "\-\-invert"
|
||||
Invert image levels (white on black).
|
||||
.TP
|
||||
.I "\-l MODE", "\-\-layout=MODE"
|
||||
Enable page layout analysis. The meaning of
|
||||
.I MODE
|
||||
is:
|
||||
.nf
|
||||
`0' no analysis at all,
|
||||
`1' column separation,
|
||||
`2' full analysis.
|
||||
.fi
|
||||
.TP
|
||||
.I "\-o FILE"
|
||||
Place the output into
|
||||
.I FILE
|
||||
instead of into the standard output.
|
||||
.TP
|
||||
.I "\-v", "\-\-verbose"
|
||||
Verbose mode.
|
||||
.TP
|
||||
.I "\-V", "\-\-version"
|
||||
Print the version number of Ocrad on the standard output and then exit.
|
||||
.TP
|
||||
.I "\-x FILE"
|
||||
Write (export) OCR Results File to
|
||||
.I FILE
|
||||
\.
|
||||
.SH BUGS
|
||||
If you find a bug in GNU Ocrad, please send electronic mail to
|
||||
<bug-ocrad@gnu.org>. Include the version number, which you can find by
|
||||
running `ocrad \-\-version'.
|
||||
.SH CAVEATS
|
||||
.IP \(bu 2
|
||||
Scan directly in b/w mode. Convert from grayscale only if you know what
|
||||
you are doing.
|
||||
.IP \(bu 2
|
||||
For better results the characters should be at least 20 pixels high.
|
||||
.IP \(bu 2
|
||||
Merged characters are always a problem. Try to avoid them.
|
||||
.IP \(bu 2
|
||||
Very bold or very light (broken) characters are also a problem.
|
||||
.IP \(bu 2
|
||||
Always see with your own eyes the pbm file before blaming Ocrad for the
|
||||
results. Remember the saying, "garbage in, garbage out".
|
||||
.SH TODO
|
||||
.IP \(bu 2
|
||||
Deal with broken characters.
|
||||
.IP \(bu 2
|
||||
Make a better layout detector. Every character on its line.
|
||||
.IP \(bu 2
|
||||
Separate (more) merged characters.
|
||||
.IP \(bu 2
|
||||
Deal better with frames, lines, pictures, etc.
|
||||
.IP \(bu 2
|
||||
Change to ISO_8859\-15 (update for ISO_8859\-1 with euro sign).
|
||||
.IP \(bu 2
|
||||
Add an option for recognizing ISO_8859\-9 chars (Turkish).
|
||||
.SH GETTING
|
||||
.I ocrad
|
||||
is available from http://www.gnu.org/software/ocrad/ocrad.html
|
||||
.SH AUTHOR
|
||||
.nf
|
||||
Antonio Diaz <ant_diaz@teleline.es>
|
||||
.fi
|
||||
.SH HISTORY
|
||||
.I ocrad
|
||||
0.6 was released in December 2003.
|
|
@ -1,14 +1,15 @@
|
|||
--- Makefile.in.orig Thu Dec 18 11:11:05 2003
|
||||
+++ Makefile.in Tue Dec 30 20:20:01 2003
|
||||
@@ -4,13 +4,14 @@
|
||||
--- Makefile.in.orig Mon Feb 9 12:08:00 2004
|
||||
+++ Makefile.in Mon Mar 1 12:42:34 2004
|
||||
@@ -3,14 +3,14 @@
|
||||
|
||||
DISTNAME = ocrad-0.6
|
||||
DISTNAME = ocrad-0.7
|
||||
|
||||
-CXX = g++
|
||||
-INSTALL = install
|
||||
-INSTALL_PROGRAM = $(INSTALL)
|
||||
-INSTALL_DATA = $(INSTALL) -m 644
|
||||
-SHELL = /bin/sh
|
||||
-CPPFLAGS =
|
||||
-CXXFLAGS = -Wall -W -O2
|
||||
-LDFLAGS =
|
||||
+CXX?= g++
|
||||
|
@ -16,13 +17,13 @@
|
|||
+INSTALL_PROGRAM?= $(INSTALL)
|
||||
+INSTALL_DATA?= $(INSTALL) -m 644
|
||||
+SHELL?= /bin/sh
|
||||
+CXXFLAGS?= -Wall -W -O2
|
||||
+CPPFLAGS?=
|
||||
+CXXFLAGS?= -Wall -W -O2
|
||||
+LDFLAGS?=
|
||||
|
||||
objs = common.o rectangle.o iso_8859_1.o bitmap.o block.o blockmap.o \
|
||||
profile.o feats.o character.o recognize1.o \
|
||||
@@ -22,10 +23,10 @@
|
||||
objs = common.o rectangle.o ucs.o bitmap.o block.o blockmap.o \
|
||||
profile.o feats.o character.o character_r11.o character_r12.o \
|
||||
@@ -23,10 +23,10 @@
|
||||
all : ocrad
|
||||
|
||||
ocrad : $(objs)
|
||||
|
@ -34,12 +35,12 @@
|
|||
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) -pg -o ocradp $(objs)
|
||||
|
||||
%.o : %.cc
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
@@ -43,6 +44,7 @@
|
||||
recognize2.o : block.h character.h iso_8859_1.h textline.h
|
||||
textblock.o : block.h character.h textline.h textblock.h
|
||||
main.o : block.h blockmap.h bitmap.h character.h textline.h textblock.h
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
|
||||
@@ -41,6 +41,7 @@
|
||||
character_r13.o : ucs.h block.h blockmap.h character.h profile.h feats.h
|
||||
feats.o : ucs.h block.h blockmap.h profile.h feats.h
|
||||
main.o : bitmap.h block.h blockmap.h character.h textline.h textblock.h
|
||||
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c main.cc
|
||||
|
||||
|
||||
install : all install-info
|
||||
profile.o : block.h blockmap.h profile.h
|
||||
textblock.o : block.h character.h textline.h textblock.h
|
||||
textline.o : ucs.h block.h character.h textline.h
|
||||
|
|
26
graphics/ocrad/files/patch-configure
Normal file
26
graphics/ocrad/files/patch-configure
Normal file
|
@ -0,0 +1,26 @@
|
|||
--- configure.orig Fri Jan 23 22:55:38 2004
|
||||
+++ configure Mon Mar 1 11:34:35 2004
|
||||
@@ -19,12 +19,6 @@
|
||||
progname=$0
|
||||
srctrigger=ocrad.png
|
||||
|
||||
-# clear some things potentially inherited from environment.
|
||||
-srcdir=
|
||||
-prefix=/usr/local
|
||||
-infodir=${prefix}/share/info
|
||||
-mandir=${prefix}/share/man
|
||||
-
|
||||
# Loop over all args
|
||||
while [ x$1 != x ] ; do
|
||||
|
||||
@@ -64,6 +58,10 @@
|
||||
exit 1 ;;
|
||||
esac
|
||||
done
|
||||
+
|
||||
+prefix=${prefix:-/usr/local}
|
||||
+infodir=${infodir:-${prefix}/share/info}
|
||||
+mandir=${mandir:-${prefix}/share/man}
|
||||
|
||||
# Find the source files, if location was not specified.
|
||||
srcdirtext=
|
|
@ -1,15 +0,0 @@
|
|||
--- iso_8859_1.h.orig Wed Dec 3 12:12:01 2003
|
||||
+++ iso_8859_1.h Tue Dec 30 17:12:05 2003
|
||||
@@ -100,6 +100,12 @@
|
||||
static unsigned char base_letter( unsigned char ch ) throw();
|
||||
static unsigned char compose( unsigned char base_letter,
|
||||
unsigned char accent ) throw();
|
||||
+#undef isalnum
|
||||
+#undef isalpha
|
||||
+#undef islower
|
||||
+#undef isupper
|
||||
+#undef isvowel
|
||||
+#undef toupper
|
||||
static bool isalnum( unsigned char ch ) throw();
|
||||
static bool isalpha( unsigned char ch ) throw();
|
||||
static bool islower( unsigned char ch ) throw();
|
Loading…
Reference in a new issue