Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Java Native Access (JNA) is licensed under the LGPL, version 2.1
or later, or (from version 4.0 onward) the Apache License,
version 2.0.

You can freely decide which license you want to apply to the project.
You can freely decide which of these licenses to apply to JNA's own code.
Bundled third-party code retains its own license, as described below.

You may obtain a copy of the LGPL License at:

Expand All @@ -24,3 +25,28 @@ as this file.

Commercial support may be available, please e-mail
twall[at]users[dot]sf[dot]net.

The native libraries bundled with JNA incorporate libffi, which is
distributed under the following license:

libffi - Copyright (c) 1996-2022 Anthony Green, Red Hat, Inc and others.
See source files for details.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
``Software''), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

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 AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Comment on lines +28 to +52

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My first thought was, that the license file might not be the best file for this. The ALv2 license has an explicit location for required notices. I'm referring to the NOTICE file (section 4d): https://www.apache.org/licenses/LICENSE-2.0#redistribution.

4 changes: 4 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@

<target name=":jar">
<uptodate property="-jar" targetfile="${build}/${jar}">
<srcfiles dir="." includes="build.xml,LICENSE,LGPL2.1,AL2.0"/>
<srcfiles dir="${classes}">
<patternset id="jar-compiled">
<include name="com/sun/jna/*"/>
Expand Down Expand Up @@ -981,6 +982,7 @@ zip ../${os.prefix}.jar libjnidispatch.so jnidispatch.dll libjnidispatch.a
cd ..
</echo>
<jar jarfile="${build}/${os.prefix}.jar" createUnicodeExtraFields="never" encoding="UTF-8">
<zipfileset dir="." includes="LICENSE" prefix="META-INF"/>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also include the AL2.0 and LGPL2.1 files. The LICENSE file explicitly references these. My first thought was that it alone might be enough, but jnidispatch is more than just libffi, it also contains parts only in JNA.

This applies to the two location below too.

<manifest>
<attribute name="Implementation-Version" value="${jni.version} b${jni.build}"/>
<attribute name="Specification-Version" value="${jni.version}"/>
Expand Down Expand Up @@ -1044,6 +1046,7 @@ cd ..
<!-- For web start, native libraries may be provided in the root of -->
<!-- an included jar file -->
<jar jarfile="${build}/${native.jar}" createUnicodeExtraFields="never" encoding="UTF-8">
<zipfileset dir="." includes="LICENSE" prefix="META-INF"/>
<fileset dir="${build.native}" includes="jnidispatch.dll,libjnidispatch.*"/>
<manifest>
<attribute name="Implementation-Version" value="${jni.version} b${jni.build}"/>
Expand Down Expand Up @@ -1161,6 +1164,7 @@ cd ..
<copy todir="${build}/jws" file="lib/junit.jar"/>
<copy todir="${build}/jws" file="lib/clover.jar"/>
<jar jarfile="${build}/jws/jnidispatch.jar" createUnicodeExtraFields="never" encoding="UTF-8">
<zipfileset dir="." includes="LICENSE" prefix="META-INF"/>
<fileset dir="${build.native}" includes="*jnidispatch.*"/>
</jar>
<!-- To allow JNLP tests to run, import the JNA testing certificate as a CA -->
Expand Down
Loading