File 0493-fix-wxwidget-code-gen-for-wxwindows-free-license.patch of Package erlang
From 1b0da672ed7b224afd5b54fc74dd0f1beb193feb Mon Sep 17 00:00:00 2001
From: Kiko Fernandez-Reyes <kiko@erlang.org>
Date: Fri, 15 Aug 2025 11:55:34 +0200
Subject: [PATCH 3/3] fix wxwidget code gen for wxwindows-free license
---
lib/wx/api_gen/gen_util.erl | 49 ++++++++++++++++++++++++++++++++++---
1 file changed, 45 insertions(+), 4 deletions(-)
diff --git a/lib/wx/api_gen/gen_util.erl b/lib/wx/api_gen/gen_util.erl
index 3aa2091e25..57acd1fcaa 100644
--- a/lib/wx/api_gen/gen_util.erl
+++ b/lib/wx/api_gen/gen_util.erl
@@ -253,8 +253,49 @@ erl_copyright_template(License) ->
w("%% See the License for the specific language governing permissions and~n",[]),
w("%% limitations under the License.~n",[]),
w("%%~n",[]),
+ append_license(License),
w("%% %CopyrightEnd%~n",[]).
+append_license("Apache-2.0 AND LicenseRef-scancode-wxwindows-free-doc-3") ->
+ w("%% For documentation, wxWindow Free Documentation License, Version 3 applies.~n",[]),
+ w("%% wxWindows Free Documentation Licence, Version 3, as follows.~n",[]),
+ w("%% ===============================================~n",[]),
+ w("%%~n",[]),
+ w("%% Everyone is permitted to copy and distribute verbatim copies~n",[]),
+ w("%% of this licence document, but changing it is not allowed.~n",[]),
+ w("%%~n",[]),
+ w("%% WXWINDOWS FREE DOCUMENTATION LICENCE~n",[]),
+ w("%% TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION~n",[]),
+ w("%%~n",[]),
+ w("%% 1. Permission is granted to make and distribute verbatim copies of this~n",[]),
+ w("%% manual or piece of documentation provided any copyright notice and this~n",[]),
+ w("%% permission notice are preserved on all copies.~n",[]),
+ w("%%~n",[]),
+ w("%% 2. Permission is granted to process this file or document through a~n",[]),
+ w("%% document processing system and, at your option and the option of any third~n",[]),
+ w("%% party, print the results, provided a printed document carries a copying~n",[]),
+ w("%% permission notice identical to this one.~n",[]),
+ w("%%~n",[]),
+ w("%% 3. Permission is granted to copy and distribute modified versions of this~n",[]),
+ w("%% manual or piece of documentation under the conditions for verbatim copying,~n",[]),
+ w("%% provided also that any sections describing licensing conditions for this~n",[]),
+ w("%% manual, such as, in particular, the GNU General Public Licence, the GNU~n",[]),
+ w("%% Library General Public Licence, and any wxWindows Licence are included~n",[]),
+ w("%% exactly as in the original, and provided that the entire resulting derived~n",[]),
+ w("%% work is distributed under the terms of a permission notice identical to~n",[]),
+ w("%% this one.~n",[]),
+ w("%%~n",[]),
+ w("%% 4. Permission is granted to copy and distribute translations of this manual~n",[]),
+ w("%% or piece of documentation into another language, under the above conditions~n",[]),
+ w("%% for modified versions, except that sections related to licensing, including~n",[]),
+ w("%% this paragraph, may also be included in translations approved by the~n",[]),
+ w("%% copyright holders of the respective licence documents in addition to the~n",[]),
+ w("%% original English.~n",[]),
+ w("%%~n",[]);
+append_license(_) ->
+ ok.
+
+
c_copyright() ->
{CurrentYear,_,_} = erlang:date(),
w("/*~n",[]),
--
2.43.0