Adding BOOST License.

This commit is contained in:
Daniel Lemire 2023-05-25 11:05:12 -04:00
parent b7cb8148bb
commit c9b908bf97
3 changed files with 41 additions and 8 deletions

23
LICENSE-BOOST Normal file
View File

@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View File

@ -279,7 +279,7 @@ under the Apache 2.0 license.
<sup> <sup>
Licensed under either of <a href="LICENSE-APACHE">Apache License, Version Licensed under either of <a href="LICENSE-APACHE">Apache License, Version
2.0</a> or <a href="LICENSE-MIT">MIT license</a> at your option. 2.0</a> or <a href="LICENSE-MIT">MIT license</a> or <a href="LICENSE-BOOST">BOOST license</a> .
</sup> </sup>
<br> <br>
@ -287,5 +287,5 @@ Licensed under either of <a href="LICENSE-APACHE">Apache License, Version
<sub> <sub>
Unless you explicitly state otherwise, any contribution intentionally submitted Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this repository by you, as defined in the Apache-2.0 license, for inclusion in this repository by you, as defined in the Apache-2.0 license,
shall be dual licensed as above, without any additional terms or conditions. shall be triple licensed as above, without any additional terms or conditions.
</sub> </sub>

View File

@ -10,10 +10,10 @@ for filename in ['AUTHORS', 'CONTRIBUTORS']:
text += '// fast_float by ' + line text += '// fast_float by ' + line
if filename == 'CONTRIBUTORS': if filename == 'CONTRIBUTORS':
text += '// with contributions from ' + line text += '// with contributions from ' + line
processed_files[filename] = text + '//\n' processed_files[filename] = text + '//\n//\n'
# licenses # licenses
for filename in ['LICENSE-MIT', 'LICENSE-APACHE']: for filename in ['LICENSE-MIT', 'LICENSE-APACHE', 'LICENSE-BOOST']:
lines = [] lines = []
with open(filename, encoding='utf8') as f: with open(filename, encoding='utf8') as f:
lines = f.readlines() lines = f.readlines()
@ -44,14 +44,20 @@ for filename in [ 'constexpr_feature_detect.h', 'float_common.h', 'fast_float.h'
import argparse import argparse
parser = argparse.ArgumentParser(description='Amalgamate fast_float.') parser = argparse.ArgumentParser(description='Amalgamate fast_float.')
parser.add_argument('--license', default='DUAL', choices=['DUAL', 'MIT', 'APACHE'], help='choose license') parser.add_argument('--license', default='TRIPLE', choices=['DUAL', 'TRIPLE', 'MIT', 'APACHE', 'BOOST'], help='choose license')
parser.add_argument('--output', default='', help='output file (stdout if none') parser.add_argument('--output', default='', help='output file (stdout if none')
args = parser.parse_args() args = parser.parse_args()
def license_content(license_arg): def license_content(license_arg):
result = [] result = []
if license_arg == 'TRIPLE':
result += [
'// Licensed under the Apache License, Version 2.0, or the\n',
'// MIT License or the Boost License. This file may not be copied,\n',
'// modified, or distributed except according to those terms.\n',
'//\n'
]
if license_arg == 'DUAL': if license_arg == 'DUAL':
result += [ result += [
'// Licensed under the Apache License, Version 2.0, or the\n', '// Licensed under the Apache License, Version 2.0, or the\n',
@ -60,14 +66,18 @@ def license_content(license_arg):
'//\n' '//\n'
] ]
if license_arg in ('DUAL', 'MIT'): if license_arg in ('DUAL', 'TRIPLE', 'MIT'):
result.append('// MIT License Notice\n//\n') result.append('// MIT License Notice\n//\n')
result.append(processed_files['LICENSE-MIT']) result.append(processed_files['LICENSE-MIT'])
result.append('//\n') result.append('//\n')
if license_arg in ('DUAL', 'APACHE'): if license_arg in ('DUAL', 'TRIPLE', 'APACHE'):
result.append('// Apache License (Version 2.0) Notice\n//\n') result.append('// Apache License (Version 2.0) Notice\n//\n')
result.append(processed_files['LICENSE-APACHE']) result.append(processed_files['LICENSE-APACHE'])
result.append('//\n') result.append('//\n')
if license_arg in ('TRIPLE', 'BOOST'):
result.append('// BOOST License Notice\n//\n')
result.append(processed_files['LICENSE-BOOST'])
result.append('//\n')
return result return result