tags 591193 +patch
thanks

Please find attached a patch which uses libswf-perl to generate replacements
for ad.swf and ad-clear.swf. The resulting flash files are not exactly the
same as the originals, but as mentioned on the bugreport, that's probably
not a big issue.

-- 
Chris
diff -urN tmp/adzapper-20090301//debian/control adzapper-20090301//debian/control
--- tmp/adzapper-20090301//debian/control	2010-11-13 16:04:12.000000000 +0000
+++ adzapper-20090301//debian/control	2010-11-13 16:06:35.867200267 +0000
@@ -2,7 +2,7 @@
 Section: web
 Priority: optional
 Maintainer: Ludovic Drolez <ldro...@debian.org>
-Build-Depends: debhelper (>> 5.0.0)
+Build-Depends: debhelper (>> 5.0.0), perl, libswf-perl, ttf-dejavu-core
 Standards-Version: 3.8.3
 
 Package: adzapper
diff -urN tmp/adzapper-20090301//debian/generate-flash.pl adzapper-20090301//debian/generate-flash.pl
--- tmp/adzapper-20090301//debian/generate-flash.pl	1970-01-01 01:00:00.000000000 +0100
+++ adzapper-20090301//debian/generate-flash.pl	2010-11-13 16:24:33.458679569 +0000
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+
+use constant FONT_LOCATION => '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf';
+use constant DEST_DIR => 'debian/adzapper/usr/share/doc/adzapper/examples/zaps/';
+use SWF qw(:ALL);
+
+my $m = new SWF::Movie();
+$m->setBackground(0xff,0xff,0xff);
+$m->save(DEST_DIR . "ad-clear.swf");
+
+my $font = new SWF::Font(FONT_LOCATION);
+
+my $txt = new SWF::Text();
+$txt->setFont($font);
+$txt->setColor(0, 0, 0xff);
+$txt->setHeight(150);
+$txt->addString('this ad zapped');
+
+my $n = new SWF::Movie();
+$n->setBackground(0xff,0xff,0xff);
+$n->setDimension(1400, 450);
+my $txtdisp = $n->add($txt);
+$txtdisp->moveTo(100,100);
+$n->save(DEST_DIR . "ad.swf");
diff -urN tmp/adzapper-20090301//debian/rules adzapper-20090301//debian/rules
--- tmp/adzapper-20090301//debian/rules	2010-11-13 16:04:12.000000000 +0000
+++ adzapper-20090301//debian/rules	2010-11-13 16:05:24.258606708 +0000
@@ -68,6 +68,8 @@
 	dh_installexamples zaps scripts/update-zapper
 # remove the hardlink in examples
 	(cd debian/adzapper/usr/share/doc/adzapper/examples/zaps; rm -f adbg-clear.gif;cp adbg.gif adbg-clear.gif)
+# generate replacement flash files
+	perl debian/generate-flash.pl
 #	dh_installmenu
 #	dh_installlogrotate
 #	dh_installemacsen

Reply via email to