# HG changeset patch # User Hans-G?nter Theisgen # Date 1551964437 -3600 # Node ID 9b0b8482701d1ded938a6af0c0c58b6ed1ef6851 # Parent 2b6b3912d775ff59816bc45db0a4c07e4196d9c0 updated gocr (0.50 -> 0.52) diff -r 2b6b3912d775 -r 9b0b8482701d gocr/receipt --- a/gocr/receipt Wed Mar 06 19:37:35 2019 +0100 +++ b/gocr/receipt Thu Mar 07 14:13:57 2019 +0100 @@ -1,26 +1,29 @@ # SliTaz package receipt. PACKAGE="gocr" -VERSION="0.50" +VERSION="0.52" CATEGORY="office" +TAGS="OCR" SHORT_DESC="Optical Character Recognition program." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="GPL" +WEB_SITE="http://jocr.sourceforge.net/" + TARBALL="$PACKAGE-$VERSION.tar.gz" -WEB_SITE="http://jocr.sourceforge.net/" WGET_URL="http://www-e.uni-magdeburg.de/jschulen/ocr/$TARBALL" -HOST_ARCH="i486 arm" DEPENDS="libpng" +HOST_ARCH="i486 arm" # Rules to configure and make the package. compile_rules() { - sed -i 's/pnmtopng/pnm2png/' src/pnm.c - ./configure \ - --prefix=/usr \ + patch --input=$stuff/gocr-0.52-pnm.patch src/pnm.c + + ./configure \ + --prefix=/usr \ $CONFIGURE_ARGS && - make && + make -j 1 && make DESTDIR=$DESTDIR install } @@ -30,4 +33,3 @@ mkdir -p $fs/bin cp -a $install/bin/gocr $fs/bin } - diff -r 2b6b3912d775 -r 9b0b8482701d gocr/stuff/gocr-0.52-pnm.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gocr/stuff/gocr-0.52-pnm.patch Thu Mar 07 14:13:57 2019 +0100 @@ -0,0 +1,25 @@ +--- src/pnm.c.orig 2018-10-15 18:47:50.000000000 +0100 ++++ src/pnm.c 2019-03-07 14:00:14.742892543 +0100 +@@ -467,7 +467,7 @@ void addrgb(unsigned char rgb[3], int sr + else rgb[i]=((rgb[i]+add[i]>255)?255:rgb[i]+add[i]); + } + /* +- * pgmtoppm or pnmtopng, use last 3 bits for farbcoding ++ * pgmtoppm or pnm2png, use last 3 bits for farbcoding + * replaces old writebmp variant + * 2018-10 add $opt to control coloring + */ +@@ -479,11 +479,11 @@ int writeppm(char *nam, pix *p, int opt) + #ifdef HAVE_POPEN + /* be sure that nam contains hacker code like "dummy | rm -rf *" */ + if (!f1) { +- strncpy(buf,"pnmtopng > ",12); /* no spaces within filenames allowed! */ ++ strncpy(buf,"pnm2png > ",12); /* no spaces within filenames allowed! */ + strncpy(buf+11,nam,111); buf[123]=0; + strncpy(buf+strlen(buf),".png",5); + /* we dont care about win "wb" here, never debug on win systems */ +- f1 = popen(buf, "w"); if(f1) f1t=1; else E0("popen pnmtopng"); ++ f1 = popen(buf, "w"); if(f1) f1t=1; else E0("popen pnm2png"); + } + if (!f1) { + strncpy(buf,"gzip -c > ",11);