Gentoo Archives: gentoo-commits

From: "Tom Wijsman (tomwij)" <tomwij@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.0.ebuild ChangeLog
Date: Fri, 28 Mar 2014 14:55:53
Message-Id: 20140328145547.7131120051@flycatcher.gentoo.org
1 tomwij 14/03/28 14:55:47
2
3 Modified: ChangeLog
4 Added: oracle-jdk-bin-1.8.0.0.ebuild
5 Log:
6 Version bump to 1.8.0.0; for bug #505040, reported by wevrn5, contribution by Krzysztof Miksa, reviewed and adjusted.
7
8 (Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 6D34E57D)
9
10 Revision Changes Path
11 1.54 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.54&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog?rev=1.54&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog?r1=1.53&r2=1.54
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog,v
20 retrieving revision 1.53
21 retrieving revision 1.54
22 diff -u -r1.53 -r1.54
23 --- ChangeLog 26 Jan 2014 10:38:22 -0000 1.53
24 +++ ChangeLog 28 Mar 2014 14:55:47 -0000 1.54
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.53 2014/01/26 10:38:22 sera Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-java/oracle-jdk-bin/ChangeLog,v 1.54 2014/03/28 14:55:47 tomwij Exp $
30 +
31 +*oracle-jdk-bin-1.8.0.0 (28 Mar 2014)
32 +
33 + 28 Mar 2014; Tom Wijsman <TomWij@g.o> +files/oracle-jdk-bin-1.8.env,
34 + +oracle-jdk-bin-1.8.0.0.ebuild:
35 + Version bump to 1.8.0.0; for bug #505040, reported by wevrn5, contribution by
36 + Krzysztof Miksa, reviewed and adjusted.
37
38 26 Jan 2014; Ralph Sennhauser <sera@g.o>
39 -oracle-jdk-bin-1.7.0.45.ebuild:
40
41
42
43 1.1 dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.0.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.0.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.0.ebuild?rev=1.1&content-type=text/plain
47
48 Index: oracle-jdk-bin-1.8.0.0.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.0.ebuild,v 1.1 2014/03/28 14:55:47 tomwij 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 arm 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 arm 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 source"
114
115 RESTRICT="fetch strip"
116 QA_PREBUILT="*"
117
118 RDEPEND="
119 X? ( !aqua? (
120 x11-libs/libX11:0
121 x11-libs/libXext:0
122 x11-libs/libXi:0
123 x11-libs/libXrender:0
124 x11-libs/libXtst:0
125 ) )
126 alsa? ( media-libs/alsa-lib:0 )
127 doc? ( dev-java/java-sdk-docs:${SLOT} )
128 fontconfig? ( media-libs/fontconfig:1.0 )
129 !prefix? ( sys-libs/glibc:* )"
130
131 DEPEND="
132 jce? ( app-arch/unzip:0 )
133 examples? ( kernel_linux? ( app-arch/unzip:0 ) )"
134
135 # A PaX header isn't created by scanelf, so depend on paxctl to avoid fallback
136 # marking. See bug #427642.
137 DEPEND="${DEPEND}
138 pax_kernel? ( sys-apps/paxctl:0 )"
139
140 S="${WORKDIR}/jdk${S_PV}"
141
142 check_tarballs_available() {
143 local uri=$1; shift
144 local dl= unavailable=
145 for dl in "${@}" ; do
146 [[ ! -f "${DISTDIR}/${dl}" ]] && unavailable+=" ${dl}"
147 done
148
149 if [[ -n "${unavailable}" ]] ; then
150 if [[ -z ${_check_tarballs_available_once} ]] ; then
151 einfo
152 einfo "Oracle requires you to download the needed files manually after"
153 einfo "accepting their license through a javascript capable web browser."
154 einfo
155 _check_tarballs_available_once=1
156 fi
157 einfo "Download the following files:"
158 for dl in ${unavailable}; do
159 einfo " ${dl}"
160 done
161 einfo "at '${uri}'"
162 einfo "and move them to '${DISTDIR}'"
163 einfo
164 fi
165 }
166
167 pkg_nofetch() {
168 local distfiles=( $(eval "echo \${$(echo AT_${ARCH/-/_})}") )
169 if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}"; then
170 distfiles+=( $(eval "echo \${$(echo DEMOS_${ARCH/-/_})}") )
171 fi
172 check_tarballs_available "${JDK_URI}" "${distfiles[@]}"
173
174 use jce && check_tarballs_available "${JCE_URI}" "${JCE_FILE}"
175 }
176
177 src_unpack() {
178 if use arm ; then
179 # Special case for ARM soft VS hard float.
180 #if [[ ${CHOST} == *-hardfloat-* ]] ; then
181 unpack jdk-${MY_PV}-linux-arm-vfp-hflt.tar.gz
182 use examples && unpack jdk-${MY_PV}-linux-arm-vfp-hflt-demos.tar.gz
183 #else
184 # unpack jdk-${MY_PV}-linux-arm-vfp-sflt.tar.gz
185 # use examples && unpack jdk-${MY_PV}-linux-arm-vfp-sflt-demos.tar.gz
186 #fi
187 use jce && unpack ${JCE_FILE}
188 elif use x86-macos || use x64-macos ; then
189 pushd "${T}" > /dev/null
190 mkdir dmgmount
191 hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
192 -mountpoint "${T}"/dmgmount
193 xar -xf dmgmount/JDK\ $(get_version_component_range 2)\ Update\ $(get_version_component_range 4).pkg
194 hdiutil detach "${T}"/dmgmount
195 zcat jdk1${MY_PV/u/0}.pkg/Payload | cpio -idv
196 mv Contents/Home "${S}"
197 popd > /dev/null
198 else
199 default
200 fi
201 }
202
203 src_prepare() {
204 if use jce ; then
205 mv "${WORKDIR}"/${JCE_DIR} "${S}"/jre/lib/security/ || die
206 fi
207 }
208
209 src_compile() {
210 # This needs to be done before CDS - #215225
211 java-vm_set-pax-markings "${S}"
212
213 # see bug #207282
214 einfo "Creating the Class Data Sharing archives"
215 case ${ARCH} in
216 arm|ia64)
217 bin/java -client -Xshare:dump || die
218 ;;
219 x86)
220 bin/java -client -Xshare:dump || die
221 bin/java -server -Xshare:dump || die
222 ;;
223 *)
224 bin/java -server -Xshare:dump || die
225 ;;
226 esac
227
228 # Create files used as storage for system preferences.
229 mkdir jre/.systemPrefs || die
230 touch jre/.systemPrefs/.system.lock || die
231 touch jre/.systemPrefs/.systemRootModFile || die
232 }
233
234 src_install() {
235 local dest="/opt/${P}"
236 local ddest="${ED}${dest}"
237
238 # We should not need the ancient plugin for Firefox 2 anymore, plus it has
239 # writable executable segments
240 if use x86 ; then
241 rm -vf {,jre/}lib/i386/libjavaplugin_oji.so \
242 {,jre/}lib/i386/libjavaplugin_nscp*.so
243 rm -vrf jre/plugin/i386
244 fi
245
246 # Without nsplugin flag, also remove the new plugin
247 local arch=${ARCH};
248 use x86 && arch=i386;
249 if ! use nsplugin ; then
250 rm -vf {,jre/}lib/${arch}/libnpjp2.so \
251 {,jre/}lib/${arch}/libjavaplugin_jni.so
252 fi
253
254 dodoc COPYRIGHT
255 dohtml README.html
256
257 dodir "${dest}"
258 cp -pPR bin include jre lib man "${ddest}" || die
259
260 if use derby ; then
261 cp -pPR db "${ddest}" || die
262 fi
263
264 if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}" ; then
265 cp -pPR demo sample "${ddest}" || die
266 fi
267
268 if use jce ; then
269 dodir "${dest}"/jre/lib/security/strong-jce
270 mv "${ddest}"/jre/lib/security/US_export_policy.jar \
271 "${ddest}"/jre/lib/security/strong-jce || die
272 mv "${ddest}"/jre/lib/security/local_policy.jar \
273 "${ddest}"/jre/lib/security/strong-jce || die
274 dosym "${dest}"/jre/lib/security/${JCE_DIR}/US_export_policy.jar \
275 "${dest}"/jre/lib/security/US_export_policy.jar
276 dosym "${dest}"/jre/lib/security/${JCE_DIR}/local_policy.jar \
277 "${dest}"/jre/lib/security/local_policy.jar
278 fi
279
280 if use nsplugin ; then
281 install_mozilla_plugin "${dest}"/jre/lib/${arch}/libnpjp2.so
282 fi
283
284 if use source ; then
285 cp src.zip "${ddest}" || die
286 fi
287
288 if use !x86-macos && use !x64-macos ; then
289 # Install desktop file for the Java Control Panel.
290 # Using ${PN}-${SLOT} to prevent file collision with jre and or
291 # other slots. make_desktop_entry can't be used as ${P} would
292 # end up in filename.
293 newicon jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
294 sun-jcontrol-${PN}-${SLOT}.png || die
295 sed -e "s#Name=.*#Name=Java Control Panel for Oracle JDK ${SLOT}#" \
296 -e "s#Exec=.*#Exec=/opt/${P}/jre/bin/jcontrol#" \
297 -e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
298 -e "s#Application;##" \
299 -e "/Encoding/d" \
300 jre/lib/desktop/applications/sun_java.desktop \
301 > "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
302 domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
303 fi
304
305 # Prune all fontconfig files so libfontconfig will be used and only install
306 # a Gentoo specific one if fontconfig is disabled.
307 # http://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
308 rm "${ddest}"/jre/lib/fontconfig.*
309 if ! use fontconfig ; then
310 cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die
311 eprefixify "${T}"/fontconfig.properties
312 insinto "${dest}"/jre/lib/
313 doins "${T}"/fontconfig.properties
314 fi
315
316 # Remove empty dirs we might have copied.
317 find "${D}" -type d -empty -exec rmdir -v {} + || die
318
319 if use x86-macos || use x64-macos ; then
320 # Fix miscellaneous install_name issues.
321 pushd "${ddest}"/jre/lib > /dev/null || die
322 local lib needed nlib npath
323 for lib in \
324 libJObjC libdecora-sse libglass libjavafx-{font,iio} \
325 libjfxmedia libjfxwebkit libprism-es2 ;
326 do
327 lib=${lib}.dylib
328 einfo "Fixing self-reference of ${lib}"
329 install_name_tool \
330 -id "${EPREFIX}${dest}/jre/lib/${lib}" \
331 "${lib}"
332 done
333 popd > /dev/null
334
335 # TODO: This reads "jdk1{5,6}", what about "jdk1{7,8}"?
336 for nlib in jdk1{5,6} ; do
337 install_name_tool -change \
338 /usr/lib/libgcc_s_ppc64.1.dylib \
339 $($(tc-getCC) -print-file-name=libgcc_s_ppc64.1.dylib) \
340 "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
341 install_name_tool -id \
342 "${EPREFIX}${dest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib \
343 "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
344 done
345 fi
346
347 set_java_env
348 java-vm_revdep-mask
349 java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
350 }