All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/2] package/openjdk-bootstrap: new package
@ 2017-10-03 20:19 Bernd Kuhls
  2017-10-03 20:19 ` [Buildroot] [PATCH v2 2/2] package/kodi: use package host-openjdk-bootstrap to provide JDK Bernd Kuhls
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Kuhls @ 2017-10-03 20:19 UTC (permalink / raw)
  To: buildroot

This package provides a binary installation of the JDK created by
the BLFS (Beyond Linux From Scratch) editors.

It is meant to be used by Kodi which currently depends on a JDK
installation provided by the host machine.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: no changes

 DEVELOPERS                                       |  1 +
 package/Config.in.host                           |  1 +
 package/openjdk-bootstrap/Config.in.host         | 11 +++++++++++
 package/openjdk-bootstrap/openjdk-bootstrap.hash |  4 ++++
 package/openjdk-bootstrap/openjdk-bootstrap.mk   | 25 ++++++++++++++++++++++++
 5 files changed, 42 insertions(+)
 create mode 100644 package/openjdk-bootstrap/Config.in.host
 create mode 100644 package/openjdk-bootstrap/openjdk-bootstrap.hash
 create mode 100644 package/openjdk-bootstrap/openjdk-bootstrap.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 43ad9e5f8a..f2eb3557a1 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -266,6 +266,7 @@ F:	package/mesa3d/
 F:	package/minidlna/
 F:	package/mjpg-streamer/
 F:	package/mplayer/
+F:	package/openjdk-bootstrap/
 F:	package/perl-crypt-openssl-random/
 F:	package/perl-crypt-openssl-rsa/
 F:	package/perl-digest-sha1/
diff --git a/package/Config.in.host b/package/Config.in.host
index 679fe22a52..90fa5af5fa 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -30,6 +30,7 @@ menu "Host utilities"
 	source "package/mtools/Config.in.host"
 	source "package/mxsldr/Config.in.host"
 	source "package/omap-u-boot-utils/Config.in.host"
+	source "package/openjdk-bootstrap/Config.in.host"
 	source "package/openocd/Config.in.host"
 	source "package/opkg-utils/Config.in.host"
 	source "package/parted/Config.in.host"
diff --git a/package/openjdk-bootstrap/Config.in.host b/package/openjdk-bootstrap/Config.in.host
new file mode 100644
index 0000000000..e769699dd4
--- /dev/null
+++ b/package/openjdk-bootstrap/Config.in.host
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_HOST_OPENJDK_BOOTSTRAP
+	bool "host openjdk bootstrap"
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	help
+	  OpenJDK (Open Java Development Kit) is a free and open source
+	  implementation of the Java Platform, Standard Edition
+	  This package provides a binary installation of the JDK created
+	  by the BLFS editors.
+
+	  http://openjdk.java.net
+	  http://www.linuxfromscratch.org/blfs/view/svn/general/java.html
diff --git a/package/openjdk-bootstrap/openjdk-bootstrap.hash b/package/openjdk-bootstrap/openjdk-bootstrap.hash
new file mode 100644
index 0000000000..7fa65592d6
--- /dev/null
+++ b/package/openjdk-bootstrap/openjdk-bootstrap.hash
@@ -0,0 +1,4 @@
+# Locally computed
+sha256 0321057130cad789ed14d7e923e69c4def6ad7470d167116f104008a079b0215  OpenJDK-1.8.0.141-i686-bin.tar.xz
+sha256 40051afdb57ed798a910ff5b1a5bbef555481bcf76f0423686861da983871e7d  OpenJDK-1.8.0.141-x86_64-bin.tar.xz
+sha256 4b9abebc4338048a7c2dc184e9f800deb349366bdf28eb23c2677a77b4c87726  LICENSE
diff --git a/package/openjdk-bootstrap/openjdk-bootstrap.mk b/package/openjdk-bootstrap/openjdk-bootstrap.mk
new file mode 100644
index 0000000000..a8a6447712
--- /dev/null
+++ b/package/openjdk-bootstrap/openjdk-bootstrap.mk
@@ -0,0 +1,25 @@
+################################################################################
+#
+# openjdk-bootstrap
+#
+################################################################################
+
+OPENJDK_BOOTSTRAP_VERSION = 1.8.0.141
+OPENJDK_BOOTSTRAP_SITE = http://anduin.linuxfromscratch.org/BLFS/OpenJDK/OpenJDK-$(OPENJDK_BOOTSTRAP_VERSION)
+ifeq ($(BR2_HOSTARCH),x86)
+OPENJDK_BOOTSTRAP_SOURCE = OpenJDK-$(OPENJDK_BOOTSTRAP_VERSION)-i686-bin.tar.xz
+else
+OPENJDK_BOOTSTRAP_SOURCE = OpenJDK-$(OPENJDK_BOOTSTRAP_VERSION)-x86_64-bin.tar.xz
+endif
+OPENJDK_BOOTSTRAP_LICENSE = GPL-2.0+ with exception
+OPENJDK_BOOTSTRAP_LICENSE_FILES = LICENSE
+
+# Also provided to other packages
+OPENJDK_BOOTSTRAP_BOOTSTRAP_DIR = $(HOST_DIR)/opt/jdk-bootstrap/
+
+define HOST_OPENJDK_BOOTSTRAP_INSTALL_CMDS
+	mkdir -p $(OPENJDK_BOOTSTRAP_BOOTSTRAP_DIR)
+	cp -r $(@D)/* $(OPENJDK_BOOTSTRAP_BOOTSTRAP_DIR)
+endef
+
+$(eval $(host-generic-package))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/kodi: use package host-openjdk-bootstrap to provide JDK
  2017-10-03 20:19 [Buildroot] [PATCH v2 1/2] package/openjdk-bootstrap: new package Bernd Kuhls
@ 2017-10-03 20:19 ` Bernd Kuhls
  2017-10-22 14:59   ` Arnout Vandecappelle
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Kuhls @ 2017-10-03 20:19 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: removed BR2_PACKAGE_KODI_OPENJDK (Baruch)

 package/kodi/Config.in | 3 ++-
 package/kodi/kodi.mk   | 7 +++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/kodi/Config.in b/package/kodi/Config.in
index fc7eafa41a..8bce77d7e4 100644
--- a/package/kodi/Config.in
+++ b/package/kodi/Config.in
@@ -46,7 +46,8 @@ menuconfig BR2_PACKAGE_KODI
 	depends on BR2_PACKAGE_KODI_ARCH_SUPPORTS
 	depends on BR2_PACKAGE_PYTHON
 	depends on !BR2_PACKAGE_PYTHON_PYC_ONLY
-	select BR2_NEEDS_HOST_JAVA
+	select BR2_NEEDS_HOST_JAVA if !(BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86")
+	select BR2_PACKAGE_HOST_OPENJDK_BOOTSTRAP if (BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86")
 	select BR2_PACKAGE_BZIP2
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_FFMPEG
diff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk
index 28fe256b65..9a3247dbbc 100644
--- a/package/kodi/kodi.mk
+++ b/package/kodi/kodi.mk
@@ -156,6 +156,13 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
 KODI_CXX_FLAGS += -latomic
 endif
 
+ifeq ($(BR2_PACKAGE_HOST_OPENJDK_BOOTSTRAP),y)
+KODI_CONF_ENV = \
+	JAVA_HOME=$(HOST_OPENJDK_BOOTSTRAP_DIR) \
+	PATH=$(HOST_OPENJDK_BOOTSTRAP_DIR)/bin:$(BR_PATH)
+KODI_DEPENDENCIES += host-openjdk-bootstrap
+endif
+
 ifeq ($(BR2_PACKAGE_KODI_MYSQL),y)
 KODI_CONF_OPTS += -DENABLE_MYSQLCLIENT=ON
 KODI_DEPENDENCIES += mysql
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/kodi: use package host-openjdk-bootstrap to provide JDK
  2017-10-03 20:19 ` [Buildroot] [PATCH v2 2/2] package/kodi: use package host-openjdk-bootstrap to provide JDK Bernd Kuhls
