[libxml-bare-perl] 05/06: Add set of patches forwarded upstream

Nuno Carvalho smash at cpan.org
Tue Sep 17 20:05:26 UTC 2013


This is an automated email from the git hooks/post-receive script.

mestre-guest pushed a commit to branch master
in repository libxml-bare-perl.

commit 9668ffb46c7116ad61ed85f3ae9181de0d4af957
Author: Nuno Carvalho <smash at cpan.org>
Date:   Tue Sep 17 21:03:56 2013 +0100

    Add set of patches forwarded upstream
---
 debian/changelog                                  |    5 +-
 debian/patches/implicit_declaration_of_free.patch |   16 ++++++
 debian/patches/libm.patch                         |   14 +++++
 debian/patches/pointer_from_integer.patch         |   64 +++++++++++++++++++++
 debian/patches/series                             |    3 +
 5 files changed, 100 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 75c413a..736767e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,6 @@
 libxml-bare-perl (0.53-1) UNRELEASED; urgency=low
 
   TODO:
-  - perhaps have a look at the patches forwarded at
-    https://rt.cpan.org/Public/Bug/Display.html?id=88155
 
   * Team upload.
 
@@ -24,6 +22,9 @@ libxml-bare-perl (0.53-1) UNRELEASED; urgency=low
   * debian/control: update debhelper required version, in order to pass all
     the hardening flags to EUMM.
   * Add lintian override to apparently false-positive warning.
+  * Add set of patches accepted upstream but still not included in this
+    release, visit https://rt.cpan.org/Public/Bug/Display.html?id=88155
+    for details.
 
  -- Nuno Carvalho <smash at cpan.org>  Tue, 17 Sep 2013 15:54:28 +0100
 
diff --git a/debian/patches/implicit_declaration_of_free.patch b/debian/patches/implicit_declaration_of_free.patch
new file mode 100644
index 0000000..92516e6
--- /dev/null
+++ b/debian/patches/implicit_declaration_of_free.patch
@@ -0,0 +1,16 @@
+Description: fix warning "incompatible implicit declaration of built-in function 'free'"
+ by unconditionally including stdlib.h (required on Linux)
+Author: Florian Schlichting <fsfs at debian.org>
+
+--- a/parser.c
++++ b/parser.c
+@@ -1,8 +1,6 @@
+ #include "parser.h"
+ #include<stdio.h>
+-#ifdef DARWIN
+-  #include "stdlib.h"
+-#endif
++#include "stdlib.h"
+ #ifdef NOSTRING
+   void memset(char *s, int c, int n) {
+     char *se = s + n;
diff --git a/debian/patches/libm.patch b/debian/patches/libm.patch
new file mode 100644
index 0000000..95ce77e
--- /dev/null
+++ b/debian/patches/libm.patch
@@ -0,0 +1,14 @@
+Description: do not link against libm unnecessarily
+ (Bare.so uses none of the libraries symbols)
+Author: Florian Schlichting <fsfs at debian.org>
+
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -66,7 +66,6 @@
+ }
+ sub gen_cc {
+   WriteMakefile( @basics,
+-    LIBS      => ['-lm'],
+     OBJECT    => 'Bare.o parser.o',
+     LDDLFLAGS => '-shared -L/usr/local/lib',
+   );
diff --git a/debian/patches/pointer_from_integer.patch b/debian/patches/pointer_from_integer.patch
new file mode 100644
index 0000000..eadc9c3
--- /dev/null
+++ b/debian/patches/pointer_from_integer.patch
@@ -0,0 +1,64 @@
+Description: fix use of pointer as int
+    fixes "warning: comparison between pointer and integer" and
+    "warning: assignment makes pointer from integer without a cast"
+    compiler warnings
+Author: Florian Schlichting <fsfs at debian.org>
+
+--- a/Bare.xs
++++ b/Bare.xs
+@@ -144,7 +144,7 @@
+       SV *atthref = newRV_noinc( (SV *) atth );
+       hv_store( output, curatt->name, curatt->namelen, atthref, 0 );
+       
+-      if( curatt->value == -1 ) attval = newSVpvn( "1", 1 );
++      if( curatt->value == NULL ) attval = newSVpvn( "1", 1 );
+       else attval = newSVpvn( curatt->value, curatt->vallen );
+       SvUTF8_on(attval);
+       hv_store( atth, "value", 5, attval, vhash );
+@@ -272,7 +272,7 @@
+   if( numatts ) {
+     curatt = curnode->firstatt;
+     for( i = 0; i < numatts; i++ ) {
+-      if( curatt->value == -1 ) attval = newSVpvn( "1", 1 );
++      if( curatt->value == NULL ) attval = newSVpvn( "1", 1 );
+       else attval = newSVpvn( curatt->value, curatt->vallen );
+       SvUTF8_on(attval);
+       hv_store( output, curatt->name, curatt->namelen, attval, 0 );
+--- a/parser.c
++++ b/parser.c
+@@ -417,7 +417,7 @@
+         case 0: last_state = ST_att_name; goto done;
+         case '/': // self closing     !! /> is assumed !!
+           curatt = nodec_addattr( curnode, attname, attname_len );
+-          if( !att_has_val ) { curatt->value = -1; curatt->vallen = 0; }
++          if( !att_has_val ) { curatt->value = NULL; curatt->vallen = 0; }
+           attname_len            = 0;
+           
+           curnode->z = cpos+1-xmlin;
+@@ -436,7 +436,7 @@
+           goto att_space;
+         case '>':
+           curatt = nodec_addattr( curnode, attname, attname_len );
+-          if( !att_has_val ) { curatt->value = -1; curatt->vallen = 0; }
++          if( !att_has_val ) { curatt->value = NULL; curatt->vallen = 0; }
+           attname_len = 0;
+           cpos++;
+           goto val_1;
+@@ -832,7 +832,7 @@
+       switch( let ) {
+         case '/': // self closing     !! /> is assumed !!
+           curatt = nodec_addattr( curnode, attname, attname_len );
+-          if( !att_has_val ) { curatt->value = -1; curatt->vallen = 0; }
++          if( !att_has_val ) { curatt->value = NULL; curatt->vallen = 0; }
+           attname_len = 0;
+           
+           curnode = curnode->parent;
+@@ -850,7 +850,7 @@
+           goto u_att_space;
+         case '>':
+           curatt = nodec_addattr( curnode, attname, attname_len );
+-          if( !att_has_val ) { curatt->value = -1; curatt->vallen = 0; }
++          if( !att_has_val ) { curatt->value = NULL; curatt->vallen = 0; }
+           attname_len = 0;
+           cpos++;
+           goto u_val_1;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..965c4a7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+implicit_declaration_of_free.patch
+libm.patch
+pointer_from_integer.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libxml-bare-perl.git



More information about the Pkg-perl-cvs-commits mailing list