[SCM] Debian packaging of libsoftware-license-perl branch, master, updated. debian/0.103004-2-20-g03627e4
Dominique Dumont
dod at debian.org
Mon Dec 10 12:54:29 UTC 2012
The following commit has been merged in the master branch:
commit c52acbc4ba236aa86cc69cf836a2d85f9d9e9a31
Author: Dominique Dumont <dod at debian.org>
Date: Mon Dec 10 12:20:37 2012 +0100
added forgotten patches
diff --git a/debian/patches/new_from_short_name b/debian/patches/new_from_short_name
new file mode 100644
index 0000000..b6d1d58
--- /dev/null
+++ b/debian/patches/new_from_short_name
@@ -0,0 +1,62 @@
+diff --git a/lib/Software/LicenseUtils.pm b/lib/Software/LicenseUtils.pm
+index 0caa5bd..c049976 100644
+--- a/lib/Software/LicenseUtils.pm
++++ b/lib/Software/LicenseUtils.pm
+@@ -1,12 +1,12 @@
+ use strict;
+ use warnings;
+ package Software::LicenseUtils;
++use Carp ;
+ {
+ $Software::LicenseUtils::VERSION = '0.103004';
+ }
+ # ABSTRACT: little useful bits of code for licensey things
+
+-
+ my $_v = qr/(?:v(?:er(?:sion|\.))(?: |\.)?)/i;
+ my @phrases = (
+ "under the same (?:terms|license) as perl $_v?6" => [],
+@@ -96,6 +96,43 @@ sub guess_license_from_meta {
+
+ *guess_license_from_meta_yml = \&guess_license_from_meta;
+
++my %short_name = (
++ 'GPL-1' => [ 'GPL_1' ],
++ 'GPL-1+' => [ 'GPL_1', or_later => 1 ],
++ 'GPL-2' => [ 'GPL_2' ],
++ 'GPL-2+' => [ 'GPL_2', or_later => 1 ],
++ 'GPL-3' => [ 'GPL_3' ],
++ 'GPL-3+' => [ 'GPL_3', or_later => 1 ],
++ 'LGPL-2' => [ 'LGPL_2' ],
++ 'LGPL-2+' => [ 'LGPL_2', or_later => 1 ],
++ 'LGPL-2.1' => [ 'LGPL_2_1' ],
++ 'LGPL-2.1+' => [ 'LGPL_2_1', or_later => 1 ],
++ 'LGPL-3' => [ 'LGPL_3_0' ],
++ 'LGPL-3.0' => [ 'LGPL_3_0' ],
++ 'LGPL-3+' => [ 'LGPL_3_0', or_later => 1 ],
++ 'LGPL-3.0+' => [ 'LGPL_3_0', or_later => 1 ],
++ 'Artistic' => [ 'Artistic_1_0' ],
++ 'Artistic-1' => [ 'Artistic_1_0' ],
++ 'Artistic-2' => [ 'Artistic_2_0' ],
++);
++
++
++sub new_from_short_name {
++ my ( $class, $arg ) = @_;
++
++ Carp::croak "no license short name specified"
++ unless defined $arg->{short_name};
++ my $short = delete $arg->{short_name};
++ Carp::croak "Unknow license with short name $short"
++ unless $short_name{$short};
++ my @lic_data = @{ $short_name{$short} };
++
++ my $lic_file = my $lic_class = 'Software::License::' . shift @lic_data;
++ $lic_file =~ s!::!/!g;
++ require "$lic_file.pm";
++ return $lic_class->new( { %$arg, @lic_data } );
++}
++
+ 1;
+
+ __END__
diff --git a/debian/patches/summary b/debian/patches/summary
new file mode 100644
index 0000000..f00cd51
--- /dev/null
+++ b/debian/patches/summary
@@ -0,0 +1,33 @@
+--- a/lib/Software/License.pm
++++ b/lib/Software/License.pm
+@@ -24,15 +24,14 @@
+ sub year { defined $_[0]->{year} ? $_[0]->{year} : (localtime)[5]+1900 }
+ sub holder { $_[0]->{holder} }
+
+-
+-sub notice { shift->_fill_in('NOTICE') }
+-
+ sub summary {
+ my ($self,$distro) = @_;
+ $distro ||= 'debian' ;
+ $self->_fill_in(uc($distro).'-SUMMARY');
+ }
+
++sub notice { shift->_fill_in('NOTICE') }
++
+ sub license { shift->_fill_in('LICENSE') }
+
+
+@@ -75,9 +74,11 @@
+ Carp::confess "couldn't build $which section" unless
+ my $template = $self->section_data($which);
+
++ my $later_text = $self->{or_later} ? ", or (at\nyour option) any later version" : '';
++
+ return Text::Template->fill_this_in(
+ $$template,
+- HASH => { self => \$self },
++ HASH => { self => \$self, or_later_clause => $later_text },
+ DELIMITERS => [ qw({{ }}) ],
+ );
+ }
diff --git a/debian/patches/summary_method b/debian/patches/summary_method
index 6ea7bd8..7d78834 100644
--- a/debian/patches/summary_method
+++ b/debian/patches/summary_method
@@ -1,7 +1,7 @@
Description: new method
--- a/lib/Software/License.pm
+++ b/lib/Software/License.pm
-@@ -28,6 +28,11 @@
+@@ -27,6 +27,11 @@
sub notice { shift->_fill_in('NOTICE') }
@@ -13,7 +13,7 @@ Description: new method
sub license { shift->_fill_in('LICENSE') }
-@@ -173,6 +178,13 @@
+@@ -165,6 +170,13 @@
C<meta_name> returns open_source, restricted, unrestricted, or unknown, that
value will be used.
--
Debian packaging of libsoftware-license-perl
More information about the Pkg-perl-cvs-commits
mailing list