Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 485770
Collapse All | Expand All

(-)adobe-flash-11.2.202.310.ebuild (-114 / +114 lines)
Lines 3-9 Link Here
3
# $Header: /var/cvsroot/gentoo-x86/www-plugins/adobe-flash/adobe-flash-11.2.202.310.ebuild,v 1.2 2013/09/11 09:04:54 pinkbyte Exp $
3
# $Header: /var/cvsroot/gentoo-x86/www-plugins/adobe-flash/adobe-flash-11.2.202.310.ebuild,v 1.2 2013/09/11 09:04:54 pinkbyte Exp $
4
4
5
EAPI=5
5
EAPI=5
6
inherit nsplugins multilib toolchain-funcs versionator
6
inherit nsplugins multilib toolchain-funcs versionator multilib-minimal
7
7
8
DESCRIPTION="Adobe Flash Player"
8
DESCRIPTION="Adobe Flash Player"
9
HOMEPAGE="http://www.adobe.com/products/flashplayer.html"
9
HOMEPAGE="http://www.adobe.com/products/flashplayer.html"
Lines 16-37 Link Here
16
AF_32_DB_URI="${AF_DB_URI}/${PV_M}/flashplayer_${PV_M}_plugin_debug.i386.tar.gz -> ${P}-debug.i386.tar.gz"
16
AF_32_DB_URI="${AF_DB_URI}/${PV_M}/flashplayer_${PV_M}_plugin_debug.i386.tar.gz -> ${P}-debug.i386.tar.gz"
17
17
18
SRC_URI="
18
SRC_URI="
19
	x86? (
19
	abi_x86_32? (
20
		!debug? ( ${AF_32_URI} )
20
		!debug? ( ${AF_32_URI} )
21
		debug? ( ${AF_32_DB_URI} )
21
		debug? ( ${AF_32_DB_URI} )
22
	)
22
	)
23
	amd64? (
23
	abi_x86_64? ( ${AF_64_URI} )
24
		multilib? (
25
			32bit? (
26
				!debug? ( ${AF_32_URI} )
27
				debug? ( ${AF_32_DB_URI} )
28
			)
29
			64bit? ( ${AF_64_URI} )
30
		)
31
		!multilib? ( ${AF_64_URI} )
32
	)
33
"
24
"
34
IUSE="-32bit +64bit debug kde multilib selinux sse2"
25
IUSE="debug kde selinux sse2"
35
REQUIRED_USE="sse2"
26
REQUIRED_USE="sse2"
36
SLOT="0"
27
SLOT="0"
37
28
Lines 42-74 Link Here
42
S="${WORKDIR}"
33
S="${WORKDIR}"
43
34
44
NATIVE_DEPS="
35
NATIVE_DEPS="
45
	>=sys-libs/glibc-2.4
36
	dev-libs/atk
37
	dev-libs/glib:2
46
	dev-libs/nspr
38
	dev-libs/nspr
47
	dev-libs/nss
39
	dev-libs/nss
48
	kde? ( kde-base/kcmshell )
40
	kde? ( 
41
		dev-qt/qtcore:4
42
		dev-qt/qtdbus:4
43
		dev-qt/qtgui:4
44
		dev-qt/qtsvg:4
45
		kde-base/kdelibs
46
		x11-libs/libICE
47
		x11-libs/libSM
48
		x11-libs/libXau
49
		x11-libs/libXdmcp
50
		x11-libs/libXext
51
		x11-libs/libXft
52
		x11-libs/libXpm
53
	)
49
	media-libs/fontconfig
54
	media-libs/fontconfig
50
	net-misc/curl
55
	media-libs/freetype
56
	>=sys-libs/glibc-2.4
57
	x11-libs/cairo
58
	x11-libs/gdk-pixbuf
51
	x11-libs/gtk+:2
59
	x11-libs/gtk+:2
52
"
60
	x11-libs/libX11
53
61
	x11-libs/libXcursor
54
EMUL_DEPS="
62
	x11-libs/libXext
55
	>=app-emulation/emul-linux-x86-gtklibs-20100409-r1
63
	x11-libs/libXrender
56
	app-emulation/emul-linux-x86-soundlibs
64
	x11-libs/libXt
65
	x11-libs/pango
