Gentoo Archives: gentoo-commits

From: "Sebastian Pipping (sping)" <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/oracle-jdk-bin: ChangeLog oracle-jdk-bin-1.8.0.20.ebuild
Date: Tue, 02 Sep 2014 23:31:54
Message-Id: 20140902233148.BC4F548E6@oystercatcher.gentoo.org
1 sping 14/09/02 23:31:48
2
3 Modified: ChangeLog
4 Added: oracle-jdk-bin-1.8.0.20.ebuild
5 Log:
6 dev-java/oracle-jdk-bin: 1.8.0.20 (bug #520416)
7
8 (Portage version: 2.2.12/cvs/Linux x86_64, signed Manifest commit with key 0x401A1600)
9
10 Revision Changes Path
11 1.72 dev-java/oracle-jdk-bin/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog?rev=1.72&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog?rev=1.72&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog?r1=1.71&r2=1.72
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog,v
20 retrieving revision 1.71
21 retrieving revision 1.72
22 diff -u -r1.71 -r1.72
23 --- ChangeLog 10 Aug 2014 19:01:35 -0000 1.71
24 +++ ChangeLog 2 Sep 2014 23:31:48 -0000 1.72
25 @@ -1,6 +1,13 @@
26 # ChangeLog for dev-java/oracle-jdk-bin
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog,v 1.71 2014/08/10 19:01:35 sera Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog,v 1.72 2014/09/02 23:31:48 sping Exp $
30 +
31 +*oracle-jdk-bin-1.8.0.20 (02 Sep 2014)
32 +
33 + 02 Sep 2014; Sebastian Pipping <sping@g.o>
34 + +oracle-jdk-bin-1.8.0.20.ebuild:
35 + Dare to bump to 1.8.0.20 myself (bug #520416); new tool javapackager(1) could
36 + use a closer look
37
38 *oracle-jdk-bin-1.7.0.67 (10 Aug 2014)
39
40
41
42
43 1.1 dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.20.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.20.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.20.ebuild?rev=1.1&content-type=text/plain
47
48 Index: oracle-jdk-bin-1.8.0.20.ebuild
49 ===================================================================
50 # Copyright 1999-2014 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.20.ebuild,v 1.1 2014/09/02 23:31:48 sping 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 selinux? ( sec-policy/selinux-java )"
120 RDEPEND="${COMMON_DEP}
121 X? ( !aqua? (
122 x11-libs/libX11:0
123 x11-libs/libXext:0
124 x11-libs/libXi:0
125 x11-libs/libXrender:0
126 x11-libs/libXtst:0
127 ) )
128 alsa? ( media-libs/alsa-lib:0 )
129 doc? ( dev-java/java-sdk-docs:${SLOT} )
130 fontconfig? ( media-libs/fontconfig:1.0 )
131 !prefix? ( sys-libs/glibc:* )"
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 fi
164 }
165
166 pkg_nofetch() {
167 local distfiles=( $(eval "echo \${$(echo AT_${ARCH/-/_})}") )
168 if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}"; then
169 distfiles+=( $(eval "echo \${$(echo DEMOS_${ARCH/-/_})}") )
170 fi
171 check_tarballs_available "${JDK_URI}" "${distfiles[@]}"
172
173 use jce && check_tarballs_available "${JCE_URI}" "${JCE_FILE}"
174 }
175
176 src_unpack() {
177 if use arm ; then
178 # Special case for ARM soft VS hard float.
179 #if [[ ${CHOST} == *-hardfloat-* ]] ; then
180 unpack jdk-${MY_PV}-linux-arm-vfp-hflt.tar.gz
181 use examples && unpack jdk-${MY_PV}-linux-arm-vfp-hflt-demos.tar.gz
182 #else
183 # unpack jdk-${MY_PV}-linux-arm-vfp-sflt.tar.gz
184 # use examples && unpack jdk-${MY_PV}-linux-arm-vfp-sflt-demos.tar.gz
185 #fi
186 use jce && unpack ${JCE_FILE}
187 elif use x86-macos || use x64-macos ; then
188 pushd "${T}" > /dev/null
189 mkdir dmgmount
190 hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
191 -mountpoint "${T}"/dmgmount
192 local update=$(get_version_component_range 4)
193 [[ ${#update} == 1 ]] && update="0${update}"
194 xar -xf dmgmount/JDK\ $(get_version_component_range 2)\ Update\ ${update}.pkg
195 hdiutil detach "${T}"/dmgmount
196 zcat jdk1${MY_PV%u*}0${update}.pkg/Payload | cpio -idv
197 mv Contents/Home "${WORKDIR}"/jdk${MY_PV}
198 popd > /dev/null
199 else
200 default
201 fi
202
203 # Upstream is changing their versioning scheme every release around 1.8.0.*;
204 # to stop having to change it over and over again, just wildcard match and
205 # live a happy life instead of trying to get this new jdk1.8.0_05 to work.
206 mv "${WORKDIR}"/jdk* "${S}" || die
207 }
208
209 src_prepare() {
210 if use jce ; then
211 mv "${WORKDIR}"/${JCE_DIR} "${S}"/jre/lib/security/ || die
212 fi
213 }
214
215 src_install() {
216 local dest="/opt/${P}"
217 local ddest="${ED}${dest}"
218
219 # Create files used as storage for system preferences.
220 mkdir jre/.systemPrefs || die
221 touch jre/.systemPrefs/.system.lock || die
222 touch jre/.systemPrefs/.systemRootModFile || die
223
224 # We should not need the ancient plugin for Firefox 2 anymore, plus it has
225 # writable executable segments
226 if use x86 ; then
227 rm -vf {,jre/}lib/i386/libjavaplugin_oji.so \
228 {,jre/}lib/i386/libjavaplugin_nscp*.so
229 rm -vrf jre/plugin/i386
230 fi
231
232 # Without nsplugin flag, also remove the new plugin
233 local arch=${ARCH};
234 use x86 && arch=i386;
235 if ! use nsplugin ; then
236 rm -vf {,jre/}lib/${arch}/libnpjp2.so \
237 {,jre/}lib/${arch}/libjavaplugin_jni.so
238 fi
239
240 dodoc COPYRIGHT
241 dohtml README.html
242
243 dodir "${dest}"
244 cp -pPR bin include jre lib man "${ddest}" || die
245
246 if use derby ; then
247 cp -pPR db "${ddest}" || die
248 fi
249
250 if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}" ; then
251 cp -pPR demo sample "${ddest}" || die
252 fi
253
254 if use jce ; then
255 dodir "${dest}"/jre/lib/security/strong-jce
256 mv "${ddest}"/jre/lib/security/US_export_policy.jar \
257 "${ddest}"/jre/lib/security/strong-jce || die
258 mv "${ddest}"/jre/lib/security/local_policy.jar \
259 "${ddest}"/jre/lib/security/strong-jce || die
260 dosym "${dest}"/jre/lib/security/${JCE_DIR}/US_export_policy.jar \
261 "${dest}"/jre/lib/security/US_export_policy.jar
262 dosym "${dest}"/jre/lib/security/${JCE_DIR}/local_policy.jar \
263 "${dest}"/jre/lib/security/local_policy.jar
264 fi
265
266 if use nsplugin ; then
267 install_mozilla_plugin "${dest}"/jre/lib/${arch}/libnpjp2.so
268 fi
269
270 if use source ; then
271 cp -p src.zip "${ddest}" || die
272 fi
273
274 if use !x86-macos && use !x64-macos ; then
275 # Install desktop file for the Java Control Panel.
276 # Using ${PN}-${SLOT} to prevent file collision with jre and or
277 # other slots. make_desktop_entry can't be used as ${P} would
278 # end up in filename.
279 newicon jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
280 sun-jcontrol-${PN}-${SLOT}.png || die
281 sed -e "s#Name=.*#Name=Java Control Panel for Oracle JDK ${SLOT}#" \
282 -e "s#Exec=.*#Exec=/opt/${P}/jre/bin/jcontrol#" \
283 -e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
284 -e "s#Application;##" \
285 -e "/Encoding/d" \
286 jre/lib/desktop/applications/sun_java.desktop \
287 > "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
288 domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
289 fi
290
291 # Prune all fontconfig files so libfontconfig will be used and only install
292 # a Gentoo specific one if fontconfig is disabled.
293 # http://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
294 rm "${ddest}"/jre/lib/fontconfig.*
295 if ! use fontconfig ; then
296 cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die
297 eprefixify "${T}"/fontconfig.properties
298 insinto "${dest}"/jre/lib/
299 doins "${T}"/fontconfig.properties
300 fi
301
302 # This needs to be done before CDS - #215225
303 java-vm_set-pax-markings "${ddest}"
304
305 # see bug #207282
306 einfo "Creating the Class Data Sharing archives"
307 case ${ARCH} in
308 arm|ia64)
309 ${ddest}/bin/java -client -Xshare:dump || die
310 ;;
311 x86)
312 ${ddest}/bin/java -client -Xshare:dump || die
313 # limit heap size for large memory on x86 #467518
314 # this is a workaround and shouldn't be needed.
315 ${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
316 ;;
317 *)
318 ${ddest}/bin/java -server -Xshare:dump || die
319 ;;
320 esac
321
322 # Remove empty dirs we might have copied.
323 find "${D}" -type d -empty -exec rmdir -v {} + || die
324
325 if use x86-macos || use x64-macos ; then
326 # Fix miscellaneous install_name issues.
327 pushd "${ddest}"/jre/lib > /dev/null || die
328 local lib needed nlib npath
329 for lib in \
330 decora_sse glass jfx{media,webkit} \
331 javafx_{font,font_t2k,iio} prism_{common,es2,sw} \
332 ; do
333 lib=lib${lib}.dylib
334 einfo "Fixing self-reference of ${lib}"
335 install_name_tool \
336 -id "${EPREFIX}${dest}/jre/lib/${lib}" \
337 "${lib}"
338 done
339 popd > /dev/null
340
341 # TODO: This reads "jdk1{5,6}", what about "jdk1{7,8}"?
342 for nlib in jdk1{5,6} ; do
343 install_name_tool -change \
344 /usr/lib/libgcc_s_ppc64.1.dylib \
345 $($(tc-getCC) -print-file-name=libgcc_s_ppc64.1.dylib) \
346 "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
347 install_name_tool -id \
348 "${EPREFIX}${dest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib \
349 "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
350 done
351 fi
352
353 set_java_env
354 java-vm_revdep-mask
355 java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
356 }