along with this program. If not, see <http://www.gnu.org/licenses/>.
EOL
-my $lgpl_boilerplate=<<"EOL";
+my $lgpl2_boilerplate=<<"EOL";
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
USA.
EOL
+my $lgpl3_boilerplate=<<"EOL";
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+EOL
+
# license overrides as specified in modules/*
our $module_licenses = {
"public domain" => {
},
"LGPL" => {
license => "LGPL",
- license_text => $lgpl_boilerplate,
+ license_text => $lgpl3_boilerplate,
},
"LGPLv2+" => {
license => "LGPL-2+",
- license_text => $lgpl_boilerplate,
+ license_text => $lgpl2_boilerplate,
+ },
+ "LGPLv3+" => {
+ license => "LGPL-3+",
+ license_text => $lgpl3_boilerplate,
},
"unmodifiable license text" => {
license => "other",
our %overrides=();
our $files={};
our $new={};
+our @deleted_files=();
# actions
my $scan=0;
{
scan_file($file);
}
- write_new();
find_deleted();
+ write_new();
}
sub merge
unless(keys(%$new))
{
warn("$me: no new/changed files found\n");
- return;
}
unless(open(NEW,">$NEWFILES"))
{
print NEW join("\n", @headerlines);
print NEW "\n\n";
}
+ if(@deleted_files)
+ {
+ print NEW map { "Deleted: $_\n"; } @deleted_files;
+ }
close NEW;
}
$in_license_text=1;
$license_text='';
}
+ elsif(/^Deleted:\s*(.*)/)
+ {
+ if(exists($files->{$1}))
+ {
+ delete($files->{$1});
+ }
+ }
else
{
warn("$me: $NEWFILES: line $line not recognized\n");
sub find_deleted
{
- my @deleted=();
my %newnames = map { $_ => 1 } @filenames;
for my $file (sort keys(%$files))
{
unless(exists($newnames{$file}))
{
- push(@deleted, $file);
+ push(@deleted_files, $file);
}
}
- if(@deleted)
+ if(@deleted_files)
{
print "Removed files:\n";
- print join("\n", @deleted),"\n";
+ print join("\n", @deleted_files),"\n";
}
}