Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-plugins/adobe-flash: adobe-flash-11.2.202.310-r1.ebuild ChangeLog
Date: Fri, 27 Sep 2013 19:35:14
Message-Id: 20130927193508.E8DC92004C@flycatcher.gentoo.org
1 mgorny 13/09/27 19:35:08
2
3 Modified: ChangeLog
4 Added: adobe-flash-11.2.202.310-r1.ebuild
5 Log:
6 Introduce a simplified, multilib-friendly ebuild by me, AxS and iamnr3.
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
9
10 Revision Changes Path
11 1.214 www-plugins/adobe-flash/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/ChangeLog?rev=1.214&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/ChangeLog?rev=1.214&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/ChangeLog?r1=1.213&r2=1.214
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-plugins/adobe-flash/ChangeLog,v
20 retrieving revision 1.213
21 retrieving revision 1.214
22 diff -u -r1.213 -r1.214
23 --- ChangeLog 11 Sep 2013 13:37:14 -0000 1.213
24 +++ ChangeLog 27 Sep 2013 19:35:08 -0000 1.214
25 @@ -1,6 +1,12 @@
26 # ChangeLog for www-plugins/adobe-flash
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-plugins/adobe-flash/ChangeLog,v 1.213 2013/09/11 13:37:14 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-plugins/adobe-flash/ChangeLog,v 1.214 2013/09/27 19:35:08 mgorny Exp $
30 +
31 +*adobe-flash-11.2.202.310-r1 (27 Sep 2013)
32 +
33 + 27 Sep 2013; Michał Górny <mgorny@g.o>
34 + +adobe-flash-11.2.202.310-r1.ebuild:
35 + Introduce a simplified, multilib-friendly ebuild by me, AxS and iamnr3.
36
37 11 Sep 2013; Jeroen Roovers <jer@g.o>
38 -adobe-flash-11.2.202.297.ebuild, -files/memcpy-to-memmove.sh:
39
40
41
42 1.1 www-plugins/adobe-flash/adobe-flash-11.2.202.310-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/adobe-flash-11.2.202.310-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/adobe-flash-11.2.202.310-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: adobe-flash-11.2.202.310-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2013 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.2.202.310-r1.ebuild,v 1.1 2013/09/27 19:35:08 mgorny Exp $
52
53 EAPI=5
54 inherit nsplugins toolchain-funcs versionator multilib-minimal
55
56 DESCRIPTION="Adobe Flash Player"
57 HOMEPAGE="http://www.adobe.com/products/flashplayer.html"
58
59 AF_URI="http://fpdownload.macromedia.com/get/flashplayer/pdc"
60 AF_DB_URI="http://fpdownload.macromedia.com/pub/flashplayer/updaters"
61 PV_M=$(get_major_version)
62 AF_32_URI="${AF_URI}/${PV}/install_flash_player_${PV_M}_linux.i386.tar.gz -> ${P}.i386.tar.gz"
63 AF_64_URI="${AF_URI}/${PV}/install_flash_player_${PV_M}_linux.x86_64.tar.gz -> ${P}.x86_64.tar.gz"
64 AF_32_DB_URI="${AF_DB_URI}/${PV_M}/flashplayer_${PV_M}_plugin_debug.i386.tar.gz -> ${P}-debug.i386.tar.gz"
65
66 SRC_URI="
67 abi_x86_32? (
68 !debug? ( ${AF_32_URI} )
69 debug? ( ${AF_32_DB_URI} )
70 )
71 abi_x86_64? ( ${AF_64_URI} )
72 "
73 IUSE="debug kde selinux sse2"
74 REQUIRED_USE="sse2 debug? ( abi_x86_32 )"
75 SLOT="0"
76
77 KEYWORDS="-* ~amd64 ~x86"
78 LICENSE="AdobeFlash-11.x"
79 RESTRICT="strip mirror"
80
81 S="${WORKDIR}"
82
83 NATIVE_DEPS="
84 dev-libs/atk
85 dev-libs/glib:2
86 dev-libs/nspr
87 dev-libs/nss
88 kde? (
89 dev-qt/qtcore:4
90 dev-qt/qtdbus:4
91 dev-qt/qtgui:4
92 dev-qt/qtsvg:4
93 kde-base/kdelibs
94 x11-libs/libICE
95 x11-libs/libSM
96 x11-libs/libXau
97 x11-libs/libXdmcp
98 x11-libs/libXext
99 x11-libs/libXft
100 x11-libs/libXpm
101 )
102 media-libs/fontconfig
103 media-libs/freetype
104 >=sys-libs/glibc-2.4
105 x11-libs/cairo
106 x11-libs/gdk-pixbuf
107 x11-libs/gtk+:2
108 x11-libs/libX11
109 x11-libs/libXcursor
110 x11-libs/libXext
111 x11-libs/libXrender
112 x11-libs/libXt
113 x11-libs/pango
114 "
115
116 DEPEND="
117 amd64? ( abi_x86_32? ( www-plugins/nspluginwrapper ) )
118 selinux? ( sec-policy/selinux-flash )
119 "
120 RDEPEND="
121 ${DEPEND}
122 abi_x86_64? ( ${NATIVE_DEPS} )
123 abi_x86_32? (
124 amd64? (
125 || (
126 (
127 dev-libs/atk[abi_x86_32(-)]
128 x11-libs/cairo[abi_x86_32(-)]
129 x11-libs/gdk-pixbuf[abi_x86_32(-)]
130 x11-libs/gtk+:2[abi_x86_32(-)]
131 x11-libs/pango[abi_x86_32(-)]
132 )
133 app-emulation/emul-linux-x86-gtklibs
134 )
135 || (
136 (
137 dev-libs/glib:2[abi_x86_32(-)]
138 dev-libs/nspr[abi_x86_32(-)]
139 dev-libs/nss[abi_x86_32(-)]
140 )
141 app-emulation/emul-linux-x86-baselibs
142 )
143 || (
144 (
145 media-libs/fontconfig[abi_x86_32(-)]
146 media-libs/freetype[abi_x86_32(-)]
147 x11-libs/libX11[abi_x86_32(-)]
148 x11-libs/libXcursor[abi_x86_32(-)]
149 x11-libs/libXext[abi_x86_32(-)]
150 x11-libs/libXrender[abi_x86_32(-)]
151 x11-libs/libXt[abi_x86_32(-)]
152 )
153 app-emulation/emul-linux-x86-xlibs
154 )
155 )
156 x86? ( ${NATIVE_DEPS} )
157 )
158 || ( media-fonts/liberation-fonts media-fonts/corefonts )
159 "
160
161 # Where should this all go? (Bug #328639)
162 INSTALL_BASE="opt/Adobe/flash-player"
163
164 # Ignore QA warnings in these closed-source binaries, since we can't fix them:
165 QA_PREBUILT="opt/*"
166
167 any_cpu_missing_flag() {
168 local value=${1}
169 grep '^flags' /proc/cpuinfo | grep -qv "${value}"
170 }
171
172 pkg_setup() {
173 unset need_lahf_wrapper
174 if use abi_x86_64 && any_cpu_missing_flag 'lahf_lm'; then
175 export need_lahf_wrapper=1
176 fi
177 }
178
179 src_unpack() {
180 local files=( ${A} )
181
182 multilib_src_unpack() {
183 mkdir -p "${BUILD_DIR}" || die
184 cd "${BUILD_DIR}" || die
185
186 # we need to filter out the other archive(s)
187 local other_abi
188 [[ ${ABI} == amd64 ]] && other_abi=i386 || other_abi=x86_64
189 unpack ${files[@]//*${other_abi}*/}
190 }
191
192 multilib_parallel_foreach_abi multilib_src_unpack
193 }
194
195 src_configure() { :; }
196
197 multilib_src_compile() {
198 if [[ ${ABI} == amd64 && ${need_lahf_wrapper} ]]; then
199 # This experimental wrapper, from Maks Verver via bug #268336 should
200 # emulate the missing lahf instruction affected platforms.
201 set -- $(tc-getCC) -fPIC -shared -nostdlib -lc \
202 -oflashplugin-lahf-fix.so "${FILESDIR}/flashplugin-lahf-fix.c"
203 echo "${@}" >&2
204 "${@}" || die "Compile of flashplugin-lahf-fix.so failed"
205 fi
206 }
207
208 multilib_src_install() {
209 # PLUGINS_DIR comes from nsplugins.eclass
210 exeinto /usr/$(get_libdir)/${PLUGINS_DIR}
211 doexe libflashplayer.so
212
213 if [[ ${ABI} == amd64 && ${need_lahf_wrapper} ]]; then
214 # This experimental wrapper, from Maks Verver via bug #268336 should
215 # emulate the missing lahf instruction affected platforms.
216 doexe flashplugin-lahf-fix.so
217 fi
218
219 if multilib_build_binaries; then
220 if use kde; then
221 local pkglibdir=lib
222 [[ -d usr/lib64 ]] && pkglibdir=lib64
223
224 exeinto /usr/$(get_libdir)/kde4
225 doexe usr/${pkglibdir}/kde4/kcm_adobe_flash_player.so
226 insinto /usr/share/kde4/services
227 doins usr/share/kde4/services/kcm_adobe_flash_player.desktop
228 else
229 # No KDE applet, so allow the GTK utility to show up in KDE:
230 sed -i usr/share/applications/flash-player-properties.desktop \
231 -e "/^NotShowIn=KDE;/d" || die "sed of .desktop file failed"
232 fi
233
234 # The userland 'flash-player-properties' standalone app:
235 dobin usr/bin/flash-player-properties
236
237 # Icon and .desktop for 'flash-player-properties'
238 insinto /usr/share
239 doins -r usr/share/{icons,applications}
240 dosym ../icons/hicolor/48x48/apps/flash-player-properties.png \
241 /usr/share/pixmaps/flash-player-properties.png
242 fi
243
244 # The magic config file!
245 insinto "/etc/adobe"
246 doins "${FILESDIR}/mms.cfg"
247 }
248
249 unregister_pluginwrapper() {
250 # TODO: Perhaps parse the output of 'nspluginwrapper -l'
251 # TODO: However, the 64b flash plugin makes
252 # TODO: 'nspluginwrapper -l' segfault.
253 local FLASH_WRAPPER="${ROOT}/usr/lib64/${PLUGINS_DIR}/npwrapper.libflashplayer.so"
254 if has_version 'www-plugins/nspluginwrapper' && [[ -f ${FLASH_WRAPPER} ]]; then
255 einfo "Removing 32-bit plugin wrapper"
256 nspluginwrapper -r "${FLASH_WRAPPER}"
257 fi
258 }
259
260 pkg_postinst() {
261 if use amd64 ; then
262 if [[ ${need_lahf_wrapper} ]]; then
263 ewarn "Your processor does not support the 'lahf' instruction which is used"
264 ewarn "by Adobe's 64-bit flash binary. We have installed a wrapper which"
265 ewarn "should allow this plugin to run. If you encounter problems, please"
266 ewarn "adjust your USE flags to install only the 32-bit version and reinstall:"
267 ewarn " ${CATEGORY}/${PN}[abi_x86_32,-abi_x86_64]"
268 elog
269 fi
270 # needed to clean up upgrades from older installs
271 if use abi_x86_64 && [[ -n ${REPLACING_VERSIONS} ]]; then
272 unregister_pluginwrapper
273 fi
274 if has_version 'www-plugins/nspluginwrapper'; then
275 if use abi_x86_32 && ! use abi_x86_64; then
276 einfo "nspluginwrapper detected: Installing plugin wrapper"
277 local oldabi="${ABI}"
278 ABI="x86"
279 local FLASH_SOURCE="${ROOT}/usr/lib32/${PLUGINS_DIR}/libflashplayer.so"
280 nspluginwrapper -i "${FLASH_SOURCE}"
281 ABI="${oldabi}"
282 fi
283 elif use abi_x86_32; then
284 elog "To use the 32-bit flash player in a native 64-bit browser,"
285 elog "you must install www-plugins/nspluginwrapper"
286 fi
287 fi
288 }
289
290 pkg_prerm() {
291 use amd64 && use abi_x86_32 && ! use abi_x86_64 && \
292 unregister_pluginwrapper
293 }