Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 783027 - dev-java/icedtea-web-1.8.4-r1 does not build if system JDK is java-11 (PATCH)
Summary: dev-java/icedtea-web-1.8.4-r1 does not build if system JDK is java-11 (PATCH)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks: jdk11
  Show dependency tree
 
Reported: 2021-04-15 16:59 UTC by Joakim Tjernlund
Modified: 2022-06-20 07:41 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2021-04-15 16:59:53 UTC
icedtea-web tries to specify openjdk:1.8 in its BDEPEND but this is
not enough to force java-8 during build

This patch(inline) fixes it:

--- a/icedtea-web-1.8.4-r1.ebuild	2021-04-06 22:09:15.000000000 +0200
+++ b/icedtea-web-1.8.4-r1.ebuild	2021-04-15 18:47:51.548876573 +0200
@@ -6,7 +6,7 @@
 README_GENTOO_SUFFIX="-r2"
 CRATES="dunce-0.1.1"
 
-inherit autotools bash-completion-r1 cargo readme.gentoo-r1 xdg-utils
+inherit autotools bash-completion-r1 cargo java-pkg-2 readme.gentoo-r1 xdg-utils
 
 DESCRIPTION="FOSS Java browser plugin and Web Start implementation"
 HOMEPAGE="https://github.com/AdoptOpenJDK/IcedTea-Web"
@@ -29,9 +29,11 @@
 	doc? ( sys-devel/bc )
 "
 
+DEPEND="virtual/jdk:1.8"
+
 RDEPEND="
 	>=app-eselect/eselect-java-0.2.0
-	>=virtual/jre-1.8
+	>=virtual/jre-1.8:*
 "
 
 S="${WORKDIR}/IcedTea-Web-${P}"
@@ -43,6 +45,7 @@
 	sed -i 's/JAVADOC_OPTS=/\0-Xdoclint:none /g' Makefile.am || die
 	eautoreconf
 	cargo_gen_config
