Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/oracle-jre-bin/
Date: Wed, 26 Jul 2017 21:18:46
Message-Id: 1501103906.4d4e25b82f873b35cebf0774f347608237e15bc9.chutzpah@gentoo
1 commit: 4d4e25b82f873b35cebf0774f347608237e15bc9
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 26 21:16:01 2017 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 26 21:18:26 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d4e25b8
7
8 dev-java/oracle-jre-bin: Version bump to 1.8.0.144
9
10 The current 1.8.0.141 version requires an account to download the
11 distfiles. Non-maintainer bump was authorized by monsieurp on IRC.
12
13 Package-Manager: Portage-2.3.6, Repoman-2.3.3
14
15 dev-java/oracle-jre-bin/Manifest | 2 +
16 .../oracle-jre-bin/oracle-jre-bin-1.8.0.144.ebuild | 251 +++++++++++++++++++++
17 2 files changed, 253 insertions(+)
18
19 diff --git a/dev-java/oracle-jre-bin/Manifest b/dev-java/oracle-jre-bin/Manifest
20 index ad8a7341944..fb3d6539bc5 100644
21 --- a/dev-java/oracle-jre-bin/Manifest
22 +++ b/dev-java/oracle-jre-bin/Manifest
23 @@ -3,3 +3,5 @@ DIST jre-8u131-linux-i586.tar.gz 78620957 SHA256 a773f2fe17061ef637ed2094b06313a
24 DIST jre-8u131-linux-x64.tar.gz 75920010 SHA256 355e5cdb066d4cada1f9f16f358b6fa6280ff5caf7470cf0d5cdd43083408d35 SHA512 26e6515f8e8b4d1d72337e347810d57fcc99284c18260d9ebd67441c19b9f1f73a9570f58a103477f2642e880a79d6579a5e40d75d06e2f4a92a6d3e07ba59db WHIRLPOOL 9cccc44679ddf103c15d6d6797c97d40ccc3abc63f5b05f78c79650be92cfa5dec8c2c567c456556b6f2f6d9ec23fbfbdf2a936ff569ac1bf7e50ce74f57bcef
25 DIST jre-8u141-linux-i586.tar.gz 78655948 SHA256 b1cf6a5161d68fcb16285e9dfdd664e6508287a80c351574327b0257baef3d1a SHA512 d14d48f8984fc1ce033971c222f8422c236e2f30cc46f89e01166222be48ace63b0ed7e877eefc44e8541adc6285ab6f83d135b0a0ffcbeb1c81fb37404beb76 WHIRLPOOL ac01fb6fc533d1f0389fdf2c9b89e785fd05bef37bacb7861a45f08b7bccd4cef4076e2be34a3706b925810e56eeddf065445547d9c7b8c83ba2d6059a69846c
26 DIST jre-8u141-linux-x64.tar.gz 75922416 SHA256 f268b4d20577be86e1d98451a27b59fd0e99aacd7e9ad7eb35abc3ffa2370c4d SHA512 04a938e25ee22d2cc3fa986622b8fba4e166c399108b6a61aa2430f17e58ddbafd3650abdcd529630ebc84d21c424b71c924cbe9612f8e24e9484eaca00c1844 WHIRLPOOL a3a43326af5c0724a7517410c2d21469f73323b780e60d5737f6c411336e259636f8a8ce8ac3bd1037630e3fc47de8e709c845740ce6dd4f7eec9add01b2cd59
27 +DIST jre-8u144-linux-i586.tar.gz 78658631 SHA256 9ac5b0d6cda9279a4959a6eb635d849d745a37dafc24666539d1c8f7d76ab77a SHA512 038e367fb00007e6b0f70ed3e48f318cfcb4144ef88b3a33d6c152cb186ede43622bc5d2fb40b39c695fdbe1fa735ab97f501a6ad0ed0a6cf48b286cc08e9ceb WHIRLPOOL 0bac95fc572bb1466b3f69c7e3dd03a77611366bc7c8076eb2feac41ecfde9a4aea6bb60b52b9db1dc0ec2bffcf553abe4ac4b1ffd28f7f3e1b6b71cd8ffc2fb
28 +DIST jre-8u144-linux-x64.tar.gz 75922776 SHA256 4e6e11aad54ae3c716a5607ee88d81f3f1e8b5b23ee474b0272dba351ee9f28a SHA512 fba5a5f5959746cb76a71847f5c6e3142816940d18c0022c0baf59611d43b24fae1052eeb217f09e840b5c393118260fb99dd38d1db7e74bb07ab0c34c2e1d60 WHIRLPOOL ac1921780076ff7ab5be5b942d5be0bab7fe12c027f1564b91734086d14c5a0da6b66d137034d7ee0318c4f72cb843013488591d1066a5f55c66dd4f53561a6f
29
30 diff --git a/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.144.ebuild b/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.144.ebuild
31 new file mode 100644
32 index 00000000000..f5a75844297
33 --- /dev/null
34 +++ b/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.144.ebuild
35 @@ -0,0 +1,251 @@
36 +# Copyright 1999-2017 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +
41 +inherit eutils java-vm-2 prefix versionator
42 +
43 +# This URIs need updating when bumping!
44 +JRE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html"
45 +JCE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html"
46 +
47 +if [[ "$(get_version_component_range 4)" == 0 ]] ; then
48 + S_PV="$(get_version_component_range 1-3)"
49 +else
50 + MY_PV_EXT="u$(get_version_component_range 4)"
51 + S_PV="$(get_version_component_range 1-4)"
52 +fi
53 +
54 +MY_PV="$(get_version_component_range 2)${MY_PV_EXT}"
55 +
56 +AT_amd64="jre-${MY_PV}-linux-x64.tar.gz"
57 +AT_x86="jre-${MY_PV}-linux-i586.tar.gz"
58 +
59 +JCE_DIR="UnlimitedJCEPolicyJDK8"
60 +JCE_FILE="jce_policy-8.zip"
61 +
62 +DESCRIPTION="Oracle's Java SE Runtime Environment"
63 +HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
64 +SRC_URI="
65 + amd64? ( ${AT_amd64} )
66 + x86? ( ${AT_x86} )
67 + jce? ( ${JCE_FILE} )"
68 +
69 +LICENSE="Oracle-BCLA-JavaSE"
70 +SLOT="1.8"
71 +KEYWORDS="~amd64 ~x86"
72 +IUSE="alsa commercial cups +fontconfig headless-awt javafx jce nsplugin selinux"
73 +
74 +RESTRICT="fetch preserve-libs strip"
75 +QA_PREBUILT="*"
76 +
77 +# NOTES:
78 +#
79 +# * cups is dlopened.
80 +#
81 +# * libpng is also dlopened but only by libsplashscreen, which isn't
82 +# important, so we can exclude that.
83 +#
84 +# * We still need to work out the exact AWT and JavaFX dependencies
85 +# under MacOS. It doesn't appear to use many, if any, of the
86 +# dependencies below.
87 +#
88 +RDEPEND="!x64-macos? (
89 + !headless-awt? (
90 + x11-libs/libX11
91 + x11-libs/libXext
92 + x11-libs/libXi
93 + x11-libs/libXrender
94 + x11-libs/libXtst
95 + )
96 + javafx? (
97 + dev-libs/glib:2
98 + dev-libs/libxml2:2
99 + dev-libs/libxslt
100 + media-libs/freetype:2
101 + x11-libs/cairo
102 + x11-libs/gtk+:2
103 + x11-libs/libX11
104 + x11-libs/libXtst
105 + x11-libs/libXxf86vm
106 + x11-libs/pango
107 + virtual/opengl
108 + )
109 + )
110 + alsa? ( media-libs/alsa-lib )
111 + cups? ( net-print/cups )
112 + fontconfig? ( media-libs/fontconfig:1.0 )
113 + !prefix? ( sys-libs/glibc:* )
114 + selinux? ( sec-policy/selinux-java )"
115 +
116 +DEPEND="app-arch/zip
117 + jce? ( app-arch/unzip )"
118 +
119 +S="${WORKDIR}/jre"
120 +
121 +pkg_nofetch() {
122 + local AT_ARCH="AT_${ARCH}"
123 + local AT="${!AT_ARCH}"
124 +
125 + einfo "Please download '${AT}' from:"
126 + einfo "'${JRE_URI}'"
127 + einfo "and move it to '${DISTDIR}'"
128 +
129 + if use jce; then
130 + einfo "Also download '${JCE_FILE}' from:"
131 + einfo "'${JCE_URI}'"
132 + einfo "and move it to '${DISTDIR}'"
133 + fi
134 +
135 + einfo
136 + einfo "If the above mentioned urls do not point to the correct version anymore,"
137 + einfo "please download the files from Oracle's java download archive:"
138 + einfo
139 + einfo " http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jre-${MY_PV}-oth-JPR"
140 + einfo
141 +
142 +}
143 +
144 +src_unpack() {
145 + default
146 +
147 + # Upstream is changing their versioning scheme every release around 1.8.0.*;
148 + # to stop having to change it over and over again, just wildcard match and
149 + # live a happy life instead of trying to get this new jre1.8.0_05 to work.
150 + mv "${WORKDIR}"/jre* "${S}" || die
151 +}
152 +
153 +src_prepare() {
154 + if use jce ; then
155 + mv "${WORKDIR}"/${JCE_DIR} lib/security/ || die
156 + fi
157 +
158 + default
159 +
160 + # Remove the hook that calls Oracle's evil usage tracker. Not just
161 + # because it's evil but because it breaks the sandbox during builds
162 + # and we can't find any other feasible way to disable it or make it
163 + # write somewhere else. See bug #559936 for details.
164 + zip -d lib/rt.jar sun/misc/PostVMInitHook.class || die
165 +}
166 +
167 +src_install() {
168 + local dest="/opt/${P}"
169 + local ddest="${ED}${dest#/}"
170 +
171 + # Create files used as storage for system preferences.
172 + mkdir .systemPrefs || die
173 + touch .systemPrefs/.system.lock || die
174 + touch .systemPrefs/.systemRootModFile || die
175 +
176 + if ! use alsa ; then
177 + rm -vf lib/*/libjsoundalsa.* || die
178 + fi
179 +
180 + if ! use commercial; then
181 + rm -vfr lib/jfr* || die
182 + fi
183 +
184 + if use headless-awt ; then
185 + rm -vf lib/*/lib*{[jx]awt,splashscreen}* \
186 + bin/{javaws,policytool} || die
187 + fi
188 +
189 + if ! use javafx ; then
190 + rm -vf lib/*/lib*{decora,fx,glass,prism}* \
191 + lib/*/libgstreamer-lite.* lib/{,ext/}*fx* || die
192 + fi
193 +
194 + if ! use nsplugin ; then
195 + rm -vf lib/*/libnpjp2.* || die
196 + else
197 + local nsplugin=$(echo lib/*/libnpjp2.*)
198 + fi
199 +
200 + # Even though plugins linked against multiple ffmpeg versions are
201 + # provided, they generally lag behind what Gentoo has available.
202 + rm -vf lib/*/libavplugin* || die
203 +
204 + dodoc COPYRIGHT
205 + dodir "${dest}"
206 + cp -pPR bin lib man "${ddest}" || die
207 +
208 + if use jce ; then
209 + dodir ${dest}/lib/security/strong-jce
210 + mv "${ddest}"/lib/security/US_export_policy.jar \
211 + "${ddest}"/lib/security/strong-jce || die
212 + mv "${ddest}"/lib/security/local_policy.jar \
213 + "${ddest}"/lib/security/strong-jce || die
214 + dosym "${dest}"/lib/security/${JCE_DIR}/US_export_policy.jar \
215 + "${dest}"/lib/security/US_export_policy.jar
216 + dosym "${dest}"/lib/security/${JCE_DIR}/local_policy.jar \
217 + "${dest}"/lib/security/local_policy.jar
218 + fi
219 +
220 + if use nsplugin ; then
221 + local nsplugin_link=${nsplugin##*/}
222 + nsplugin_link=${nsplugin_link/./-${PN}-${SLOT}.}
223 + dosym "${dest}/${nsplugin}" "/usr/$(get_libdir)/nsbrowser/plugins/${nsplugin_link}"
224 + fi
225 +
226 + # Install desktop file for the Java Control Panel.
227 + # Using ${PN}-${SLOT} to prevent file collision with jre and or other slots.
228 + # make_desktop_entry can't be used as ${P} would end up in filename.
229 + newicon lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
230 + sun-jcontrol-${PN}-${SLOT}.png || die
231 + sed -e "s#Name=.*#Name=Java Control Panel for Oracle JRE ${SLOT}#" \
232 + -e "s#Exec=.*#Exec=/opt/${P}/bin/jcontrol#" \
233 + -e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
234 + -e "s#Application;##" \
235 + -e "/Encoding/d" \
236 + lib/desktop/applications/sun_java.desktop > \
237 + "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
238 + domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
239 +
240 + # Prune all fontconfig files so libfontconfig will be used and only install
241 + # a Gentoo specific one if fontconfig is disabled.
242 + # http://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
243 + rm "${ddest}"/lib/fontconfig.* || die
244 + if ! use fontconfig ; then
245 + cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die
246 + eprefixify "${T}"/fontconfig.properties
247 + insinto "${dest}"/lib/
248 + doins "${T}"/fontconfig.properties
249 + fi
250 +
251 + # This needs to be done before CDS - #215225
252 + java-vm_set-pax-markings "${ddest}"
253 +
254 + # see bug #207282
255 + einfo "Creating the Class Data Sharing archives"
256 + case ${ARCH} in
257 + arm|ia64)
258 + ${ddest}/bin/java -client -Xshare:dump || die
259 + ;;
260 + x86)
261 + ${ddest}/bin/java -client -Xshare:dump || die
262 + # limit heap size for large memory on x86 #467518
263 + # this is a workaround and shouldn't be needed.
264 + ${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
265 + ;;
266 + *)
267 + ${ddest}/bin/java -server -Xshare:dump || die
268 + ;;
269 + esac
270 +
271 + # Remove empty dirs we might have copied.
272 + find "${D}" -type d -empty -exec rmdir -v {} + || die
273 +
274 + java-vm_install-env "${FILESDIR}"/${PN}.env.sh
275 + java-vm_revdep-mask
276 + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
277 +}
278 +
279 +pkg_postinst() {
280 + java-vm-2_pkg_postinst
281 +
282 + if ! use headless-awt && ! use javafx; then
283 + ewarn "You have disabled the javafx flag. Some modern desktop Java applications"
284 + ewarn "require this and they may fail with a confusing error message."
285 + fi
286 +}