Skip to contentSkip to conversation

package/openjdk: install header files to staging

PATCH New aduskett at gmail.com 2 participants 2 messages Jun 16, 2020 – Jun 17, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/openjdk: install header files to staging

From: Adam Duskett <[email protected]>

These files are necessary for C or C++ programs to use the native java interface (JNI.)

---
 package/openjdk/openjdk.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/openjdk/openjdk.mk +7 -0
index f3a4a616eb..22c9a777b5 100644
@@ -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
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/1 package/openjdk: install header files to staging

Quoted 9 lines · On Mon, 15 Jun 2020 17:12:43 -0700 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

These files are necessary for C or C++ programs to use the native java interface (JNI.)

---
 package/openjdk/openjdk.mk | 7 +++++++
 1 file changed, 7 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com