r5949 - in /packages/libdevice-cdio-perl/trunk: ./ debian/ debian/patches/

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Mon Jul 23 20:15:58 UTC 2007


Author: tincho-guest
Date: Mon Jul 23 20:15:58 2007
New Revision: 5949

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=5949
Log:
Lots of changes:
- new maintainer version, preparing for libcdio 0.78. I think it's worth
  waiting for it to be uploaded, as it has a soname change.
- The patch to Build.PL was moved to a dpatch. Dpatch support and dependency
  was added.
- More patches for fixing upstream bugs which break Device-Cdio with the new
  libcdio.

Added:
    packages/libdevice-cdio-perl/trunk/debian/patches/
    packages/libdevice-cdio-perl/trunk/debian/patches/00list
    packages/libdevice-cdio-perl/trunk/debian/patches/01_invalid_cflags.dpatch   (with props)
    packages/libdevice-cdio-perl/trunk/debian/patches/02_wrong_function_name.dpatch   (with props)
    packages/libdevice-cdio-perl/trunk/debian/patches/03_version_information_in_swig.dpatch   (with props)
    packages/libdevice-cdio-perl/trunk/debian/patches/04_wrong_handling_of_output_parameters.dpatch   (with props)
Modified:
    packages/libdevice-cdio-perl/trunk/Build.PL
    packages/libdevice-cdio-perl/trunk/debian/changelog
    packages/libdevice-cdio-perl/trunk/debian/control
    packages/libdevice-cdio-perl/trunk/debian/rules

Modified: packages/libdevice-cdio-perl/trunk/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdevice-cdio-perl/trunk/Build.PL?rev=5949&op=diff
==============================================================================
--- packages/libdevice-cdio-perl/trunk/Build.PL (original)
+++ packages/libdevice-cdio-perl/trunk/Build.PL Mon Jul 23 20:15:58 2007
@@ -319,10 +319,6 @@
     $ldflags .= " -bundle -flat_namespace";
 }
 
-$ccflags =~ s/^\s+//;
-$ccflags =~ s/\s+$//;
-$ldflags =~ s/^\s+//;
-$ldflags =~ s/\s+$//;
 my $class = Module::Build->subclass( code => $code );
 
 my $builder = $class->new( 

Modified: packages/libdevice-cdio-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdevice-cdio-perl/trunk/debian/changelog?rev=5949&op=diff
==============================================================================
--- packages/libdevice-cdio-perl/trunk/debian/changelog (original)
+++ packages/libdevice-cdio-perl/trunk/debian/changelog Mon Jul 23 20:15:58 2007
@@ -1,3 +1,12 @@
+libdevice-cdio-perl (0.2.4-2) unstable; urgency=low
+
+  * Many bugs fixed found when using the library. Most of them related to the
+    upcoming version 0.78 of libcdio.
+  * Dependency on swig, to regenerate C wrappers.
+  * Added dpatch support and moved all the modifications there.
+
+ -- Martín Ferrari <martin.ferrari at gmail.com>  Mon, 23 Jul 2007 20:54:27 +0100
+
 libdevice-cdio-perl (0.2.4-1) unstable; urgency=low
 
   [ Martín Ferrari ]

Modified: packages/libdevice-cdio-perl/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdevice-cdio-perl/trunk/debian/control?rev=5949&op=diff
==============================================================================
--- packages/libdevice-cdio-perl/trunk/debian/control (original)
+++ packages/libdevice-cdio-perl/trunk/debian/control Mon Jul 23 20:15:58 2007
@@ -1,7 +1,7 @@
 Source: libdevice-cdio-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 5.0.0), libmodule-build-perl, perl (>= 5.8.8-7), libversion-perl, libextutils-pkgconfig-perl, libcdio-dev, libiso9660-dev
+Build-Depends: debhelper (>= 5.0.0), dpatch, swig, libmodule-build-perl, perl (>= 5.8.8-7), libversion-perl, libextutils-pkgconfig-perl, libcdio-dev, libiso9660-dev
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Martín Ferrari <martin.ferrari at gmail.com>
 Standards-Version: 3.7.2

