There is at least one (possibly more) places where signed overflow
needs to work or things break. It is formally UB, but fortunately
there is compiler flag to not break things when possible. Fixes
build on x86_64.
This commit updates $license variable in all APKBUILDs to comply with
short names specified by SPDX version 3.0 [1] where possible. It was
done using find-and-replace method on substrings inside $license
variables.
Only license names were updated, not "expressions" specifying relation
between the licenses (e.g. "X and Y", "X or Y", "X and (Y or Z)") or
exceptions (e.g. "X with exceptions").
Many licenses have a version or multiple variants, e.g. MPL-2.0,
BSD-2-Clause, BSD-3-Clause. However, $license in many aports do not
contain license version or variant. Since there's no way how to infer
this information just from abuild, it were left without the variant
suffix or version, i.e. non SPDX compliant.
GNU licenses (AGPL, GFDL, GPL, LGPL) are especially complicated. They
exist in two variants: -only (formerly e.g. GPL-2.0) and -or-later
(formerly e.g. GPL-2.0+). We did not systematically noted distinguish
between these variants, so GPL-2.0, GPL2, GPLv2 etc. may mean
GPL-2.0-only or GPL-2.0-or-later. Thus GNU licenses without "+" (e.g.
GPL2+) were left without the variant suffix, i.e. non SPDX compliant.
Note: This commit just fixes format of the license names, no
verification has been done if the specified license information is
actually correct!
[1]: https://spdx.org/licenses/
There's some problem with busybox 1.25.0-r5, the build fails with error:
```
bootstrap/jdk1.6.0/bin/javac -J-XX:ThreadStackSize=1664 -J-XX:-PrintVMOptions -J-XX:+UnlockDiagnosticVMOptions -J-XX:-LogVMOutput -J-Xmx512m -J-Xms512m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -g -source 7 -target 7 -encoding ascii -Xbootclasspath:/home/buildozer/aports/community/openjdk7/src/icedtea-2.6.3/openjdk.build-boot/classes -sourcepath /home/buildozer/aports/community/openjdk7/src/icedtea-2.6.3/generated.build:../../../src/solaris/classes:../../../src/share/classes -d /home/buildozer/aports/community/openjdk7/src/icedtea-2.6.3/openjdk.build-boot/classes @/home/buildozer/aports/community/openjdk7/src/icedtea-2.6.3/openjdk.build-boot/tmp/sun/sun.awt.X11/xawt/.classes.list.filtered
Annotation processing got disabled, since it requires a 1.6 compliant JVM
----------
1. ERROR in /home/buildozer/aports/community/openjdk7/src/icedtea-2.6.3/openjdk-boot/jdk/src/solaris/classes/sun/awt/X11/XWarningWindow.java (at line 64)
icons[0][0] = new IconInfo(sun.awt.AWTIcon32_security_icon_bw16_png.security_icon_bw16_png);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sun.awt.AWTIcon32_security_icon_bw16_png cannot be resolved to a variable
----------
2. ERROR in /home/buildozer/aports/community/openjdk7/src/icedtea-2.6.3/openjdk-boot/jdk/src/solaris/classes/sun/awt/X11/XWarningWindow.java (at line 65)
icons[0][1] = new IconInfo(sun.awt.AWTIcon32_security_icon_interim16_png.security_icon_interim16_png);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sun.awt.AWTIcon32_security_icon_interim16_png cannot be resolved to a variable
----------
...
32. ERROR in /home/buildozer/aports/community/openjdk7/src/icedtea-2.6.3/openjdk-boot/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java (at line 438)
defaultIconInfo.add(new IconInfo(sun.awt.AWTIcon64_java_icon48_png.java_icon48_png));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sun.awt.AWTIcon64_java_icon48_png cannot be resolved to a variable
----------
```
This means that files AWTIcon*.java are missing, they haven't been
generated for some unknown reason.
I verified that the build works on edge with busybox 1.24.2-r11 (from v3.4).
The fix involves installing coreutils, so it's more a workaround, but
IcedTea's build system is very complex, so finding the root cause would be
very difficult and time consuming.
Note: Installing just GNU sed didn't help.