+	java-pkg-2_src_prepare
 }
 
 src_configure() {
@@ -54,7 +57,7 @@
 		--disable-native-plugin
 		--program-transform-name='s/^javaws$/itweb-javaws/'
 		--with-java="${EPREFIX}/usr/bin/java"
-		--with-jdk-home="${EPREFIX}/etc/java-config-2/current-system-vm"
+		--with-jdk-home="${EPREFIX}${JDK_HOME}"
 		--with-itw-libs=DISTRIBUTION
 		--without-rhino
 		--without-tagsoup



Note the DEPEND="virtual/jdk:1.8, java-pkg-2 uses DEPEND to enforce jdk version
Comment 1 Joakim Tjernlund 2021-04-16 13:47:39 UTC
The java-pkg-2_src_prepare should be replaced with default

Also, JRE deps indicate JRE can be >java-8 so maybe add
--with-modularjdk-file="${EPREFIX}"/usr/bin
and keep the itw-modularjdk.args file?
Comment 2 Georgy Yakovlev archtester gentoo-dev 2021-04-25 16:19:53 UTC
ack, will check it soon, limited time.
Comment 3 Joakim Tjernlund 2021-06-22 11:34:28 UTC
icedtea-web-1.8.7 is out
Comment 4 Georgy Yakovlev archtester gentoo-dev 2021-11-18 05:10:41 UTC
I bumped to 1.8.8 but I don't think this issue is fixed as I did not touch ebuild.
Comment 5 dtoch 2021-11-20 12:23:53 UTC
(In reply to Joakim Tjernlund from comment #0)
> icedtea-web tries to specify openjdk:1.8 in its BDEPEND but this is
> not enough to force java-8 during build
> 
> This patch(inline) fixes it:
Just tested it on my laptop. Thanks, Joakim!
Comment 6 Joakim Tjernlund 2021-12-01 18:06:16 UTC
My diff ATM:
--- icedtea-web-1.8.8.ebuild	2021-11-18 06:39:38.000000000 +0100
+++ icedtea-web-1.8.8.ebuild	2021-12-01 18:58:07.949298406 +0100
@@ -6,7 +6,7 @@
 README_GENTOO_SUFFIX="-r2"
 CRATES="dunce-0.1.1"
 
-inherit autotools bash-completion-r1 cargo readme.gentoo-r1 xdg-utils
+inherit autotools bash-completion-r1 cargo java-pkg-2 readme.gentoo-r1 xdg-utils
 
 DESCRIPTION="FOSS Java browser plugin and Web Start implementation"
 HOMEPAGE="https://github.com/AdoptOpenJDK/IcedTea-Web"
@@ -14,7 +14,7 @@
 	$(cargo_crate_uris ${CRATES})"
 LICENSE="GPL-2 GPL-2-with-linking-exception LGPL-2"
 SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
 IUSE="doc"
 
 # tests require ton of java deps we don't have packaged/working
@@ -29,10 +29,11 @@
 	virtual/rust
 	doc? ( sys-devel/bc )
 "
+DEPEND="virtual/jdk:1.8"
 
 RDEPEND="
 	>=app-eselect/eselect-java-0.2.0
-	>=virtual/jre-1.8
+	>=virtual/jre-1.8:*
 "
 
 S="${WORKDIR}/IcedTea-Web-${P}"
@@ -44,6 +45,7 @@
 	sed -i 's/JAVADOC_OPTS=/\0-Xdoclint:none /g' Makefile.am || die
 	eautoreconf
 	cargo_gen_config
+	default
 }
 
 src_configure() {
@@ -53,10 +55,15 @@
 	# native plugins also disabled, modern browsers no longer support it.
 	local myconf=(
 		--disable-native-plugin
+		--enable-shell-launchers
+		#--libdir="${EPREFIX}/usr/$(get_libdir)/nsbrowser/plugins"
 		--program-transform-name='s/^javaws$/itweb-javaws/'
 		--with-java="${EPREFIX}/usr/bin/java"
-		--with-jdk-home="${EPREFIX}/etc/java-config-2/current-system-vm"
+		--with-jdk-home="${EPREFIX}${JDK_HOME}"
 		--with-itw-libs=DISTRIBUTION
+		--with-modularjdk-file="${EPREFIX}"/usr/bin
+		--with-browser-tests=no
+		--with-junit=no
 		--without-rhino
 		--without-tagsoup
 		$(use_enable doc docs)
@@ -68,13 +75,11 @@
 }
 
 src_compile() {
-	# races in makefile
-	emake -j1 #nowarn
+	emake
 }
 
 src_install() {
 	default
-	rm -v "${ED}/usr/bin/itw-modularjdk.args" || die
 	rename -v '.bash' '' "${ED}/usr/share/bash-completion/completions/"*.bash || die
 	rename -v 'javaws' 'itweb-javaws' "${ED}/usr/share/man/man1/"javaws.1* || die
 	mv -v "${ED}/usr/share/bash-completion/completions/"{javaws,itweb-javaws} || die
Comment 7 Joakim Tjernlund 2021-12-01 18:30:19 UTC
Not many blocker left blocking java-11, icedtea-web stands out ...
Comment 8 Larry the Git Cow gentoo-dev 2022-05-11 19:57:24 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47bad21c79c7886701279312dc6923538dd12fd2

commit 47bad21c79c7886701279312dc6923538dd12fd2
Author:     Yuan Liao <liaoyuan@gmail.com>
AuthorDate: 2022-03-16 18:22:19 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2022-05-11 19:51:03 +0000

    dev-java/icedtea-web: EAPI 8, restrict build VM to 1.8
    
    - java-pkg-2.eclass is inherited to set up JDK 8 as the build VM
      properly, so a JAVA_HOME that points to JDK 8 is always passed to the
      ./configure script regardless of the eselect-java system VM setting.
    
    - The 'itw-modularjdk.args' file is now installed to an FHS-compliant
      path to allow the programs from this package to be run with JRE 9+.
      These programs are compatible with JRE 9+ under the condition that
      this file is installed.  The file is required for integration with the
      Java Platform Module System introduced in Java 9.
    
    - README.gentoo is updated to convey the USE="-headless-awt" requirement
      for any JRE used to run those programs.  This seems to be a
      runtime-only requirement, as using a JDK with this USE flag disabled
      would not cause any build errors during testing.
    
    Bug: https://bugs.gentoo.org/659174
    Bug: https://bugs.gentoo.org/698582
    Bug: https://bugs.gentoo.org/783027
    Bug: https://bugs.gentoo.org/831895
    Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/24610
    Signed-off-by: Florian Schmaus <flow@gentoo.org>

 dev-java/icedtea-web/files/README.gentoo-r3      |  16 +++
 dev-java/icedtea-web/icedtea-web-1.8.8-r1.ebuild | 118 +++++++++++++++++++++++
 2 files changed, 134 insertions(+)
Comment 9 Larry the Git Cow gentoo-dev 2022-06-20 07:41:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6d64b078ac431a26142e7bd0f81852492003cee

commit f6d64b078ac431a26142e7bd0f81852492003cee
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2022-06-20 05:21:53 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2022-06-20 06:49:26 +0000

    dev-java/icedtea-web: drop 1.8.4-r1, 1.8.8
    
    Closes: https://bugs.gentoo.org/586810
    Closes: https://bugs.gentoo.org/659174
    Closes: https://bugs.gentoo.org/698582
    Closes: https://bugs.gentoo.org/783027
    Closes: https://bugs.gentoo.org/831895
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Closes: https://github.com/gentoo/gentoo/pull/25989
    Signed-off-by: Florian Schmaus <flow@gentoo.org>

 dev-java/icedtea-web/Manifest                    |  1 -
 dev-java/icedtea-web/icedtea-web-1.8.4-r1.ebuild | 94 ------------------------
 dev-java/icedtea-web/icedtea-web-1.8.8.ebuild    | 94 ------------------------
 3 files changed, 189 deletions(-)