Gentoo Archives: gentoo-commits

From: "James Le Cuirot (chewi)" <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/oracle-jdk-bin: oracle-jdk-bin-1.8.0.40.ebuild ChangeLog oracle-jdk-bin-1.8.0.31.ebuild
Date: Tue, 03 Mar 2015 23:47:03
Message-Id: 20150303234658.AD29912FBA@oystercatcher.gentoo.org
1 chewi 15/03/03 23:46:58
2
3 Modified: ChangeLog
4 Added: oracle-jdk-bin-1.8.0.40.ebuild
5 Removed: oracle-jdk-bin-1.8.0.31.ebuild
6 Log:
7 Version bump of oracle-jdk-bin:8 wrt bug #542044
8
9 (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key 9C6D7DE4)
10
11 Revision Changes Path
12 1.88 dev-java/oracle-jdk-bin/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog?rev=1.88&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog?rev=1.88&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog?r1=1.87&r2=1.88
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog,v
21 retrieving revision 1.87
22 retrieving revision 1.88
23 diff -u -r1.87 -r1.88
24 --- ChangeLog 30 Jan 2015 05:20:54 -0000 1.87
25 +++ ChangeLog 3 Mar 2015 23:46:58 -0000 1.88
26 @@ -1,6 +1,12 @@
27 # ChangeLog for dev-java/oracle-jdk-bin
28 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog,v 1.87 2015/01/30 05:20:54 ercpe Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog,v 1.88 2015/03/03 23:46:58 chewi Exp $
31 +
32 +*oracle-jdk-bin-1.8.0.40 (03 Mar 2015)
33 +
34 + 03 Mar 2015; James Le Cuirot <chewi@g.o>
35 + +oracle-jdk-bin-1.8.0.40.ebuild, -oracle-jdk-bin-1.8.0.31.ebuild:
36 + Version bump of oracle-jdk-bin:8 wrt bug #542044
37
38 30 Jan 2015; Johann Schmitz <ercpe@g.o>
39 -oracle-jdk-bin-1.7.0.71.ebuild, -oracle-jdk-bin-1.7.0.72.ebuild,
40
41
42
43 1.1 dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.40.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.40.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.40.ebuild?rev=1.1&content-type=text/plain
47
48 Index: oracle-jdk-bin-1.8.0.40.ebuild
49 ===================================================================
50 # Copyright 1999-2015 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.40.ebuild,v 1.1 2015/03/03 23:46:58 chewi Exp $
53
54 EAPI="5"
55
56 inherit eutils java-vm-2 prefix versionator
57
58 # This URIs need to be updated when bumping!
59 JDK_URI="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"
60 JCE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html"
61
62 # This is a list of archs supported by this update.
63 # Currently arm comes and goes.
64 AT_AVAILABLE=( amd64 x86 x64-solaris sparc64-solaris x86-macos x64-macos )
65
66 # Sometimes some or all of the demos are missing, this is to not have to rewrite half
67 # the ebuild when it happens.
68 DEMOS_AVAILABLE=( amd64 x86 x64-solaris sparc64-solaris x86-macos x64-macos )
69
70 if [[ "$(get_version_component_range 4)" == 0 ]] ; then
71 S_PV="$(get_version_component_range 1-3)"
72 else
73 MY_PV_EXT="u$(get_version_component_range 4)"
74 S_PV="$(get_version_component_range 1-4)"
75 fi
76
77 MY_PV="$(get_version_component_range 2)${MY_PV_EXT}"
78
79 AT_amd64="jdk-${MY_PV}-linux-x64.tar.gz"
80 AT_arm="jdk-${MY_PV}-linux-arm-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_x86_macos="jdk-${MY_PV}-macosx-x64.dmg"
85 AT_x64_macos="jdk-${MY_PV}-macosx-x64.dmg"
86
87 DEMOS_amd64="jdk-${MY_PV}-linux-x64-demos.tar.gz"
88 DEMOS_arm="jdk-${MY_PV}-linux-arm-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_x86_macos="jdk-${MY_PV}-macosx-x86_64-demos.zip"
93 DEMOS_x64_macos="jdk-${MY_PV}-macosx-x86_64-demos.zip"
94
95 JCE_DIR="UnlimitedJCEPolicyJDK8"
96 JCE_FILE="jce_policy-8.zip"
97
98 DESCRIPTION="Oracle's Java SE Development Kit"
99 HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
100 for d in "${AT_AVAILABLE[@]}"; do
101 SRC_URI+=" ${d}? ( $(eval "echo \${$(echo AT_${d/-/_})}")"
102 if has ${d} "${DEMOS_AVAILABLE[@]}"; then
103 SRC_URI+=" examples? ( $(eval "echo \${$(echo DEMOS_${d/-/_})}") )"
104 fi
105 SRC_URI+=" )"
106 done
107 unset d
108 SRC_URI+=" jce? ( ${JCE_FILE} )"
109
110 LICENSE="Oracle-BCLA-JavaSE examples? ( BSD )"
111 SLOT="1.8"
112 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc64-solaris ~x64-solaris"
113 IUSE="+X alsa aqua derby doc examples +fontconfig jce nsplugin pax_kernel selinux source"
114
115 RESTRICT="fetch strip"
116 QA_PREBUILT="*"
117
118 COMMON_DEP=""
119 RDEPEND="${COMMON_DEP}
120 X? ( !aqua? (
121 x11-libs/libX11:0
122 x11-libs/libXext:0
123 x11-libs/libXi:0
124 x11-libs/libXrender:0
125 x11-libs/libXtst:0
126 ) )
127 alsa? ( media-libs/alsa-lib:0 )
128 doc? ( dev-java/java-sdk-docs:${SLOT} )
129 fontconfig? ( media-libs/fontconfig:1.0 )
130 !prefix? ( sys-libs/glibc:* )
131 selinux? ( sec-policy/selinux-java )"
132 # A PaX header isn't created by scanelf, so depend on paxctl to avoid fallback
133 # marking. See bug #427642.
134 DEPEND="${COMMON_DEP}
135 jce? ( app-arch/unzip:0 )
136 examples? ( kernel_linux? ( app-arch/unzip:0 ) )
137 pax_kernel? ( sys-apps/paxctl:0 )"
138
139 S="${WORKDIR}/jdk"
140
141 check_tarballs_available() {
142 local uri=$1; shift
143 local dl= unavailable=
144 for dl in "${@}" ; do
145 [[ ! -f "${DISTDIR}/${dl}" ]] && unavailable+=" ${dl}"
146 done
147
148 if [[ -n "${unavailable}" ]] ; then
149 if [[ -z ${_check_tarballs_available_once} ]] ; then
150 einfo
151 einfo "Oracle requires you to download the needed files manually after"
152 einfo "accepting their license through a javascript capable web browser."
153 einfo
154 _check_tarballs_available_once=1
155 fi
156 einfo "Download the following files:"
157 for dl in ${unavailable}; do
158 einfo " ${dl}"
159 done
160 einfo "at '${uri}'"
161 einfo "and move them to '${DISTDIR}'"
162 einfo
163 einfo "If the above mentioned urls do not point to the correct version anymore,"
164 einfo "please download the files from Oracle's java download archive:"
165 einfo
166 einfo " http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jdk-${MY_PV}-oth-JPR"
167 einfo
168 fi
169 }
170
171 pkg_nofetch() {
172 local distfiles=( $(eval "echo \${$(echo AT_${ARCH/-/_})}") )
173 if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}"; then
174 distfiles+=( $(eval "echo \${$(echo DEMOS_${ARCH/-/_})}") )
175 fi
176 check_tarballs_available "${JDK_URI}" "${distfiles[@]}"
177
178 use jce && check_tarballs_available "${JCE_URI}" "${JCE_FILE}"
179 }
180
181 src_unpack() {
182 if use arm ; then
183 # Special case for ARM soft VS hard float.
184 #if [[ ${CHOST} == *-hardfloat-* ]] ; then
185 unpack jdk-${MY_PV}-linux-arm-vfp-hflt.tar.gz
186 use examples && unpack jdk-${MY_PV}-linux-arm-vfp-hflt-demos.tar.gz
187 #else
188 # unpack jdk-${MY_PV}-linux-arm-vfp-sflt.tar.gz
189 # use examples && unpack jdk-${MY_PV}-linux-arm-vfp-sflt-demos.tar.gz
190 #fi
191 use jce && unpack ${JCE_FILE}
192 elif use x86-macos || use x64-macos ; then
193 pushd "${T}" > /dev/null
194 mkdir dmgmount
195 hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
196 -mountpoint "${T}"/dmgmount
197 local update=$(get_version_component_range 4)
198 [[ ${#update} == 1 ]] && update="0${update}"
199 xar -xf dmgmount/JDK\ $(get_version_component_range 2)\ Update\ ${update}.pkg
200 hdiutil detach "${T}"/dmgmount
201 zcat jdk1${MY_PV%u*}0${update}.pkg/Payload | cpio -idv
202 mv Contents/Home "${WORKDIR}"/jdk${MY_PV}
203 popd > /dev/null
204 else
205 default
206 fi
207
208 # Upstream is changing their versioning scheme every release around 1.8.0.*;
209 # to stop having to change it over and over again, just wildcard match and
210 # live a happy life instead of trying to get this new jdk1.8.0_05 to work.
211 mv "${WORKDIR}"/jdk* "${S}" || die
212 }
213
214 src_prepare() {
215 if use jce ; then
216 mv "${WORKDIR}"/${JCE_DIR} "${S}"/jre/lib/security/ || die
217 fi
218 }
219
220 src_install() {
221 local dest="/opt/${P}"
222 local ddest="${ED}${dest}"
223
224 # Create files used as storage for system preferences.
225 mkdir jre/.systemPrefs || die
226 touch jre/.systemPrefs/.system.lock || die
227 touch jre/.systemPrefs/.systemRootModFile || die
228
229 # We should not need the ancient plugin for Firefox 2 anymore, plus it has
230 # writable executable segments
231 if use x86 ; then
232 rm -vf {,jre/}lib/i386/libjavaplugin_oji.so \
233 {,jre/}lib/i386/libjavaplugin_nscp*.so
234 rm -vrf jre/plugin/i386
235 fi
236
237 # Without nsplugin flag, also remove the new plugin
238 local arch=${ARCH};
239 use x86 && arch=i386;
240 if ! use nsplugin ; then
241 rm -vf {,jre/}lib/${arch}/libnpjp2.so \
242 {,jre/}lib/${arch}/libjavaplugin_jni.so
243 fi
244
245 dodoc COPYRIGHT
246 dohtml README.html
247
248 dodir "${dest}"
249 cp -pPR bin include jre lib man "${ddest}" || die
250
251 if use derby ; then
252 cp -pPR db "${ddest}" || die
253 fi
254
255 if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}" ; then
256 cp -pPR demo sample "${ddest}" || die
257 fi
258
259 if use jce ; then
260 dodir "${dest}"/jre/lib/security/strong-jce
261 mv "${ddest}"/jre/lib/security/US_export_policy.jar \
262 "${ddest}"/jre/lib/security/strong-jce || die
263 mv "${ddest}"/jre/lib/security/local_policy.jar \
264 "${ddest}"/jre/lib/security/strong-jce || die
265 dosym "${dest}"/jre/lib/security/${JCE_DIR}/US_export_policy.jar \
266 "${dest}"/jre/lib/security/US_export_policy.jar
267 dosym "${dest}"/jre/lib/security/${JCE_DIR}/local_policy.jar \
268 "${dest}"/jre/lib/security/local_policy.jar
269 fi
270
271 if use nsplugin ; then
272 install_mozilla_plugin "${dest}"/jre/lib/${arch}/libnpjp2.so
273 fi
274
275 if use source ; then
276 cp -p src.zip "${ddest}" || die
277 fi
278
279 if [[ -d jre/lib/desktop ]] ; then
280 # Install desktop file for the Java Control Panel.
281 # Using ${PN}-${SLOT} to prevent file collision with jre and or
282 # other slots. make_desktop_entry can't be used as ${P} would
283 # end up in filename.
284 newicon jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
285 sun-jcontrol-${PN}-${SLOT}.png || die
286 sed -e "s#Name=.*#Name=Java Control Panel for Oracle JDK ${SLOT}#" \
287 -e "s#Exec=.*#Exec=/opt/${P}/jre/bin/jcontrol#" \
288 -e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
289 -e "s#Application;##" \
290 -e "/Encoding/d" \
291 jre/lib/desktop/applications/sun_java.desktop \
292 > "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
293 domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
294 fi
295
296 # Prune all fontconfig files so libfontconfig will be used and only install
297 # a Gentoo specific one if fontconfig is disabled.
298 # http://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
299 rm "${ddest}"/jre/lib/fontconfig.*
300 if ! use fontconfig ; then
301 cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die
302 eprefixify "${T}"/fontconfig.properties
303 insinto "${dest}"/jre/lib/
304 doins "${T}"/fontconfig.properties
305 fi
306
307 # This needs to be done before CDS - #215225
308 java-vm_set-pax-markings "${ddest}"
309
310 # see bug #207282
311 einfo "Creating the Class Data Sharing archives"
312 case ${ARCH} in
313 arm|ia64)
314 ${ddest}/bin/java -client -Xshare:dump || die
315 ;;
316 x86)
317 ${ddest}/bin/java -client -Xshare:dump || die
318 # limit heap size for large memory on x86 #467518
319 # this is a workaround and shouldn't be needed.
320 ${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
321 ;;
322 *)
323 ${ddest}/bin/java -server -Xshare:dump || die
324 ;;
325 esac
326
327 # Remove empty dirs we might have copied.
328 find "${D}" -type d -empty -exec rmdir -v {} + || die
329
330 if use x86-macos || use x64-macos ; then
331 # Fix miscellaneous install_name issues.
332 pushd "${ddest}"/jre/lib > /dev/null || die
333 local lib needed nlib npath
334 for lib in \
335 decora_sse glass jfx{media,webkit} \
336 javafx_{font,font_t2k,iio} prism_{common,es2,sw} \
337 ; do
338 lib=lib${lib}.dylib
339 einfo "Fixing self-reference of ${lib}"
340 install_name_tool \
341 -id "${EPREFIX}${dest}/jre/lib/${lib}" \
342 "${lib}"
343 done
344 popd > /dev/null
345
346 # TODO: This reads "jdk1{5,6}", what about "jdk1{7,8}"?
347 for nlib in jdk1{5,6} ; do
348 install_name_tool -change \
349 /usr/lib/libgcc_s_ppc64.1.dylib \
350 $($(tc-getCC) -print-file-name=libgcc_s_ppc64.1.dylib) \
351 "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
352 install_name_tool -id \
353 "${EPREFIX}${dest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib \
354 "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
355 done
356 fi
357
358 set_java_env
359 java-vm_revdep-mask
360 java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
361 }