package/openjdk: install header files to staging
authorAdam Duskett <Aduskett@gmail.com>
Tue, 16 Jun 2020 00:12:43 +0000 (17:12 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 17 Jun 2020 20:01:20 +0000 (22:01 +0200)
These files are necessary for C or C++ programs to use the native java
interface (JNI.)

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/openjdk/openjdk.mk

index f3a4a616ebb38b572c1fcbf3a919940b0a632e03..22c9a777b5d5abe75efffb35287f194eeee141e9 100644 (file)
@@ -20,6 +20,7 @@ endif
 
 OPENJDK_LICENSE = GPL-2.0+ with exception
 OPENJDK_LICENSE_FILES = LICENSE
+OPENJDK_INSTALL_STAGING = YES
 
 # OpenJDK requires Alsa, cups, and X11 even for a headless build.
 # host-zip is needed for the zip executable.
@@ -145,6 +146,12 @@ define OPENJDK_INSTALL_TARGET_CMDS
        cd $(TARGET_DIR)/usr/bin && ln -snf ../..$(OPENJDK_INSTALL_BASE)/bin/* .
 endef
 
+define OPENJDK_INSTALL_STAGING_CMDS
+       mkdir -p $(STAGING_DIR)/usr/include/jvm
+       cp -dpfr $(@D)/build/linux-*-release/jdk/include/* \
+               $(STAGING_DIR)/usr/include/jvm
+endef
+
 # Demos and includes are not needed on the target
 ifeq ($(BR2_PACKAGE_OPENJDK_FULL_JDK),y)
 define OPENJDK_REMOVE_UNEEDED_JDK_DIRECTORIES