Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/oracle-jdk-bin/
Date: Wed, 27 Jul 2016 22:19:20
Message-Id: 1469657945.0f17c91c5893f95f49ff8153483e97bd8f24725d.chewi@gentoo
1 commit: 0f17c91c5893f95f49ff8153483e97bd8f24725d
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 27 22:14:15 2016 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 27 22:19:05 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f17c91c
7
8 dev-java/oracle-jdk-bin: Version bumps wrt security bug #589208
9
10 This restores arm(64) that was accidentally dropped recently.
11
12 Package-Manager: portage-2.3.0
13
14 dev-java/oracle-jdk-bin/Manifest | 14 +
15 .../oracle-jdk-bin/oracle-jdk-bin-1.8.0.101.ebuild | 366 +++++++++++++++++++++
16 .../oracle-jdk-bin/oracle-jdk-bin-1.8.0.102.ebuild | 366 +++++++++++++++++++++
17 3 files changed, 746 insertions(+)
18
19 diff --git a/dev-java/oracle-jdk-bin/Manifest b/dev-java/oracle-jdk-bin/Manifest
20 index 33d6934..d544381 100644
21 --- a/dev-java/oracle-jdk-bin/Manifest
22 +++ b/dev-java/oracle-jdk-bin/Manifest
23 @@ -1,4 +1,18 @@
24 DIST jce_policy-8.zip 8409 SHA256 f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 SHA512 abbaa81a35f904ec61b4cf3c2d1ca8c8d49e53bb248e698185eea906939d68f5063412800585ec74027aab1012ef189aebe1dc99fe8ef4230a0ecb0b527f88e5 WHIRLPOOL 8c9ce1ea4673b75fa6271b74e598880f98361d5d2c9c25439fa0af3d07cfeb871b39682dae4e38160f49770b1fec953162e451b9b2cf44d2c72a226944212bcc
25 +DIST jdk-8u101-linux-arm32-vfp-hflt-demos.tar.gz 10431884 SHA256 5426040890772b3008ec134d9c11e9bf18f6b01a342ce76c1829f8bbf194964e SHA512 cd59a278570e6c4cdec1ca9db8200d3a9a0ab49bf561e23139b6987cebede3ca3bd332668ccb1bee6ad4ef05b7385e2939c2556a4a31da70e58f0c704db99724 WHIRLPOOL 3a989a7cae0b77ba53557e7972a5b582d78dfa005bd1f018cb27e0b3df9b45a1da592a86e0e954129772c278926b648dd5cf09b4ff347917e5978c9a23159626
26 +DIST jdk-8u101-linux-arm32-vfp-hflt.tar.gz 81542641 SHA256 9819bd28af551589c8ea599c5b8b5cdf1aa86dacc9a75c31dd611bda27ae38a4 SHA512 861752cb55a4ba52961e6328b71ca02cbe3d911965f74b9e45304cfcf68f8753f89d343343b0effa4f74bf06e09dc9223a83df84dc7f5c37c84262f97738422a WHIRLPOOL 1251b2dbe5b4c82ca0e024c02210d70575d2650c78363b87e2eecf8b416e7d1579d5657d63342384153bd11912e6a1f8a5b0edb10fb8f7b1ad7e51d77615621c
27 +DIST jdk-8u101-linux-arm64-vfp-hflt-demos.tar.gz 10386441 SHA256 4f598169e972c6378e19cb06cec35d0fe9e13ea95209897a40c50dd69cd47e88 SHA512 8b7c44bf006108a780b18111f3a21bbd867555a21dce4bcad661c27b6cddbf28cdd78a15f9056916b9f179e41d320586288d5e12853564e59a9e4a4db5be0a13 WHIRLPOOL bef6e3c3551bcd40efa629f6f65b4aaf7d82c5ccc43ff168f4ee8b6a3221863f79c47ce76bf3757cca16638127b32694e08bfe478d82f18bd1df04aa8818010c
28 +DIST jdk-8u101-linux-arm64-vfp-hflt.tar.gz 78347134 SHA256 795df50a2991e84866ccd251111cfa1cf72d1859aa77d4cc1a8fa2419d254bcf SHA512 63f888187f045f946a30ce52cc853ace44a13a64ce2eea51d971eecf740b0cd435fb44a76e2dbb93a668ac7c262012ea61712af719c323b330b4b003f48ce686 WHIRLPOOL 688af78a6f9ef01987cf046dc99864816f3cff6764a8cc3e83c90f5e5b8012cf18f8e29e5ef82ef6c10699ec034c9e513c3f0a4926e6dc7587aeb009e9055578
29 +DIST jdk-8u102-linux-i586-demos.tar.gz 55067513 SHA256 a7931ebf57eb967fadc7ef68370600c42e612658cda5d1b638283935d9b0e47e SHA512 7de446ff15e597a36b467bb3f762ef99b5de80c1cee5e4b645cab124dbc9eeccc1cd7240af933db1a68a2e0828afde63772968371834354a296cd65e05df362d WHIRLPOOL 4b9b680ce9776b0fa6abeee220279131d333dfb169fe53736a31454ca137ee2b70c830006b05a75e92ad5d9dd3e70ba7cc8a8f4dad0050db896527b2683d770b
30 +DIST jdk-8u102-linux-i586.tar.gz 183529522 SHA256 ed08112bad8e63c1c102ab52fccef930849b6cbadc5e9a816e12a99ddcbb5eaf SHA512 23a4c75161d3d0a6097640d1a4ef6b268e9555bc5dd425e3772374a5ed002a14932011972a05f966aaff48b7371fa150af3ddce5ab810b5b1b0fcd4993e1e53d WHIRLPOOL 5eeb83aa099574e2ecfb8c53770accd47642e624374aaa47e4c7cf909841ab4ce275926966bb68a5156302461d7c2badbb5f395357b14900ceb0a4048f9c4788
31 +DIST jdk-8u102-linux-x64-demos.tar.gz 55097110 SHA256 07c96706b029f92e7c5f783af03f837bafa4e9fffd3ae1aadba3b412f20dbf6b SHA512 d8fc956a463583466596c0fe89a96e05971f358a3385c80ccff0b6b18b37505b31f1033594f9a2611de4cf2d4b378fa324018e0cc0e9392ab0f07f106962d7e5 WHIRLPOOL ac7028d7f6279bf8b601c69bf83e2ffa4119c358f6fb85d9dd49ff98959e97704fd1918fcf360da5a2b17509b17293e1b4cbf88715cb04b6d8efac734b6bab0f
32 +DIST jdk-8u102-linux-x64.tar.gz 181435897 SHA256 7cfbe0bc0391a4abe60b3e9eb2a541d2315b99b9cb3a24980e618a89229e04b7 SHA512 a8420f6aa4658545b6276b477156326d5ab66458f4fc78616bdc3e1794a17a6c1964170c709a139cf6ee9a86e7c2386a776c40e3236292a4521a3d5d1a08e206 WHIRLPOOL 7128fb43378e60b9dd7d1d3789665f4534438d3d1e1e91b6a2eef3b442fd4012827da77bf76fe0bca64b13b7739a1644e628f7c787428d532c8617c638cddc6f
33 +DIST jdk-8u102-macosx-x64.dmg 238397488 SHA256 9f53b71af203502da4ff416b5ab1a217a655006786bcbb8f8d8ad501debda748 SHA512 71abfae2cc25342f017fd531f28a18f671e276673c757424418fb3d72341f0220b6f87c714b21dd819aebe44af24c0bc31355fdbdd987622635ecd372a3158af WHIRLPOOL 18677405318ff454a9d589422cc2855bd1f3bd8193180b14b9865c923b8e34678dbbf0dc1d3dd5d3ed1df5a2d1f0d3aca6eab3904d105cdacb6dbf4f5f4c1d73
34 +DIST jdk-8u102-macosx-x86_64-demos.zip 55667285 SHA256 730c06c1e931dfeb757aaed6f1abff86c80f1ab235eaab817af6d0e0b8aed50e SHA512 0697368e81490f879e16fe63510e37b57f867c996cb272f5e2fda4416bf9848582772e77ca910dc8390a35e04d005bd5cc7d9fd486480d8e7df9dd86f70bbef1 WHIRLPOOL f37c6363d03362ea101545f664398ae7dc6c363e78d871f861501c7073df499f9034e9cb3ce9628a695587b54688c1642a472f00dfb09b09399a05dd4ba07f75
35 +DIST jdk-8u102-solaris-sparcv9-demos.tar.gz 9785269 SHA256 627331a28b33cbafea7e3ee3f8a48a5aee2935bc107ed0d35bb19dce3de04d84 SHA512 f16f37ba8ca50dc4fb1603bb0008b173936984836f5ef7c49b81950de6b7b508c96c3f2cae9a3859d8361d576740dce8b0433f835504a6be2206de0d371c12e1 WHIRLPOOL 60f27e7c6059caf78d9e20736e098d64d7222d564eff132018865b3d48416e3575719c5cdeb6267ba4369e04718960fd1c086e9a8fe9a8f66ab1cd36376c9e1b
36 +DIST jdk-8u102-solaris-sparcv9.tar.gz 103789000 SHA256 8a720552ee679b7a4d207b16c8fa5d30222f7be3f9a0081a71a913b73b4f35a5 SHA512 af7b8d3ae6e322ab0a17e555debd48e2a210450b70382f8f9e5b89045d9320728de05c7dd2f7407261b1d679029c0bce15569f413b56258c790400972f4035c8 WHIRLPOOL 24569d67a55464a96d0564ec619739d1c764d64986be0ea709d61b6306876b7386a20e3165aee3b41a3c6a6965d216abd1e5896b08dee630bcec8157cfec7637
37 +DIST jdk-8u102-solaris-x64-demos.tar.gz 9721135 SHA256 a7951a0a3c3ee52afa3ddd3ec4a8d25de02217dd2062a7f051e056ade83558f4 SHA512 354ade36a5af449eb43c9a8539ee5ffedb660981d5a9ee86887946b1df38f633f8841b35016d966c9116fd4c8ef23c92f220a42201e92a69d12a711675e51df9 WHIRLPOOL 62e84c7f8ec1a2d952b76510521fec814e2f476bbdf1effd92f7defcd04447a30001c1ba0127e1a6a9378aead56a7893f040d3526918f0326816487c5fca5af2
38 +DIST jdk-8u102-solaris-x64.tar.gz 100915566 SHA256 a3842c793a894beb0c836ffaf385e569b76d51a4efb9d0476cc26f0a02342684 SHA512 bf43f4bb4c706b0175182eb68063dee55cd4cd9e584f2df7b71c57368e6809be3f40b1138e6866f7f9a1dd0ac2c13a13ef4de8a38dfb94aea3194456a82ebb56 WHIRLPOOL 81a433b08f4d02c834d19d5dc612f4dc7ddac86e4e9d2a39041c96f09e8e1f715e4a9add330322a62e398c495b48f7a9a2fb8738a6c92d7e4280d0a31d3e3896
39 DIST jdk-8u92-linux-i586-demos.tar.gz 55064676 SHA256 e89fac1a329cb4d4a09ce045dbedc44fe3d99efb32bdf8fda39c8ffa0533c36a SHA512 b3eed7bc92142c8811415d54f62bd1454f5755d1e7ec95e6f2c83569ccc3524465d1755784a9aa0d3170ab5b8b3204b5ab22e0f7c1bf074c1082a9d697a406e4 WHIRLPOOL 222acce19d625ad7b637831feeb31d0bda5ba36317e9e8dc924e94e818cafcb8a70a6f7ee625d0f05d15061bec1d52a74b2f5e24f61ae2f7c240e1e958b7a29a
40 DIST jdk-8u92-linux-i586.tar.gz 183433226 SHA256 7203592329877735bb6259844a3a30640edc61920d132f952c40ab2e2014b224 SHA512 fcb2db52e8cb392de91ca914dae13bc7786954334e7df346619686837bceab9ca49699153d308d869499d2948c5eb67ae39583e28db3c63a537afd33f6b1226d WHIRLPOOL b8a6df77307627baa3f81f14fbd2e526f40a1b628772bd6ea7599068a0b88bdbe164a8de340414ddc363b6e7fa3054f4c687143aaf9c5b57716c492fb8545a17
41 DIST jdk-8u92-linux-x64-demos.tar.gz 55132437 SHA256 afebf7ae44afc8ef1199dd02b32c1d50d1fb16b9bc4f4e2443bd8d4d122e2178 SHA512 89d24f188f5d80524d952eb16af0913eac6ef2184ec79f8116ed91927f30aad73d057e0160502545c1a5a6fd2cbaa42ce50d9df5a73504813132ad002215bea0 WHIRLPOOL 8c02e4c98408fd1d1dc5368fb67ec904a6145b569a2d59c36d64fefbf9630c835d74e302ac651b803d3be9ad2c34bc4b80b3c15714b2982ffae8e0262f2b58c2
42
43 diff --git a/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.101.ebuild b/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.101.ebuild
44 new file mode 100644
45 index 0000000..9840a6f
46 --- /dev/null
47 +++ b/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.101.ebuild
48 @@ -0,0 +1,366 @@
49 +# Copyright 1999-2016 Gentoo Foundation
50 +# Distributed under the terms of the GNU General Public License v2
51 +# $Id$
52 +
53 +EAPI="5"
54 +
55 +inherit eutils java-vm-2 prefix versionator
56 +
57 +# This URIs need to be updated when bumping!
58 +JDK_URI="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"
59 +JCE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html"
60 +
61 +# This is a list of archs supported by this update.
62 +# Currently arm comes and goes.
63 +AT_AVAILABLE=( arm arm64 )
64 +
65 +# Sometimes some or all of the demos are missing, this is to not have to rewrite half
66 +# the ebuild when it happens.
67 +DEMOS_AVAILABLE=( arm arm64 )
68 +
69 +if [[ "$(get_version_component_range 4)" == 0 ]] ; then
70 + S_PV="$(get_version_component_range 1-3)"
71 +else
72 + MY_PV_EXT="u$(get_version_component_range 4)"
73 + S_PV="$(get_version_component_range 1-4)"
74 +fi
75 +
76 +MY_PV="$(get_version_component_range 2)${MY_PV_EXT}"
77 +
78 +AT_amd64="jdk-${MY_PV}-linux-x64.tar.gz"
79 +AT_arm="jdk-${MY_PV}-linux-arm32-vfp-hflt.tar.gz"
80 +AT_arm64="jdk-${MY_PV}-linux-arm64-vfp-hflt.tar.gz"
81 +AT_x86="jdk-${MY_PV}-linux-i586.tar.gz"
82 +AT_x64_solaris="jdk-${MY_PV}-solaris-x64.tar.gz"
83 +AT_sparc64_solaris="${AT_sparc_solaris} jdk-${MY_PV}-solaris-sparcv9.tar.gz"
84 +AT_x64_macos="jdk-${MY_PV}-macosx-x64.dmg"
85 +
86 +DEMOS_amd64="jdk-${MY_PV}-linux-x64-demos.tar.gz"
87 +DEMOS_arm="jdk-${MY_PV}-linux-arm32-vfp-hflt-demos.tar.gz"
88 +DEMOS_arm64="jdk-${MY_PV}-linux-arm64-vfp-hflt-demos.tar.gz"
89 +DEMOS_x86="jdk-${MY_PV}-linux-i586-demos.tar.gz"
90 +DEMOS_x64_solaris="jdk-${MY_PV}-solaris-x64-demos.tar.gz"
91 +DEMOS_sparc64_solaris="jdk-${MY_PV}-solaris-sparcv9-demos.tar.gz"
92 +DEMOS_x64_macos="jdk-${MY_PV}-macosx-x86_64-demos.zip"
93 +
94 +JCE_DIR="UnlimitedJCEPolicyJDK8"
95 +JCE_FILE="jce_policy-8.zip"
96 +
97 +DESCRIPTION="Oracle's Java SE Development Kit"
98 +HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
99 +for d in "${AT_AVAILABLE[@]}"; do
100 + SRC_URI+=" ${d}? ( $(eval "echo \${$(echo AT_${d/-/_})}")"
101 + if has ${d} "${DEMOS_AVAILABLE[@]}"; then
102 + SRC_URI+=" examples? ( $(eval "echo \${$(echo DEMOS_${d/-/_})}") )"
103 + fi
104 + SRC_URI+=" )"
105 +done
106 +unset d
107 +SRC_URI+=" jce? ( ${JCE_FILE} )"
108 +
109 +LICENSE="Oracle-BCLA-JavaSE examples? ( BSD )"
110 +SLOT="1.8"
111 +KEYWORDS="~arm ~arm64"
112 +IUSE="alsa cups derby doc examples +fontconfig headless-awt javafx jce nsplugin pax_kernel selinux source"
113 +REQUIRED_USE="javafx? ( alsa fontconfig )"
114 +
115 +RESTRICT="fetch preserve-libs strip"
116 +QA_PREBUILT="*"
117 +
118 +# NOTES:
119 +#
120 +# * cups is dlopened.
121 +#
122 +# * libpng is also dlopened but only by libsplashscreen, which isn't
123 +# important, so we can exclude that.
124 +#
125 +# * We still need to work out the exact AWT and JavaFX dependencies
126 +# under MacOS. It doesn't appear to use many, if any, of the
127 +# dependencies below.
128 +#
129 +RDEPEND="!x64-macos? (
130 + !headless-awt? (
131 + x11-libs/libX11
132 + x11-libs/libXext
133 + x11-libs/libXi
134 + x11-libs/libXrender
135 + x11-libs/libXtst
136 + )
137 + javafx? (
138 + dev-libs/glib:2
139 + dev-libs/libxml2:2
140 + dev-libs/libxslt
141 + media-libs/freetype:2
142 + x11-libs/cairo
143 + x11-libs/gtk+:2
144 + x11-libs/libX11
145 + x11-libs/libXtst
146 + x11-libs/libXxf86vm
147 + x11-libs/pango
148 + virtual/opengl
149 + )
150 + )
151 + alsa? ( media-libs/alsa-lib )
152 + cups? ( net-print/cups )
153 + doc? ( dev-java/java-sdk-docs:${SLOT} )
154 + fontconfig? ( media-libs/fontconfig:1.0 )
155 + !prefix? ( sys-libs/glibc:* )
156 + selinux? ( sec-policy/selinux-java )"
157 +
158 +# A PaX header isn't created by scanelf so depend on paxctl to avoid
159 +# fallback marking. See bug #427642.
160 +DEPEND="app-arch/zip
161 + jce? ( app-arch/unzip )
162 + examples? ( x64-macos? ( app-arch/unzip ) )
163 + pax_kernel? ( sys-apps/paxctl )"
164 +
165 +S="${WORKDIR}/jdk"
166 +
167 +check_tarballs_available() {
168 + local uri=$1; shift
169 + local dl= unavailable=
170 + for dl in "${@}" ; do
171 + [[ ! -f "${DISTDIR}/${dl}" ]] && unavailable+=" ${dl}"
172 + done
173 +
174 + if [[ -n "${unavailable}" ]] ; then
175 + if [[ -z ${_check_tarballs_available_once} ]] ; then
176 + einfo
177 + einfo "Oracle requires you to download the needed files manually after"
178 + einfo "accepting their license through a javascript capable web browser."
179 + einfo
180 + _check_tarballs_available_once=1
181 + fi
182 + einfo "Download the following files:"
183 + for dl in ${unavailable}; do
184 + einfo " ${dl}"
185 + done
186 + einfo "at '${uri}'"
187 + einfo "and move them to '${DISTDIR}'"
188 + einfo
189 + einfo "If the above mentioned urls do not point to the correct version anymore,"
190 + einfo "please download the files from Oracle's java download archive:"
191 + einfo
192 + einfo " http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jdk-${MY_PV}-oth-JPR"
193 + einfo
194 + fi
195 +}
196 +
197 +pkg_nofetch() {
198 + local distfiles=( $(eval "echo \${$(echo AT_${ARCH/-/_})}") )
199 + if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}"; then
200 + distfiles+=( $(eval "echo \${$(echo DEMOS_${ARCH/-/_})}") )
201 + fi
202 + check_tarballs_available "${JDK_URI}" "${distfiles[@]}"
203 +
204 + use jce && check_tarballs_available "${JCE_URI}" "${JCE_FILE}"
205 +}
206 +
207 +src_unpack() {
208 + if use x64-macos ; then
209 + pushd "${T}" > /dev/null
210 + mkdir dmgmount
211 + hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
212 + -mountpoint "${T}"/dmgmount
213 + local update=$(get_version_component_range 4)
214 + [[ ${#update} == 1 ]] && update="0${update}"
215 + xar -xf dmgmount/JDK\ $(get_version_component_range 2)\ Update\ ${update}.pkg
216 + hdiutil detach "${T}"/dmgmount
217 + zcat jdk1${MY_PV%u*}0${update}.pkg/Payload | cpio -idv
218 + mv Contents/Home "${WORKDIR}"/jdk${MY_PV}
219 + popd > /dev/null
220 + use jce && unpack "${JCE_FILE}"
221 + else
222 + default
223 + fi
224 +
225 + # Upstream is changing their versioning scheme every release around 1.8.0.*;
226 + # to stop having to change it over and over again, just wildcard match and
227 + # live a happy life instead of trying to get this new jdk1.8.0_05 to work.
228 + mv "${WORKDIR}"/jdk* "${S}" || die
229 +}
230 +
231 +src_prepare() {
232 + if use jce ; then
233 + mv "${WORKDIR}"/${JCE_DIR} jre/lib/security/ || die
234 + fi
235 +
236 + if [[ -n ${JAVA_PKG_STRICT} ]] ; then
237 + # Mark this binary early to run it now.
238 + pax-mark Cm ./bin/javap
239 +
240 + eqawarn "Ensure that this only calls trackJavaUsage(). If not, see bug #559936."
241 + eqawarn
242 + eqawarn "$(./bin/javap -J-Duser.home=${T} -c sun.misc.PostVMInitHook || die)"
243 + fi
244 +
245 + # Remove the hook that calls Oracle's evil usage tracker. Not just
246 + # because it's evil but because it breaks the sandbox during builds
247 + # and we can't find any other feasible way to disable it or make it
248 + # write somewhere else. See bug #559936 for details.
249 + zip -d jre/lib/rt.jar sun/misc/PostVMInitHook.class || die
250 +}
251 +
252 +src_install() {
253 + local dest="/opt/${P}"
254 + local ddest="${ED}${dest#/}"
255 +
256 + # Create files used as storage for system preferences.
257 + mkdir jre/.systemPrefs || die
258 + touch jre/.systemPrefs/.system.lock || die
259 + touch jre/.systemPrefs/.systemRootModFile || die
260 +
261 + if ! use alsa ; then
262 + rm -vf jre/lib/*/libjsoundalsa.* || die
263 + fi
264 +
265 + if use headless-awt ; then
266 + rm -vf {,jre/}lib/*/lib*{[jx]awt,splashscreen}* \
267 + {,jre/}bin/{javaws,policytool} \
268 + bin/appletviewer || die
269 + fi
270 +
271 + if ! use javafx ; then
272 + rm -vf jre/lib/*/lib*{decora,fx,glass,prism}* \
273 + jre/lib/*/libgstreamer-lite.* {,jre/}lib/{,ext/}*fx* \
274 + bin/*javafx* bin/javapackager || die
275 + fi
276 +
277 + if ! use nsplugin ; then
278 + rm -vf jre/lib/*/libnpjp2.* || die
279 + else
280 + local nsplugin=$(echo jre/lib/*/libnpjp2.*)
281 + fi
282 +
283 + # Even though plugins linked against multiple ffmpeg versions are
284 + # provided, they generally lag behind what Gentoo has available.
285 + rm -vf jre/lib/*/libavplugin* || die
286 +
287 + dodoc COPYRIGHT
288 + dodir "${dest}"
289 + cp -pPR bin include jre lib man "${ddest}" || die
290 +
291 + if use derby ; then
292 + cp -pPR db "${ddest}" || die
293 + fi
294 +
295 + if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}" ; then
296 + cp -pPR demo sample "${ddest}" || die
297 + fi
298 +
299 + if use jce ; then
300 + dodir "${dest}"/jre/lib/security/strong-jce
301 + mv "${ddest}"/jre/lib/security/US_export_policy.jar \
302 + "${ddest}"/jre/lib/security/strong-jce || die
303 + mv "${ddest}"/jre/lib/security/local_policy.jar \
304 + "${ddest}"/jre/lib/security/strong-jce || die
305 + dosym "${dest}"/jre/lib/security/${JCE_DIR}/US_export_policy.jar \
306 + "${dest}"/jre/lib/security/US_export_policy.jar
307 + dosym "${dest}"/jre/lib/security/${JCE_DIR}/local_policy.jar \
308 + "${dest}"/jre/lib/security/local_policy.jar
309 + fi
310 +
311 + if use nsplugin ; then
312 + local nsplugin_link=${nsplugin##*/}
313 + nsplugin_link=${nsplugin_link/./-${PN}-${SLOT}.}
314 + dosym "${dest}/${nsplugin}" "/usr/$(get_libdir)/nsbrowser/plugins/${nsplugin_link}"
315 + fi
316 +
317 + if use source ; then
318 + cp -v src.zip "${ddest}" || die
319 +
320 + if use javafx ; then
321 + cp -v javafx-src.zip "${ddest}" || die
322 + fi
323 + fi
324 +
325 + if [[ -d jre/lib/desktop ]] ; then
326 + # Install desktop file for the Java Control Panel.
327 + # Using ${PN}-${SLOT} to prevent file collision with jre and or
328 + # other slots. make_desktop_entry can't be used as ${P} would
329 + # end up in filename.
330 + newicon jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
331 + sun-jcontrol-${PN}-${SLOT}.png || die
332 + sed -e "s#Name=.*#Name=Java Control Panel for Oracle JDK ${SLOT}#" \
333 + -e "s#Exec=.*#Exec=/opt/${P}/jre/bin/jcontrol#" \
334 + -e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
335 + -e "s#Application;##" \
336 + -e "/Encoding/d" \
337 + jre/lib/desktop/applications/sun_java.desktop \
338 + > "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
339 + domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
340 + fi
341 +
342 + # Prune all fontconfig files so libfontconfig will be used and only install
343 + # a Gentoo specific one if fontconfig is disabled.
344 + # http://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
345 + rm "${ddest}"/jre/lib/fontconfig.*
346 + if ! use fontconfig ; then
347 + cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die
348 + eprefixify "${T}"/fontconfig.properties
349 + insinto "${dest}"/jre/lib/
350 + doins "${T}"/fontconfig.properties
351 + fi
352 +
353 + # This needs to be done before CDS - #215225
354 + java-vm_set-pax-markings "${ddest}"
355 +
356 + # see bug #207282
357 + einfo "Creating the Class Data Sharing archives"
358 + case ${ARCH} in
359 + arm|ia64)
360 + ${ddest}/bin/java -client -Xshare:dump || die
361 + ;;
362 + x86)
363 + ${ddest}/bin/java -client -Xshare:dump || die
364 + # limit heap size for large memory on x86 #467518
365 + # this is a workaround and shouldn't be needed.
366 + ${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
367 + ;;
368 + *)
369 + ${ddest}/bin/java -server -Xshare:dump || die
370 + ;;
371 + esac
372 +
373 + # Remove empty dirs we might have copied.
374 + find "${D}" -type d -empty -exec rmdir -v {} + || die
375 +
376 + if use x64-macos ; then
377 + # Fix miscellaneous install_name issues.
378 + pushd "${ddest}"/jre/lib > /dev/null || die
379 + local lib needed nlib npath
380 + for lib in decora_sse glass prism_{common,es2,sw} ; do
381 + lib=lib${lib}.dylib
382 + einfo "Fixing self-reference of ${lib}"
383 + install_name_tool \
384 + -id "${EPREFIX}${dest}/jre/lib/${lib}" \
385 + "${lib}"
386 + done
387 + popd > /dev/null
388 +
389 + # This is still jdk1{5,6}, even on Java 8, so don't change it
390 + # until you know different.
391 + for nlib in jdk1{5,6} ; do
392 + install_name_tool -change \
393 + /usr/lib/libgcc_s_ppc64.1.dylib \
394 + /usr/lib/libSystem.B.dylib \
395 + "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
396 + install_name_tool -id \
397 + "${EPREFIX}${dest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib \
398 + "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
399 + done
400 + fi
401 +
402 + set_java_env
403 + java-vm_revdep-mask
404 + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
405 +}
406 +
407 +pkg_postinst() {
408 + java-vm-2_pkg_postinst
409 +
410 + if ! use headless-awt && ! use javafx; then
411 + ewarn "You have disabled the javafx flag. Some modern desktop Java applications"
412 + ewarn "require this and they may fail with a confusing error message."
413 + fi
414 +}
415
416 diff --git a/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.102.ebuild b/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.102.ebuild
417 new file mode 100644
418 index 0000000..3087def
419 --- /dev/null
420 +++ b/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.102.ebuild
421 @@ -0,0 +1,366 @@
422 +# Copyright 1999-2016 Gentoo Foundation
423 +# Distributed under the terms of the GNU General Public License v2
424 +# $Id$
425 +
426 +EAPI="5"
427 +
428 +inherit eutils java-vm-2 prefix versionator
429 +
430 +# This URIs need to be updated when bumping!
431 +JDK_URI="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"
432 +JCE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html"
433 +
434 +# This is a list of archs supported by this update.
435 +# Currently arm comes and goes.
436 +AT_AVAILABLE=( amd64 x86 x64-solaris sparc64-solaris x64-macos )
437 +
438 +# Sometimes some or all of the demos are missing, this is to not have to rewrite half
439 +# the ebuild when it happens.
440 +DEMOS_AVAILABLE=( amd64 x86 x64-solaris sparc64-solaris x64-macos )
441 +
442 +if [[ "$(get_version_component_range 4)" == 0 ]] ; then
443 + S_PV="$(get_version_component_range 1-3)"
444 +else
445 + MY_PV_EXT="u$(get_version_component_range 4)"
446 + S_PV="$(get_version_component_range 1-4)"
447 +fi
448 +
449 +MY_PV="$(get_version_component_range 2)${MY_PV_EXT}"
450 +
451 +AT_amd64="jdk-${MY_PV}-linux-x64.tar.gz"
452 +AT_arm="jdk-${MY_PV}-linux-arm32-vfp-hflt.tar.gz"
453 +AT_arm64="jdk-${MY_PV}-linux-arm64-vfp-hflt.tar.gz"
454 +AT_x86="jdk-${MY_PV}-linux-i586.tar.gz"
455 +AT_x64_solaris="jdk-${MY_PV}-solaris-x64.tar.gz"
456 +AT_sparc64_solaris="${AT_sparc_solaris} jdk-${MY_PV}-solaris-sparcv9.tar.gz"
457 +AT_x64_macos="jdk-${MY_PV}-macosx-x64.dmg"
458 +
459 +DEMOS_amd64="jdk-${MY_PV}-linux-x64-demos.tar.gz"
460 +DEMOS_arm="jdk-${MY_PV}-linux-arm32-vfp-hflt-demos.tar.gz"
461 +DEMOS_arm64="jdk-${MY_PV}-linux-arm64-vfp-hflt-demos.tar.gz"
462 +DEMOS_x86="jdk-${MY_PV}-linux-i586-demos.tar.gz"
463 +DEMOS_x64_solaris="jdk-${MY_PV}-solaris-x64-demos.tar.gz"
464 +DEMOS_sparc64_solaris="jdk-${MY_PV}-solaris-sparcv9-demos.tar.gz"
465 +DEMOS_x64_macos="jdk-${MY_PV}-macosx-x86_64-demos.zip"
466 +
467 +JCE_DIR="UnlimitedJCEPolicyJDK8"
468 +JCE_FILE="jce_policy-8.zip"
469 +
470 +DESCRIPTION="Oracle's Java SE Development Kit"
471 +HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
472 +for d in "${AT_AVAILABLE[@]}"; do
473 + SRC_URI+=" ${d}? ( $(eval "echo \${$(echo AT_${d/-/_})}")"
474 + if has ${d} "${DEMOS_AVAILABLE[@]}"; then
475 + SRC_URI+=" examples? ( $(eval "echo \${$(echo DEMOS_${d/-/_})}") )"
476 + fi
477 + SRC_URI+=" )"
478 +done
479 +unset d
480 +SRC_URI+=" jce? ( ${JCE_FILE} )"
481 +
482 +LICENSE="Oracle-BCLA-JavaSE examples? ( BSD )"
483 +SLOT="1.8"
484 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~sparc64-solaris ~x64-solaris"
485 +IUSE="alsa cups derby doc examples +fontconfig headless-awt javafx jce nsplugin pax_kernel selinux source"
486 +REQUIRED_USE="javafx? ( alsa fontconfig )"
487 +
488 +RESTRICT="fetch preserve-libs strip"
489 +QA_PREBUILT="*"
490 +
491 +# NOTES:
492 +#
493 +# * cups is dlopened.
494 +#
495 +# * libpng is also dlopened but only by libsplashscreen, which isn't
496 +# important, so we can exclude that.
497 +#
498 +# * We still need to work out the exact AWT and JavaFX dependencies
499 +# under MacOS. It doesn't appear to use many, if any, of the
500 +# dependencies below.
501 +#
502 +RDEPEND="!x64-macos? (
503 + !headless-awt? (
504 + x11-libs/libX11
505 + x11-libs/libXext
506 + x11-libs/libXi
507 + x11-libs/libXrender
508 + x11-libs/libXtst
509 + )
510 + javafx? (
511 + dev-libs/glib:2
512 + dev-libs/libxml2:2
513 + dev-libs/libxslt
514 + media-libs/freetype:2
515 + x11-libs/cairo
516 + x11-libs/gtk+:2
517 + x11-libs/libX11
518 + x11-libs/libXtst
519 + x11-libs/libXxf86vm
520 + x11-libs/pango
521 + virtual/opengl
522 + )
523 + )
524 + alsa? ( media-libs/alsa-lib )
525 + cups? ( net-print/cups )
526 + doc? ( dev-java/java-sdk-docs:${SLOT} )
527 + fontconfig? ( media-libs/fontconfig:1.0 )
528 + !prefix? ( sys-libs/glibc:* )
529 + selinux? ( sec-policy/selinux-java )"
530 +
531 +# A PaX header isn't created by scanelf so depend on paxctl to avoid
532 +# fallback marking. See bug #427642.
533 +DEPEND="app-arch/zip
534 + jce? ( app-arch/unzip )
535 + examples? ( x64-macos? ( app-arch/unzip ) )
536 + pax_kernel? ( sys-apps/paxctl )"
537 +
538 +S="${WORKDIR}/jdk"
539 +
540 +check_tarballs_available() {
541 + local uri=$1; shift
542 + local dl= unavailable=
543 + for dl in "${@}" ; do
544 + [[ ! -f "${DISTDIR}/${dl}" ]] && unavailable+=" ${dl}"
545 + done
546 +
547 + if [[ -n "${unavailable}" ]] ; then
548 + if [[ -z ${_check_tarballs_available_once} ]] ; then
549 + einfo
550 + einfo "Oracle requires you to download the needed files manually after"
551 + einfo "accepting their license through a javascript capable web browser."
552 + einfo
553 + _check_tarballs_available_once=1
554 + fi
555 + einfo "Download the following files:"
556 + for dl in ${unavailable}; do
557 + einfo " ${dl}"
558 + done
559 + einfo "at '${uri}'"
560 + einfo "and move them to '${DISTDIR}'"
561 + einfo
562 + einfo "If the above mentioned urls do not point to the correct version anymore,"
563 + einfo "please download the files from Oracle's java download archive:"
564 + einfo
565 + einfo " http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jdk-${MY_PV}-oth-JPR"
566 + einfo
567 + fi
568 +}
569 +
570 +pkg_nofetch() {
571 + local distfiles=( $(eval "echo \${$(echo AT_${ARCH/-/_})}") )
572 + if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}"; then
573 + distfiles+=( $(eval "echo \${$(echo DEMOS_${ARCH/-/_})}") )
574 + fi
575 + check_tarballs_available "${JDK_URI}" "${distfiles[@]}"
576 +
577 + use jce && check_tarballs_available "${JCE_URI}" "${JCE_FILE}"
578 +}
579 +
580 +src_unpack() {
581 + if use x64-macos ; then
582 + pushd "${T}" > /dev/null
583 + mkdir dmgmount
584 + hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
585 + -mountpoint "${T}"/dmgmount
586 + local update=$(get_version_component_range 4)
587 + [[ ${#update} == 1 ]] && update="0${update}"
588 + xar -xf dmgmount/JDK\ $(get_version_component_range 2)\ Update\ ${update}.pkg
589 + hdiutil detach "${T}"/dmgmount
590 + zcat jdk1${MY_PV%u*}0${update}.pkg/Payload | cpio -idv
591 + mv Contents/Home "${WORKDIR}"/jdk${MY_PV}
592 + popd > /dev/null
593 + use jce && unpack "${JCE_FILE}"
594 + else
595 + default
596 + fi
597 +
598 + # Upstream is changing their versioning scheme every release around 1.8.0.*;
599 + # to stop having to change it over and over again, just wildcard match and
600 + # live a happy life instead of trying to get this new jdk1.8.0_05 to work.
601 + mv "${WORKDIR}"/jdk* "${S}" || die
602 +}
603 +
604 +src_prepare() {
605 + if use jce ; then
606 + mv "${WORKDIR}"/${JCE_DIR} jre/lib/security/ || die
607 + fi
608 +
609 + if [[ -n ${JAVA_PKG_STRICT} ]] ; then
610 + # Mark this binary early to run it now.
611 + pax-mark Cm ./bin/javap
612 +
613 + eqawarn "Ensure that this only calls trackJavaUsage(). If not, see bug #559936."
614 + eqawarn
615 + eqawarn "$(./bin/javap -J-Duser.home=${T} -c sun.misc.PostVMInitHook || die)"
616 + fi
617 +
618 + # Remove the hook that calls Oracle's evil usage tracker. Not just
619 + # because it's evil but because it breaks the sandbox during builds
620 + # and we can't find any other feasible way to disable it or make it
621 + # write somewhere else. See bug #559936 for details.
622 + zip -d jre/lib/rt.jar sun/misc/PostVMInitHook.class || die
623 +}
624 +
625 +src_install() {
626 + local dest="/opt/${P}"
627 + local ddest="${ED}${dest#/}"
628 +
629 + # Create files used as storage for system preferences.
630 + mkdir jre/.systemPrefs || die
631 + touch jre/.systemPrefs/.system.lock || die
632 + touch jre/.systemPrefs/.systemRootModFile || die
633 +
634 + if ! use alsa ; then
635 + rm -vf jre/lib/*/libjsoundalsa.* || die
636 + fi
637 +
638 + if use headless-awt ; then
639 + rm -vf {,jre/}lib/*/lib*{[jx]awt,splashscreen}* \
640 + {,jre/}bin/{javaws,policytool} \
641 + bin/appletviewer || die
642 + fi
643 +
644 + if ! use javafx ; then
645 + rm -vf jre/lib/*/lib*{decora,fx,glass,prism}* \
646 + jre/lib/*/libgstreamer-lite.* {,jre/}lib/{,ext/}*fx* \
647 + bin/*javafx* bin/javapackager || die
648 + fi
649 +
650 + if ! use nsplugin ; then
651 + rm -vf jre/lib/*/libnpjp2.* || die
652 + else
653 + local nsplugin=$(echo jre/lib/*/libnpjp2.*)
654 + fi
655 +
656 + # Even though plugins linked against multiple ffmpeg versions are
657 + # provided, they generally lag behind what Gentoo has available.
658 + rm -vf jre/lib/*/libavplugin* || die
659 +
660 + dodoc COPYRIGHT
661 + dodir "${dest}"
662 + cp -pPR bin include jre lib man "${ddest}" || die
663 +
664 + if use derby ; then
665 + cp -pPR db "${ddest}" || die
666 + fi
667 +
668 + if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}" ; then
669 + cp -pPR demo sample "${ddest}" || die
670 + fi
671 +
672 + if use jce ; then
673 + dodir "${dest}"/jre/lib/security/strong-jce
674 + mv "${ddest}"/jre/lib/security/US_export_policy.jar \
675 + "${ddest}"/jre/lib/security/strong-jce || die
676 + mv "${ddest}"/jre/lib/security/local_policy.jar \
677 + "${ddest}"/jre/lib/security/strong-jce || die
678 + dosym "${dest}"/jre/lib/security/${JCE_DIR}/US_export_policy.jar \
679 + "${dest}"/jre/lib/security/US_export_policy.jar
680 + dosym "${dest}"/jre/lib/security/${JCE_DIR}/local_policy.jar \
681 + "${dest}"/jre/lib/security/local_policy.jar
682 + fi
683 +
684 + if use nsplugin ; then
685 + local nsplugin_link=${nsplugin##*/}
686 + nsplugin_link=${nsplugin_link/./-${PN}-${SLOT}.}
687 + dosym "${dest}/${nsplugin}" "/usr/$(get_libdir)/nsbrowser/plugins/${nsplugin_link}"
688 + fi
689 +
690 + if use source ; then
691 + cp -v src.zip "${ddest}" || die
692 +
693 + if use javafx ; then
694 + cp -v javafx-src.zip "${ddest}" || die
695 + fi
696 + fi
697 +
698 + if [[ -d jre/lib/desktop ]] ; then
699 + # Install desktop file for the Java Control Panel.
700 + # Using ${PN}-${SLOT} to prevent file collision with jre and or
701 + # other slots. make_desktop_entry can't be used as ${P} would
702 + # end up in filename.
703 + newicon jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
704 + sun-jcontrol-${PN}-${SLOT}.png || die
705 + sed -e "s#Name=.*#Name=Java Control Panel for Oracle JDK ${SLOT}#" \
706 + -e "s#Exec=.*#Exec=/opt/${P}/jre/bin/jcontrol#" \
707 + -e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
708 + -e "s#Application;##" \
709 + -e "/Encoding/d" \
710 + jre/lib/desktop/applications/sun_java.desktop \
711 + > "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
712 + domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
713 + fi
714 +
715 + # Prune all fontconfig files so libfontconfig will be used and only install
716 + # a Gentoo specific one if fontconfig is disabled.
717 + # http://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
718 + rm "${ddest}"/jre/lib/fontconfig.*
719 + if ! use fontconfig ; then
720 + cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die
721 + eprefixify "${T}"/fontconfig.properties
722 + insinto "${dest}"/jre/lib/
723 + doins "${T}"/fontconfig.properties
724 + fi
725 +
726 + # This needs to be done before CDS - #215225
727 + java-vm_set-pax-markings "${ddest}"
728 +
729 + # see bug #207282
730 + einfo "Creating the Class Data Sharing archives"
731 + case ${ARCH} in
732 + arm|ia64)
733 + ${ddest}/bin/java -client -Xshare:dump || die
734 + ;;
735 + x86)
736 + ${ddest}/bin/java -client -Xshare:dump || die
737 + # limit heap size for large memory on x86 #467518
738 + # this is a workaround and shouldn't be needed.
739 + ${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
740 + ;;
741 + *)
742 + ${ddest}/bin/java -server -Xshare:dump || die
743 + ;;
744 + esac
745 +
746 + # Remove empty dirs we might have copied.
747 + find "${D}" -type d -empty -exec rmdir -v {} + || die
748 +
749 + if use x64-macos ; then
750 + # Fix miscellaneous install_name issues.
751 + pushd "${ddest}"/jre/lib > /dev/null || die
752 + local lib needed nlib npath
753 + for lib in decora_sse glass prism_{common,es2,sw} ; do
754 + lib=lib${lib}.dylib
755 + einfo "Fixing self-reference of ${lib}"
756 + install_name_tool \
757 + -id "${EPREFIX}${dest}/jre/lib/${lib}" \
758 + "${lib}"
759 + done
760 + popd > /dev/null
761 +
762 + # This is still jdk1{5,6}, even on Java 8, so don't change it
763 + # until you know different.
764 + for nlib in jdk1{5,6} ; do
765 + install_name_tool -change \
766 + /usr/lib/libgcc_s_ppc64.1.dylib \
767 + /usr/lib/libSystem.B.dylib \
768 + "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
769 + install_name_tool -id \
770 + "${EPREFIX}${dest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib \
771 + "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
772 + done
773 + fi
774 +
775 + set_java_env
776 + java-vm_revdep-mask
777 + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
778 +}
779 +
780 +pkg_postinst() {
781 + java-vm-2_pkg_postinst
782 +
783 + if ! use headless-awt && ! use javafx; then
784 + ewarn "You have disabled the javafx flag. Some modern desktop Java applications"
785 + ewarn "require this and they may fail with a confusing error message."
786 + fi
787 +}