[SCM] Debian packaging of libsoftware-license-perl branch, master, updated. debian/0.103004-2-25-g03b6230

Dominique Dumont dod at debian.org
Wed Dec 12 11:28:00 UTC 2012


The following commit has been merged in the master branch:
commit 614f2c8fa3393d8f37e9b93688c4b191aa00098e
Author: Dominique Dumont <dod at debian.org>
Date:   Tue Dec 11 14:16:36 2012 +0100

    added patch to become backward compatible

diff --git a/debian/patches/backward-compat b/debian/patches/backward-compat
new file mode 100644
index 0000000..565622f
--- /dev/null
+++ b/debian/patches/backward-compat
@@ -0,0 +1,48 @@
+--- a/lib/Software/License.pm
++++ b/lib/Software/License.pm
+@@ -11,10 +11,15 @@
+ use Sub::Install ();
+ use Text::Template ();
+ 
++use Software::LicenseUtils;
+ 
+ sub new {
+   my ($class, $arg) = @_;
+ 
++  if ($arg->{short_name}) {
++         return Software::LicenseUtils->new_from_short_name($arg) ;
++  }
++
+   Carp::croak "no copyright holder specified" unless $arg->{holder};
+ 
+   bless $arg => $class;
+--- a/t/summary.t
++++ b/t/summary.t
+@@ -2,7 +2,7 @@
+ use strict;
+ use warnings;
+ 
+-use Test::More tests => 13;
++use Test::More tests => 19;
+ 
+ # try LGP2 license
+ 
+@@ -37,3 +37,18 @@
+ like($license->fulltext, qr/library/i, 'license text');
+ 
+ }
++
++# test backward compat form
++{
++my $license = Software::License->new({ 
++    short_name => 'LGPL-2+', 
++    holder => 'X. Ample' 
++});
++
++is($license->holder, 'X. Ample', '(c) holder');
++isa_ok($license,'Software::License::LGPL_2',"license class");
++like($license->summary, qr/common-licenses/i, 'common-licenses found');
++like($license->summary, qr/later version/i, 'later version clause found');
++like($license->name, qr/version 2/i, "license name");
++like($license->fulltext, qr/library/i, 'license text');
++}
diff --git a/debian/patches/series b/debian/patches/series
index c1b7afe..a48e948 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ lgpl-3-summary
 lgpl-2-summary
 summary_test
 add_or_later_clause
+backward-compat

-- 
Debian packaging of libsoftware-license-perl



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