src/java.desktop/share/native/libsplashscreen/libpng/UPDATING.txt
author prr
Tue, 31 Jul 2018 14:03:39 -0700
changeset 51304 66d9993dd4ad
permissions -rw-r--r--
8208353: Upgrade JDK 11 to libpng 1.6.35 Reviewed-by: jdv, kaddepalli

Updating libpng in OpenJDK

1) Update the src/java.desktop/share/legal/libpng.md file.
Usually this is just a matter of updating the version at the top,
and in the embedded text, and extending the copyright date.

The updated info comes from the LICENSE file.

2) Copy LICENSE, README, and CHANGES from the new version into OpenJDK's
libpng source directory

3) OpenJDK includes just a subset of the files, since we use it only for reading.
Copy only the same .c and .h files as are already there and re-apply the
GPL v2 + CP header to all the updated files. These files also have a special
note referencing the previous license. Restore everything as it was.
You can either do this with a clever-enough script, or manually copy/paste.
There are 18 files to update so either is do-able.

4) Special and careful handling of pnglibconf.h
OpenJDK has a heavily modified copy of pnglibconf.h.
This is the trickiest part of the whole exercise.
This file is generated by png at build time.
Except for the dates and version, you should generally not need to update
OpenJDK's copy unless the new version of PNG has added rquired new #defines
that cause problems building.
You can run configure && make on the downloaded source and compare but we
do not want to enable any of the WRITE support, and there are many more
modifications as well.
So do NOT just copy in a file from the new libpng.
The header may be the only thing you want to update.
Also this file has a special "THIS FILE WAS MODIFIED BY ORACLE, INC."
line in the GPL header.
So lots of reasons to not copy over the new version,
and instead just tweak the existing one.

5) Run scripts to expand tabs and remove trailing white space from source files.

Use expand to remove tabs
expand ${f} > ${f}.tmp
mv ${f}.tmp $f

Use sed to remove trailing white space
sed -e 's/[ ]* $//' ${f} > ${f}.tmp
mv ${f}.tmp $f

6) As with all native code, run it through the official build systems, in case
the updated code trigger any fatal warnings with the official compilers.

7) Run the splashscreen jtreg tests.