/[smeserver]/rpms/FuzzyOcr/sme7/FuzzyOcr-3.5.1-locations.patch
ViewVC logotype

Contents of /rpms/FuzzyOcr/sme7/FuzzyOcr-3.5.1-locations.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Jun 12 16:22:22 2007 UTC (17 years, 5 months ago) by slords
Branch: MAIN
CVS Tags: FuzzyOcr-3_5_1-3_el4_sme, FuzzyOcr-3_5_1-2_el4_sme, HEAD
Error occurred while calculating annotation data.
Import on branch sme7 of package FuzzyOcr-3.5.1-2.el4.sme.src.rpm

1 diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Config.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Config.pm
2 --- FuzzyOcr-3.5.1/FuzzyOcr/Config.pm 2007-01-07 05:05:18.000000000 -0700
3 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Config.pm 2007-01-07 08:55:18.000000000 -0700
4 @@ -1,10 +1,10 @@
5 use strict;
6 -package FuzzyOcr::Config;
7 +package Mail::SpamAssassin::Plugin::FuzzyOcr::Config;
8
9 use lib qw(..);
10 -use FuzzyOcr::Logging qw(debuglog infolog warnlog errorlog);
11 -use FuzzyOcr::Scanset;
12 -use FuzzyOcr::Preprocessor;
13 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(debuglog infolog warnlog errorlog);
14 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Scanset;
15 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Preprocessor;
16 use Mail::SpamAssassin::Logger;
17
18 use Fcntl qw(O_RDWR O_CREAT);
19 @@ -930,7 +930,7 @@
20 errorlog("Label already used earlier in line $., aborting...");
21 return 1;
22 }
23 - $scanset = FuzzyOcr::Scanset->new($3);
24 + $scanset = Mail::SpamAssassin::Plugin::FuzzyOcr::Scanset->new($3);
25 push(@slabels, $3);
26 }
27 }
28 @@ -988,7 +988,7 @@
29 errorlog("Error, label already used earlier in line $., aborting...");
30 return 1;
31 }
32 - $preprocessor = FuzzyOcr::Preprocessor->new($3);
33 + $preprocessor = Mail::SpamAssassin::Plugin::FuzzyOcr::Preprocessor->new($3);
34 push(@plabels, $3);
35 }
36 }
37 diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Deanimate.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Deanimate.pm
38 --- FuzzyOcr-3.5.1/FuzzyOcr/Deanimate.pm 2007-01-07 05:05:18.000000000 -0700
39 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Deanimate.pm 2007-01-07 08:54:19.000000000 -0700
40 @@ -1,13 +1,13 @@
41 use strict;
42 -package FuzzyOcr::Deanimate;
43 +package Mail::SpamAssassin::Plugin::FuzzyOcr::Deanimate;
44
45 use base 'Exporter';
46 our @EXPORT_OK = qw(deanimate);
47
48 use lib qw(..);
49 -use FuzzyOcr::Config qw(get_config set_config get_tmpdir);
50 -use FuzzyOcr::Misc qw(save_execute);
51 -use FuzzyOcr::Logging qw(errorlog warnlog infolog);
52 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Config qw(get_config set_config get_tmpdir);
53 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Misc qw(save_execute);
54 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(errorlog warnlog infolog);
55
56 # Provide functions to deanimate gifs
57
58 diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Hashing.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Hashing.pm
59 --- FuzzyOcr-3.5.1/FuzzyOcr/Hashing.pm 2007-01-07 05:05:18.000000000 -0700
60 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Hashing.pm 2007-01-07 08:54:19.000000000 -0700
61 @@ -1,5 +1,5 @@
62 use strict;
63 -package FuzzyOcr::Hashing;
64 +package Mail::SpamAssassin::Plugin::FuzzyOcr::Hashing;
65
66 use base 'Exporter';
67 our @EXPORT_OK = qw(check_image_hash_db
68 @@ -7,9 +7,9 @@
69 calc_image_hash);
70
71 use lib qw(..);
72 -use FuzzyOcr::Config qw(get_thresholds get_config set_config get_tmpdir get_mysql_ddb);
73 -use FuzzyOcr::Misc qw(save_execute);
74 -use FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog);
75 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Config qw(get_thresholds get_config set_config get_tmpdir get_mysql_ddb);
76 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Misc qw(save_execute);
77 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog);
78 use Fcntl;
79 use Fcntl ':flock';
80
81 diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Logging.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Logging.pm
82 --- FuzzyOcr-3.5.1/FuzzyOcr/Logging.pm 2007-01-07 05:05:18.000000000 -0700
83 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Logging.pm 2007-01-07 08:55:31.000000000 -0700
84 @@ -1,4 +1,4 @@
85 -package FuzzyOcr::Logging;
86 +package Mail::SpamAssassin::Plugin::FuzzyOcr::Logging;
87
88 use base 'Exporter';
89 our @EXPORT_OK = qw(debuglog errorlog infolog warnlog logfile);
90 @@ -9,7 +9,7 @@
91 use POSIX qw(strftime);
92
93 sub logfile {
94 - my $conf = FuzzyOcr::Config::get_config();
95 + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config();
96 my $logtext = $_[0];
97 my $time = strftime("%Y-%m-%d %H:%M:%S",localtime(time));
98 $logtext =~ s/\n/\n /g;
99 @@ -28,14 +28,14 @@
100 return $Mail::SpamAssassin::Logger::LOG_SA{level} != 3;
101 }
102 sub _log {
103 - my $conf = FuzzyOcr::Config::get_config();
104 + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config();
105 my $type = $_[0];
106 my @lines = split('\n',$_[1]);
107 foreach (@lines) { log_message($type,"FuzzyOcr: $_"); }
108 }
109
110 sub errorlog {
111 - my $conf = FuzzyOcr::Config::get_config();
112 + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config();
113 _log("error",$_[0]) if $conf->{focr_log_stderr};
114 if (defined $conf->{focr_logfile}) {
115 logfile($_[0]);
116 @@ -43,7 +43,7 @@
117 }
118
119 sub warnlog {
120 - my $conf = FuzzyOcr::Config::get_config();
121 + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config();
122 _log("warn",$_[0]) if $conf->{focr_log_stderr};
123 if (defined $conf->{focr_logfile} and ($conf->{focr_verbose} >= 1)) {
124 logfile($_[0]);
125 @@ -51,7 +51,7 @@
126 }
127
128 sub infolog {
129 - my $conf = FuzzyOcr::Config::get_config();
130 + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config();
131 unless (_not_debug()) {
132 _log("info",$_[0]) if $conf->{focr_log_stderr};
133 }
134 @@ -61,7 +61,7 @@
135 }
136
137 sub debuglog {
138 - my $conf = FuzzyOcr::Config::get_config();
139 + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config();
140 unless (_not_debug()) {
141 _log("dbg",$_[0]) if $conf->{focr_log_stderr};
142 }
143 diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Misc.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Misc.pm
144 --- FuzzyOcr-3.5.1/FuzzyOcr/Misc.pm 2007-01-07 05:05:18.000000000 -0700
145 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Misc.pm 2007-01-07 08:54:19.000000000 -0700
146 @@ -1,12 +1,12 @@
147 use strict;
148 -package FuzzyOcr::Misc;
149 +package Mail::SpamAssassin::Plugin::FuzzyOcr::Misc;
150
151 use base 'Exporter';
152 our @EXPORT_OK = qw(max removedirs removedir save_execute);
153
154 use lib qw(..);
155 -use FuzzyOcr::Config qw(set_pid unset_pid get_config get_timeout kill_pid);
156 -use FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog);
157 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Config qw(set_pid unset_pid get_config get_timeout kill_pid);
158 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog);
159 use Time::HiRes qw( gettimeofday tv_interval );
160 use POSIX qw(WIFEXITED WIFSIGNALED WIFSTOPPED WEXITSTATUS WTERMSIG WSTOPSIG
161 O_RDONLY O_WRONLY O_RDWR O_APPEND O_CREAT O_EXCL);
162 diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Preprocessor.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Preprocessor.pm
163 --- FuzzyOcr-3.5.1/FuzzyOcr/Preprocessor.pm 2007-01-07 05:05:18.000000000 -0700
164 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Preprocessor.pm 2007-01-07 08:55:44.000000000 -0700
165 @@ -1,4 +1,4 @@
166 -package FuzzyOcr::Preprocessor;
167 +package Mail::SpamAssassin::Plugin::FuzzyOcr::Preprocessor;
168
169 sub new {
170 my ($class, $label, $command, $args) = @_;
171 @@ -12,7 +12,7 @@
172
173 sub run {
174 my ($self, $input) = @_;
175 - my $tmpdir = FuzzyOcr::Config::get_tmpdir();
176 + my $tmpdir = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_tmpdir();
177 my $label = $self->{label};
178 my $output = "$tmpdir/prep.$label.out";
179 my $stderr = ">$tmpdir/prep.$label.err";
180 @@ -41,7 +41,7 @@
181 }
182
183 # Run processor
184 - my $retcode = FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr);
185 + my $retcode = Mail::SpamAssassin::Plugin::FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr);
186
187 # Return code
188 return $retcode;
189 diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Scanset.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Scanset.pm
190 --- FuzzyOcr-3.5.1/FuzzyOcr/Scanset.pm 2007-01-07 05:05:18.000000000 -0700
191 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Scanset.pm 2007-01-07 08:55:55.000000000 -0700
192 @@ -1,7 +1,7 @@
193 -package FuzzyOcr::Scanset;
194 +package Mail::SpamAssassin::Plugin::FuzzyOcr::Scanset;
195
196 use lib qw(..);
197 -use FuzzyOcr::Logging qw(errorlog);
198 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(errorlog);
199
200 sub new {
201 my ($class, $label, $preprocessors, $command, $args, $output_in) = @_;
202 @@ -18,8 +18,8 @@
203
204 sub run {
205 my ($self, $input) = @_;
206 - my $conf = FuzzyOcr::Config::get_config();
207 - my $tmpdir = FuzzyOcr::Config::get_tmpdir();
208 + my $conf = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_config();
209 + my $tmpdir = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_tmpdir();
210 my $label = $self->{label};
211 my $output = "$tmpdir/scanset.$label.out";
212 my $stderr = ">$tmpdir/scanset.$label.err";
213 @@ -45,7 +45,7 @@
214 $preprocessors =~ s/ //g;
215 my @prep = split(',', $preprocessors);
216 foreach (@prep) {
217 - my $proc = FuzzyOcr::Config::get_preprocessor($_);
218 + my $proc = Mail::SpamAssassin::Plugin::FuzzyOcr::Config::get_preprocessor($_);
219 my $plabel = $proc->{label};
220 my $command = $proc->{command};
221 if (defined $proc->{args}) {
222 @@ -89,7 +89,7 @@
223 if ($out_in) {
224 $out_in =~ s/\$output/$output/;
225 $out_in =~ s/\$tmpdir/$tmpdir/;
226 - $retcode = FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr);
227 + $retcode = Mail::SpamAssassin::Plugin::FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr);
228 unless ( open(INFILE, "<$out_in") ) {
229 errorlog("Unable to read output from \"$out_in\" for scanset $self->{label}");
230 $stderr =~ tr/>|</ /;
231 @@ -102,7 +102,7 @@
232 @result = <INFILE>;
233 close(INFILE);
234 } else {
235 - ($retcode, @result) = FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr, 1);
236 + ($retcode, @result) = Mail::SpamAssassin::Plugin::FuzzyOcr::Misc::save_execute($rcmd, $stdin, $stdout, $stderr, 1);
237 }
238
239 # If there were errors in the scan, return the errors instead of OCR results
240 diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr/Scoring.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Scoring.pm
241 --- FuzzyOcr-3.5.1/FuzzyOcr/Scoring.pm 2007-01-07 05:05:18.000000000 -0700
242 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr/Scoring.pm 2007-01-07 08:55:58.000000000 -0700
243 @@ -1,12 +1,12 @@
244 use strict;
245 -package FuzzyOcr::Scoring;
246 +package Mail::SpamAssassin::Plugin::FuzzyOcr::Scoring;
247
248 use base 'Exporter';
249 our @EXPORT_OK = qw(wrong_ctype corrupt_img known_img_hash wrong_extension);
250
251 use lib qw(..);
252 -use FuzzyOcr::Config qw(get_pms get_config);
253 -use FuzzyOcr::Logging qw(infolog);
254 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Config qw(get_pms get_config);
255 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(infolog);
256
257 # Provide custom scoring functions
258
259 diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr.cf mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr.cf
260 --- FuzzyOcr-3.5.1/FuzzyOcr.cf 2007-01-07 05:07:00.000000000 -0700
261 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr.cf 2007-01-07 08:54:19.000000000 -0700
262 @@ -1,7 +1,7 @@
263 # Syntax:
264 # loadplugin <Plugin_Name> <Location>
265 # <Location> path where Plugin resides.
266 -loadplugin FuzzyOcr FuzzyOcr.pm
267 +loadplugin Mail::SpamAssassin::Plugin::FuzzyOcr
268
269 body FUZZY_OCR eval:fuzzyocr_check()
270 body FUZZY_OCR_WRONG_CTYPE eval:dummy_check()
271 diff -Nur -x '*.orig' -x '*.rej' FuzzyOcr-3.5.1/FuzzyOcr.pm mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr.pm
272 --- FuzzyOcr-3.5.1/FuzzyOcr.pm 2007-01-07 05:05:08.000000000 -0700
273 +++ mezzanine_patched_FuzzyOcr-3.5.1/FuzzyOcr.pm 2007-01-07 08:55:04.000000000 -0700
274 @@ -3,7 +3,7 @@
275 # written by Christian Holler (decoder_at_own-hero_dot_net)
276 # and Jorge Valdes (jorge_at_joval_dot_info)
277
278 -package FuzzyOcr;
279 +package Mail::SpamAssassin::Plugin::FuzzyOcr;
280
281 use strict;
282 use warnings;
283 @@ -21,8 +21,8 @@
284
285 use lib qw(/etc/mail/spamassassin); # Allow placing of FuzzyOcr in siteconfigdir
286
287 -use FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog);
288 -use FuzzyOcr::Config qw(kill_pid
289 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Logging qw(debuglog errorlog warnlog infolog);
290 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Config qw(kill_pid
291 get_tmpdir
292 set_tmpdir
293 get_all_tmpdirs
294 @@ -37,10 +37,10 @@
295 parse_config
296 finish_parsing_end
297 read_words);
298 -use FuzzyOcr::Hashing qw(check_image_hash_db add_image_hash_db calc_image_hash);
299 -use FuzzyOcr::Deanimate qw(deanimate);
300 -use FuzzyOcr::Scoring qw(wrong_ctype wrong_extension corrupt_img known_img_hash);
301 -use FuzzyOcr::Misc qw(max removedir removedirs save_execute);
302 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Hashing qw(check_image_hash_db add_image_hash_db calc_image_hash);
303 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Deanimate qw(deanimate);
304 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Scoring qw(wrong_ctype wrong_extension corrupt_img known_img_hash);
305 +use Mail::SpamAssassin::Plugin::FuzzyOcr::Misc qw(max removedir removedirs save_execute);
306
307 our @ISA = qw(Mail::SpamAssassin::Plugin);
308

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed