]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Follow gnulib-tool changes, part 31.
authorCollin Funk <collin.funk1@gmail.com>
Tue, 27 Feb 2024 10:01:59 +0000 (02:01 -0800)
committerBruno Haible <bruno@clisp.org>
Tue, 27 Feb 2024 10:48:10 +0000 (11:48 +0100)
Follow gnulib-tool change
2021-06-04  Bruno Haible  <bruno@clisp.org>
gnulib-tool: Stop doing license notice replacements.

* pygnulib/GLConfig.py (GLConfig.default): Remove 'copyrights' key. Add
'gnu_make' key which returns False.
(checkCopyrights): Remove function.
(setSymbolic, resetSymbolic): Remove 'copyrights' key.
* pygnulib/GLImport.py (GLImport.prepare): Remove copyrights variable.
Don't modify license notice on source files.
(GLImport.execute): Remove copyrights variable.

ChangeLog
pygnulib/GLConfig.py
pygnulib/GLImport.py

index 3827e10d1508445f639d0fe814bbb0110c9e7d47..a71c5a771c8f274288d7f729897d1c784262f487 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2024-02-27  Collin Funk  <collin.funk1@gmail.com>
+
+       gnulib-tool.py: Follow gnulib-tool changes, part 31.
+       Follow gnulib-tool change
+       2021-06-04  Bruno Haible  <bruno@clisp.org>
+       gnulib-tool: Stop doing license notice replacements.
+       * pygnulib/GLConfig.py (GLConfig.default): Remove 'copyrights' key.
+       (checkCopyrights): Remove function.
+       (setSymbolic, resetSymbolic): Remove 'copyrights' key.
+       * pygnulib/GLImport.py (GLImport.prepare): Remove copyrights variable.
+       Don't modify license notice on source files.
+       (GLImport.execute): Remove copyrights variable.
+
 2024-02-27  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Small fix of part 27.
index 9ba5a3dca57041d71dcedf42d50b87157399b381..ae83bd6155f0bf088c32a2723c7904cba4a9b836 100644 (file)
@@ -274,8 +274,6 @@ class GLConfig(object):
                 return 2.59
             elif key == 'verbosity':
                 return 0
-            elif key == 'copyrights':
-                return True
             elif key in ['modules', 'avoids', 'tests', 'incl_test_categories', 'excl_test_categories']:
                 return list()
             elif key in ['libtool', 'lgpl', 'gnu_make', 'conddeps', 'symbolic', 'lsymbolic',
@@ -960,10 +958,6 @@ class GLConfig(object):
         '''Specify preferred autoconf version. Default value is 2.59.'''
         self.table['ac_version'] = 2.59
 
-    def checkCopyrights(self):
-        '''Check if copyright notices in files should be replaced.'''
-        return self.table['copyrights']
-
     # Define symbolic methods.
     def checkSymbolic(self):
         '''Check if pygnulib will make symbolic links instead of copying files.'''
@@ -973,7 +967,6 @@ class GLConfig(object):
         '''Enable / disable creation of the symbolic links instead of copying files.'''
         if type(value) is bool:
             self.table['symbolic'] = value
-            self.table['copyrights'] = not value
         else:  # if type(value) is not bool
             raise TypeError('value must be a bool, not %s'
                             % type(value).__name__)
@@ -981,7 +974,6 @@ class GLConfig(object):
     def resetSymbolic(self):
         '''Reset creation of the symbolic links instead of copying files.'''
         self.table['symbolic'] = False
-        self.table['copyrights'] = True
 
     # Define lsymbolic methods.
     def checkLSymbolic(self):
index 7f332ec760db82d4c704e62204cf60f549fd28e2..0f0f463add7672e138c8bace948e37c6161f3cd8 100644 (file)
@@ -781,7 +781,6 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
         docbase = self.config['docbase']
         testsbase = self.config['testsbase']
         lgpl = self.config['lgpl']
-        copyrights = self.config['copyrights']
         libname = self.config['libname']
         makefile_name = self.config['makefile_name']
         conddeps = self.config['conddeps']
@@ -885,12 +884,6 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
                 print(notice)
 
         # Determine script to apply to imported library files.
-        lgpl2gpl = '''
-      s/GNU Lesser General/GNU General/g
-      s/Lesser General Public License/General Public License/g
-      s/GNU Library General/GNU General/g
-      s/Library General Public License/General Public License/g
-      s/version 2\\(.1\\)\\{0,1\\}\\([ ,]\\)/version 3\\2/g'''
         sed_transform_lib_file = ''
         if 'config-h' in [ str(module)
                            for module in main_modules ]:
@@ -898,50 +891,12 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
         s/^#ifdef[\t ]*HAVE_CONFIG_H[\t ]*$/#if 1/
       '''
         sed_transform_main_lib_file = sed_transform_lib_file
-        if copyrights:
-            if lgpl:  # if lgpl is enabled
-                if lgpl == True or lgpl == '3':
-                    sed_transform_main_lib_file += '''
-            s/GNU General/GNU Lesser General/g
-            s/General Public License/Lesser General Public License/g
-            s/Lesser Lesser General Public License/Lesser General Public License/g'''
-                elif lgpl == '3orGPLv2':
-                    sed_transform_main_lib_file += '''
-            /^ *This program is free software/i\\
-   This program is free software: you can redistribute it and\\/or\\
-   modify it under the terms of either:\\
-\\
-     * 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.\\
-\\
-   or\\
-\\
-     * the GNU General Public License as published by the Free\\
-       Software Foundation; either version 2 of the License, or (at your\\
-       option) any later version.\\
-\\
-   or both in parallel, as here.
-            /^ *This program is free software/,/^$/d
-            '''
-                elif lgpl == '2':
-                    sed_transform_main_lib_file += '''
-            s/GNU General/GNU Lesser General/g
-            s/General Public License/Lesser General Public License/g
-            s/Lesser Lesser General Public License/Lesser General Public License/g
-            s/version [23]\\([ ,]\\)/version 2.1\\1/g'''
-            else:  # if lgpl is disabled
-                sed_transform_main_lib_file += lgpl2gpl
 
         # Determine script to apply to auxiliary files that go into $auxdir/.
         sed_transform_build_aux_file = ''
-        if copyrights:
-            sed_transform_build_aux_file += lgpl2gpl
 
         # Determine script to apply to library files that go into $testsbase/.
         sed_transform_testsrelated_lib_file = sed_transform_lib_file
-        if copyrights:
-            sed_transform_testsrelated_lib_file += lgpl2gpl
 
         # Determine the final file lists.
         main_filelist, tests_filelist = \
@@ -1018,7 +973,6 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
         docbase = self.config['docbase']
         testsbase = self.config['testsbase']
         lgpl = self.config['lgpl']
-        copyrights = self.config['copyrights']
         libname = self.config['libname']
         makefile_name = self.config['makefile_name']
         conddeps = self.config['conddeps']