bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Collin Funk <collin.funk1@gmail.com>
To: bug-gnulib@gnu.org
Subject: gnulib-tool.py: Follow gnulib-tool changes, part 31
Date: Tue, 27 Feb 2024 02:16:41 -0800	[thread overview]
Message-ID: <d3f3aeb4-4afb-4008-866d-438dd756e0b3@gmail.com> (raw)
In-Reply-To: <ffaffc17-4727-4fff-be98-4860e33b23a1@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

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

[-- Attachment #2: 0003-gnulib-tool.py-Follow-gnulib-tool-changes-part-31.patch --]
[-- Type: text/x-patch, Size: 7542 bytes --]

From 983e8e95e90b108a2e126bb2a34d3ee0ad3dd721 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@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  <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            | 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.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. 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.funk1@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


  reply	other threads:[~2024-02-27 10:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27  6:04 gnulib-tool.py: Follow gnulib-tool changes, part 29, 30 Collin Funk
2024-02-27 10:16 ` Collin Funk [this message]
2024-02-27 10:53   ` gnulib-tool.py: Follow gnulib-tool changes, part 31 Bruno Haible
2024-02-27 10:36 ` gnulib-tool.py: Follow gnulib-tool changes, part 29, 30 Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d3f3aeb4-4afb-4008-866d-438dd756e0b3@gmail.com \
    --to=collin.funk1@gmail.com \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).