@ 2017-10-22 14:59   ` Arnout Vandecappelle
  0 siblings, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2017-10-22 14:59 UTC (permalink / raw)
  To: buildroot

 Hi Bernd,

On 03-10-17 22:19, Bernd Kuhls wrote:
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> ---
> v2: removed BR2_PACKAGE_KODI_OPENJDK (Baruch)
> 
>  package/kodi/Config.in | 3 ++-
>  package/kodi/kodi.mk   | 7 +++++++
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/package/kodi/Config.in b/package/kodi/Config.in
> index fc7eafa41a..8bce77d7e4 100644
> --- a/package/kodi/Config.in
> +++ b/package/kodi/Config.in
> @@ -46,7 +46,8 @@ menuconfig BR2_PACKAGE_KODI
>  	depends on BR2_PACKAGE_KODI_ARCH_SUPPORTS
>  	depends on BR2_PACKAGE_PYTHON
>  	depends on !BR2_PACKAGE_PYTHON_PYC_ONLY
> -	select BR2_NEEDS_HOST_JAVA
> +	select BR2_NEEDS_HOST_JAVA if !(BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86")
> +	select BR2_PACKAGE_HOST_OPENJDK_BOOTSTRAP if (BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86")

 So basically, what this series does is to allow you to build Kodi on a distro
that doesn't have Java installed, by downloading a Java binary, instead of
telling the user that they should install Java on the host.

 Although it indeed does make it simpler for a user to build Kodi in case they
don't have Java installed, I wonder if it really is worth it. It's adding some
complexity, it only works for x86 and x86_64 anyway, and I'm not sure it's even
going to work on all hosts: the binaries are linked with glibc, libX11, etc.
etc. and the build machines where you need this the most (old distros, funky
stuff like Alpine) might not have the correct libraries installed...

 Therefore, I've marked this series as Rejected. If you have good reasons to
have this and you can show that it does work on funky build machines, please
resubmit.

 Regards,
 Arnout


>  	select BR2_PACKAGE_BZIP2
>  	select BR2_PACKAGE_EXPAT
>  	select BR2_PACKAGE_FFMPEG
> diff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk
> index 28fe256b65..9a3247dbbc 100644
> --- a/package/kodi/kodi.mk
> +++ b/package/kodi/kodi.mk
> @@ -156,6 +156,13 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
>  KODI_CXX_FLAGS += -latomic
>  endif
>  
> +ifeq ($(BR2_PACKAGE_HOST_OPENJDK_BOOTSTRAP),y)
> +KODI_CONF_ENV = \
> +	JAVA_HOME=$(HOST_OPENJDK_BOOTSTRAP_DIR) \
> +	PATH=$(HOST_OPENJDK_BOOTSTRAP_DIR)/bin:$(BR_PATH)
> +KODI_DEPENDENCIES += host-openjdk-bootstrap
> +endif
> +
>  ifeq ($(BR2_PACKAGE_KODI_MYSQL),y)
>  KODI_CONF_OPTS += -DENABLE_MYSQLCLIENT=ON
>  KODI_DEPENDENCIES += mysql
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-22 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-03 20:19 [Buildroot] [PATCH v2 1/2] package/openjdk-bootstrap: new package Bernd Kuhls
2017-10-03 20:19 ` [Buildroot] [PATCH v2 2/2] package/kodi: use package host-openjdk-bootstrap to provide JDK Bernd Kuhls
2017-10-22 14:59   ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.