wok rev 20987
updated gocr (0.50 -> 0.52)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Mar 07 14:13:57 2019 +0100 (2019-03-07) |
parents | 2b6b3912d775 |
children | c59c2834e80e |
files | gocr/receipt gocr/stuff/gocr-0.52-pnm.patch |
line diff
1.1 --- a/gocr/receipt Wed Mar 06 19:37:35 2019 +0100 1.2 +++ b/gocr/receipt Thu Mar 07 14:13:57 2019 +0100 1.3 @@ -1,26 +1,29 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="gocr" 1.7 -VERSION="0.50" 1.8 +VERSION="0.52" 1.9 CATEGORY="office" 1.10 +TAGS="OCR" 1.11 SHORT_DESC="Optical Character Recognition program." 1.12 MAINTAINER="pascal.bellard@slitaz.org" 1.13 LICENSE="GPL" 1.14 +WEB_SITE="http://jocr.sourceforge.net/" 1.15 + 1.16 TARBALL="$PACKAGE-$VERSION.tar.gz" 1.17 -WEB_SITE="http://jocr.sourceforge.net/" 1.18 WGET_URL="http://www-e.uni-magdeburg.de/jschulen/ocr/$TARBALL" 1.19 -HOST_ARCH="i486 arm" 1.20 1.21 DEPENDS="libpng" 1.22 +HOST_ARCH="i486 arm" 1.23 1.24 # Rules to configure and make the package. 1.25 compile_rules() 1.26 { 1.27 - sed -i 's/pnmtopng/pnm2png/' src/pnm.c 1.28 - ./configure \ 1.29 - --prefix=/usr \ 1.30 + patch --input=$stuff/gocr-0.52-pnm.patch src/pnm.c 1.31 + 1.32 + ./configure \ 1.33 + --prefix=/usr \ 1.34 $CONFIGURE_ARGS && 1.35 - make && 1.36 + make -j 1 && 1.37 make DESTDIR=$DESTDIR install 1.38 } 1.39 1.40 @@ -30,4 +33,3 @@ 1.41 mkdir -p $fs/bin 1.42 cp -a $install/bin/gocr $fs/bin 1.43 } 1.44 -
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/gocr/stuff/gocr-0.52-pnm.patch Thu Mar 07 14:13:57 2019 +0100 2.3 @@ -0,0 +1,25 @@ 2.4 +--- src/pnm.c.orig 2018-10-15 18:47:50.000000000 +0100 2.5 ++++ src/pnm.c 2019-03-07 14:00:14.742892543 +0100 2.6 +@@ -467,7 +467,7 @@ void addrgb(unsigned char rgb[3], int sr 2.7 + else rgb[i]=((rgb[i]+add[i]>255)?255:rgb[i]+add[i]); 2.8 + } 2.9 + /* 2.10 +- * pgmtoppm or pnmtopng, use last 3 bits for farbcoding 2.11 ++ * pgmtoppm or pnm2png, use last 3 bits for farbcoding 2.12 + * replaces old writebmp variant 2.13 + * 2018-10 add $opt to control coloring 2.14 + */ 2.15 +@@ -479,11 +479,11 @@ int writeppm(char *nam, pix *p, int opt) 2.16 + #ifdef HAVE_POPEN 2.17 + /* be sure that nam contains hacker code like "dummy | rm -rf *" */ 2.18 + if (!f1) { 2.19 +- strncpy(buf,"pnmtopng > ",12); /* no spaces within filenames allowed! */ 2.20 ++ strncpy(buf,"pnm2png > ",12); /* no spaces within filenames allowed! */ 2.21 + strncpy(buf+11,nam,111); buf[123]=0; 2.22 + strncpy(buf+strlen(buf),".png",5); 2.23 + /* we dont care about win "wb" here, never debug on win systems */ 2.24 +- f1 = popen(buf, "w"); if(f1) f1t=1; else E0("popen pnmtopng"); 2.25 ++ f1 = popen(buf, "w"); if(f1) f1t=1; else E0("popen pnm2png"); 2.26 + } 2.27 + if (!f1) { 2.28 + strncpy(buf,"gzip -c > ",11);