|
1 Updating libpng in OpenJDK |
|
2 |
|
3 1) Update the src/java.desktop/share/legal/libpng.md file. |
|
4 Usually this is just a matter of updating the version at the top, |
|
5 and in the embedded text, and extending the copyright date. |
|
6 |
|
7 The updated info comes from the LICENSE file. |
|
8 |
|
9 2) Copy LICENSE, README, and CHANGES from the new version into OpenJDK's |
|
10 libpng source directory |
|
11 |
|
12 3) OpenJDK includes just a subset of the files, since we use it only for reading. |
|
13 Copy only the same .c and .h files as are already there and re-apply the |
|
14 GPL v2 + CP header to all the updated files. These files also have a special |
|
15 note referencing the previous license. Restore everything as it was. |
|
16 You can either do this with a clever-enough script, or manually copy/paste. |
|
17 There are 18 files to update so either is do-able. |
|
18 |
|
19 4) Special and careful handling of pnglibconf.h |
|
20 OpenJDK has a heavily modified copy of pnglibconf.h. |
|
21 This is the trickiest part of the whole exercise. |
|
22 This file is generated by png at build time. |
|
23 Except for the dates and version, you should generally not need to update |
|
24 OpenJDK's copy unless the new version of PNG has added rquired new #defines |
|
25 that cause problems building. |
|
26 You can run configure && make on the downloaded source and compare but we |
|
27 do not want to enable any of the WRITE support, and there are many more |
|
28 modifications as well. |
|
29 So do NOT just copy in a file from the new libpng. |
|
30 The header may be the only thing you want to update. |
|
31 Also this file has a special "THIS FILE WAS MODIFIED BY ORACLE, INC." |
|
32 line in the GPL header. |
|
33 So lots of reasons to not copy over the new version, |
|
34 and instead just tweak the existing one. |
|
35 |
|
36 5) Run scripts to expand tabs and remove trailing white space from source files. |
|
37 |
|
38 Use expand to remove tabs |
|
39 expand ${f} > ${f}.tmp |
|
40 mv ${f}.tmp $f |
|
41 |
|
42 Use sed to remove trailing white space |
|
43 sed -e 's/[ ]* $//' ${f} > ${f}.tmp |
|
44 mv ${f}.tmp $f |
|
45 |
|
46 6) As with all native code, run it through the official build systems, in case |
|
47 the updated code trigger any fatal warnings with the official compilers. |
|
48 |
|
49 7) Run the splashscreen jtreg tests. |