OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael Schloh
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 06-May-2005 13:13:42
Branch: HEAD Handle: 2005050612134200
Added files:
openpkg-src/perl-gfx perl-gfx.patch
Modified files:
openpkg-src/perl-gfx perl-gfx.spec
Log:
patch argument checking flaws, and correct path to perl
Summary:
Revision Changes Path
1.1 +86 -0 openpkg-src/perl-gfx/perl-gfx.patch
1.40 +7 -1 openpkg-src/perl-gfx/perl-gfx.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/perl-gfx/perl-gfx.patch
============================================================================
$ cvs diff -u -r0 -r1.1 perl-gfx.patch
--- /dev/null 2005-05-06 13:11:00 +0200
+++ perl-gfx.patch 2005-05-06 13:13:42 +0200
@@ -0,0 +1,86 @@
+Index: PostScript-Simple-0.06/lib/PostScript/Simple.pm
+--- PostScript-Simple-0.06/lib/PostScript/Simple.pm.orig 2005-05-04
16:42:28.187771138 +0200
++++ PostScript-Simple-0.06/lib/PostScript/Simple.pm 2005-05-04
16:58:39.923776000 +0200
+@@ -1322,10 +1322,21 @@
+
+ my ($x, $y, $r) = @_;
+
+- unless (@_ == 3)
++ if (@_ == 4)
+ {
+- $self->_error("circle: wrong number of arguments");
+- return 0;
++ if (defined($opt{'filled'}))
++ {
++ $opt{'filled'} = 1;
++ }
++ else
++ {
++ $opt{'filled'} = 0;
++ }
++ }
++ elsif (@_ != 3)
++ {
++ $self->_error( "wrong number of args for line" );
++ return 0;
+ }
+
+ if (!$self->{usedcircle})
+@@ -1378,7 +1385,7 @@
+
+ my ($x, $y, $r, $a, $text) = @_;
+
+- unless (@_ == 5) {
++ unless (@_ == 5 || @_ == 6) {
+ $self->_error("circletext: wrong number of arguments");
+ return 0;
+ }
+@@ -1499,16 +1506,23 @@
+
+ my ($x1, $y1, $x2, $y2) = @_;
+
+- unless (@_ == 4) {
+- $self->_error("box: wrong number of arguments");
+- return 0;
++ if (@_ == 5)
++ {
++ if (defined($opt{'filled'}))
++ {
++ $opt{'filled'} = 1;
++ }
++ else
++ {
++ $opt{'filled'} = 0;
++ }
+ }
+-
+- if (!defined($opt{'filled'}))
++ elsif (@_ != 4)
+ {
+- $opt{'filled'} = 0;
++ $self->_error( "wrong number of args for line" );
++ return 0;
+ }
+-
++
+ unless ($self->{usedbox})
+ {
+ $self->{psfunctions} .= "/box {
+@@ -1606,7 +1616,7 @@
+ %opt = %{; shift};
+ }
+
+- unless ( @_ == 3 )
++ unless ( @_ == 3 || @_ == 4 )
+ { # check required params first
+ $self->_error("text: wrong number of arguments");
+ return 0;
+@@ -1818,7 +1828,7 @@
+
+ my ($file, $x1, $y1, $x2, $y2) = @_;
+
+- unless (@_ == 5) {
++ unless (@_ == 5 || @_ == 6) {
+ $self->_error("importepsfile: wrong number of arguments");
+ return 0;
+ }
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/perl-gfx/perl-gfx.spec
============================================================================
$ cvs diff -u -r1.39 -r1.40 perl-gfx.spec
--- openpkg-src/perl-gfx/perl-gfx.spec 4 May 2005 14:32:29 -0000
1.39
+++ openpkg-src/perl-gfx/perl-gfx.spec 6 May 2005 11:13:42 -0000
1.40
@@ -39,12 +39,13 @@
Group: Language
License: GPL/Artistic
Version: %{V_perl}
-Release: 20050504
+Release: 20050506
# list of sources
Source0:
http://www.cpan.org/modules/by-module/Image/Image-Info-%{V_image_info}.tar.gz
Source1:
http://www.cpan.org/modules/by-module/Image/Image-Size-%{V_image_size}.tar.gz
Source2:
http://www.cpan.org/modules/by-module/PostScript/PostScript-Simple-%{V_ps_simple}.tar.gz
+Patch0: perl-gfx.patch
# build information
Prefix: %{l_prefix}
@@ -83,6 +84,11 @@
%setup -q -c
%setup -q -T -D -a 1
%setup -q -T -D -a 2
+ %patch -p0
+ %{l_shtool} subst \
+ -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \
+ PostScript-Simple-%{V_ps_simple}/lib/PostScript/Simple.pm \
+ PostScript-Simple-%{V_ps_simple}/lib/PostScript/Simple/EPS.pm
%build
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]