From e1f51c8e0431fe2598479daf76690e1d4d7c1a88 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Tue, 27 Feb 2024 02:01:59 -0800 Subject: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 31. Follow gnulib-tool change 2021-06-04 Bruno Haible 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 | 13 +++++++++++++ pygnulib/GLConfig.py | 8 -------- pygnulib/GLImport.py | 46 -------------------------------------------- 3 files changed, 13 insertions(+), 54 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3827e10d15..a71c5a771c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2024-02-27 Collin Funk + + gnulib-tool.py: Follow gnulib-tool changes, part 31. + Follow gnulib-tool change + 2021-06-04 Bruno Haible + 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 gnulib-tool.py: Small fix of part 27. diff --git a/pygnulib/GLConfig.py b/pygnulib/GLConfig.py index 9ba5a3dca5..ae83bd6155 100644 --- a/pygnulib/GLConfig.py +++ b/pygnulib/GLConfig.py @@ -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): diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 7f332ec760..0f0f463add 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -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'] -- 2.39.5