Lines 1-140
Link Here
|
1 |
# Copyright 1999-2018 Gentoo Authors |
|
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
4 |
EAPI=6 |
5 |
inherit gnome2-utils nsplugins multilib multilib-minimal |
6 |
|
7 |
DESCRIPTION="Adobe Flash Player" |
8 |
HOMEPAGE=" |
9 |
https://www.adobe.com/products/flashplayer.html |
10 |
https://get.adobe.com/flashplayer/ |
11 |
https://helpx.adobe.com/security/products/flash-player.html |
12 |
" |
13 |
|
14 |
AF_URI="https://fpdownload.adobe.com/pub/flashplayer/pdc/${PV}" |
15 |
AF_NP_32_URI="${AF_URI}/flash_player_npapi_linux.i386.tar.gz -> ${P}-npapi.i386.tar.gz" |
16 |
AF_NP_64_URI="${AF_URI}/flash_player_npapi_linux.x86_64.tar.gz -> ${P}-npapi.x86_64.tar.gz" |
17 |
AF_PP_32_URI="${AF_URI}/flash_player_ppapi_linux.i386.tar.gz -> ${P}-ppapi.i386.tar.gz" |
18 |
AF_PP_64_URI="${AF_URI}/flash_player_ppapi_linux.x86_64.tar.gz -> ${P}-ppapi.x86_64.tar.gz" |
19 |
|
20 |
IUSE="+nsplugin +ppapi" |
21 |
REQUIRED_USE=" |
22 |
|| ( nsplugin ppapi ) |
23 |
" |
24 |
|
25 |
SRC_URI=" |
26 |
nsplugin? ( |
27 |
abi_x86_32? ( ${AF_NP_32_URI} ) |
28 |
abi_x86_64? ( ${AF_NP_64_URI} ) |
29 |
) |
30 |
ppapi? ( |
31 |
abi_x86_32? ( ${AF_PP_32_URI} ) |
32 |
abi_x86_64? ( ${AF_PP_64_URI} ) |
33 |
) |
34 |
" |
35 |
SLOT="22" |
36 |
|
37 |
KEYWORDS="-* amd64 x86" |
38 |
LICENSE="AdobeFlash-11.x" |
39 |
RESTRICT="strip mirror" |
40 |
|
41 |
NPAPI_RDEPEND=" |
42 |
dev-libs/atk[${MULTILIB_USEDEP}] |
43 |
dev-libs/glib:2[${MULTILIB_USEDEP}] |
44 |
dev-libs/nspr[${MULTILIB_USEDEP}] |
45 |
dev-libs/nss[${MULTILIB_USEDEP}] |
46 |
media-libs/fontconfig[${MULTILIB_USEDEP}] |
47 |
media-libs/freetype[${MULTILIB_USEDEP}] |
48 |
>=sys-libs/glibc-2.4 |
49 |
x11-libs/cairo[${MULTILIB_USEDEP}] |
50 |
x11-libs/gdk-pixbuf[${MULTILIB_USEDEP}] |
51 |
x11-libs/gtk+:2[${MULTILIB_USEDEP}] |
52 |
x11-libs/libX11[${MULTILIB_USEDEP}] |
53 |
x11-libs/libXcursor[${MULTILIB_USEDEP}] |
54 |
x11-libs/libXext[${MULTILIB_USEDEP}] |
55 |
x11-libs/libXrender[${MULTILIB_USEDEP}] |
56 |
x11-libs/libXt[${MULTILIB_USEDEP}] |
57 |
x11-libs/pango[${MULTILIB_USEDEP}] |
58 |
" |
59 |
RDEPEND=" |
60 |
!www-plugins/chrome-binary-plugins[flash(-)] |
61 |
nsplugin? ( |
62 |
${NPAPI_RDEPEND} |
63 |
!www-plugins/adobe-flash:0 |
64 |
) |
65 |
" |
66 |
|
67 |
S="${WORKDIR}" |
68 |
|
69 |
# Ignore QA warnings in these closed-source binaries, since we can't fix them: |
70 |
QA_PREBUILT="usr/*" |
71 |
|
72 |
src_unpack() { |
73 |
local files=( ${A} ) |
74 |
|
75 |
multilib_src_unpack() { |
76 |
mkdir -p "${BUILD_DIR}" || die |
77 |
cd "${BUILD_DIR}" || die |
78 |
|
79 |
# we need to filter out the other archive(s) |
80 |
local other_abi |
81 |
[[ ${ABI} == amd64 ]] && other_abi=i386 || other_abi=x86_64 |
82 |
unpack ${files[@]//*${other_abi}*/} |
83 |
} |
84 |
|
85 |
multilib_parallel_foreach_abi multilib_src_unpack |
86 |
} |
87 |
|
88 |
multilib_src_install() { |
89 |
local pkglibdir=lib |
90 |
[[ -d usr/lib64 ]] && pkglibdir=lib64 |
91 |
|
92 |
if use nsplugin; then |
93 |
# PLUGINS_DIR comes from nsplugins.eclass |
94 |
exeinto /usr/$(get_libdir)/${PLUGINS_DIR} |
95 |
doexe libflashplayer.so |
96 |
|
97 |
if multilib_is_native_abi; then |
98 |
# No KDE applet, so allow the GTK utility to show up in KDE: |
99 |
sed \ |
100 |
-i usr/share/applications/flash-player-properties.desktop \ |
101 |
-e "/^NotShowIn=KDE;/d" || die |
102 |
|
103 |
# The userland 'flash-player-properties' standalone app: |
104 |
dobin usr/bin/flash-player-properties |
105 |
|
106 |
# Icon and .desktop for 'flash-player-properties' |
107 |
insinto /usr/share |
108 |
doins -r usr/share/{icons,applications} |
109 |
dosym ../icons/hicolor/48x48/apps/flash-player-properties.png \ |
110 |
/usr/share/pixmaps/flash-player-properties.png |
111 |
fi |
112 |
|
113 |
# The magic config file! |
114 |
insinto "/etc/adobe" |
115 |
doins "${FILESDIR}/mms.cfg" |
116 |
fi |
117 |
|
118 |
if use ppapi; then |
119 |
exeinto /usr/$(get_libdir)/chromium/PepperFlash |
120 |
doexe libpepflashplayer.so |
121 |
insinto /usr/$(get_libdir)/chromium/PepperFlash |
122 |
doins manifest.json |
123 |
|
124 |
if multilib_is_native_abi; then |
125 |
dodir /etc/chromium |
126 |
sed "${FILESDIR}"/pepper-flash-r1 \ |
127 |
-e "s|@FP_LIBDIR@|$(get_libdir)|g" \ |
128 |
-e "s|@FP_PV@|${PV}|g" \ |
129 |
> "${D}"/etc/chromium/pepper-flash \ |
130 |
|| die |
131 |
fi |
132 |
fi |
133 |
} |
134 |
|
135 |
pkg_postinst() { |
136 |
gnome2_icon_cache_update |
137 |
} |
138 |
pkg_postrm() { |
139 |
gnome2_icon_cache_update |
140 |
} |
141 |
- |