On Wed, Jul 14, 2010 at 01:23:18PM -0400, Mike Erdely wrote: > This diff brings FuzzyOCR to 2.6.0 which works with SA 3.3.1.
New diff that includes tesseract that ajacoutot@ committed a couple days ago. OK? -ME Index: Makefile =================================================================== RCS file: /cvs/ports/mail/p5-FuzzyOcr/Makefile,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 Makefile --- Makefile 4 Oct 2007 19:53:49 -0000 1.1.1.1 +++ Makefile 20 Jul 2010 15:07:28 -0000 @@ -2,15 +2,13 @@ COMMENT= detect image spam with SpamAssassin -V= svn133 -DISTNAME= fuzzyocr-${V} -PKGNAME= p5-FuzzyOcr-3.5.1-${V} +V= 3.6.0 +DISTNAME= fuzzyocr-$V +PKGNAME= p5-FuzzyOcr-$V CATEGORIES= mail perl5 HOMEPAGE= http://fuzzyocr.own-hero.net/ -MASTER_SITES= http://openbsd.rutgers.edu/ \ - http://meta-planets.net/~openbsd/ \ - http://www.phxbsd.com/OpenBSD/ +MASTER_SITES= http://users.own-hero.net/~decoder/fuzzyocr/ MAINTAINER= Michael Erdely <merd...@openbsd.org> @@ -21,12 +19,13 @@ RUN_DEPENDS= ::devel/p5-MLDBM-Sync \ ::graphics/ocrad \ ::graphics/ImageMagick \ ::graphics/gifsicle,no_x11 \ + ::graphics/tesseract \ ::mail/p5-Mail-SpamAssassin \ ::textproc/p5-String-Approx REGRESS_DEPENDS= ::mail/p5-FuzzyOcr -# MIT +# Apache 2.0 PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes @@ -35,7 +34,7 @@ PERMIT_DISTFILES_FTP= Yes NO_BUILD= Yes MODULES= perl -WRKDIST= ${WRKDIR}/devel +WRKDIST= ${WRKDIR}/FuzzyOcr-$V CONFDIR= ${SYSCONFDIR}/mail/spamassassin SUBST_VARS= CONFDIR PKG_ARCH= * Index: distinfo =================================================================== RCS file: /cvs/ports/mail/p5-FuzzyOcr/distinfo,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 distinfo --- distinfo 4 Oct 2007 19:53:49 -0000 1.1.1.1 +++ distinfo 14 Jul 2010 15:20:10 -0000 @@ -1,5 +1,5 @@ -MD5 (fuzzyocr-svn133.tar.gz) = s0wT6CsJ2HgF90kFqLl5JA== -RMD160 (fuzzyocr-svn133.tar.gz) = 5+XHJpjqst8N1JVdF7pg9Yj42a8= -SHA1 (fuzzyocr-svn133.tar.gz) = 5rC+U0qZzdgbMaSWv3SPwrZ5Ja0= -SHA256 (fuzzyocr-svn133.tar.gz) = X3wAz2dlkCgPBX9EyfQdLUQuqs8URpJ2SPL3aCsEyts= -SIZE (fuzzyocr-svn133.tar.gz) = 258112 +MD5 (fuzzyocr-3.6.0.tar.gz) = 1DSjOfsLtcyRIHcjJZCN9Q== +RMD160 (fuzzyocr-3.6.0.tar.gz) = OqHuY//gmW3uOxyYii6WvC7bvow= +SHA1 (fuzzyocr-3.6.0.tar.gz) = xUp5eJlAG5ki5dY3GmB3gJIxkt4= +SHA256 (fuzzyocr-3.6.0.tar.gz) = 3TRclQDDw83DNQOGP+I0vzwnIMVLMD5svJTb6Krzohg= +SIZE (fuzzyocr-3.6.0.tar.gz) = 127103 Index: patches/patch-FuzzyOcr_Config_pm =================================================================== RCS file: patches/patch-FuzzyOcr_Config_pm diff -N patches/patch-FuzzyOcr_Config_pm --- patches/patch-FuzzyOcr_Config_pm 4 Oct 2007 19:53:49 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,40 +0,0 @@ -$OpenBSD: patch-FuzzyOcr_Config_pm,v 1.1.1.1 2007/10/04 19:53:49 merdely Exp $ ---- FuzzyOcr/Config.pm.orig Tue Oct 2 14:16:29 2007 -+++ FuzzyOcr/Config.pm Tue Oct 2 14:17:24 2007 -@@ -51,8 +51,10 @@ our @EXPORT_OK = qw/ - read_words - /; - --use constant HAS_DBI => eval { require DBI; }; --use constant HAS_DBD_MYSQL => eval { require DBD::mysql; }; -+eval { require DBI; }; -+my $HAS_DBI = ($@) ? undef : 1; -+eval { require DBD::mysql; }; -+my $HAS_DBD_MYSQL = ($@) ? undef : 1; - use constant HAS_MLDBM => eval { require MLDBM; require MLDBM::Sync;}; - use constant HAS_DB_FILE => eval { require DB_File; }; - use constant HAS_STORABLE => eval { require Storable; }; -@@ -179,7 +181,7 @@ sub get_db_ref { - } - - sub get_mysql_ddb { -- return undef unless (HAS_DBI and HAS_DBD_MYSQL); -+ return undef unless ($HAS_DBI and $HAS_DBD_MYSQL); - - my $conf = get_config(); - my %dopts = ( AutoCommit => 1 ); -@@ -685,11 +687,11 @@ sub finish_parsing_end { - } - - if ($conf->{focr_enable_image_hashing} == 3) { -- unless (HAS_DBI and HAS_DBD_MYSQL) { -+ unless ($HAS_DBI and $HAS_DBD_MYSQL) { - $conf->{focr_enable_image_hashing} = 0; - errorlog("Disable Image Hashing"); -- errorlog("Missing DBI") unless HAS_DBI; -- errorlog("Missing DBD::mysql") unless HAS_DBD_MYSQL; -+ errorlog("Missing DBI") unless $HAS_DBI; -+ errorlog("Missing DBD::mysql") unless $HAS_DBD_MYSQL; - } - - # Warn if MLDBM databases are present, but can't be imported Index: patches/patch-FuzzyOcr_cf =================================================================== RCS file: /cvs/ports/mail/p5-FuzzyOcr/patches/patch-FuzzyOcr_cf,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-FuzzyOcr_cf --- patches/patch-FuzzyOcr_cf 4 Oct 2007 19:53:49 -0000 1.1.1.1 +++ patches/patch-FuzzyOcr_cf 20 Jul 2010 15:08:21 -0000 @@ -1,6 +1,6 @@ -$OpenBSD: patch-FuzzyOcr_cf,v 1.1.1.1 2007/10/04 19:53:49 merdely Exp $ ---- FuzzyOcr.cf.orig Tue Sep 4 13:31:13 2007 -+++ FuzzyOcr.cf Tue Oct 2 12:25:00 2007 +$OpenBSD$ +--- FuzzyOcr.cf.orig Wed May 27 18:16:00 2009 ++++ FuzzyOcr.cf Wed Jul 14 13:15:58 2010 @@ -1,7 +1,7 @@ # Syntax: # loadplugin <Plugin_Name> <Location> @@ -24,9 +24,8 @@ $OpenBSD: patch-FuzzyOcr_cf,v 1.1.1.1 20 # Include additional scanner/preprocessor commands here: # -focr_bin_helper pnmnorm, pnminvert, pamthreshold, ppmtopgm, pamtopnm --focr_bin_helper tesseract +focr_bin_helper pnmnorm, pnminvert, pamditherbw, ppmtopgm, pamtopnm -+#focr_bin_helper tesseract + focr_bin_helper tesseract # These helpers must be defined before enabling PDF scanning #focr_bin_helper pdfinfo, pdftops, pstopnm Index: patches/patch-FuzzyOcr_preps =================================================================== RCS file: /cvs/ports/mail/p5-FuzzyOcr/patches/patch-FuzzyOcr_preps,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-FuzzyOcr_preps --- patches/patch-FuzzyOcr_preps 4 Oct 2007 19:53:49 -0000 1.1.1.1 +++ patches/patch-FuzzyOcr_preps 14 Jul 2010 17:18:31 -0000 @@ -1,7 +1,7 @@ -$OpenBSD: patch-FuzzyOcr_preps,v 1.1.1.1 2007/10/04 19:53:49 merdely Exp $ ---- FuzzyOcr.preps.orig Tue Sep 4 13:31:13 2007 -+++ FuzzyOcr.preps Mon Sep 17 14:21:43 2007 -@@ -33,3 +33,10 @@ preprocessor maketiff { +$OpenBSD$ +--- FuzzyOcr.preps.orig Wed Jul 14 12:56:27 2010 ++++ FuzzyOcr.preps Wed Jul 14 12:56:45 2010 +@@ -33,3 +33,8 @@ preprocessor maketiff { args = -color -truecolor } @@ -10,5 +10,3 @@ $OpenBSD: patch-FuzzyOcr_preps,v 1.1.1.1 + command = pamditherbw + args = -threshold +} -+ -+ Index: patches/patch-FuzzyOcr_scansets =================================================================== RCS file: patches/patch-FuzzyOcr_scansets diff -N patches/patch-FuzzyOcr_scansets --- patches/patch-FuzzyOcr_scansets 4 Oct 2007 19:53:49 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,42 +0,0 @@ -$OpenBSD: patch-FuzzyOcr_scansets,v 1.1.1.1 2007/10/04 19:53:49 merdely Exp $ ---- FuzzyOcr.scansets.orig Tue Sep 4 13:31:13 2007 -+++ FuzzyOcr.scansets Mon Sep 17 14:21:43 2007 -@@ -18,19 +18,36 @@ scanset ocrad-invert { - args = -s5 -i $input - } - -+## Inverted Ocrad scanset with decolorization -+#scanset ocrad-decolorize-invert { -+# preprocessors = ppmtopgm, pamthreshold, pamtopnm -+# command = $ocrad -+# args = -s5 -i $input -+#} -+ -+## Ocrad scanset with decolorization -+#scanset ocrad-decolorize { -+# preprocessors = ppmtopgm, pamthreshold, pamtopnm -+# command = $ocrad -+# args = -s5 $input -+#} -+ - # Inverted Ocrad scanset with decolorization -+# (without pamthreshold - for netpbm < 10.34) - scanset ocrad-decolorize-invert { -- preprocessors = ppmtopgm, pamthreshold, pamtopnm -+ preprocessors = ppmtopgm, pamditherbw, pamtopnm - command = $ocrad - args = -s5 -i $input - } - - # Ocrad scanset with decolorization -+# (without pamthreshold - for netpbm < 10.34) - scanset ocrad-decolorize { -- preprocessors = ppmtopgm, pamthreshold, pamtopnm -+ preprocessors = ppmtopgm, pamditherbw, pamtopnm - command = $ocrad - args = -s5 $input - } -+ - - # Standard Gocr Scanset - scanset gocr {