]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license.
authorBruno Haible <bruno@clisp.org>
Sun, 13 Nov 2016 03:12:26 +0000 (04:12 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 13 Nov 2016 03:13:21 +0000 (04:13 +0100)
* gnulib-tool (--lgpl): Accept value 3orGPLv2.
(func_import): Extend determination of license_incompatibilities.
(func_create_testdir): Extend table of license compatibility. Handle
also the licenses GPLv3+, GPL, LGPLv3+.

ChangeLog
gnulib-tool

index 2a61a471e020c7e57ecb5cc89242462721b682f5..3fb31d4536309c633adbec05f30ff205e6952e4e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-11-11  Bruno Haible  <bruno@clisp.org>
+
+       gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license.
+       * gnulib-tool (--lgpl): Accept value 3orGPLv2.
+       (func_import): Extend determination of license_incompatibilities.
+       (func_create_testdir): Extend table of license compatibility. Handle
+       also the licenses GPLv3+, GPL, LGPLv3+.
+
 2016-11-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        strftime: tune %q
index 666057aead2be1fb3a87f2f4f0f9677252319d61..5145d47bdfafc74ccfd80a9d268f827cb6eee5bf 100755 (executable)
@@ -264,7 +264,8 @@ Options for --import, --add/remove-import:
                             placed (default \"tests\").
       --aux-dir=DIRECTORY   Directory relative to --dir where auxiliary build
                             tools are placed (default comes from configure.ac).
-      --lgpl[=2|=3]         Abort if modules aren't available under the LGPL.
+      --lgpl[=2|=3orGPLv2|=3]
+                            Abort if modules aren't available under the LGPL.
                             Also modify license template from GPL to LGPL.
                             The version number of the LGPL can be specified;
                             the default is currently LGPLv3.
@@ -1299,7 +1300,7 @@ func_determine_path_separator
       --lgpl=* )
         arg=`echo "X$1" | sed -e 's/^X--lgpl=//'`
         case "$arg" in
-          2 | 3) ;;
+          2 | 3orGPLv2 | 3) ;;
           *) func_fatal_error "invalid LGPL version number for --lgpl" ;;
         esac
         lgpl=$arg
@@ -4707,7 +4708,13 @@ func_import ()
           case "$lgpl" in
             yes | 3)
               case $license in
-                LGPL | LGPLv2+ | LGPLv3+) ;;
+                LGPLv2+ | 'LGPLv3+ or GPLv2' | LGPLv3+ | LGPL) ;;
+                *) func_append license_incompatibilities "$module $license$nl" ;;
+              esac
+              ;;
+            3orGPLv2)
+              case $license in
+                LGPLv2+ | 'LGPLv3+ or GPLv2') ;;
                 *) func_append license_incompatibilities "$module $license$nl" ;;
               esac
               ;;
@@ -4751,7 +4758,7 @@ s,^\(.................................................[^ ]*\) *,
     if test -n "$lgpl"; then
       # Update license.
       case "$lgpl" in
-        yes | 3)
+        yes | 3 | 3orGPLv2)
           sed_transform_main_lib_file=$sed_transform_main_lib_file'
             s/GNU General/GNU Lesser General/g
             s/General Public License/Lesser General Public License/g
@@ -5851,15 +5858,27 @@ func_create_testdir ()
           'public domain' | 'unlimited' | 'unmodifiable license text') ;;
           *)
             case "$requested_license" in
+              GPLv3+ | GPL)
+                case "$license" in
+                  LGPLv2+ | 'LGPLv3+ or GPLv2' | LGPLv3+ | LGPL | GPLv2+ | GPLv3+ | GPL) ;;
+                  *) func_warning "module $requested_module depends on a module with an incompatible license: $module" ;;
+                esac
+                ;;
               GPLv2+)
                 case "$license" in
-                  GPLv2+ | LGPLv2+) ;;
+                  LGPLv2+ | 'LGPLv3+ or GPLv2' |                  GPLv2+) ;;
+                  *) func_warning "module $requested_module depends on a module with an incompatible license: $module" ;;
+                esac
+                ;;
+              LGPLv3+ | LGPL)
+                case "$license" in
+                  LGPLv2+ | 'LGPLv3+ or GPLv2' | LGPLv3+ | LGPL) ;;
                   *) func_warning "module $requested_module depends on a module with an incompatible license: $module" ;;
                 esac
                 ;;
-              LGPL)
+              'LGPLv3+ or GPLv2')
                 case "$license" in
-                  LGPL | LGPLv2+) ;;
+                  LGPLv2+ | 'LGPLv3+ or GPLv2') ;;
                   *) func_warning "module $requested_module depends on a module with an incompatible license: $module" ;;
                 esac
                 ;;