aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2010-09-29 04:15:23 +0800
committermi <mi@FreeBSD.org>2010-09-29 04:15:23 +0800
commit2f7cbc18a770bb95b535b8704f07e7ac519a6891 (patch)
tree8cdfc9ef06450d081cc7a00f3613e2c3bd70f822
parent881ac7af31d00410fd3fad618e535642757bea61 (diff)
downloadfreebsd-ports-gnome-2f7cbc18a770bb95b535b8704f07e7ac519a6891.tar.gz
freebsd-ports-gnome-2f7cbc18a770bb95b535b8704f07e7ac519a6891.tar.zst
freebsd-ports-gnome-2f7cbc18a770bb95b535b8704f07e7ac519a6891.zip
Set the WWW link(s) to existing domains again. Use Gentoo's set of mirrors
instead of the developers' own site, because they insist on using name of "download.html" and don't provide a useful mtime. The above was requested by one named: jhell,v While here, add patches from Debian/Ubuntu to fix varargs-manipulations, and from Gentoo to fix mode of the newly-created files. Also, make sure the man-page of selthresh is installed. Replace my hack from 2008 with the MAKE_JOBS_SAFE=yes.
-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