Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 492996 | Differences between
and this patch

Collapse All | Expand All

(-)oracle-jdk-bin-1.7.0.45.ebuild (-19 / +62 lines)
Lines 11-20 Link Here
11
JCE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html"
11
JCE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html"
12
# This is a list of archs supported by this update.
12
# This is a list of archs supported by this update.
13
# Currently arm comes and goes.
13
# Currently arm comes and goes.
14
AT_AVAILABLE=( amd64 arm x86 x64-solaris x86-solaris sparc-solaris sparc64-solaris )
14
AT_AVAILABLE=( amd64 arm x86 x64-solaris x86-solaris sparc-solaris sparc64-solaris x86-macos x64-macos )
15
# Sometimes some or all of the demos are missing, this is to not have to rewrite half
15
# Sometimes some or all of the demos are missing, this is to not have to rewrite half
16
# the ebuild when it happens.
16
# the ebuild when it happens.
17
DEMOS_AVAILABLE=( amd64 arm x86 x64-solaris x86-solaris sparc-solaris sparc64-solaris )
17
DEMOS_AVAILABLE=( amd64 arm x86 x64-solaris x86-solaris sparc-solaris sparc64-solaris x86-macos x64-macos )
18
FX_VERSION="2_2_45"
18
FX_VERSION="2_2_45"
19
19
20
MY_PV="$(get_version_component_range 2)u$(get_version_component_range 4)"
20
MY_PV="$(get_version_component_range 2)u$(get_version_component_range 4)"
Lines 27-32 Link Here
27
AT_x64_solaris="${AT_x86_solaris} jdk-${MY_PV}-solaris-x64.tar.gz"
27
AT_x64_solaris="${AT_x86_solaris} jdk-${MY_PV}-solaris-x64.tar.gz"
28
AT_sparc_solaris="jdk-${MY_PV}-solaris-sparc.tar.gz"
28
AT_sparc_solaris="jdk-${MY_PV}-solaris-sparc.tar.gz"
29
AT_sparc64_solaris="${AT_sparc_solaris} jdk-${MY_PV}-solaris-sparcv9.tar.gz"
29
AT_sparc64_solaris="${AT_sparc_solaris} jdk-${MY_PV}-solaris-sparcv9.tar.gz"
30
AT_x86_macos="jdk-${MY_PV}-macosx-x64.dmg"
31
AT_x64_macos="jdk-${MY_PV}-macosx-x64.dmg"
30
32
31
FXDEMOS_linux="javafx_samples-${FX_VERSION}-linux.zip"
33
FXDEMOS_linux="javafx_samples-${FX_VERSION}-linux.zip"
32
34
Lines 37-42 Link Here
37
DEMOS_x64_solaris="${DEMOS_x86_solaris} jdk-${MY_PV}-solaris-x64-demos.tar.gz"
39
DEMOS_x64_solaris="${DEMOS_x86_solaris} jdk-${MY_PV}-solaris-x64-demos.tar.gz"
38
DEMOS_sparc_solaris="jdk-${MY_PV}-solaris-sparc-demos.tar.gz"
40
DEMOS_sparc_solaris="jdk-${MY_PV}-solaris-sparc-demos.tar.gz"
39
DEMOS_sparc64_solaris="${DEMOS_sparc_solaris} jdk-${MY_PV}-solaris-sparcv9-demos.tar.gz"
41
DEMOS_sparc64_solaris="${DEMOS_sparc_solaris} jdk-${MY_PV}-solaris-sparcv9-demos.tar.gz"
42
DEMOS_x86_macos="jdk-${MY_PV}-macosx-x86_64-demos.tar.gz"
43
DEMOS_x64_macos="jdk-${MY_PV}-macosx-x86_64-demos.tar.gz"
40
44
41
JCE_DIR="UnlimitedJCEPolicy"
45
JCE_DIR="UnlimitedJCEPolicy"
42
JCE_FILE="${JCE_DIR}JDK7.zip"
46
JCE_FILE="${JCE_DIR}JDK7.zip"
Lines 56-75 Link Here
56
60
57
LICENSE="Oracle-BCLA-JavaSE examples? ( BSD )"
61
LICENSE="Oracle-BCLA-JavaSE examples? ( BSD )"
58
SLOT="1.7"
62
SLOT="1.7"
59
KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
63
KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
60
IUSE="+X alsa derby doc examples +fontconfig jce nsplugin pax_kernel source"
64
IUSE="+X alsa aqua derby doc examples +fontconfig jce nsplugin pax_kernel source"
61
65
62
RESTRICT="fetch strip"
66
RESTRICT="fetch strip"
63
QA_PREBUILT="*"
67
QA_PREBUILT="*"
64
68
65
RDEPEND="
69
RDEPEND="
66
	X? (
70
	X? ( !aqua? (
67
		x11-libs/libX11
71
		x11-libs/libX11
68
		x11-libs/libXext
72
		x11-libs/libXext
69
		x11-libs/libXi
73
		x11-libs/libXi
70
		x11-libs/libXrender
74
		x11-libs/libXrender
71
		x11-libs/libXtst
75
		x11-libs/libXtst
72
	)
76
	) )
