Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/icedtea-web/files/, dev-java/icedtea-web/
Date: Wed, 11 May 2022 19:57:31
Message-Id: 1652298663.47bad21c79c7886701279312dc6923538dd12fd2.flow@gentoo
1 commit: 47bad21c79c7886701279312dc6923538dd12fd2
2 Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
3 AuthorDate: Wed Mar 16 18:22:19 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Wed May 11 19:51:03 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47bad21c
7
8 dev-java/icedtea-web: EAPI 8, restrict build VM to 1.8
9
10 - java-pkg-2.eclass is inherited to set up JDK 8 as the build VM
11 properly, so a JAVA_HOME that points to JDK 8 is always passed to the
12 ./configure script regardless of the eselect-java system VM setting.
13
14 - The 'itw-modularjdk.args' file is now installed to an FHS-compliant
15 path to allow the programs from this package to be run with JRE 9+.
16 These programs are compatible with JRE 9+ under the condition that
17 this file is installed. The file is required for integration with the
18 Java Platform Module System introduced in Java 9.
19
20 - README.gentoo is updated to convey the USE="-headless-awt" requirement
21 for any JRE used to run those programs. This seems to be a
22 runtime-only requirement, as using a JDK with this USE flag disabled
23 would not cause any build errors during testing.
24
25 Bug: https://bugs.gentoo.org/659174
26 Bug: https://bugs.gentoo.org/698582
27 Bug: https://bugs.gentoo.org/783027
28 Bug: https://bugs.gentoo.org/831895
29 Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
30 Closes: https://github.com/gentoo/gentoo/pull/24610
31 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
32
33 dev-java/icedtea-web/files/README.gentoo-r3 | 16 +++
34 dev-java/icedtea-web/icedtea-web-1.8.8-r1.ebuild | 118 +++++++++++++++++++++++
35 2 files changed, 134 insertions(+)
36
37 diff --git a/dev-java/icedtea-web/files/README.gentoo-r3 b/dev-java/icedtea-web/files/README.gentoo-r3
38 new file mode 100644
39 index 000000000000..fc199f3c50f2
40 --- /dev/null
41 +++ b/dev-java/icedtea-web/files/README.gentoo-r3
42 @@ -0,0 +1,16 @@
43 +Browser plugin
44 +--------------
45 +
46 +The IcedTea browser plugin (NPPlugin) is no longer available,
47 +as modern browsers no longer support this plugin format.
48 +
49 +JVM selection
50 +-------------
51 +
52 +By default, Web Start uses the JVM
53 +selected via eselect environment variable.
54 +Note that this doesn't have to be an IcedTea. Openjdk will also work.
55 +Also note that the selected JVM must have been installed with the
56 +'headless-awt' USE flag *disabled*.
57 +The choice can be overridden using the itweb-settings program.
58 +Simply blank out the field to restore the default behaviour.
59
60 diff --git a/dev-java/icedtea-web/icedtea-web-1.8.8-r1.ebuild b/dev-java/icedtea-web/icedtea-web-1.8.8-r1.ebuild
61 new file mode 100644
62 index 000000000000..238bb9080267
63 --- /dev/null
64 +++ b/dev-java/icedtea-web/icedtea-web-1.8.8-r1.ebuild
65 @@ -0,0 +1,118 @@
66 +# Copyright 1999-2022 Gentoo Authors
67 +# Distributed under the terms of the GNU General Public License v2
68 +
69 +EAPI=8
70 +
71 +README_GENTOO_SUFFIX="-r3"
72 +CRATES="dunce-0.1.1"
73 +
74 +inherit autotools bash-completion-r1 cargo java-pkg-2 readme.gentoo-r1 xdg-utils
75 +
76 +DESCRIPTION="FOSS Java browser plugin and Web Start implementation"
77 +HOMEPAGE="https://github.com/AdoptOpenJDK/IcedTea-Web"
78 +SRC_URI="https://github.com/AdoptOpenJDK/${PN}/archive/${P}.tar.gz
79 + $(cargo_crate_uris ${CRATES})"
80 +LICENSE="GPL-2 GPL-2-with-linking-exception LGPL-2"
81 +SLOT="0"
82 +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
83 +IUSE="doc"
84 +
85 +# tests require ton of java deps we don't have packaged/working
86 +# but rust tests pass.
87 +RESTRICT="test"
88 +
89 +BDEPEND="
90 + app-arch/zip
91 + sys-devel/bc
92 + virtual/pkgconfig
93 + virtual/rust
94 + doc? ( sys-devel/bc )
95 +"
96 +
97 +# Build within Portage using JDK 11+ (also presumably 9+) fails during
98 +# src_configure:
99 +# configure: error: sun.security.util.SecurityConstants not found.
100 +#
101 +# When upstream's build instructions are executed outside Portage using
102 +# JDK 11+, ./configure also fails, though a different error pops up:
103 +# configure: error: sun.applet.AppletImageRef not found.
104 +#
105 +# If even the upstream build instructions fail outside Portage with JDK 11+,
106 +# then it is very unlikely that the build issue within Portage is fixable.
107 +# The upstream has moved forward to development of 2.0.0 and 3.0.0 versions,
108 +# so they might no longer be interested in fixing the legacy 1.x versions.
109 +#
110 +# The 'sun.applet.AppletImageRef not found' issue has been reported to
111 +# FreeBSD <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248197#c2>,
112 +# and some efforts there to fix the issue were unsuccessful. They seem
113 +# to have ended up with restricting Java version to 8
114 +# <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244976#c17>.
115 +#
116 +# Thus, the build VM version is restricted to 1.8 here.
117 +DEPEND="
118 + virtual/jdk:1.8
119 +"
120 +
121 +RDEPEND="
122 + >=app-eselect/eselect-java-0.2.0
123 + >=virtual/jre-1.8:*
124 +"
125 +
126 +S="${WORKDIR}/IcedTea-Web-${P}"
127 +
128 +QA_FLAGS_IGNORED="usr/bin/.*"
129 +
130 +src_prepare() {
131 + eapply_user
132 + sed -i 's/JAVADOC_OPTS=/\0-Xdoclint:none /g' Makefile.am || die
133 + eautoreconf
134 + cargo_gen_config
135 +}
136 +
137 +src_configure() {
138 + xdg_environment_reset
139 + # some functionality (tagsoup rhino) is disabled, because dev-java is
140 + # unmaintained and a lot of things simply does not build anymore.
141 + # native plugins also disabled, modern browsers no longer support it.
142 + # modularjdk-file and the 'itw-modularjdk.args' file controlled by it
143 + # are required to run this package's programs using JRE 9+.
144 + local myconf=(
145 + --disable-native-plugin
146 + --program-transform-name='s/^javaws$/itweb-javaws/'
147 + --with-jdk-home="$(java-config -O)"
148 + --with-modularjdk-file="${EPREFIX}/usr/share/${PN}/"
149 + --with-itw-libs=DISTRIBUTION
150 + --without-rhino
151 + --without-tagsoup
152 + $(use_enable doc docs)
153 + )
154 + unset _JAVA_OPTIONS
155 + export bashcompdir="$(get_bashcompdir)" # defaults to /etc if not found in pkg-config
156 + export CARGO_HOME="${ECARGO_HOME}"
157 + CONFIG_SHELL="${EPREFIX}/bin/bash" econf "${myconf[@]}"
158 +}
159 +
160 +src_compile() {
161 + # races in makefile
162 + emake -j1 #nowarn
163 +}
164 +
165 +src_install() {
166 + default
167 + rename -v '.bash' '' "${ED}/usr/share/bash-completion/completions/"*.bash || die
168 + rename -v 'javaws' 'itweb-javaws' "${ED}/usr/share/man/man1/"javaws.1* || die
169 + mv -v "${ED}/usr/share/bash-completion/completions/"{javaws,itweb-javaws} || die
170 + sed -i 's/javaws/itweb-javaws/g' \
171 + "${ED}/usr/share/bash-completion/completions/itweb-javaws" || die
172 +
173 + readme.gentoo_create_doc
174 +}
175 +
176 +src_test() {
177 + # we want to override cargo.eclass' src_test
178 + :
179 +}
180 +
181 +pkg_postinst() {
182 + readme.gentoo_print_elog
183 +}