Lines Matching refs:license
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License along
24 licensecheck - simple license checker for source files
37 B<licensecheck> attempts to determine the license that applies to each file
51 the corresponding license information.
58 for license information. (Default is 60).
74 decide which files to check the license of.
85 <file><tab><license>[<tab><copyright>] so that it can be easily sorted
115 the license(s) in use. This is equivalent to the B<--lines> command line
120 =head1 LICENSE
127 General Public License, version 2 or later.
292 my $license = '';
308 $license = parselicense($header);
310 # If no license in header, check footer (slow, because read file backwards)
312 if ($license eq "UNKNOWN") {
324 $license = parselicense($footer);
328 print "$file\t$license";
334 print $license . "\n";
397 license information
399 should be parsed for license information
425 GNU General Public License, version 2, or (at your option) any
436 my $license = "";
438 if ($licensetext =~ /version ([^, ]+?)[.,]? (?:\(?only\)?.? )?(?:of the GNU (Affero )?General Public License )?(as )?published by the Free Software Foundation/i or
439 $licensetext =~ /GNU (?:Affero )?General Public License (?:as )?published by the Free Software Foundation; version ([^, ]+?)[.,]? /i or
440 $licensetext =~ /GNU (?:Affero )?General Public License,? [Vv]ersion (\d+(?:\.\d+)?)[ \.]/) {
442 } elsif ($licensetext =~ /either version ([^ ]+)(?: of the License)?, or \(at your option\) any later version/) {
446 if ($licensetext =~ /version ([^, ]+?)[.,]? (?:or later|or any later version) (?:of the GNU (?:Lesser |Library )General Public License )(as )?published by the Free Software Foundation/i or
447 $licensetext =~ /(?:GNU (?:Lesser |Library )|(?:Lesser|Library) GNU )General Public License (?:(?:as )?published by the Free Software Foundation;)?,? (?:either )?[Vv]ersion ([^, ]+?)(?: of the license)?[.,]? (?:or later|or (?:\(at your option\) )?any later version)/i or
448 $licensetext =~ /GNU (?:Lesser |Library )General Public License(?: \(LGPL\))?,? [Vv]ersion (\d+(?:\.\d+)?)[ \.]/) {
457 $license = "GENERATED FILE";
460 if ($licensetext =~ /is (free software.? you can redistribute it and\/or modify it|licensed) under the terms of (version [^ ]+ of )?the (GNU (Library |Lesser )General Public License|LGPL)/i or
461 $licensetext =~ /(is distributed|may be used|can redistribute).*terms.*(LGPL|(Lesser|Library) GNU General Public License)/) {
463 $license = "LGPL$lgplver$extrainfo $license";
465 $license = "LGPL (unversioned/unknown version) $license";
469 if ($licensetext =~ /is free software.? you (can|may) redistribute it and\/or modify it under the terms of (?:version [^ ]+ (?:\(?only\)? )?of )?the GNU General Public License/i) {
470 $license = "GPL$gplver$extrainfo $license";
471 } elsif ($licensetext =~ /is distributed under the terms of the GNU General Public License,/
473 $license = "GPL$gplver$extrainfo $license";
476 $license = "GPL$gplver$extrainfo $license";
478 $license = "GPL (unversioned/unknown version) $license";
482 License as defined/) {
483 $license = "QPL (part of Qt) $license";
484 } elsif ($licensetext =~ /may be distributed under the terms of the Q Public License as defined/) {
485 $license = "QPL $license";
489 $license = "MIT/X11 (BSD like) $license";
491 $license = "MIT/X11 (BSD like) $license";
492 } elsif ($licensetext =~ /Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose/) {
493 $license = "MIT/X11 (BSD like) $license";
496 if ($licensetext =~ /This file is distributed under the University of Illinois Open Source License/){
497 $license = "University of Illinois/NCSA Open Source License (BSD like) $license";
501 $license = "ISC $license";
507 $license = "BSD (4 clause) $license";
509 $license = "BSD (3 clause) $license";
511 $license = "BSD (2 clause) $license";
513 $license = "BSD $license";
515 } elsif ($licensetext =~ /Use of this source code is governed by a BSD-style license/) {
516 $license = "BSD-like $license";
518 $license = "BSD-like $license";
519 } elsif ($licensetext =~ /subject to the BSD License/) {
521 $license = "BSD-like $license";
522 } elsif ($licensetext =~ /license BSD/) {
523 $license = "BSD-like $license";
524 } elsif ($licensetext =~ /GOVERNED BY A BSD-STYLE SOURCE LICENSE/) {
525 $license = "BSD-like $license";
528 if ($licensetext =~ /Mozilla Public License( Version|, v.) ([^ ]+[^., ]),?/) {
529 $license = "MPL (v$2) $license";
532 if ($licensetext =~ /Released under the terms of the Artistic License ([^ ]+)/) {
533 $license = "Artistic (v$1) $license";
537 $license = "Artistic $license";
541 $license = "Perl $license";
544 if ($licensetext =~ /under the terms of the Apache ([^ ]+) License OR version 2 of the GNU/) {
545 $license = "Apache (v$1) GPL (v2) $license";
546 } elsif ($licensetext =~ /under the Apache License, Version ([^ ]+)/) {
547 $license = "Apache (v$1) $license";
550 if ($licensetext =~ /(THE BEER-WARE LICENSE)/i) {
551 $license = "Beerware $license";
554 if ($licensetext =~ /This source file is subject to version ([^ ]+) of the PHP license/) {
555 $license = "PHP (v$1) $license";
559 $license = "CeCILL $license";
563 $license = "CeCILL-$1 $license";
566 if ($licensetext =~ /under the SGI Free Software (B License|License B)/) {
567 $license = "SGI Free Software License B $license";
571 $license = "Public domain $license";
574 if ($licensetext =~ /terms of the Common Development and Distribution License(, Version ([^(]+))? \(the License\)/) {
575 $license = "CDDL " . ($1 ? "(v$2) " : '') . $license;
578 if ($licensetext =~ /Microsoft Permissive License \(Ms-PL\)/) {
579 $license = "Ms-PL $license";
582 if ($licensetext =~ /as defined in and that are subject to the Apple Public Source License([ ,-]+Version ([^ ]+)?(\.))/) {
583 $license = "APSL " . ($1 ? "(v$2) " : '') . $license;
586 $license = "Apple MIT $license";
589 if ($licensetext =~ /Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license \(the \"Software\"\)/ or
590 $licensetext =~ /Boost Software License([ ,-]+Version ([^ ]+)?(\.))/i) {
591 $license = "BSL " . ($1 ? "(v$2) " : '') . $license;
594 if ($licensetext =~ /PYTHON SOFTWARE FOUNDATION LICENSE (VERSION ([^ ]+))/i) {
595 $license = "PSF " . ($1 ? "(v$2) " : '') . $license;
600 $license = "zlib/libpng $license";
601 } elsif ($licensetext =~ /This code is released under the libpng license/) {
602 $license = "libpng $license";
605 if ($licensetext =~ /under MIT license/) {
606 $license = "MIT/X11 (BSD like) $license";
609 if ($licensetext =~ /License MIT(-| )License/) {
610 $license = "MIT/X11 (BSD like) $license";
614 $license = $license . "with Bison parser exception";
617 if ($licensetext =~ /As a special exception to the GNU General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program/) {
618 $license = $license . "with libtool exception";
622 $license = $license . "Khronos Group";
625 $license = "UNKNOWN" unless $license;
628 $license =~ s/\s+$//;
630 return $license;