diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Config.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Config.pm --- FuzzyOcr-3.5.1/FuzzyOcr/Config.pm 2007-01-07 05:05:18.000000000 -0700 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Config.pm 2007-01-07 08:55:18.000000000 -0700 @@ -1,10 +1,10 @@ use strict; -package FuzzyOcr::Config; +package Mail::SpamAssassin::Plugin::FuzzyOcr::Config; use lib qw(..); -use FuzzyOcr::Logging qw(debuglog infolog warnlog errorlog); -use FuzzyOcr::Scanset; -use FuzzyOcr::Preprocessor; +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(debuglog infolog warnlog errorlog); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Scanset; +use Mail::SpamAssassin::Plugin::FuzzyOcr::Preprocessor; use Mail::SpamAssassin::Logger; use Fcntl qw(O_RDWR O_CREAT); @@ -930,7 +930,7 @@ errorlog("Label already used earlier in line $., aborting..."); return 1; } - $scanset = FuzzyOcr::Scanset->new($3); + $scanset = Mail::SpamAssassin::Plugin::FuzzyOcr::Scanset->new($3); push(@slabels, $3); } } @@ -988,7 +988,7 @@ errorlog("Error, label already used earlier in line $., aborting..."); return 1; } - $preprocessor = FuzzyOcr::Preprocessor->new($3); + $preprocessor = Mail::SpamAssassin::Plugin::FuzzyOcr::Preprocessor->new($3); push(@plabels, $3); } } diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Deanimate.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Deanimate.pm --- FuzzyOcr-3.5.1/FuzzyOcr/Deanimate.pm 2007-01-07 05:05:18.000000000 -0700 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Deanimate.pm 2007-01-07 08:54:19.000000000 -0700 @@ -1,13 +1,13 @@ use strict; -package FuzzyOcr::Deanimate; +package Mail::SpamAssassin::Plugin::FuzzyOcr::Deanimate; use base 'Exporter'; our @EXPORT_OK = qw(deanimate); use lib qw(..); -use FuzzyOcr::Config qw(get_config set_config get_tmpdir); -use FuzzyOcr::Misc qw(save_execute); -use FuzzyOcr::Logging qw(errorlog warnlog infolog); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Config qw(get_config set_config get_tmpdir); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Misc qw(save_execute); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(errorlog warnlog infolog); # Provide functions to deanimate gifs diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Hashing.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Hashing.pm --- FuzzyOcr-3.5.1/FuzzyOcr/Hashing.pm 2007-01-07 05:05:18.000000000 -0700 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Hashing.pm 2007-01-07 08:54:19.000000000 -0700 @@ -1,5 +1,5 @@ use strict; -package FuzzyOcr::Hashing; +package Mail::SpamAssassin::Plugin::FuzzyOcr::Hashing; use base 'Exporter'; our @EXPORT_OK = qw(check_image_hash_db @@ -7,9 +7,9 @@ calc_image_hash); use lib qw(..); -use FuzzyOcr::Config qw(get_thresholds get_config set_config get_tmpdir get_mysql_ddb); -use FuzzyOcr::Misc qw(save_execute); -use FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Config qw(get_thresholds get_config set_config get_tmpdir get_mysql_ddb); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Misc qw(save_execute); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog); use Fcntl; use Fcntl ':flock'; diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Logging.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Logging.pm --- FuzzyOcr-3.5.1/FuzzyOcr/Logging.pm 2007-01-07 05:05:18.000000000 -0700 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Logging.pm 2007-01-07 08:55:31.000000000 -0700 @@ -1,4 +1,4 @@ -package FuzzyOcr::Logging; +package Mail::SpamAssassin::Plugin::FuzzyOcr::Logging; use base 'Exporter'; our @EXPORT_OK = qw(debuglog errorlog infolog warnlog logfile); @@ -9,7 +9,7 @@ use POSIX qw(strftime); sub logfile { - my $conf = FuzzyOcr::Config::get_config(); + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config(); my $logtext = $_[0]; my $time = strftime("%Y-%m-%d %H:%M:%S",localtime(time)); $logtext =~ s/\n/\n /g; @@ -28,14 +28,14 @@ return $Mail::SpamAssassin::Logger::LOG_SA{level} != 3; } sub _log { - my $conf = FuzzyOcr::Config::get_config(); + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config(); my $type = $_[0]; my @lines = split('\n',$_[1]); foreach (@lines) { log_message($type,"FuzzyOcr: $_"); } } sub errorlog { - my $conf = FuzzyOcr::Config::get_config(); + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config(); _log("error",$_[0]) if $conf->{focr_log_stderr}; if (defined $conf->{focr_logfile}) { logfile($_[0]); @@ -43,7 +43,7 @@ } sub warnlog { - my $conf = FuzzyOcr::Config::get_config(); + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config(); _log("warn",$_[0]) if $conf->{focr_log_stderr}; if (defined $conf->{focr_logfile} and ($conf->{focr_verbose} >= 1)) { logfile($_[0]); @@ -51,7 +51,7 @@ } sub infolog { - my $conf = FuzzyOcr::Config::get_config(); + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config(); unless (_not_debug()) { _log("info",$_[0]) if $conf->{focr_log_stderr}; } @@ -61,7 +61,7 @@ } sub debuglog { - my $conf = FuzzyOcr::Config::get_config(); + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config(); unless (_not_debug()) { _log("dbg",$_[0]) if $conf->{focr_log_stderr}; } diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Misc.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Misc.pm --- FuzzyOcr-3.5.1/FuzzyOcr/Misc.pm 2007-01-07 05:05:18.000000000 -0700 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Misc.pm 2007-01-07 08:54:19.000000000 -0700 @@ -1,12 +1,12 @@ use strict; -package FuzzyOcr::Misc; +package Mail::SpamAssassin::Plugin::FuzzyOcr::Misc; use base 'Exporter'; our @EXPORT_OK = qw(max removedirs removedir save_execute); use lib qw(..); -use FuzzyOcr::Config qw(set_pid unset_pid get_config get_timeout kill_pid); -use FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Config qw(set_pid unset_pid get_config get_timeout kill_pid); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog); use Time::HiRes qw( gettimeofday tv_interval ); use POSIX qw(WIFEXITED WIFSIGNALED WIFSTOPPED WEXITSTATUS WTERMSIG WSTOPSIG O_RDONLY O_WRONLY O_RDWR O_APPEND O_CREAT O_EXCL); diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Preprocessor.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Preprocessor.pm --- FuzzyOcr-3.5.1/FuzzyOcr/Preprocessor.pm 2007-01-07 05:05:18.000000000 -0700 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Preprocessor.pm 2007-01-07 08:55:44.000000000 -0700 @@ -1,4 +1,4 @@ -package FuzzyOcr::Preprocessor; +package Mail::SpamAssassin::Plugin::FuzzyOcr::Preprocessor; sub new { my ($class, $label, $command, $args) = @_; @@ -12,7 +12,7 @@ sub run { my ($self, $input) = @_; - my $tmpdir = FuzzyOcr::Config::get_tmpdir(); + my $tmpdir = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_tmpdir(); my $label = $self->{label}; my $output = "$tmpdir/prep.$label.out"; my $stderr = ">$tmpdir/prep.$label.err"; @@ -41,7 +41,7 @@ } # Run processor - my $retcode = FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr); + my $retcode = Mail::SpamAssassin::Plugin::FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr); # Return code return $retcode; diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Scanset.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Scanset.pm --- FuzzyOcr-3.5.1/FuzzyOcr/Scanset.pm 2007-01-07 05:05:18.000000000 -0700 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Scanset.pm 2007-01-07 08:55:55.000000000 -0700 @@ -1,7 +1,7 @@ -package FuzzyOcr::Scanset; +package Mail::SpamAssassin::Plugin::FuzzyOcr::Scanset; use lib qw(..); -use FuzzyOcr::Logging qw(errorlog); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(errorlog); sub new { my ($class, $label, $preprocessors, $command, $args, $output_in) = @_; @@ -18,8 +18,8 @@ sub run { my ($self, $input) = @_; - my $conf = FuzzyOcr::Config::get_config(); - my $tmpdir = FuzzyOcr::Config::get_tmpdir(); + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config(); + my $tmpdir = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_tmpdir(); my $label = $self->{label}; my $output = "$tmpdir/scanset.$label.out"; my $stderr = ">$tmpdir/scanset.$label.err"; @@ -45,7 +45,7 @@ $preprocessors =~ s/ //g; my @prep = split(',', $preprocessors); foreach (@prep) { - my $proc = FuzzyOcr::Config::get_preprocessor($_); + my $proc = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_preprocessor($_); my $plabel = $proc->{label}; my $command = $proc->{command}; if (defined $proc->{args}) { @@ -89,7 +89,7 @@ if ($out_in) { $out_in =~ s/\$output/$output/; $out_in =~ s/\$tmpdir/$tmpdir/; - $retcode = FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr); + $retcode = Mail::SpamAssassin::Plugin::FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr); unless ( open(INFILE, "<$out_in") ) { errorlog("Unable to read output from \"$out_in\" for scanset $self->{label}"); $stderr =~ tr/>|; close(INFILE); } else { - ($retcode, @result) = FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr, 1); + ($retcode, @result) = Mail::SpamAssassin::Plugin::FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr, 1); } # If there were errors in the scan, return the errors instead of OCR results diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Scoring.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Scoring.pm --- FuzzyOcr-3.5.1/FuzzyOcr/Scoring.pm 2007-01-07 05:05:18.000000000 -0700 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Scoring.pm 2007-01-07 08:55:58.000000000 -0700 @@ -1,12 +1,12 @@ use strict; -package FuzzyOcr::Scoring; +package Mail::SpamAssassin::Plugin::FuzzyOcr::Scoring; use base 'Exporter'; our @EXPORT_OK = qw(wrong_ctype corrupt_img known_img_hash wrong_extension); use lib qw(..); -use FuzzyOcr::Config qw(get_pms get_config); -use FuzzyOcr::Logging qw(infolog); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Config qw(get_pms get_config); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(infolog); # Provide custom scoring functions diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr.cf mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr.cf --- FuzzyOcr-3.5.1/FuzzyOcr.cf 2007-01-07 05:07:00.000000000 -0700 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr.cf 2007-01-07 08:54:19.000000000 -0700 @@ -1,7 +1,7 @@ # Syntax: # loadplugin # path where Plugin resides. -loadplugin FuzzyOcr FuzzyOcr.pm +loadplugin Mail::SpamAssassin::Plugin::FuzzyOcr body FUZZY_OCR eval:fuzzyocr_check() body FUZZY_OCR_WRONG_CTYPE eval:dummy_check() diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr.pm --- FuzzyOcr-3.5.1/FuzzyOcr.pm 2007-01-07 05:05:08.000000000 -0700 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr.pm 2007-01-07 08:55:04.000000000 -0700 @@ -3,7 +3,7 @@ # written by Christian Holler (decoder_at_own-hero_dot_net) # and Jorge Valdes (jorge_at_joval_dot_info) -package FuzzyOcr; +package Mail::SpamAssassin::Plugin::FuzzyOcr; use strict; use warnings; @@ -21,8 +21,8 @@ use lib qw(/etc/mail/spamassassin); # Allow placing of FuzzyOcr in siteconfigdir -use FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog); -use FuzzyOcr::Config qw(kill_pid +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Config qw(kill_pid get_tmpdir set_tmpdir get_all_tmpdirs @@ -37,10 +37,10 @@ parse_config finish_parsing_end read_words); -use FuzzyOcr::Hashing qw(check_image_hash_db add_image_hash_db calc_image_hash); -use FuzzyOcr::Deanimate qw(deanimate); -use FuzzyOcr::Scoring qw(wrong_ctype wrong_extension corrupt_img known_img_hash); -use FuzzyOcr::Misc qw(max removedir removedirs save_execute); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Hashing qw(check_image_hash_db add_image_hash_db calc_image_hash); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Deanimate qw(deanimate); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Scoring qw(wrong_ctype wrong_extension corrupt_img known_img_hash); +use Mail::SpamAssassin::Plugin::FuzzyOcr::Misc qw(max removedir removedirs save_execute); our @ISA = qw(Mail::SpamAssassin::Plugin);