Gentoo Archives: gentoo-commits

From: "Jim Ramsay (lack)" <lack@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-plugins/adobe-flash: ChangeLog adobe-flash-11.1.102.55.ebuild
Date: Mon, 28 Nov 2011 15:54:44
Message-Id: 20111128155434.28A152004B@flycatcher.gentoo.org
1 lack 11/11/28 15:54:34
2
3 Modified: ChangeLog
4 Added: adobe-flash-11.1.102.55.ebuild
5 Log:
6 Bug #390149: Flash player 11.1.102.55 is released
7
8 (Portage version: 2.1.10.31/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.110 www-plugins/adobe-flash/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/ChangeLog?rev=1.110&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/ChangeLog?rev=1.110&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/ChangeLog?r1=1.109&r2=1.110
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-plugins/adobe-flash/ChangeLog,v
20 retrieving revision 1.109
21 retrieving revision 1.110
22 diff -u -r1.109 -r1.110
23 --- ChangeLog 5 Oct 2011 12:32:41 -0000 1.109
24 +++ ChangeLog 28 Nov 2011 15:54:34 -0000 1.110
25 @@ -1,6 +1,12 @@
26 # ChangeLog for www-plugins/adobe-flash
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-plugins/adobe-flash/ChangeLog,v 1.109 2011/10/05 12:32:41 scarabeus Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-plugins/adobe-flash/ChangeLog,v 1.110 2011/11/28 15:54:34 lack Exp $
30 +
31 +*adobe-flash-11.1.102.55 (28 Nov 2011)
32 +
33 + 28 Nov 2011; Jim Ramsay <jim_ramsay@g.o>
34 + +adobe-flash-11.1.102.55.ebuild:
35 + Bug #390149: Flash player 11.1.102.55 is released
36
37 05 Oct 2011; Tomáš Chvátal <scarabeus@g.o>
38 adobe-flash-11.0.1.152.ebuild:
39
40
41
42 1.1 www-plugins/adobe-flash/adobe-flash-11.1.102.55.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/adobe-flash-11.1.102.55.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/adobe-flash-11.1.102.55.ebuild?rev=1.1&content-type=text/plain
46
47 Index: adobe-flash-11.1.102.55.ebuild
48 ===================================================================
49 # Copyright 1999-2011 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/www-plugins/adobe-flash/adobe-flash-11.1.102.55.ebuild,v 1.1 2011/11/28 15:54:34 lack Exp $
52
53 EAPI=4
54 inherit nsplugins multilib toolchain-funcs versionator rpm
55
56 MY_32B_URI="http://fpdownload.macromedia.com/get/flashplayer/pdc/${PV}/flash-plugin-${PV}-release.i386.rpm -> ${P}.i386.rpm"
57 MY_64B_URI="http://fpdownload.macromedia.com/get/flashplayer/pdc/${PV}/flash-plugin-${PV}-release.x86_64.rpm -> ${P}.x86_64.rpm"
58
59 DESCRIPTION="Adobe Flash Player"
60 SRC_URI="x86? ( ${MY_32B_URI} )
61 amd64? (
62 multilib? (
63 32bit? ( ${MY_32B_URI} )
64 64bit? ( ${MY_64B_URI} )
65 )
66 !multilib? ( ${MY_64B_URI} )
67 )"
68 HOMEPAGE="http://www.adobe.com/products/flashplayer.html"
69 IUSE="multilib -32bit +64bit vdpau kde"
70 SLOT="0"
71
72 KEYWORDS="-* ~amd64 ~x86"
73 LICENSE="AdobeFlash-10.3"
74 RESTRICT="strip mirror"
75
76 S="${WORKDIR}"
77
78 NATIVE_DEPS="x11-libs/gtk+:2
79 media-libs/fontconfig
80 dev-libs/nss
81 net-misc/curl
82 vdpau? ( x11-libs/libvdpau )
83 kde? ( kde-base/kcmshell )
84 >=sys-libs/glibc-2.4"
85
86 EMUL_DEPS="vdpau? ( >=app-emulation/emul-linux-x86-xlibs-20110129 )
87 >=app-emulation/emul-linux-x86-gtklibs-20100409-r1
88 app-emulation/emul-linux-x86-soundlibs"
89
90 DEPEND="amd64? ( multilib? ( !64bit? ( www-plugins/nspluginwrapper ) ) )"
91 RDEPEND="x86? ( $NATIVE_DEPS )
92 amd64? (
93 multilib? (
94 64bit? ( $NATIVE_DEPS )
95 32bit? ( $EMUL_DEPS )
96 )
97 !multilib? ( $NATIVE_DEPS )
98 )
99 || ( media-fonts/liberation-fonts media-fonts/corefonts )
100 ${DEPEND}"
101
102 # Where should this all go? (Bug #328639)
103 INSTALL_BASE="opt/Adobe/flash-player"
104
105 # Ignore QA warnings in these closed-source binaries, since we can't fix them:
106 QA_PREBUILT="opt/*"
107
108 pkg_setup() {
109 if use x86; then
110 export native_install=1
111 elif use amd64; then
112 # amd64 users may unselect the native 64bit binary, if they choose
113 # TODO: In future revisions, remove this ability now that 64-bit
114 # binaries are officially released and working.
115 if ! use multilib || use 64bit; then
116 export native_install=1
117 else
118 unset native_install
119 fi
120
121 if use multilib && use 32bit; then
122 export amd64_32bit=1
123 else
124 unset amd64_32bit
125 fi
126
127 if use multilib && ! use 32bit && ! use 64bit; then
128 eerror "You must select at least one architecture USE flag (32bit or 64bit)"
129 die "No library version selected [-32bit -64bit]"
130 fi
131
132 unset need_lahf_wrapper
133 if [[ $native_install ]]; then
134 # 64bit flash requires the 'lahf' instruction (bug #268336)
135 # Also, check if *any* of the processors are affected (bug #286159)
136 if grep '^flags' /proc/cpuinfo | grep -qv 'lahf_lm'; then
137 export need_lahf_wrapper=1
138 fi
139 fi
140 fi
141 }
142
143 src_unpack() {
144 if [[ $amd64_32bit ]]; then
145 # Since the 32-bit and 64-bit packages collide, put the 32-bit one
146 # elsewhere:
147 local my_32b_src=${MY_32B_URI##*>}
148 local my_64b_src=${MY_64B_URI##*>}
149 if [[ $native_install ]]; then
150 rpm_unpack $my_64b_src
151 fi
152 mkdir 32bit
153 pushd 32bit >/dev/null
154 rpm_unpack $my_32b_src
155 popd >/dev/null
156 else
157 rpm_src_unpack
158 fi
159 }
160
161 src_compile() {
162 if [[ $need_lahf_wrapper ]]; then
163 # This experimental wrapper, from Maks Verver via bug #268336 should
164 # emulate the missing lahf instruction affected platforms.
165 $(tc-getCC) -fPIC -shared -nostdlib -lc -oflashplugin-lahf-fix.so \
166 "${FILESDIR}/flashplugin-lahf-fix.c" \
167 || die "Compile of flashplugin-lahf-fix.so failed"
168 fi
169 }
170
171 src_install() {
172 if [[ $native_install ]]; then
173 if use x86; then
174 local RPMLIB="lib"
175 else
176 local RPMLIB="lib64"
177 fi
178 local BASE=${INSTALL_BASE}
179
180 # The plugin itself
181 exeinto /${BASE}/flash-plugin
182 doexe usr/${RPMLIB}/flash-plugin/libflashplayer.so
183 inst_plugin /${BASE}/flash-plugin/libflashplayer.so
184
185 # Also install the 'homecleanup' script:
186 doexe usr/${RPMLIB}/flash-plugin/homecleanup
187
188 # The optional KDE4 KCM plugin
189 if use kde; then
190 exeinto /${BASE}/kde4/
191 doexe usr/${RPMLIB}/kde4/kcm_adobe_flash_player.so
192 dosym /${BASE}/kde4/kcm_adobe_flash_player.so \
193 /usr/$(get_libdir)/kde4/kcm_adobe_flash_player.so
194 insinto /usr/share/kde4/services
195 doins usr/share/kde4/services/kcm_adobe_flash_player.desktop
196 else
197 # No KDE applet, so allow the GTK utility to show up in KDE:
198 sed -i usr/share/applications/flash-player-properties.desktop \
199 -e "/^NotShowIn=KDE;/d" || die "sed of .desktop file failed"
200 fi
201
202 # The userland 'flash-player-properties' standalone app:
203 exeinto /${BASE}/bin
204 doexe usr/bin/flash-player-properties
205
206 # Icon and .desktop for 'flash-player-properties'
207 for icon in $(find usr/share/icons/ -name '*.png'); do
208 insinto /$(dirname $icon)
209 doins $icon
210 done
211 insinto usr/share/applications
212 sed -i usr/share/applications/flash-player-properties.desktop \
213 -e "s:^Exec=:Exec=/${BASE}/bin/:" || die "sed of .desktop file failed"
214 doins usr/share/applications/flash-player-properties.desktop
215
216 # Documentation:
217 dodoc usr/${RPMLIB}/flash-plugin/README
218 fi
219
220 if [[ $need_lahf_wrapper ]]; then
221 # This experimental wrapper, from Maks Verver via bug #268336 should
222 # emulate the missing lahf instruction affected platforms.
223 exeinto /${INSTALL_BASE}
224 doexe flashplugin-lahf-fix.so
225 inst_plugin /${INSTALL_BASE}/flashplugin-lahf-fix.so
226 fi
227
228 if [[ $amd64_32bit ]]; then
229 # Only install the plugin, nothing else for 32-bit.
230 local oldabi="${ABI}"
231 ABI="x86"
232
233 # 32b plugin
234 pushd "${S}/32bit"
235 exeinto /${INSTALL_BASE}32
236 doexe usr/lib/flash-plugin/libflashplayer.so
237 inst_plugin /${INSTALL_BASE}32/libflashplayer.so
238 popd
239
240 ABI="${oldabi}"
241 fi
242
243 # The magic config file!
244 insinto "/etc/adobe"
245 doins "${FILESDIR}/mms.cfg"
246 }
247
248 pkg_postinst() {
249 if use amd64; then
250 if [[ $need_lahf_wrapper ]]; then
251 ewarn "Your processor does not support the 'lahf' instruction which is used"
252 ewarn "by Adobe's 64-bit flash binary. We have installed a wrapper which"
253 ewarn "should allow this plugin to run. If you encounter problems, please"
254 ewarn "adjust your USE flags to install only the 32-bit version and reinstall:"
255 ewarn " ${CATEGORY}/$PN[+32bit -64bit]"
256 elog
257 fi
258 if has_version 'www-plugins/nspluginwrapper'; then
259 if [[ $native_install ]]; then
260 # TODO: Perhaps parse the output of 'nspluginwrapper -l'
261 # However, the 64b flash plugin makes
262 # 'nspluginwrapper -l' segfault.
263 local FLASH_WRAPPER="${ROOT}/usr/lib64/nsbrowser/plugins/npwrapper.libflashplayer.so"
264 if [[ -f ${FLASH_WRAPPER} ]]; then
265 einfo "Removing duplicate 32-bit plugin wrapper: Native 64-bit plugin installed"
266 nspluginwrapper -r "${FLASH_WRAPPER}"
267 fi
268 else
269 einfo "nspluginwrapper detected: Installing plugin wrapper"
270 local oldabi="${ABI}"
271 ABI="x86"
272 local FLASH_SOURCE="${ROOT}/${INSTALL_BASE}32/libflashplayer.so"
273 nspluginwrapper -i "${FLASH_SOURCE}"
274 ABI="${oldabi}"
275 fi
276 elif [[ ! $native_install ]]; then
277 elog "To use the 32-bit flash player in a native 64-bit browser,"
278 elog "you must install www-plugins/nspluginwrapper"
279 fi
280 fi
281
282 ewarn "Flash player is closed-source, with a long history of security"
283 ewarn "issues. Please consider only running flash applets you know to"
284 ewarn "be safe. The 'flashblock' extension may help for mozilla users:"
285 ewarn " https://addons.mozilla.org/en-US/firefox/addon/433"
286 }