Gentoo Archives: gentoo-commits

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