Update to 3.6.0.146, unbreak and take maintainership.
ok merdely@ (old maintainer)
This commit is contained in:
parent
0a5757f08d
commit
58ec4a10cd
@ -1,18 +1,17 @@
|
||||
# $OpenBSD: Makefile,v 1.7 2012/05/08 16:31:46 okan Exp $
|
||||
# $OpenBSD: Makefile,v 1.8 2012/07/09 21:04:03 giovanni Exp $
|
||||
|
||||
COMMENT= detect image spam with SpamAssassin
|
||||
|
||||
V= 3.6.0
|
||||
V= 3.6.0.146
|
||||
DISTNAME= fuzzyocr-$V
|
||||
PKGNAME= p5-FuzzyOcr-$V
|
||||
PKG_ARCH= *
|
||||
REVISION= 2
|
||||
CATEGORIES= mail perl5
|
||||
|
||||
HOMEPAGE= http://fuzzyocr.own-hero.net/
|
||||
MASTER_SITES= http://users.own-hero.net/~decoder/fuzzyocr/
|
||||
MASTER_SITES= http://bigio.snb.it/openbsd/distfiles/
|
||||
|
||||
MAINTAINER= Michael Erdely <merdely@openbsd.org>
|
||||
MAINTAINER= Giovanni Bechis <giovanni@openbsd.org>
|
||||
|
||||
RUN_DEPENDS= devel/p5-MLDBM-Sync \
|
||||
graphics/gocr \
|
||||
@ -25,7 +24,7 @@ RUN_DEPENDS= devel/p5-MLDBM-Sync \
|
||||
mail/p5-Mail-SpamAssassin \
|
||||
textproc/p5-String-Approx
|
||||
|
||||
REGRESS_DEPENDS= mail/p5-FuzzyOcr
|
||||
NO_REGRESS= Yes
|
||||
|
||||
# Apache 2.0
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
@ -43,10 +42,6 @@ SUBST_VARS= CONFDIR
|
||||
CONF= FuzzyOcr.cf FuzzyOcr.mysql FuzzyOcr.preps \
|
||||
FuzzyOcr.scansets FuzzyOcr.words
|
||||
|
||||
SAMPLES= ocr-gif.eml ocr-multi.eml ocr-png.eml \
|
||||
ocr-animated.eml ocr-jpg.eml ocr-obfuscated.eml \
|
||||
ocr-wrongext.eml
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/FuzzyOcr.pm ${PREFIX}/${P5SITE}
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/${P5SITE}/FuzzyOcr
|
||||
@ -56,10 +51,4 @@ do-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/examples/FuzzyOcr
|
||||
.endfor
|
||||
|
||||
do-regress:
|
||||
.for i in ${SAMPLES}
|
||||
spamassassin -xLt --cf="focr_autodisable_score 100" < \
|
||||
${WRKSRC}/samples/${i}
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,5 +1,5 @@
|
||||
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
|
||||
MD5 (fuzzyocr-3.6.0.146.tar.gz) = 4KNMa+vdy6rAXBRgZjomAA==
|
||||
RMD160 (fuzzyocr-3.6.0.146.tar.gz) = eQ1cbi8RJaoMyyjnISs9WUwpT8c=
|
||||
SHA1 (fuzzyocr-3.6.0.146.tar.gz) = J+Ti83ZtR0Df5Sjbdiz6lwGJlPE=
|
||||
SHA256 (fuzzyocr-3.6.0.146.tar.gz) = aUaSkok8Ak456E5Zr+xNUCS0yydV0ua9wnIiXdGRmNY=
|
||||
SIZE (fuzzyocr-3.6.0.146.tar.gz) = 29241
|
||||
|
29
mail/p5-FuzzyOcr/patches/patch-FuzzyOcr_Deanimate_pm
Normal file
29
mail/p5-FuzzyOcr/patches/patch-FuzzyOcr_Deanimate_pm
Normal file
@ -0,0 +1,29 @@
|
||||
$OpenBSD: patch-FuzzyOcr_Deanimate_pm,v 1.1 2012/07/09 21:04:03 giovanni Exp $
|
||||
--- FuzzyOcr/Deanimate.pm.orig Mon Jul 9 19:15:25 2012
|
||||
+++ FuzzyOcr/Deanimate.pm Mon Jul 9 19:17:38 2012
|
||||
@@ -26,12 +26,14 @@ use FuzzyOcr::Config qw(get_config set_config get_tmpd
|
||||
use FuzzyOcr::Misc qw(save_execute);
|
||||
use FuzzyOcr::Logging qw(errorlog warnlog infolog);
|
||||
|
||||
+use File::Basename qw(dirname);
|
||||
+
|
||||
# Provide functions to deanimate gifs
|
||||
|
||||
sub deanimate {
|
||||
my $conf = get_config();
|
||||
- my $imgdir = get_tmpdir();
|
||||
my $tfile = shift;
|
||||
+ my $imgdir = dirname($tfile);
|
||||
my $efile = $tfile . ".err";
|
||||
my $tfile2 = $tfile;
|
||||
my $tfile3 = $tfile;
|
||||
@@ -75,8 +77,8 @@ sub deanimate {
|
||||
|
||||
sub gif_info {
|
||||
my $conf = get_config();
|
||||
- my $imgdir = get_tmpdir();
|
||||
my $giffile = $_[0];
|
||||
+ my $imgdir = dirname($giffile);
|
||||
|
||||
my $fd = new IO::Handle;
|
||||
|
21
mail/p5-FuzzyOcr/patches/patch-FuzzyOcr_Preprocessor_pm
Normal file
21
mail/p5-FuzzyOcr/patches/patch-FuzzyOcr_Preprocessor_pm
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-FuzzyOcr_Preprocessor_pm,v 1.1 2012/07/09 21:04:03 giovanni Exp $
|
||||
--- FuzzyOcr/Preprocessor.pm.orig Mon Jul 9 19:11:28 2012
|
||||
+++ FuzzyOcr/Preprocessor.pm Mon Jul 9 19:12:39 2012
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
package FuzzyOcr::Preprocessor;
|
||||
|
||||
+use File::Basename qw(dirname);
|
||||
+
|
||||
sub new {
|
||||
my ($class, $label, $command, $args) = @_;
|
||||
|
||||
@@ -29,7 +31,7 @@ sub new {
|
||||
|
||||
sub run {
|
||||
my ($self, $input) = @_;
|
||||
- my $tmpdir = FuzzyOcr::Config::get_tmpdir();
|
||||
+ my $tmpdir = dirname($input);
|
||||
my $label = $self->{label};
|
||||
my $output = "$tmpdir/prep.$label.out";
|
||||
|
21
mail/p5-FuzzyOcr/patches/patch-FuzzyOcr_Scanset_pm
Normal file
21
mail/p5-FuzzyOcr/patches/patch-FuzzyOcr_Scanset_pm
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-FuzzyOcr_Scanset_pm,v 1.1 2012/07/09 21:04:03 giovanni Exp $
|
||||
--- FuzzyOcr/Scanset.pm.orig Mon Jul 9 19:12:47 2012
|
||||
+++ FuzzyOcr/Scanset.pm Mon Jul 9 19:13:54 2012
|
||||
@@ -20,6 +20,8 @@ package FuzzyOcr::Scanset;
|
||||
use lib qw(..);
|
||||
use FuzzyOcr::Logging qw(errorlog);
|
||||
|
||||
+use File::Basename qw(dirname);
|
||||
+
|
||||
sub new {
|
||||
my ($class, $label, $preprocessors, $command, $args, $output_in) = @_;
|
||||
|
||||
@@ -36,7 +38,7 @@ sub new {
|
||||
sub run {
|
||||
my ($self, $input) = @_;
|
||||
my $conf = FuzzyOcr::Config::get_config();
|
||||
- my $tmpdir = FuzzyOcr::Config::get_tmpdir();
|
||||
+ my $tmpdir = dirname($input);
|
||||
my $label = $self->{label};
|
||||
my $output = "$tmpdir/scanset.$label.out";
|
||||
my $stderr = ">$tmpdir/scanset.$label.err";
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-FuzzyOcr_cf,v 1.2 2010/07/21 05:53:07 merdely Exp $
|
||||
--- FuzzyOcr.cf.orig Wed May 27 18:16:00 2009
|
||||
+++ FuzzyOcr.cf Wed Jul 14 13:15:58 2010
|
||||
$OpenBSD: patch-FuzzyOcr_cf,v 1.3 2012/07/09 21:04:03 giovanni Exp $
|
||||
--- FuzzyOcr.cf.orig Thu May 28 00:16:00 2009
|
||||
+++ FuzzyOcr.cf Thu Jul 5 12:30:02 2012
|
||||
@@ -1,7 +1,7 @@
|
||||
# Syntax:
|
||||
# loadplugin <Plugin_Name> <Location>
|
||||
@ -19,7 +19,7 @@ $OpenBSD: patch-FuzzyOcr_cf,v 1.2 2010/07/21 05:53:07 merdely Exp $
|
||||
|
||||
###
|
||||
### Wordlists
|
||||
@@ -96,8 +96,8 @@ priority FUZZY_OCR 900
|
||||
@@ -96,7 +96,7 @@ priority FUZZY_OCR 900
|
||||
|
||||
# Include additional scanner/preprocessor commands here:
|
||||
#
|
||||
@ -28,7 +28,6 @@ $OpenBSD: patch-FuzzyOcr_cf,v 1.2 2010/07/21 05:53:07 merdely Exp $
|
||||
focr_bin_helper tesseract
|
||||
|
||||
# These helpers must be defined before enabling PDF scanning
|
||||
#focr_bin_helper pdfinfo, pdftops, pstopnm
|
||||
@@ -314,17 +314,17 @@ focr_bin_helper tesseract
|
||||
# If the image hash database feature is enabled (Type 1 Hashing),
|
||||
# specify the file to use as database
|
||||
|
12
mail/p5-FuzzyOcr/patches/patch-FuzzyOcr_pm
Normal file
12
mail/p5-FuzzyOcr/patches/patch-FuzzyOcr_pm
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-FuzzyOcr_pm,v 1.1 2012/07/09 21:04:03 giovanni Exp $
|
||||
--- FuzzyOcr.pm.orig Mon Jul 9 19:14:22 2012
|
||||
+++ FuzzyOcr.pm Mon Jul 9 19:15:16 2012
|
||||
@@ -164,7 +164,7 @@ sub fuzzyocr_do {
|
||||
){
|
||||
$fname = join('',@{$p->{'headers'}->{'content-id'}});
|
||||
$fname =~ s/[<>]//g;
|
||||
- $fname =~ tr/\@\$\%\&/_/s;
|
||||
+ $fname =~ tr/\@\$\%\&\./_/s;
|
||||
}
|
||||
|
||||
my $filename = $fname; $filename =~ tr{a-zA-Z0-9\-.}{_}cs;
|
Loading…
Reference in New Issue
Block a user