/[gentoo-x86]/www-plugins/adobe-flash/adobe-flash-11.2.202.346.ebuild
Gentoo

Contents of /www-plugins/adobe-flash/adobe-flash-11.2.202.346.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Sat Mar 15 13:16:34 2014 UTC (6 years ago) by ago
Branch: MAIN
Changes since 1.2: +2 -2 lines
Stable for x86, wrt bug #504286

(Portage version: 2.2.8-r1/cvs/Linux x86_64, RepoMan options: --include-arches="x86", signed Manifest commit with key 7194459F)

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

  ViewVC Help
Powered by ViewVC 1.1.20