Added: packages/libdevice-cdio-perl/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdevice-cdio-perl/trunk/debian/patches/00list?rev=5949&op=file
==============================================================================
--- packages/libdevice-cdio-perl/trunk/debian/patches/00list (added)
+++ packages/libdevice-cdio-perl/trunk/debian/patches/00list Mon Jul 23 20:15:58 2007
@@ -1,0 +1,4 @@
+01_invalid_cflags
+02_wrong_function_name
+03_version_information_in_swig
+04_wrong_handling_of_output_parameters

Added: packages/libdevice-cdio-perl/trunk/debian/patches/01_invalid_cflags.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdevice-cdio-perl/trunk/debian/patches/01_invalid_cflags.dpatch?rev=5949&op=file
==============================================================================
--- packages/libdevice-cdio-perl/trunk/debian/patches/01_invalid_cflags.dpatch (added)
+++ packages/libdevice-cdio-perl/trunk/debian/patches/01_invalid_cflags.dpatch Mon Jul 23 20:15:58 2007
@@ -1,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_invalid_cflags.dpatch by Martín Ferrari <martin.ferrari at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Some string splitting is generating a empty
+## DP: array element that's passed to exec, so cc interprets it as a
+## DP: parameter and it fails.
+## DP: (Patch sent to http://rt.cpan.org/Public/Bug/Display.html?id=28132)
+
+ at DPATCH@
+diff -urNad libdevice-cdio-perl~/Build.PL libdevice-cdio-perl/Build.PL
+--- libdevice-cdio-perl~/Build.PL	2007-07-17 12:55:24.000000000 +0100
++++ libdevice-cdio-perl/Build.PL	2007-07-17 12:58:26.000000000 +0100
+@@ -319,6 +319,10 @@
+     $ldflags .= " -bundle -flat_namespace";
+ }
+ 
++$ccflags =~ s/^\s+//;
++$ccflags =~ s/\s+$//;
++$ldflags =~ s/^\s+//;
++$ldflags =~ s/\s+$//;
+ my $class = Module::Build->subclass( code => $code );
+ 
+ my $builder = $class->new( 

Propchange: packages/libdevice-cdio-perl/trunk/debian/patches/01_invalid_cflags.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/libdevice-cdio-perl/trunk/debian/patches/02_wrong_function_name.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdevice-cdio-perl/trunk/debian/patches/02_wrong_function_name.dpatch?rev=5949&op=file
==============================================================================
--- packages/libdevice-cdio-perl/trunk/debian/patches/02_wrong_function_name.dpatch (added)
+++ packages/libdevice-cdio-perl/trunk/debian/patches/02_wrong_function_name.dpatch Mon Jul 23 20:15:58 2007
@@ -1,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_wrong_function_name.dpatch by Martín Ferrari <martin.ferrari at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: This is surely a mistake in libcdio, as the name in not coherent with
+## DP: the rest of the API. Nevertheless, this wasn't working as it was.
+
+ at DPATCH@
+diff -urNad libdevice-cdio-perl~/perliso9660.swg libdevice-cdio-perl/perliso9660.swg
+--- libdevice-cdio-perl~/perliso9660.swg	2007-07-17 07:16:02.000000000 +0100
++++ libdevice-cdio-perl/perliso9660.swg	2007-07-17 13:02:54.000000000 +0100
+@@ -564,8 +564,8 @@
+ 
+    Returns stat_t of entry if we found lsn, or NULL otherwise.
+  */
+-%rename iso9660_find_ifs_lsn ifs_find_lsn;
+-IsoStat_t *iso9660_find_ifs_lsn(const iso9660_t *p_iso, lsn_t i_lsn);
++%rename iso9660_ifs_find_lsn ifs_find_lsn;
++IsoStat_t *iso9660_ifs_find_lsn(const iso9660_t *p_iso, lsn_t i_lsn);
+ #endif
+ 
+ 

Propchange: packages/libdevice-cdio-perl/trunk/debian/patches/02_wrong_function_name.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/libdevice-cdio-perl/trunk/debian/patches/03_version_information_in_swig.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdevice-cdio-perl/trunk/debian/patches/03_version_information_in_swig.dpatch?rev=5949&op=file
==============================================================================
--- packages/libdevice-cdio-perl/trunk/debian/patches/03_version_information_in_swig.dpatch (added)
+++ packages/libdevice-cdio-perl/trunk/debian/patches/03_version_information_in_swig.dpatch Mon Jul 23 20:15:58 2007
@@ -1,0 +1,63 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_version_information_in_swig.dpatch by Martín Ferrari <martin.ferrari at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: The conditional compilation based on the lib's version wasn't working.
+
+ at DPATCH@
+diff -urNad libdevice-cdio-perl~/device.swg libdevice-cdio-perl/device.swg
+--- libdevice-cdio-perl~/device.swg	2007-07-17 07:16:02.000000000 +0100
++++ libdevice-cdio-perl/device.swg	2007-07-17 13:07:51.000000000 +0100
+@@ -20,6 +20,7 @@
+ /* See <cdio/device.h> for more extensive documentation. */
+ 
+ %include "device_const.swg"
++%include <cdio/version.h>
+ 
+ /* Set up to allow functions to return device lists of type "char
+    *". We'll use a typedef so we can make sure to isolate this. I
+diff -urNad libdevice-cdio-perl~/perliso9660.swg libdevice-cdio-perl/perliso9660.swg
+--- libdevice-cdio-perl~/perliso9660.swg	2007-07-17 07:16:02.000000000 +0100
++++ libdevice-cdio-perl/perliso9660.swg	2007-07-17 13:10:03.000000000 +0100
+@@ -35,6 +35,7 @@
+ #include <time.h>
+ #include <cdio/iso9660.h>
+ #include <cdio/version.h>
++%include <cdio/version.h>
+ 
+ /* Various libcdio constants and typedefs */
+ %include "types.swg"
+@@ -60,7 +61,7 @@
+ %constant long int RECORD               = ISO_RECORD;
+ 
+ /* When version 0.77 comes out, require it and fix this fix this. */
+-#if 0
++#if LIBCDIO_VERSION_NUM >= 77
+ %constant long int PROTECTION           = ISO_PROTECTION;
+ #else 
+ %constant long int PROTECTION           = 16;
+diff -urNad libdevice-cdio-perl~/Build.PL libdevice-cdio-perl/Build.PL
+--- libdevice-cdio-perl~/Build.PL	2007-07-17 12:55:24.000000000 +0100
++++ libdevice-cdio-perl/Build.PL	2007-07-17 14:50:53.000000000 +0100
+@@ -98,11 +98,12 @@
+     } else {
+ 	@swig_flags = ();
+     }
++    my @include_dirs = map {"-I$_"} (@{$p->{include_dirs}});
+ 
+     my $blib_lib = File::Spec->catfile($self->blib, 'lib');
+ 
+     # print "+++swig -o $c_file -outdir $blib_lib -perl $file\n";
+-    $self->do_system(@swig, '-o', $c_file, '-outdir', $blib_lib,
++    $self->do_system(@swig, @include_dirs, '-o', $c_file, '-outdir', $blib_lib,
+ 		     '-perl', @swig_flags, $file)
+ 	or die "error building $c_file file from '$file'";
+     
+@@ -331,6 +332,7 @@
+     extra_linker_flags  => $ldflags,
+     extra_compiler_flags=> $ccflags,
+     swig_flags          => $swig_flags,
++    include_dirs        => [ '/usr/include' ],
+     swig_installed      => $swig_installed,
+     license             => 'gpl',
+     requires => {

Propchange: packages/libdevice-cdio-perl/trunk/debian/patches/03_version_information_in_swig.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/libdevice-cdio-perl/trunk/debian/patches/04_wrong_handling_of_output_parameters.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdevice-cdio-perl/trunk/debian/patches/04_wrong_handling_of_output_parameters.dpatch?rev=5949&op=file
==============================================================================
--- packages/libdevice-cdio-perl/trunk/debian/patches/04_wrong_handling_of_output_parameters.dpatch (added)
+++ packages/libdevice-cdio-perl/trunk/debian/patches/04_wrong_handling_of_output_parameters.dpatch Mon Jul 23 20:15:58 2007
@@ -1,0 +1,121 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_wrong_handling_of_output_parameters.dpatch by Martín Ferrari <martin.ferrari at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: The return parameters handling was incorrect and resulted in weird
+## DP: behaviour. But it somehow passed the tests.
+
+ at DPATCH@
+diff -urNad libdevice-cdio-perl~/lib/Device/Cdio/ISO9660/FS.pm libdevice-cdio-perl/lib/Device/Cdio/ISO9660/FS.pm
+--- libdevice-cdio-perl~/lib/Device/Cdio/ISO9660/FS.pm	2006-09-02 17:40:09.000000000 +0100
++++ libdevice-cdio-perl/lib/Device/Cdio/ISO9660/FS.pm	2007-07-17 15:34:57.000000000 +0100
+@@ -132,9 +132,6 @@
+ 
+     my @values = perliso9660::fs_find_lsn($self->{cd}, $lsn);
+ 
+-    # Remove the two input parameters
+-    splice(@values, 0, 2) if @values > 2;
+-
+     return Device::Cdio::ISO9660::stat_array_to_href(@values);
+ }
+ 
+@@ -195,9 +192,6 @@
+ 
+     my @values = perliso9660::fs_readdir($self->{cd}, $dirname);
+ 
+-    # Remove the two input parameters
+-    splice(@values, 0, 2) if @values > 2;
+-
+     my @result = ();
+     while (@values) {
+ 	push @result, Device::Cdio::ISO9660::stat_array_to_href(@values);
+@@ -310,9 +304,6 @@
+ 	@values = perliso9660::fs_stat($self->{cd}, $path);
+     }
+ 
+-    # Remove the input parameters
+-    splice(@values, 0, 2) if @values > 2;
+-
+     return undef if !@values;
+     return Device::Cdio::ISO9660::stat_array_to_href(@values);
+ }
+diff -urNad libdevice-cdio-perl~/lib/Device/Cdio/ISO9660/IFS.pm libdevice-cdio-perl/lib/Device/Cdio/ISO9660/IFS.pm
+--- libdevice-cdio-perl~/lib/Device/Cdio/ISO9660/IFS.pm	2006-09-02 17:40:09.000000000 +0100
++++ libdevice-cdio-perl/lib/Device/Cdio/ISO9660/IFS.pm	2007-07-17 15:34:12.000000000 +0100
+@@ -489,9 +489,6 @@
+ 
+     my @values = perliso9660::ifs_readdir($self->{iso9660}, $dirname);
+ 
+-    # Remove the two input parameters
+-    splice(@values, 0, 2) if @values > 2;
+-
+     my @result = ();
+     while (@values) {
+ 	push @result, Device::Cdio::ISO9660::stat_array_to_href(@values);
+@@ -625,9 +622,6 @@
+ 	@values = perliso9660::ifs_stat($self->{iso9660}, $path);
+     }
+ 
+-    # Remove the input parameters
+-    splice(@values, 0, 2) if @values > 2;
+-
+     return undef if !@values;
+     return Device::Cdio::ISO9660::stat_array_to_href(@values);
+ }
+diff -urNad libdevice-cdio-perl~/perliso9660.swg libdevice-cdio-perl/perliso9660.swg
+--- libdevice-cdio-perl~/perliso9660.swg	2007-07-17 15:32:40.000000000 +0100
++++ libdevice-cdio-perl/perliso9660.swg	2007-07-17 15:36:23.000000000 +0100
+@@ -115,12 +115,11 @@
+ 
+  PPCODE:
+     /* Have perl compute the length of the string using strlen() */
+-    XPUSHs(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
+-    XPUSHs(sv_2mortal(newSViv(p_statbuf->lsn)));
+-    XPUSHs(sv_2mortal(newSViv(p_statbuf->size)));
+-    XPUSHs(sv_2mortal(newSViv(p_statbuf->secsize)));
+-    XPUSHs(sv_2mortal(newSViv(p_statbuf->type)));
+-    argvi += 7;
++    %append_output(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
++    %append_output(sv_2mortal(newSViv(p_statbuf->lsn)));
++    %append_output(sv_2mortal(newSViv(p_statbuf->size)));
++    %append_output(sv_2mortal(newSViv(p_statbuf->secsize)));
++    %append_output(sv_2mortal(newSViv(p_statbuf->type)));
+     free (p_statbuf);
+  out: ;
+ }
+@@ -129,30 +128,23 @@
+     // $1 is of type IsoStatList_t
+     CdioList_t *p_entlist   = result;
+     CdioListNode_t *p_entnode;
+-    unsigned int num = 0;
+ 
+     if (!result) goto out;
+ 
+  PPCODE:
+-    /* Figure out how many items in the array */
+-    _CDIO_LIST_FOREACH (p_entnode, p_entlist) {
+-      num +=5;
+-    }
+-
+     /* For each element in the array of strings, create a new
+      * mortalscalar, and stuff it into the above array. */
+     _CDIO_LIST_FOREACH (p_entnode, p_entlist) {
+       iso9660_stat_t *p_statbuf = 
+ 	(iso9660_stat_t *) _cdio_list_node_data (p_entnode);
+       /* Have perl compute the length of the string using strlen() */
+-      XPUSHs(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
+-      XPUSHs(sv_2mortal(newSViv(p_statbuf->lsn)));
+-      XPUSHs(sv_2mortal(newSViv(p_statbuf->size)));
+-      XPUSHs(sv_2mortal(newSViv(p_statbuf->secsize)));
+-      XPUSHs(sv_2mortal(newSViv(p_statbuf->type)));
++      %append_output(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
++      %append_output(sv_2mortal(newSViv(p_statbuf->lsn)));
++      %append_output(sv_2mortal(newSViv(p_statbuf->size)));
++      %append_output(sv_2mortal(newSViv(p_statbuf->secsize)));
++      %append_output(sv_2mortal(newSViv(p_statbuf->type)));
+     }
+     _cdio_list_free (p_entlist, true);
+-    argvi += num + 2;
+  out: ;
+ }
+ 

Propchange: packages/libdevice-cdio-perl/trunk/debian/patches/04_wrong_handling_of_output_parameters.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Modified: packages/libdevice-cdio-perl/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdevice-cdio-perl/trunk/debian/rules?rev=5949&op=diff
==============================================================================
--- packages/libdevice-cdio-perl/trunk/debian/rules (original)
+++ packages/libdevice-cdio-perl/trunk/debian/rules Mon Jul 23 20:15:58 2007
@@ -6,6 +6,8 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
+
+include /usr/share/dpatch/dpatch.make
 
 # If set to a true value then MakeMaker's prompt function will
 # always return the default without waiting for user input.
@@ -28,7 +30,13 @@
         CFLAGS += -O2
 endif
 
-build: build-stamp
+build: fixperms patch build-stamp
+fixperms:
+	# remove files that will be regenerated by SWIG (and fail because of
+	# permissions in the original tarball)
+	rm -f $(CURDIR)/perlcdio_wrap.c $(CURDIR)/perliso9660_wrap.c \
+		$(CURDIR)/perlmmc_wrap.c $(CURDIR)lib/perlmmc.pm \
+		$(CURDIR)lib/perlcdio.pm $(CURDIR)lib/perliso9660.pm
 build-stamp:
 	dh_testdir
 
@@ -38,7 +46,8 @@
 
 	touch build-stamp
 
-clean:
+clean: clean-patched unpatch
+clean-patched:
 	dh_testdir
 	dh_testroot
 




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