57
"
66
"
58
67
59
DEPEND="
68
DEPEND="
60
	amd64? ( multilib? ( !64bit? ( www-plugins/nspluginwrapper ) ) )
69
	amd64? ( abi_x86_32? ( www-plugins/nspluginwrapper ) )
61
	selinux? ( sec-policy/selinux-flash )
70
	selinux? ( sec-policy/selinux-flash )
62
"
71
"
63
RDEPEND="
72
RDEPEND="
64
	${DEPEND}
73
	${DEPEND}
65
	x86? ( $NATIVE_DEPS )
74
	abi_x86_64? ( $NATIVE_DEPS )
66
	amd64? (
75
	abi_x86_32? (
67
		multilib? (
76
		amd64? (
68
			64bit? ( $NATIVE_DEPS )
77
			|| (
69
			32bit? ( $EMUL_DEPS )
78
				(
79
					dev-libs/atk[abi_x86_32(-)]
80
					x11-libs/cairo[abi_x86_32(-)]
81
					x11-libs/gdk-pixbuf[abi_x86_32(-)]
82
					x11-libs/gtk+:2[abi_x86_32(-)]
83
					x11-libs/pango[abi_x86_32(-)]
84
				)
85
				app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)]
86
			)
87
			|| (
88
				(
89
					dev-libs/glib:2[abi_x86_32(-)]
90
					dev-libs/nspr[abi_x86_32(-)]
91
					dev-libs/nss[abi_x86_32(-)]
92
				)
93
				app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
94
			)
95
			|| (
96
				(
97
					media-libs/fontconfig[abi_x86_32(-)]
98
					media-libs/freetype[abi_x86_32(-)]
99
					x11-libs/libX11[abi_x86_32(-)]
100
					x11-libs/libXcursor[abi_x86_32(-)]
101
					x11-libs/libXext[abi_x86_32(-)]
102
					x11-libs/libXrender[abi_x86_32(-)]
103
					x11-libs/libXt[abi_x86_32(-)]
104
				)
105
				app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
106
			)
70
		)
107
		)
71
		!multilib? ( $NATIVE_DEPS )
108
		x86? ( $NATIVE_DEPS )
72
	)
109
	)
73
	|| ( media-fonts/liberation-fonts media-fonts/corefonts )
110
	|| ( media-fonts/liberation-fonts media-fonts/corefonts )
