From: Stuart Cassoff Subject: graphics/gocr: MODTK_VERSION=8.6 To: OpenBSD Ports Date: Tue, 18 Aug 2026 15:00:43 -0400 Main: Original homepage no longer exists. Install examples. Gui: MODTK_VERSION=8.6 Better shebang. Point to an example file. Use and add run dep on x11/xli. Maybe some of the example files and xli are too much. I'm mainly interested in changing the MODTK_VERSION. Stu diff -Nurp /usr/ports/graphics/gocr/Makefile ./Makefile --- /usr/ports/graphics/gocr/Makefile Wed Mar 18 04:10:36 2026 +++ ./Makefile Tue Aug 18 14:56:15 2026 @@ -6,13 +6,13 @@ DISTNAME= gocr-$V PKGNAME-main= gocr-$V PKGNAME-gui= gocr-gui-$V -REVISION-main = 0 -REVISION-gui = 1 +REVISION-main = 1 +REVISION-gui = 2 CATEGORIES= graphics SITES= ${SITE_SOURCEFORGE:=jocr/} -HOMEPAGE= http://www-e.uni-magdeburg.de/jschulen/ocr/ +HOMEPAGE= https://sourceforge.net/projects/jocr/ # GPLv2 PERMIT_PACKAGE= Yes @@ -27,12 +27,14 @@ FAKE_FLAGS+= prefix=${PREFIX} exec_prefix=${PREFIX} MULTI_PACKAGES= -main -gui MODULES= x11/tk +MODTK_VERSION= 8.6 PKG_ARCH-gui= * RUN_DEPENDS-gui=${MODTK_RUN_DEPENDS} \ graphics/xsane \ textproc/p5-tkispell \ - graphics/gocr + graphics/gocr \ + x11/xli WANTLIB-main= c m netpbm LIB_DEPENDS-main=graphics/netpbm @@ -50,5 +52,9 @@ post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/gocr ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/gocr ${INSTALL_DATA} ${WRKSRC}/doc/gocr.html ${PREFIX}/share/doc/gocr + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/gocr + ${INSTALL_DATA} ${WRKSRC}/examples/*.png{,.txt} ${PREFIX}/share/examples/gocr/ + ${INSTALL_DATA} ${WRKSRC}/examples/*.jpg ${PREFIX}/share/examples/gocr/ + ${INSTALL_DATA} ${WRKSRC}/examples/handwrt1.txt ${PREFIX}/share/examples/gocr/ .include diff -Nurp /usr/ports/graphics/gocr/patches/patch-bin_gocr_tcl ./patches/patch-bin_gocr_tcl --- /usr/ports/graphics/gocr/patches/patch-bin_gocr_tcl Fri Mar 11 14:22:28 2022 +++ ./patches/patch-bin_gocr_tcl Tue Aug 18 13:52:39 2026 @@ -1,24 +1,21 @@ ---- bin/gocr.tcl.orig Fri Feb 6 10:38:46 2004 -+++ bin/gocr.tcl Fri Oct 27 10:35:15 2006 +Index: bin/gocr.tcl +--- bin/gocr.tcl.orig ++++ bin/gocr.tcl @@ -9,7 +9,7 @@ # - Reading from stderr of child??? # # this is a multiline comment in wish, but not in sh \ -exec wish -f $0 $@ -+exec ${MODTK_BIN} -f $0 $@ ++exec ${MODTK_BIN} "$0" ${1+"$@"} set ver 0.3.6 set gocrver 0.3.5 -@@ -31,10 +31,10 @@ wm title . "GOCR Tcl frontend $ver" - set spacewidth 0 - set graylevel 160 - set dustsize 20 --set imgviewer "xli -geometry 400x400 " -+set imgviewer "" +@@ -34,7 +34,7 @@ set dustsize 20 + set imgviewer "xli -geometry 400x400 " set gocrpath "gocr" set gocraddopt "-e - -f UTF8" -set file "../examples/text.pbm" -+set file "" ++set file "${LOCALBASE}/share/examples/gocr/5x8.png" set ofile "out01.txt" # entry out{n+1}.txt can automaticly generated! if $argc { diff -Nurp /usr/ports/graphics/gocr/pkg/PLIST-main ./pkg/PLIST-main --- /usr/ports/graphics/gocr/pkg/PLIST-main Fri Mar 11 14:22:28 2022 +++ ./pkg/PLIST-main Tue Aug 18 14:57:12 2026 @@ -4,3 +4,17 @@ share/doc/gocr/ share/doc/gocr/README share/doc/gocr/gocr.html +share/examples/gocr/ +share/examples/gocr/4x6.png +share/examples/gocr/5x7.png +share/examples/gocr/5x7.png.txt +share/examples/gocr/5x8.png +share/examples/gocr/5x8.png.txt +share/examples/gocr/handwrt1.jpg +share/examples/gocr/handwrt1.txt +share/examples/gocr/matrix.jpg +share/examples/gocr/ocr-a-subset.png +share/examples/gocr/ocr-a-subset.png.txt +share/examples/gocr/ocr-a.png +share/examples/gocr/ocr-b.png +share/examples/gocr/ocr-b.png.txt