From b331dec1d8c18e48b39b3c9e5d0c547e066f1d15 Mon Sep 17 00:00:00 2001 From: Jens Rehsack Date: Thu, 15 Oct 2015 13:52:09 +0200 Subject: icedtea7-native: compiling without x11 Allow building icedtea7 without any X11 dependency. This affects the native part only which is required to bootstrap openjdk-8-native for cross-compiling openjdk-8, but should be adoptable for cross-compiled recipe as well as for openjdk-6. Signed-off-by: Jens Rehsack Signed-off-by: Otavio Salvador --- recipes-core/icedtea/icedtea7-native.inc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'recipes-core/icedtea/icedtea7-native.inc') diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc index b29fd34..69dd0ae 100644 --- a/recipes-core/icedtea/icedtea7-native.inc +++ b/recipes-core/icedtea/icedtea7-native.inc @@ -5,13 +5,18 @@ INC_PR = "r1" DEPENDS = "virtual/javac-native virtual/java-native classpath-native \ rhino-native ant-native libxslt-native attr-native \ - libx11-native xproto-native libxt-native libxext-native libxrender-native \ giflib-native jpeg-native libpng-native \ glib-2.0-native freetype-native zlib-native \ - fontconfig-native zip-native alsa-lib-native \ + fontconfig-native zip-native \ unzip-native \ " +PACKAGECONFIG ??= "" +PACKAGECONFIG[x11] = ",--disable-headful,libx11-native xproto-native libxt-native libxext-native libxrender-native" + +OEMAKE_BUILD_HEADLESS_ONLY = "${@base_contains('PACKAGECONFIG', 'x11', '', 'BUILD_HEADLESS_ONLY=1', d)}" +CFLAGS_append = "${@base_contains('PACKAGECONFIG', 'x11', '', ' -DHEADLESS=true', d)}" + inherit native java autotools JAVA_HOME[unexport] = "1" @@ -27,6 +32,7 @@ SRC_URI = " \ ${LANGTOOLS_URI} \ ${ICEDTEA_PATCHES} \ ${OPENJDK_PATCHES} \ + file://allow-headless-build.patch;striplevel=0 \ " S = "${WORKDIR}/${ICEDTEA}" @@ -124,6 +130,8 @@ do_configure_prepend() { done } +POST_CONFIGURE_CLEAN_X11 = "${@base_contains('PACKAGECONFIG', 'x11', '', 'rm openjdk*/jdk/src/solaris/classes/sun/awt/X11/*.java', d)}" + do_configure_append() { oe_runmake patch-fsg @@ -143,6 +151,7 @@ do_configure_append() { -e"s|g++\$(GCC_SUFFIX)|${CXX}|" \ $F done + ${POST_CONFIGURE_CLEAN_X11} oe_runmake patch-boot } @@ -152,6 +161,7 @@ EXTRA_OEMAKE = ' \ OE_CXXFLAGS="${CXXFLAGS}" \ OE_LDFLAGS="${LDFLAGS}" \ ZIPEXE="${STAGING_BINDIR_NATIVE}/zip" \ + ${OEMAKE_BUILD_HEADLESS_ONLY} \ ' do_compile() { -- cgit v1.2.3-54-g00ecf