And another patch to stop gnulib-tool.py from messing with copyright
headers. This patch is just doing the same as this commit did for
gnulib-tool:
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=f3553bdefc9202e81996c73686e3ca53cd827417
I assume that this commit somehow escaped being added to
gnulibtool.py.TODO so I've made a reference to it anyways.
Collin
From 983e8e95e90b108a2e126bb2a34d3ee0ad3dd721 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Tue, 27 Feb 2024 02:01:59 -0800
Subject: [PATCH 3/3] gnulib-tool.py: Follow gnulib-tool changes, part 31.
Follow gnulib-tool change
2021-06-04 Bruno Haible <br...@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 | 14 ++++++++++++++
pygnulib/GLConfig.py | 10 +---------
pygnulib/GLImport.py | 46 --------------------------------------------
3 files changed, 15 insertions(+), 55 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fdf08ad934..ed517802e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-02-27 Collin Funk <collin.fu...@gmail.com>
+
+ gnulib-tool.py: Follow gnulib-tool changes, part 31.
+ Follow gnulib-tool change
+ 2021-06-04 Bruno Haible <br...@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.
+
2024-02-26 Collin Funk <collin.fu...@gmail.com>
gnulib-tool.py: Follow gnulib-tool changes, part 30.
diff --git a/pygnulib/GLConfig.py b/pygnulib/GLConfig.py
index bdebf243cc..7c26a4873f 100644
--- a/pygnulib/GLConfig.py
+++ b/pygnulib/GLConfig.py
@@ -274,12 +274,10 @@ 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', 'conddeps', 'symbolic', 'lsymbolic',
- 'libtests', 'dryrun']:
+ 'libtests', 'dryrun', 'gnu_make']:
return False
elif key == 'vc_files':
return None
@@ -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.2