summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-8/0004-jdk-Allow-using-a-system-installed-libpng.patch
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2019-12-30 15:35:59 +0100
committerRichard Leitner <richard.leitner@skidata.com>2020-01-28 15:09:31 +0100
commit7d30e6ff7b8a54d67256ce528e8c4fd7e63f6b14 (patch)
tree398a12e3addb7470622d4cb2f98e7ad2dda02c5c /recipes-core/openjdk/patches-openjdk-8/0004-jdk-Allow-using-a-system-installed-libpng.patch
parent19b569281cc30e3aa94e772d6885cd340b1d1724 (diff)
downloadmeta-java-7d30e6ff7b8a54d67256ce528e8c4fd7e63f6b14.tar.gz
openjdk-8: update to latest ga version 242
As OpenJDK-8 is now tagging "ga" versions in addition to the "build" version the recipes are adapted to use those "ga" versions. All existing patches got re-applied and renamed. For better handling Hotspot patches now start at patch number 1001 and jdk patches at 2001. Furthermore architecture dependent patches are prefixed with the architecture they apply on. Following patches/hunks were completely dropped: - 0002-hotspot-fix-compilation-with-security-flags-enabled.patch got backported to hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/c40a28e54185 - 0011-hotspot-backport-patch-to-fix-misuses-of-strncpy-str.patch ostream.cpp:112 got fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f3108e56b502 - 0014-hotspot-zero-fix-undefined-behaviour-gcc-v8-fix.patch got backported to hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/ca4663e58916 - 0018-hotspot-Fix-debug-build-after-8062808-Turn-on-the-Wr.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/32bc598624bd - 0020-Enable-HotSpot-builds-on-5.x-Linux-kernels.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/5af8ec63c21c - openjdk8-add-missing-linker-flags.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f175513c2c3a - openjdk8-fix-shark-stdc++11.patch fixed in hotspot jdk8u - openjdk8-fix-libpng-neon-build.patch fixed in jdk https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/5d57817931e1 - aarch64-hotspot-fix-undefined-behaviour-gcc-v8-fix.patch got backported to hotspot jdk8u Following patches were newly added: - 0011-autoconf-fix-CC-with-arguments-detection.patch needed because of jdk8u commit "8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris" - 0012-autoconf-NativeCompilation-remove-sysroot.patch needed because of jdk8u commit "8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris" Additionally add UPDATING.md which describes the openjdk8 update process for this layer and update8checksums.sh, a script that updates the openjdk8 source archive checksums in the corresponding .inc files. Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/0004-jdk-Allow-using-a-system-installed-libpng.patch')
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/0004-jdk-Allow-using-a-system-installed-libpng.patch148
1 files changed, 0 insertions, 148 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/0004-jdk-Allow-using-a-system-installed-libpng.patch b/recipes-core/openjdk/patches-openjdk-8/0004-jdk-Allow-using-a-system-installed-libpng.patch
deleted file mode 100644
index 658ba32..0000000
--- a/recipes-core/openjdk/patches-openjdk-8/0004-jdk-Allow-using-a-system-installed-libpng.patch
+++ /dev/null
@@ -1,148 +0,0 @@
1From 549100e3e687d2c844eeebe22a7dcbf7ed50406e Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Tue, 27 Feb 2018 13:43:04 +0000
4Subject: [PATCH 4/9] jdk: Allow using a system-installed libpng
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Patch stolen (and some typos corrected) from debian patch,
10which 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
14Issues fixed on top of debian patch:
15 * the default when --with-libpng= is not given works
16 * using the bundled libpng works
17
18Upstream-Status: Backport
19Signed-off-by: André Draszik <andre.draszik@jci.com>
20---
21 common/autoconf/libraries.m4 | 41 ++++++++++++++++++++++
22 common/autoconf/spec.gmk.in | 1 +
23 jdk/make/lib/Awt2dLibraries.gmk | 12 +++++--
24 .../native/sun/awt/splashscreen/splashscreen_png.c | 3 +-
25 4 files changed, 52 insertions(+), 5 deletions(-)
26
27diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4
28index 3f5f69b1..e419a050 100644
29--- a/common/autoconf/libraries.m4
30+++ b/common/autoconf/libraries.m4
31@@ -664,6 +664,47 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
32 fi
33 AC_SUBST(USE_EXTERNAL_LIBGIF)
34
35+ ###############################################################################
36+ #
37+ # Check for the png library
38+ #
39+
40+ AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng],
41+ [use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
42+
43+ AC_CHECK_LIB(png, png_sig_cmp,
44+ [ LIBPNG_FOUND=yes ],
45+ [ LIBPNG_FOUND=no ])
46+
47+ AC_MSG_CHECKING([for which libpng to use])
48+
49+ # default is bundled
50+ DEFAULT_LIBPNG=bundled
51+
52+ #
53+ # if user didn't specify, use DEFAULT_LIBPNG
54+ #
55+ if test "x${with_libpng}" = "x"; then
56+ with_libpng=${DEFAULT_LIBPNG}
57+ fi
58+
59+
60+ if test "x${with_libpng}" = "xbundled"; then
61+ USE_EXTERNAL_LIBPNG=false
62+ AC_MSG_RESULT([bundled])
63+ elif test "x${with_libpng}" = "xsystem"; then
64+ if test "x${LIBPNG_FOUND}" = "xyes"; then
65+ USE_EXTERNAL_LIBPNG=true
66+ AC_MSG_RESULT([system])
67+ else
68+ AC_MSG_RESULT([system not found])
69+ AC_MSG_ERROR([--with-libpng=system specified, but no libpng found!])
70+ fi
71+ else
72+ AC_MSG_ERROR([Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'])
73+ fi
74+ AC_SUBST(USE_EXTERNAL_LIBPNG)
75+
76 ###############################################################################
77 #
78 # Check for the zlib library
79diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in
80index 1c418f29..2c802c0a 100644
81--- a/common/autoconf/spec.gmk.in
82+++ b/common/autoconf/spec.gmk.in
83@@ -567,6 +567,7 @@ endif
84 ENABLE_JFR=@ENABLE_JFR@
85 ENABLE_INTREE_EC=@ENABLE_INTREE_EC@
86 USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
87+USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@
88 USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
89 USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
90 LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
91diff --git a/jdk/make/lib/Awt2dLibraries.gmk b/jdk/make/lib/Awt2dLibraries.gmk
92index 8872a8e8..c577951a 100644
93--- a/jdk/make/lib/Awt2dLibraries.gmk
94+++ b/jdk/make/lib/Awt2dLibraries.gmk
95@@ -1219,7 +1219,6 @@ endif
96 ifndef BUILD_HEADLESS_ONLY
97 LIBSPLASHSCREEN_DIRS := \
98 $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
99- $(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
100 $(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
101
102 ifeq ($(USE_EXTERNAL_LIBGIF), true)
103@@ -1236,6 +1235,13 @@ ifndef BUILD_HEADLESS_ONLY
104 LIBJPEG_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg
105 endif
106
107+ ifeq ($(USE_EXTERNAL_LIBPNG), true)
108+ LIBPNG_LDFLAGS := -lpng
109+ else
110+ LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/libpng
111+ LIBPNG_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/libpng
112+ endif
113+
114 ifneq ($(OPENJDK_TARGET_OS), macosx)
115 LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
116 else
117@@ -1297,12 +1303,12 @@ ifndef BUILD_HEADLESS_ONLY
118 LANG := C, \
119 OPTIMIZATION := LOW, \
120 CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
121- $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS), \
122+ $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(LIBPNG_CFLAGS), \
123 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
124 LDFLAGS := $(LDFLAGS_JDKLIB) \
125 $(call SET_SHARED_LIBRARY_ORIGIN), \
126 LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) \
127- $(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS), \
128+ $(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS) $(LIBPNG_LDFLAGS), \
129 LDFLAGS_SUFFIX_solaris := -lc, \
130 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
131 RC_FLAGS := $(RC_FLAGS) \
132diff --git a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c
133index 3599433e..5bf002ea 100644
134--- a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c
135+++ b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c
136@@ -25,8 +25,7 @@
137
138 #include "splashscreen_impl.h"
139
140-#include "../libpng/png.h"
141-
142+#include <png.h>
143 #include <setjmp.h>
144
145 #define SIG_BYTES 8
146--
1472.16.2
148