diff options
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/2003-jdk-Allow-using-a-system-installed-libpng.patch')
-rw-r--r-- | recipes-core/openjdk/patches-openjdk-8/2003-jdk-Allow-using-a-system-installed-libpng.patch | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/2003-jdk-Allow-using-a-system-installed-libpng.patch b/recipes-core/openjdk/patches-openjdk-8/2003-jdk-Allow-using-a-system-installed-libpng.patch new file mode 100644 index 0000000..13d3045 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/2003-jdk-Allow-using-a-system-installed-libpng.patch | |||
@@ -0,0 +1,83 @@ | |||
1 | From bdf8cb302ab7c8f11b676f93da482cd4a9405ce4 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com> | ||
3 | Date: Tue, 27 Feb 2018 13:43:04 +0000 | ||
4 | Subject: [PATCH 2003/2008] jdk: Allow using a system-installed libpng | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Patch stolen (and some typos corrected) from debian patch, | ||
10 | which itself was a backport from: | ||
11 | http://hg.openjdk.java.net/jdk9/jdk9/rev/bfc1c131e540 | ||
12 | http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/5e503831b142 | ||
13 | |||
14 | Issues fixed on top of debian patch: | ||
15 | * the default when --with-libpng= is not given works | ||
16 | * using the bundled libpng works | ||
17 | |||
18 | Upstream-Status: Backport | ||
19 | Signed-off-by: André Draszik <andre.draszik@jci.com> | ||
20 | Signed-off-by: Richard Leitner <richard.leitner@skidata.com> | ||
21 | --- | ||
22 | make/lib/Awt2dLibraries.gmk | 12 +++++++++--- | ||
23 | .../native/sun/awt/splashscreen/splashscreen_png.c | 3 +-- | ||
24 | 2 files changed, 10 insertions(+), 5 deletions(-) | ||
25 | |||
26 | diff --git a/jdk/make/lib/Awt2dLibraries.gmk b/jdk/make/lib/Awt2dLibraries.gmk | ||
27 | index 12b9da11d..cd8b94cd8 100644 | ||
28 | --- a/jdk/make/lib/Awt2dLibraries.gmk | ||
29 | +++ b/jdk/make/lib/Awt2dLibraries.gmk | ||
30 | @@ -1148,7 +1148,6 @@ endif | ||
31 | ifndef BUILD_HEADLESS_ONLY | ||
32 | LIBSPLASHSCREEN_DIRS := \ | ||
33 | $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \ | ||
34 | - $(JDK_TOPDIR)/src/share/native/sun/awt/libpng \ | ||
35 | $(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen | ||
36 | |||
37 | ifeq ($(USE_EXTERNAL_LIBGIF), true) | ||
38 | @@ -1165,6 +1164,13 @@ ifndef BUILD_HEADLESS_ONLY | ||
39 | LIBJPEG_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg | ||
40 | endif | ||
41 | |||
42 | + ifeq ($(USE_EXTERNAL_LIBPNG), true) | ||
43 | + LIBPNG_LDFLAGS := -lpng | ||
44 | + else | ||
45 | + LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/libpng | ||
46 | + LIBPNG_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/libpng | ||
47 | + endif | ||
48 | + | ||
49 | ifneq ($(OPENJDK_TARGET_OS), macosx) | ||
50 | LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen | ||
51 | else | ||
52 | @@ -1222,12 +1228,12 @@ ifndef BUILD_HEADLESS_ONLY | ||
53 | LANG := C, \ | ||
54 | OPTIMIZATION := LOW, \ | ||
55 | CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \ | ||
56 | - $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS), \ | ||
57 | + $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(LIBPNG_CFLAGS), \ | ||
58 | MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \ | ||
59 | LDFLAGS := $(LDFLAGS_JDKLIB) \ | ||
60 | $(call SET_SHARED_LIBRARY_ORIGIN), \ | ||
61 | LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) \ | ||
62 | - $(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS), \ | ||
63 | + $(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS) $(LIBPNG_LDFLAGS), \ | ||
64 | LDFLAGS_SUFFIX_solaris := -lc, \ | ||
65 | VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ | ||
66 | RC_FLAGS := $(RC_FLAGS) \ | ||
67 | diff --git a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c | ||
68 | index 3599433e4..5bf002ea1 100644 | ||
69 | --- a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c | ||
70 | +++ b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c | ||
71 | @@ -25,8 +25,7 @@ | ||
72 | |||
73 | #include "splashscreen_impl.h" | ||
74 | |||
75 | -#include "../libpng/png.h" | ||
76 | - | ||
77 | +#include <png.h> | ||
78 | #include <setjmp.h> | ||
79 | |||
80 | #define SIG_BYTES 8 | ||
81 | -- | ||
82 | 2.24.1 | ||
83 | |||