73
	alsa? ( media-libs/alsa-lib )
77
	alsa? ( media-libs/alsa-lib )
74
	doc? ( dev-java/java-sdk-docs:1.7 )
78
	doc? ( dev-java/java-sdk-docs:1.7 )
75
	fontconfig? ( media-libs/fontconfig )
79
	fontconfig? ( media-libs/fontconfig )
Lines 130-135 Link Here
130
		fi
134
		fi
131
		use examples && unpack javafx_samples-${FX_VERSION}-linux.zip
135
		use examples && unpack javafx_samples-${FX_VERSION}-linux.zip
132
		use jce && unpack ${JCE_FILE}
136
		use jce && unpack ${JCE_FILE}
137
	elif use x86-macos || use x64-macos ; then
138
		pushd "${T}" > /dev/null
139
		mkdir dmgmount
140
		hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
141
			-mountpoint "${T}"/dmgmount
142
		xar -xf dmgmount/JDK\ $(get_version_component_range 2)\ Update\ $(get_version_component_range 4).pkg
143
		hdiutil detach "${T}"/dmgmount
144
		zcat jdk1${MY_PV/u/0}.pkg/Payload | cpio -idv
145
		mv Contents/Home "${S}"
146
		popd > /dev/null
133
	else
147
	else
134
		default
148
		default
135
	fi
149
	fi
Lines 223-241 Link Here
223
		cp src.zip "${ddest}" || die
237
		cp src.zip "${ddest}" || die
224
	fi
238
	fi
225
239
226
	# Install desktop file for the Java Control Panel.
240
	if use !x86-macos && use !x64-macos ; then
227
	# Using ${PN}-${SLOT} to prevent file collision with jre and or other slots.
241
		# Install desktop file for the Java Control Panel.
228
	# make_desktop_entry can't be used as ${P} would end up in filename.
242
		# Using ${PN}-${SLOT} to prevent file collision with jre and or
229
	newicon jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
243
		# other slots.  make_desktop_entry can't be used as ${P} would
230
		sun-jcontrol-${PN}-${SLOT}.png || die
244
		# end up in filename.
231
	sed -e "s#Name=.*#Name=Java Control Panel for Oracle JDK ${SLOT}#" \
245
		newicon jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
232
		-e "s#Exec=.*#Exec=/opt/${P}/jre/bin/jcontrol#" \
246
			sun-jcontrol-${PN}-${SLOT}.png || die
233
		-e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
247
		sed -e "s#Name=.*#Name=Java Control Panel for Oracle JDK ${SLOT}#" \
234
		-e "s#Application;##" \
248
			-e "s#Exec=.*#Exec=/opt/${P}/jre/bin/jcontrol#" \
235
		-e "/Encoding/d" \
249
			-e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
236
		jre/lib/desktop/applications/sun_java.desktop \
250
			-e "s#Application;##" \
237
		> "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
251
			-e "/Encoding/d" \
238
	domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
252
			jre/lib/desktop/applications/sun_java.desktop \
253
			> "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
254
		domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
255
	fi
239
256
240
	# Prune all fontconfig files so libfontconfig will be used and only install
257
	# Prune all fontconfig files so libfontconfig will be used and only install
241
	# a Gentoo specific one if fontconfig is disabled.
258
	# a Gentoo specific one if fontconfig is disabled.
Lines 251-256 Link Here
251
	# Remove empty dirs we might have copied
268
	# Remove empty dirs we might have copied
252
	find "${D}" -type d -empty -exec rmdir -v {} + || die
269
	find "${D}" -type d -empty -exec rmdir -v {} + || die
253
270
271
	if use x86-macos || use x64-macos ; then
272
		# fix misc rpath issues
273
		pushd "${ddest}"/jre/lib > /dev/null || die
274
		local lib needed nlib npath
275
		for lib in \
276
				libJObjC libdecora-sse libglass libjavafx-{font,iio} \
277
				libjfxmedia libjfxwebkit libprism-es2 ;
278
		do
279
			lib=${lib}.dylib
280
			einfo "Fixing self-reference of ${lib}"
281
			install_name_tool \
282
				-id "${EPREFIX}${dest}/jre/lib/${lib}" \
283
				"${lib}"
284
		done
285
		popd > /dev/null
286
		for nlib in jdk1{5,6} ; do
287
			install_name_tool -change \
288
				/usr/lib/libgcc_s_ppc64.1.dylib \
289
				$($(tc-getCC) -print-file-name=libgcc_s_ppc64.1.dylib) \
290
				"${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
291
			install_name_tool -id \
292
				"${EPREFIX}${dest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib \
293
				"${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib
294
		done
295
	fi
296
254
	set_java_env
297
	set_java_env
255
	java-vm_revdep-mask
298
	java-vm_revdep-mask
256
	java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
299
	java-vm_sandbox-predict /dev/random /proc/self/coredump_filter

Return to bug 492996