Path: blob/master/src/java.desktop/share/native/libsplashscreen/libpng/UPDATING.txt
41154 views
Updating libpng in OpenJDK121) Update the src/java.desktop/share/legal/libpng.md file.3Usually this is just a matter of updating the version at the top,4and in the embedded text, and extending the copyright date.56The updated info comes from the LICENSE file.782) Copy LICENSE, README, and CHANGES from the new version into OpenJDK's9libpng source directory10113) OpenJDK includes just a subset of the files, since we use it only for reading.12Copy only the same .c and .h files as are already there and re-apply the13GPL v2 + CP header to all the updated files. These files also have a special14note referencing the previous license. Restore everything as it was.15You can either do this with a clever-enough script, or manually copy/paste.16There are 18 files to update so either is do-able.17184) Special and careful handling of pnglibconf.h19OpenJDK has a heavily modified copy of pnglibconf.h.20This is the trickiest part of the whole exercise.21This file is generated by png at build time.22Except for the dates and version, you should generally not need to update23OpenJDK's copy unless the new version of PNG has added rquired new #defines24that cause problems building.25You can run configure && make on the downloaded source and compare but we26do not want to enable any of the WRITE support, and there are many more27modifications as well.28So do NOT just copy in a file from the new libpng.29The header may be the only thing you want to update.30Also this file has a special "THIS FILE WAS MODIFIED BY ORACLE, INC."31line in the GPL header.32So lots of reasons to not copy over the new version,33and instead just tweak the existing one.34355) Run scripts to expand tabs and remove trailing white space from source files.3637Use expand to remove tabs38expand ${f} > ${f}.tmp39mv ${f}.tmp $f4041Use sed to remove trailing white space42sed -e 's/[ ]* $//' ${f} > ${f}.tmp43mv ${f}.tmp $f44456) As with all native code, run it through the official build systems, in case46the updated code trigger any fatal warnings with the official compilers.47487) Run the splashscreen jtreg tests.495051