From cd0b4bce453661d5b0e9f4059fba0dcf88a7e241 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Wed, 14 May 2014 11:05:57 +0400 Subject: [PATCH] adobe-flash-11.2.202.359 added --- www-plugins/adobe-flash/Manifest | 3 + .../adobe-flash-11.2.202.359.ebuild | 245 ++++++++++++++++++ .../adobe-flash/files/flashplugin-lahf-fix.c | 29 +++ www-plugins/adobe-flash/files/mms.cfg | 117 +++++++++ 4 files changed, 394 insertions(+) create mode 100644 www-plugins/adobe-flash/Manifest create mode 100644 www-plugins/adobe-flash/adobe-flash-11.2.202.359.ebuild create mode 100644 www-plugins/adobe-flash/files/flashplugin-lahf-fix.c create mode 100644 www-plugins/adobe-flash/files/mms.cfg diff --git a/www-plugins/adobe-flash/Manifest b/www-plugins/adobe-flash/Manifest new file mode 100644 index 00000000..35cec397 --- /dev/null +++ b/www-plugins/adobe-flash/Manifest @@ -0,0 +1,3 @@ +DIST adobe-flash-11.2.202.359-debug.i386.tar.gz 7403524 SHA256 c56a1391081171ad0a2376eb0a516ba9ce790b3d2a30e2fcb2724f8af5c2a2ae SHA512 0827364ebde09e58c629ca8f7d644e236e90bfe56aaca9e2c0e460fa3850e92d4d44d8fee2eb2cd5151ef434a31f85665cf5de0595ac75fed7bb282543e20515 WHIRLPOOL 60c422cd731659fc26f05fec66b1dc85cdb4e47d89fd2a1767b79781bdbc108ee05847ca9fc8f5343e003dccf001e9345a99ff7f814b1e346541657ac6817b13 +DIST adobe-flash-11.2.202.359.i386.tar.gz 6924219 SHA256 15adcd18f039a00e87c8ef02be93e11c5ab9c585bdeb9ddba8e732bd240a9013 SHA512 717ff4693b626b5de2472ad882d6bc639b785c3c2db161911384b30299e0f3a676f1edddddf5efe3d290917c8ab0ddf4144fa1521682d199ffdeb4c903bd5df7 WHIRLPOOL 99e6b6d5c3a7c9dedbf850886fa5ba731b21ef2e46d165c60277acec04483a818967a6a304239c314854a96d190cff9b44349ae56148f26e8a7275bc53a170b9 +DIST adobe-flash-11.2.202.359.x86_64.tar.gz 7236046 SHA256 6ade0c217d7c5d5ebb6fce4529a256bbf5dc94ed6f9cfa960c1ea7949cc1be8e SHA512 040c2ed2a0510b1c6a1b5054352ebc0c8f435aa4776989fb47ebaa8afb507c87a316d7202c092093f77481ec0a5105be984900f8648fe45891ee4f99f494f05d WHIRLPOOL c947cb77841c1aad7b2b750a9a9d5625279003ed9c6ceee41fcbc11f958c2c3ad48f5df4a9c24cb53ece45cb285e2f15317d297c0c9fb1b8249a843bc85b55de diff --git a/www-plugins/adobe-flash/adobe-flash-11.2.202.359.ebuild b/www-plugins/adobe-flash/adobe-flash-11.2.202.359.ebuild new file mode 100644 index 00000000..bbe0f557 --- /dev/null +++ b/www-plugins/adobe-flash/adobe-flash-11.2.202.359.ebuild @@ -0,0 +1,245 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-plugins/adobe-flash/adobe-flash-11.2.202.359.ebuild,v 1.1 2014/05/14 05:01:46 jer Exp $ + +EAPI=5 +inherit nsplugins toolchain-funcs versionator multilib multilib-minimal + +DESCRIPTION="Adobe Flash Player" +HOMEPAGE="http://www.adobe.com/products/flashplayer.html" + +AF_URI="http://fpdownload.macromedia.com/get/flashplayer/pdc" +AF_DB_URI="http://fpdownload.macromedia.com/pub/flashplayer/updaters" +PV_M=$(get_major_version) +AF_32_URI="${AF_URI}/${PV}/install_flash_player_${PV_M}_linux.i386.tar.gz -> ${P}.i386.tar.gz" +AF_64_URI="${AF_URI}/${PV}/install_flash_player_${PV_M}_linux.x86_64.tar.gz -> ${P}.x86_64.tar.gz" +AF_32_DB_URI="${AF_DB_URI}/${PV_M}/flashplayer_${PV_M}_plugin_debug.i386.tar.gz -> ${P}-debug.i386.tar.gz" + +SRC_URI=" + abi_x86_32? ( + !debug? ( ${AF_32_URI} ) + debug? ( ${AF_32_DB_URI} ) + ) + abi_x86_64? ( ${AF_64_URI} ) +" +IUSE="debug kde selinux sse2" +REQUIRED_USE=" + sse2 debug? ( abi_x86_32 ) + || ( abi_x86_64 abi_x86_32 ) +" +SLOT="0" + +KEYWORDS="-* ~amd64 ~x86" +LICENSE="AdobeFlash-11.x" +RESTRICT="strip mirror" + +S="${WORKDIR}" + +NATIVE_DEPS=" + dev-libs/atk + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + kde? ( + dev-qt/qtcore:4 + dev-qt/qtdbus:4 + dev-qt/qtgui:4 + dev-qt/qtsvg:4 + kde-base/kdelibs + x11-libs/libICE + x11-libs/libSM + x11-libs/libXau + x11-libs/libXdmcp + x11-libs/libXext + x11-libs/libXft + x11-libs/libXpm + ) + media-libs/fontconfig + media-libs/freetype + >=sys-libs/glibc-2.4 + x11-libs/cairo + x11-libs/gdk-pixbuf + x11-libs/gtk+:2 + x11-libs/libX11 + x11-libs/libXcursor + x11-libs/libXext + x11-libs/libXrender + x11-libs/libXt + x11-libs/pango +" + +DEPEND=" + amd64? ( abi_x86_32? ( !abi_x86_64? ( www-plugins/nspluginwrapper ) ) ) + selinux? ( sec-policy/selinux-flash ) +" +RDEPEND=" + ${DEPEND} + abi_x86_64? ( ${NATIVE_DEPS} ) + abi_x86_32? ( + amd64? ( + || ( + ( + dev-libs/atk[abi_x86_32(-)] + x11-libs/cairo[abi_x86_32(-)] + x11-libs/gdk-pixbuf[abi_x86_32(-)] + x11-libs/gtk+:2[abi_x86_32(-)] + x11-libs/pango[abi_x86_32(-)] + ) + app-emulation/emul-linux-x86-gtklibs + ) + || ( + ( + dev-libs/glib:2[abi_x86_32(-)] + dev-libs/nspr[abi_x86_32(-)] + dev-libs/nss[abi_x86_32(-)] + ) + app-emulation/emul-linux-x86-baselibs + ) + || ( + ( + media-libs/fontconfig[abi_x86_32(-)] + media-libs/freetype[abi_x86_32(-)] + x11-libs/libX11[abi_x86_32(-)] + x11-libs/libXcursor[abi_x86_32(-)] + x11-libs/libXext[abi_x86_32(-)] + x11-libs/libXrender[abi_x86_32(-)] + x11-libs/libXt[abi_x86_32(-)] + ) + app-emulation/emul-linux-x86-xlibs + ) + ) + x86? ( ${NATIVE_DEPS} ) + ) + || ( media-fonts/liberation-fonts media-fonts/corefonts ) +" + +# Ignore QA warnings in these closed-source binaries, since we can't fix them: +QA_PREBUILT="usr/*" + +any_cpu_missing_flag() { + local value=${1} + grep '^flags' /proc/cpuinfo | grep -qv "${value}" +} + +pkg_setup() { + unset need_lahf_wrapper + if use abi_x86_64 && any_cpu_missing_flag 'lahf_lm'; then + export need_lahf_wrapper=1 + fi +} + +src_unpack() { + local files=( ${A} ) + + multilib_src_unpack() { + mkdir -p "${BUILD_DIR}" || die + cd "${BUILD_DIR}" || die + + # we need to filter out the other archive(s) + local other_abi + [[ ${ABI} == amd64 ]] && other_abi=i386 || other_abi=x86_64 + unpack ${files[@]//*${other_abi}*/} + } + + multilib_parallel_foreach_abi multilib_src_unpack +} + +src_configure() { :; } + +multilib_src_compile() { + if [[ ${ABI} == amd64 && ${need_lahf_wrapper} ]]; then + # This experimental wrapper, from Maks Verver via bug #268336 should + # emulate the missing lahf instruction affected platforms. + set -- $(tc-getCC) -fPIC -shared -nostdlib -lc \ + -oflashplugin-lahf-fix.so "${FILESDIR}/flashplugin-lahf-fix.c" + echo "${@}" >&2 + "${@}" || die "Compile of flashplugin-lahf-fix.so failed" + fi +} + +multilib_src_install() { + # PLUGINS_DIR comes from nsplugins.eclass + exeinto /usr/$(get_libdir)/${PLUGINS_DIR} + doexe libflashplayer.so + + if [[ ${ABI} == amd64 && ${need_lahf_wrapper} ]]; then + # This experimental wrapper, from Maks Verver via bug #268336 should + # emulate the missing lahf instruction affected platforms. + doexe flashplugin-lahf-fix.so + fi + + if multilib_is_native_abi; then + if use kde; then + local pkglibdir=lib + [[ -d usr/lib64 ]] && pkglibdir=lib64 + + exeinto /usr/$(get_libdir)/kde4 + doexe usr/${pkglibdir}/kde4/kcm_adobe_flash_player.so + insinto /usr/share/kde4/services + doins usr/share/kde4/services/kcm_adobe_flash_player.desktop + else + # No KDE applet, so allow the GTK utility to show up in KDE: + sed -i usr/share/applications/flash-player-properties.desktop \ + -e "/^NotShowIn=KDE;/d" || die "sed of .desktop file failed" + fi + + # The userland 'flash-player-properties' standalone app: + dobin usr/bin/flash-player-properties + + # Icon and .desktop for 'flash-player-properties' + insinto /usr/share + doins -r usr/share/{icons,applications} + dosym ../icons/hicolor/48x48/apps/flash-player-properties.png \ + /usr/share/pixmaps/flash-player-properties.png + fi + + # The magic config file! + insinto "/etc/adobe" + doins "${FILESDIR}/mms.cfg" +} + +unregister_pluginwrapper() { + # TODO: Perhaps parse the output of 'nspluginwrapper -l' + # TODO: However, the 64b flash plugin makes + # TODO: 'nspluginwrapper -l' segfault. + local FLASH_WRAPPER="${ROOT}/usr/lib64/${PLUGINS_DIR}/npwrapper.libflashplayer.so" + if has_version 'www-plugins/nspluginwrapper' && [[ -f ${FLASH_WRAPPER} ]]; then + einfo "Removing 32-bit plugin wrapper" + nspluginwrapper -r "${FLASH_WRAPPER}" + fi +} + +pkg_postinst() { + if use amd64 ; then + if [[ ${need_lahf_wrapper} ]]; then + ewarn "Your processor does not support the 'lahf' instruction which is used" + ewarn "by Adobe's 64-bit flash binary. We have installed a wrapper which" + ewarn "should allow this plugin to run. If you encounter problems, please" + ewarn "adjust your USE flags to install only the 32-bit version and reinstall:" + ewarn " ${CATEGORY}/${PN}[abi_x86_32,-abi_x86_64]" + elog + fi + # needed to clean up upgrades from older installs + if use abi_x86_64 && [[ -n ${REPLACING_VERSIONS} ]]; then + unregister_pluginwrapper + fi + if has_version 'www-plugins/nspluginwrapper'; then + if use abi_x86_32 && ! use abi_x86_64; then + einfo "nspluginwrapper detected: Installing plugin wrapper" + local oldabi="${ABI}" + ABI="x86" + local FLASH_SOURCE="${ROOT}/usr/lib32/${PLUGINS_DIR}/libflashplayer.so" + nspluginwrapper -i "${FLASH_SOURCE}" + ABI="${oldabi}" + fi + elif use abi_x86_32; then + elog "To use the 32-bit flash player in a native 64-bit browser," + elog "you must install www-plugins/nspluginwrapper" + fi + fi +} + +pkg_prerm() { + use amd64 && use abi_x86_32 && ! use abi_x86_64 && \ + unregister_pluginwrapper +} diff --git a/www-plugins/adobe-flash/files/flashplugin-lahf-fix.c b/www-plugins/adobe-flash/files/flashplugin-lahf-fix.c new file mode 100644 index 00000000..9338b733 --- /dev/null +++ b/www-plugins/adobe-flash/files/flashplugin-lahf-fix.c @@ -0,0 +1,29 @@ +/* Simple work-around for running the 64-bit Adobe Flash plug-in version 10 + on Athlon64 processors without support for the lahf instruction. + +Compile with: +cc -fPIC -shared -nostdlib -lc -oflashplugin-lahf-fix.so flashplugin-lahf-fix.c +Then place the .so file in the plug-in directory (e.g. $HOME/.mozilla/plugins) +or use LD_PRELOAD to force Firefox to load the library. + + - Maks Verver July 2009 */ + +#define _GNU_SOURCE +#include +#include +#include + +static void sig_handler(int signal, siginfo_t *info, void *context) { + if (signal != SIGILL) return; + if (*(char*)info->si_addr != (char)0x9f) abort(); + greg_t *regs = ((ucontext_t*)context)->uc_mcontext.gregs; + ((char*)®s[REG_RAX])[1] = ((char*)®s[REG_EFL])[0]; + regs[REG_RIP]++; +} + +static struct sigaction old_sa, new_sa = { + .sa_flags = SA_SIGINFO, + .sa_sigaction = &sig_handler }; + +int _init() { sigaction(SIGILL, &new_sa, &old_sa); return 0; } +int _fini() { sigaction(SIGILL, &old_sa, &new_sa); return 0; } diff --git a/www-plugins/adobe-flash/files/mms.cfg b/www-plugins/adobe-flash/files/mms.cfg new file mode 100644 index 00000000..3d53391e --- /dev/null +++ b/www-plugins/adobe-flash/files/mms.cfg @@ -0,0 +1,117 @@ +# +# /etc/adobe/mms.cfg: Adobe Flash privacy and security settings +# +# For more details on the meaning of most of these options, please visit: +# http://www.adobe.com/devnet/flashplayer/articles/flash_player_admin_guide.html +# + +# Lets you prevent users from designating any files on the local file system as +# trusted +# 0 = Not Allowed, 1 = Allowed (default) +#AllowUserLocalTrust = 1 + +# Lets you specify a hard limit on the amount of local storage that Flash Player +# uses for the storage of common Flash components +# Size in megabytes (default is 20), 0 = Component storage disabled +#AssetCacheSize = 20 + +# Lets you prevent Flash Player from automatically checkingfor and installing +# updated versions +# 0 = Not Disabled (default), 1 = Disabled +AutoUpdateDisable = 1 + +# Lets you specify how often to check for an updated version of Flash Player +# Number of days, 0 = Every startup +# There is no default value, which falls back to the user's setting (30 days by +# default) +#AutoUpdateInterval = + +# Lets you prevent SWF files from accessing webcams or microphones +# 0 = Not Disabled (default), 1 = Disabled +#AVHardwareDisable = 0 + +# Lets you prevent information on installed fonts from being displayed +# 0 = Not Disabled (default), 1 = Disabled +#DisableDeviceFontEnumeration = 0 + +# Lets you prevent networking or file system access if any kind +# Set to the executable filename, default is empty +#DisableNetworkAndFilesystemInHostApp = + +# Lets you prevent native code applications that are digitally signed and +# delivered by Adobe from being downloaded +# 0 = Not Disabled (default), 1 = Disabled +#DisableProductDownload = 0 + +# Lets you enable or disable the use of the Socket.connect() and +# XMLSocket.connect() methods +# 0 = Not Disabled (default), 1 = Disabled +#DisableSockets = 0 + +# Lets you create a whitelist of servers to which socket connections are allowed +# Set to hostname or IP address. This can be specified multiple times in this +# file to allow more than one host, and only takes effect if DisableSockets +# (above) is set to 1. +#EnableSocketsTo = localhost.localdomain +#EnableSocketsTo = 127.0.0.1 + +# Lets you prevent the ActionScript FileReference API from performing file +# downloads +# 0 = Not Disabled (default), 1 = Disabled +#FileDownloadDisable = 0 + +# Lets you prevent the ActionScript FileReference API from prerforming file +# uploads +# 0 = Not Disabled (default), 1 = Disabled +#FileUploadDisable = 0 + +# Lets you disable SWF files playing via a browser plug-in from being displayed +# in full-screen mode +# 0 = Not Disabled (default), 1 = Disabled +#FullScreenDisable = 0 + +# Lets you specify whether SWF files produced for Flash Player 6 and earlier can +# execute an operation that has been restricted in a newer version of Flash +# Player +# 0 = Deny, 1 = Allow +# There is no default value, which falls back to the user's setting (Defaults to +# "Ask" +#LegacyDomainMatching = + +# Lets you specify how Flash Player should determine whether to execute certain +# local SWF files that were originally produced for Flash Player 7 and earlier +# 0 = Deny, 1 = Allow +# There is no default value, which falls back to the user's setting +#LocalFileLegacyAction = + +# Lets you prevent local SWF files from having read access to files on local +# drive +# 0 = Not Disabled (default), 1 = Disabled +#LocalFileReadDisable = 0 + +# Lets you specify a hard limit on the amout of local storage that Flash Player +# uses (per domain) for persistent shared objects +# 1 = no storage, 2 = 10KB, 3 = 100KB, 4 = 1MB, 5 = 10MB, +# 6 = User specified (default) +# If the user does not specify a limit, the default is 100KB. +#LocalStorageLimit = 6 + +# Lets you override GPU validation checks to force hardware acceleration +# Warning: This may make your player (more) unstable! +# 0 = Check GPU (default), 1 = Skip checks +# More details: +# http://blogs.adobe.com/penguin.swf/2008/08/secrets_of_the_mmscfg_file_1.html +#OverrideGPUValidation = 0 + +# Lets you specify whether third-party SWF files can read and write locally +# persistent shared objects +# 0 = disabled, 1 = enabled +# There is no default value, which falls back to the user's setting +#ThirdPartyStorage = + +# Lets you disable "Windowless" mode, which may cause crashes in firefox +# version 3.01 and earlier. +# 0 = Not Disabled (default), 1 = Disabled +# More details: +# http://blogs.adobe.com/penguin.swf/2008/08/windowless_mode_fix.html +#WindowlessDisable = 0