aboutsummaryrefslogtreecommitdiff
path: root/graphics/claraocr
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2010-09-28 20:15:23 +0000
committerMikhail Teterin <mi@FreeBSD.org>2010-09-28 20:15:23 +0000
commit3e9c2693a165a034aa1c5914cb2ddab7a7d30cb4 (patch)
tree7c0d4e9fff39d57735d0ad34c40554721e5d26d3 /graphics/claraocr
parentd724ddb2078294456e6a4c4fb34eb2fbc5fca705 (diff)
downloadports-3e9c2693a165a034aa1c5914cb2ddab7a7d30cb4.tar.gz
ports-3e9c2693a165a034aa1c5914cb2ddab7a7d30cb4.zip
Notes
Diffstat (limited to 'graphics/claraocr')
-rw-r--r--graphics/claraocr/Makefile12
-rw-r--r--graphics/claraocr/files/patch-debian-ubuntu95
-rw-r--r--graphics/claraocr/files/patch-openmode24
-rw-r--r--graphics/claraocr/pkg-descr3
4 files changed, 129 insertions, 5 deletions
diff --git a/graphics/claraocr/Makefile b/graphics/claraocr/Makefile
index 084589e83cc3..94fedc8e6b4c 100644
--- a/graphics/claraocr/Makefile
+++ b/graphics/claraocr/Makefile
@@ -7,9 +7,10 @@
PORTNAME= claraocr
PORTVERSION= 20031214
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= graphics accessibility
-MASTER_SITES= http://www.geocities.com/claraocr/
+MASTER_SITES= ${MASTER_SITE_GENTOO}
+MASTER_SITE_SUBDIR=distfiles
DISTNAME= clara-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
@@ -20,12 +21,15 @@ RUN_DEPENDS= pnmenlarge:${PORTSDIR}/graphics/netpbm
USE_XORG= x11
USE_PERL5= yes
MAKE_ENV= MKDIR="${MKDIR}"
-MAKE_ARGS= -j`${SYSCTL} -n hw.ncpu`
+MAKE_JOBS_SAFE= yes
-MAN1= clara-adv.1 clara-dev.1 clara.1
+MAN1= clara-adv.1 clara-dev.1 clara.1 selthresh.1
post-patch:
@cd ${WRKSRC} && ${REINPLACE_CMD} -e 's|^#!/usr/bin/perl|#!${PERL}|g' \
clara.pl mkdoc.pl selthresh
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/selthresh.1 ${MAN1PREFIX}/man/man1/
+
.include <bsd.port.mk>
diff --git a/graphics/claraocr/files/patch-debian-ubuntu b/graphics/claraocr/files/patch-debian-ubuntu
new file mode 100644
index 000000000000..e8700020d76a
--- /dev/null
+++ b/graphics/claraocr/files/patch-debian-ubuntu
@@ -0,0 +1,95 @@
+This set of fixes/improvements was downloaded from Ubuntu.
+Many thanks.
+
+ -mi
+
+--- clara.c
++++ clara.c
+@@ -751,11 +751,12 @@
+ s[128] = 0;
+ logmsg(s);
+
+- if (!trace)
+- return;
+- va_start(args,m);
+- vfprintf(stderr,m,args);
+- fprintf(stderr,"\n");
++ if (trace) {
++ vfprintf(stderr,m,args);
++ fprintf(stderr,"\n");
++ }
++
++ va_end(args);
+ }
+
+ /*
+@@ -775,10 +776,12 @@
+ logmsg(s);
+
+ /* send to stderr if requested */
+- if (!debug)
+- return;
+- vfprintf(stderr,m,args);
+- fprintf(stderr,"\n");
++ if (debug) {
++ vfprintf(stderr,m,args);
++ fprintf(stderr,"\n");
++ }
++
++ va_end(args);
+ }
+
+ /*
+@@ -797,9 +800,10 @@
+ s[128] = 0;
+ logmsg(s);
+
+- va_start(args,m);
+ vfprintf(stderr,m,args);
+ fprintf(stderr,"\n");
++
++ va_end(args);
+ }
+
+ /* (devel)
+--- event.c
++++ event.c
+@@ -638,6 +638,8 @@
+ }
+ }
+
++ va_end(args);
++
+ /*
+ printf("request (priority %d, mclip=%d, redraw=%d) to draw the message \"%s\"\n",f,mclip,redraw_stline,s);
+ */
+--- html.c
++++ html.c
+@@ -1548,11 +1548,12 @@
+ va_list args;
+ int n=0,f;
+
+- va_start(args, fmt);
+ for (f=0; f==0; ) {
+
+ /* try to write */
++ va_start(args, fmt);
+ n = vsnprintf(*t+*top+1,*sz-*top-1,fmt,args);
++ va_end(args);
+
+ /*
+ Some implementations of vsnprintf return -1 when
+@@ -1589,11 +1590,12 @@
+ va_list args;
+ int n=0,f;
+
+- va_start(args, fmt);
+ for (f=0; f==0; ) {
+
+ /* try to write */
++ va_start(args, fmt);
+ n = vsnprintf(text+topt+1,textsz-topt-1,fmt,args);
++ va_end(args);
+
+ /*
+ Some implementations of vsnprintf return -1 when
diff --git a/graphics/claraocr/files/patch-openmode b/graphics/claraocr/files/patch-openmode
new file mode 100644
index 000000000000..505e7ce62598
--- /dev/null
+++ b/graphics/claraocr/files/patch-openmode
@@ -0,0 +1,24 @@
+Obtained from Gentoo:
+
+ http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-text/clara/files/
+
+--- pgmblock.c 2002-04-29 14:26:13.000000000 +0000
++++ pgmblock.c 2009-03-05 02:51:43.000000000 +0000
+@@ -161,7 +161,7 @@
+
+ printf("%d rare pixels (%1.4f)\n",t,((float)t)/(w*h));
+
+- F = open("map",O_WRONLY|O_CREAT);
++ F = open("map",O_WRONLY|O_CREAT, 0644);
+ write(F,m,h*bpl);
+ write(F,map,256);
+ close(F);
+@@ -197,7 +197,7 @@
+ {
+ int i,j,F;
+
+- F = open("map",O_RDONLY|O_CREAT);
++ F = open("map",O_RDONLY|O_CREAT, 0644);
+ read(F,m,h*bpl);
+ read(F,map,256);
+ close(F);
diff --git a/graphics/claraocr/pkg-descr b/graphics/claraocr/pkg-descr
index eec8637f6223..dc38a397f29f 100644
--- a/graphics/claraocr/pkg-descr
+++ b/graphics/claraocr/pkg-descr
@@ -3,4 +3,5 @@ An OCR program tries to recognize the characters from the digital image
of a paper document. The name Clara stands for "Cooperative Lightweight
chAracter Recognizer".
-WWW: http://www.geocities.com/claraocr/
+WWW: http://claraocr.org/
+WWW: http://freshmeat.net/projects/claraocr