74
"
111
"
Lines 85-143 Link Here
85
}
122
}
86
123
87
pkg_setup() {
124
pkg_setup() {
88
	if use x86; then
125
	unset need_lahf_wrapper
89
		export native_install=1
126
	if use amd64 && use abi_x86_64 && any_cpu_missing_flag 'lahf_lm'; then
90
	elif use amd64; then
127
		export need_lahf_wrapper=1
91
		# amd64 users may unselect the native 64bit binary, if they choose
92
		# TODO: In future revisions, remove this ability now that 64-bit
93
		# binaries are officially released and working.
94
		if ! use multilib || use 64bit; then
95
			export native_install=1
96
		else
97
			unset native_install
98
		fi
99
100
		if use multilib && use 32bit; then
101
			export amd64_32bit=1
102
		else
103
			unset amd64_32bit
104
		fi
105
106
		if use multilib && ! use 32bit && ! use 64bit; then
107
			eerror "You must select at least one architecture USE flag (32bit or 64bit)"
108
			die "No library version selected [-32bit -64bit]"
109
		fi
110
111
		unset need_lahf_wrapper
112
		if [[ $native_install ]]; then
113
			# 64bit flash requires the 'lahf' instruction (bug #268336)
114
			if any_cpu_missing_flag 'lahf_lm'; then
115
				export need_lahf_wrapper=1
116
			fi
117
		fi
118
	fi
128
	fi
119
}
129
}
120
130
121
src_unpack() {
131
src_unpack() {
122
	if [[ $amd64_32bit ]]; then
132
	unpack_for_abi() {
123
		# Since the 32-bit and 64-bit packages collide, put the 32-bit one
133
		mkdir -p "${BUILD_DIR}" || die
124
		# elsewhere:
134
		pushd "${BUILD_DIR}" || die
125
		local my_32b_src=${AF_32_URI##*>}
135
		if use debug; then
126
		local my_64b_src=${AF_64_URI##*>}
136
			local my_src=${AF_32_URI##*>}
127
		if [[ $native_install ]]; then
137
		else
128
			unpack $my_64b_src
138
			local my_src=${AF_32_DB_URI##*>}
129
		fi
139
		fi
130
		mkdir 32bit
140
		[[ ${ABI} == "amd64" ]] && my_src="${AF_64_URI##*>}"
131
		pushd 32bit >/dev/null
141
		unpack $my_src
132
		unpack $my_32b_src
142
		# shortcut the need for PKGLIB using a common symlink
133
		popd >/dev/null
143
		if [[ -d /usr/lib64 ]] ; then
134
	else
144
			ln -s /usr/lib64 usr/correctlib
135
		default_src_unpack
145
		else
136
	fi
146
			ln -s /usr/lib usr/correctlib
147
		fi
148
		popd || die
149
	}
150
	multilib_parallel_foreach_abi unpack_for_abi
137
}
151
}
138
152
139
src_compile() {
153
multilib_src_compile() {
140
	if [[ $need_lahf_wrapper ]]; then
154
	if [[ ${ABI} == "amd64" ]] && [[ $need_lahf_wrapper ]]; then
141
		# This experimental wrapper, from Maks Verver via bug #268336 should
155
		# This experimental wrapper, from Maks Verver via bug #268336 should
142
		# emulate the missing lahf instruction affected platforms.
156
		# emulate the missing lahf instruction affected platforms.
143
		$(tc-getCC) -fPIC -shared -nostdlib -lc -oflashplugin-lahf-fix.so \
157
		$(tc-getCC) -fPIC -shared -nostdlib -lc -oflashplugin-lahf-fix.so \
Lines 146-169 Link Here
146
	fi
160
	fi
147
}
161
}
148
162
149
src_install() {
163
multilib_src_install() {
150
	if [[ $native_install ]]; then
164
	local BASE=${INSTALL_BASE}
151
		if use x86; then
152
			local PKGLIB=lib
153
		else
154
			local PKGLIB=lib64
155
		fi
156
		local BASE=${INSTALL_BASE}
157
165
166
	if multilib_build_binaries; then
158
		# The plugin itself
167
		# The plugin itself
159
		exeinto /${BASE}/flash-plugin
168
		exeinto /${BASE}/flash-plugin
160
		doexe libflashplayer.so
169
		doexe libflashplayer.so
161
		inst_plugin /${BASE}/flash-plugin/libflashplayer.so
170
		inst_plugin /${BASE}/flash-plugin/libflashplayer.so
162
171
163
		# The optional KDE4 KCM plugin
164
		if use kde; then
172
		if use kde; then
165
			exeinto /${BASE}/kde4
173
			exeinto /${BASE}/kde4
166
			doexe usr/${PKGLIB}/kde4/kcm_adobe_flash_player.so
174
			doexe usr/correctlib/kde4/kcm_adobe_flash_player.so
167
			dosym /${BASE}/kde4/kcm_adobe_flash_player.so \
175
			dosym /${BASE}/kde4/kcm_adobe_flash_player.so \
168
				/usr/$(get_libdir)/kde4/kcm_adobe_flash_player.so
176
				/usr/$(get_libdir)/kde4/kcm_adobe_flash_player.so
169
			insinto /usr/share/kde4/services
177
			insinto /usr/share/kde4/services
Lines 191-238 Link Here
191
		sed -i usr/share/applications/flash-player-properties.desktop \
199
		sed -i usr/share/applications/flash-player-properties.desktop \
192
			-e "s:^Exec=:Exec=/${BASE}/bin/:" || die "sed of .desktop file failed"
200
			-e "s:^Exec=:Exec=/${BASE}/bin/:" || die "sed of .desktop file failed"
193
		doins usr/share/applications/flash-player-properties.desktop
201
		doins usr/share/applications/flash-player-properties.desktop
194
	fi
195
196
	if [[ $need_lahf_wrapper ]]; then
197
		# This experimental wrapper, from Maks Verver via bug #268336 should
198
		# emulate the missing lahf instruction affected platforms.
199
		exeinto /${INSTALL_BASE}
200
		doexe flashplugin-lahf-fix.so
201
		inst_plugin /${INSTALL_BASE}/flashplugin-lahf-fix.so
202
	fi
203
202
204
	if [[ $amd64_32bit ]]; then
203
		if [[ ${ABI} == "amd64" ]] && [[ $need_lahf_wrapper ]]; then
205
		# Only install the plugin, nothing else for 32-bit.
204
			# This experimental wrapper, from Maks Verver via bug #268336 should
206
		local oldabi="${ABI}"
205
			# emulate the missing lahf instruction affected platforms.
207
		ABI="x86"
206
			exeinto /${INSTALL_BASE}
208
207
			doexe flashplugin-lahf-fix.so
209
		# 32b plugin
208
			inst_plugin /${INSTALL_BASE}/flashplugin-lahf-fix.so
210
		pushd "${S}/32bit"
209
		fi
211
			exeinto /${INSTALL_BASE}32
212
			doexe libflashplayer.so
213
			inst_plugin /${INSTALL_BASE}32/libflashplayer.so
214
		popd
215
210
216
		ABI="${oldabi}"
211
		# The magic config file!
212
		insinto "/etc/adobe"
213
		doins "${FILESDIR}/mms.cfg"
214
	else
215
		# install plugin only for alternate ABIs
216
		local mylibdir=$(get_libdir)
217
		BASE=${INSTALL_BASE}${mylibdir##*lib}
218
		exeinto /${BASE}
219
		doexe libflashplayer.so
220
		inst_plugin /${BASE}/libflashplayer.so
217
	fi
221
	fi
218
219
	# The magic config file!
220
	insinto "/etc/adobe"
221
	doins "${FILESDIR}/mms.cfg"
222
}
222
}
223
223
224
pkg_postinst() {
224
pkg_postinst() {
225
	if use amd64; then
225
	if use amd64 ; then
226
		if [[ $need_lahf_wrapper ]]; then
226
		if [[ $need_lahf_wrapper ]]; then
227
			ewarn "Your processor does not support the 'lahf' instruction which is used"
227
			ewarn "Your processor does not support the 'lahf' instruction which is used"
228
			ewarn "by Adobe's 64-bit flash binary. We have installed a wrapper which"
228
			ewarn "by Adobe's 64-bit flash binary. We have installed a wrapper which"
229
			ewarn "should allow this plugin to run. If you encounter problems, please"
229
			ewarn "should allow this plugin to run. If you encounter problems, please"
230
			ewarn "adjust your USE flags to install only the 32-bit version and reinstall:"
230
			ewarn "adjust your USE flags to install only the 32-bit version and reinstall:"
231
			ewarn " ${CATEGORY}/$PN[+32bit -64bit]"
231
			ewarn " ${CATEGORY}/$PN[+abi_x86_32 -abi_x86_64]"
232
			elog
232
			elog
233
		fi
233
		fi
234
		if has_version 'www-plugins/nspluginwrapper'; then
234
		if has_version 'www-plugins/nspluginwrapper'; then
235
			if [[ $native_install ]]; then
235
			if ! use abi_x86_32; then
236
				# TODO: Perhaps parse the output of 'nspluginwrapper -l'
236
				# TODO: Perhaps parse the output of 'nspluginwrapper -l'
237
				# TODO: However, the 64b flash plugin makes
237
				# TODO: However, the 64b flash plugin makes
238
				# TODO: 'nspluginwrapper -l' segfault.
238
				# TODO: 'nspluginwrapper -l' segfault.
Lines 249-255 Link Here
249
				nspluginwrapper -i "${FLASH_SOURCE}"
249
				nspluginwrapper -i "${FLASH_SOURCE}"
250
				ABI="${oldabi}"
250
				ABI="${oldabi}"
251
			fi
251
			fi
252
		elif [[ ! $native_install ]]; then
252
		elif use abi_x86_32; then
253
			elog "To use the 32-bit flash player in a native 64-bit browser,"
253
			elog "To use the 32-bit flash player in a native 64-bit browser,"
254
			elog "you must install www-plugins/nspluginwrapper"
254
			elog "you must install www-plugins/nspluginwrapper"
255
		fi
255
		fi

Return to bug 485770