From bac3b9acee5110390d15d38dacdb1622e31b2238 Mon Sep 17 00:00:00 2001 From: Jens Rehsack Date: Tue, 8 Dec 2015 14:52:51 +0100 Subject: openjdk-8: add recipes for openjdk-8 and openjre-8 This adds openjdk-8 for native and target builds and allows a stripped openjre-8 being built as well instead of trying to cherry-pick jre components from jdk-image. The recipes allow building openjdk-8 with or without: * x11 * cups * alsa/pulseaudio and let packager enable unlimited-crypto, if desired. To support certificate based java libraries, cacerts is created based on ca-certificates from OE-core. Since there can be only one PROVIDES for virtual/java-native and virtual/javac-native, move the provides to openjdk-8-native (I think everyone agrees it's a better choice than ecj-bootstrap-native). Plus: Applying a fix from openjdk-9 repository which fixes build issues using gcc5 Signed-off-by: Jens Rehsack Signed-off-by: Maxin B. John --- .../openjdk8-no-unused-deps.patch | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 recipes-core/openjdk/patches-openjdk-8/openjdk8-no-unused-deps.patch (limited to 'recipes-core/openjdk/patches-openjdk-8/openjdk8-no-unused-deps.patch') diff --git a/recipes-core/openjdk/patches-openjdk-8/openjdk8-no-unused-deps.patch b/recipes-core/openjdk/patches-openjdk-8/openjdk8-no-unused-deps.patch new file mode 100644 index 0000000..cd42544 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/openjdk8-no-unused-deps.patch @@ -0,0 +1,94 @@ +--- jdk/make/lib/Awt2dLibraries.gmk.orig 2015-09-03 15:05:21.429981848 +0200 ++++ jdk/make/lib/Awt2dLibraries.gmk 2015-09-03 15:05:44.705981936 +0200 +@@ -235,6 +235,10 @@ + LIBAWT_DIRS += $(JDK_TOPDIR)/src/aix/porting + endif + ++ifdef BUILD_HEADLESS_ONLY ++LIBAWT_CFLAGS += -DHEADLESS=true ++endif ++ + LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES \ + $(X_CFLAGS) \ + $(foreach dir, $(LIBAWT_DIRS), -I$(dir)) +@@ -1126,17 +1130,28 @@ + -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks + endif + +- LIBAWT_HEADLESS_FILES := \ +- awt_Font.c \ +- HeadlessToolkit.c \ +- fontpath.c \ +- VDrawingArea.c \ ++ ifndef X11_NOT_NEEDED ++ LIBAWT_HEADLESS_X11_FILES := \ + X11Color.c \ + X11Renderer.c \ + X11PMBlitLoops.c \ + X11SurfaceData.c \ + X11FontScaler_md.c \ + X11TextRenderer_md.c \ ++ GLXGraphicsConfig.c \ ++ GLXSurfaceData.c ++ endif ++ ++ ifndef CUPS_NOT_NEEDED ++ LIBAWT_HEADLESS_CUPS_FILES := \ ++ CUPSfuncs.c ++ endif ++ ++ LIBAWT_HEADLESS_FILES := \ ++ awt_Font.c \ ++ HeadlessToolkit.c \ ++ fontpath.c \ ++ VDrawingArea.c \ + OGLBlitLoops.c \ + OGLBufImgOps.c \ + OGLContext.c \ +@@ -1149,10 +1164,9 @@ + OGLSurfaceData.c \ + OGLTextRenderer.c \ + OGLVertexCache.c \ +- GLXGraphicsConfig.c \ +- GLXSurfaceData.c \ + AccelGlyphCache.c \ +- CUPSfuncs.c ++ $(LIBAWT_HEADLESS_X11_FILES) \ ++ $(LIBAWT_HEADLESS_CUPS_FILES) + + LIBAWT_HEADLESS_REORDER := + ifeq ($(OPENJDK_TARGET_OS), solaris) +--- jdk/make/CompileNativeLibraries.gmk.orig 2015-08-24 13:35:55.320678845 +0200 ++++ jdk/make/CompileNativeLibraries.gmk 2015-08-24 13:36:22.776678949 +0200 +@@ -85,7 +85,9 @@ + + include lib/Awt2dLibraries.gmk + ++ifndef BUILD_SOUNDLESS_ONLY + include lib/SoundLibraries.gmk ++endif + + # Include the corresponding custom file, if present. + -include $(CUSTOM_MAKE_DIR)/CompileNativeLibraries.gmk +--- jdk/src/solaris/native/sun/awt/jawt.c.orig 2015-08-24 14:12:29.376687104 +0200 ++++ jdk/src/solaris/native/sun/awt/jawt.c 2015-08-24 14:16:20.420687974 +0200 +@@ -33,7 +33,7 @@ + */ + JNIEXPORT jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt) + { +-#if defined(JAVASE_EMBEDDED) && defined(HEADLESS) ++#if defined(JAVASE_EMBEDDED) || defined(HEADLESS) + /* there are no AWT libs available at all */ + return JNI_FALSE; + #else +--- jdk/src/solaris/native/sun/awt/utility/rect.h.orig 2015-09-03 14:45:40.717977403 +0200 ++++ jdk/src/solaris/native/sun/awt/utility/rect.h 2015-09-03 14:46:46.337977650 +0200 +@@ -28,7 +28,7 @@ + #ifndef _AWT_RECT_H + #define _AWT_RECT_H + +-#ifndef MACOSX ++#if !(defined(MACOSX) || defined(HEADLESS)) + #include + typedef XRectangle RECT_T; + #else -- cgit v1.2.3-54-g00ecf