summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /www-plugins/gnash
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'www-plugins/gnash')
-rw-r--r--www-plugins/gnash/Manifest2
-rw-r--r--www-plugins/gnash/files/gnash-0.8.10-amf-include.patch45
-rw-r--r--www-plugins/gnash/files/gnash-0.8.10-boost-1.50.patch24
-rw-r--r--www-plugins/gnash/files/gnash-0.8.10-gettext-macro.patch170
-rw-r--r--www-plugins/gnash/files/gnash-0.8.10-npapi-sdk.patch29
-rw-r--r--www-plugins/gnash/files/gnash-0.8.10_p20120903-bytesfmt.patch32
-rw-r--r--www-plugins/gnash/files/gnash-0.8.10_p20120903-ffmpeg1.patch252
-rw-r--r--www-plugins/gnash/files/gnash-0.8.10_p20120903-libav9.patch85
-rw-r--r--www-plugins/gnash/files/gnash-0.8.11-gettext-macro.patch29
-rw-r--r--www-plugins/gnash/files/gnash-0.8.9-external-dejagnu.patch24
-rw-r--r--www-plugins/gnash/files/gnash-0.8.9-kde4-libdir.patch12
-rw-r--r--www-plugins/gnash/files/gnash-0.8.9-klash.patch12
-rw-r--r--www-plugins/gnash/gnash-0.8.10_p20131019.ebuild284
-rw-r--r--www-plugins/gnash/gnash-0.8.10_p20150316.ebuild281
-rw-r--r--www-plugins/gnash/metadata.xml21
15 files changed, 1302 insertions, 0 deletions
diff --git a/www-plugins/gnash/Manifest b/www-plugins/gnash/Manifest
new file mode 100644
index 000000000000..773c154640f3
--- /dev/null
+++ b/www-plugins/gnash/Manifest
@@ -0,0 +1,2 @@
+DIST gnash-0.8.10_p20131019.tar.xz 3868156 SHA256 93e5c82c9f5e326b8ddba3cb4c4178fb9428e92987b3b8e6ef59b201ef37782a SHA512 79b4e86275b6b11774212315ea3b4a6192177d297d4ebe93c39d69734dbaa4c893845dc606e724e03f6409f0695794ade0f2544e30cf2d291a42d0cf3d674dcc WHIRLPOOL fb9a9b9f00c10af75c595147ce3d9bdf18f5cfde907fa69c9d0e28a278ff4fa835eba4d1e19ea72ac65e6e0f769da30f5790c652e2df723c36db6e3ef4436851
+DIST gnash-0.8.10_p20150316.tar.xz 4031684 SHA256 0c380f7b6756ad8a4d5ca152933f9a51278e00d51b3677812c69d65a166e3a6c SHA512 3f166de91a2f9f538ef76d21f7e9c2c240a776855cfe00c4e39fd6c0b6718f450ffecac61f38a6e534c6eb3f5b747c1d800f5bc7712ece3dcf14be1ee50384d0 WHIRLPOOL 6dd3886b9bcca56fbf63442f25d7af9184188702a167d3962f97fcf0496a99898033ee52843f9bc53b73236b96e4995b882de9685898820cf0f6b27dccb881c9
diff --git a/www-plugins/gnash/files/gnash-0.8.10-amf-include.patch b/www-plugins/gnash/files/gnash-0.8.10-amf-include.patch
new file mode 100644
index 000000000000..983fa6b70eb1
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.10-amf-include.patch
@@ -0,0 +1,45 @@
+diff -ur a/cygnal/libnet/cque.h b/cygnal/libnet/cque.h
+--- a/cygnal/libnet/cque.h 2012-01-19 20:17:47.000000000 +0100
++++ b/cygnal/libnet/cque.h 2012-02-23 20:13:39.000000000 +0100
+@@ -25,8 +25,9 @@
+ #include <boost/thread/condition.hpp>
+ #include <deque>
+
++#include "../libamf/amf.h"
+ #include "getclocktime.hpp"
+-#include "buffer.h"
++#include "../libamf/buffer.h"
+ #include "network.h"
+ #include "dsodefs.h" //For DSOEXPORT.
+
+diff -ur a/cygnal/libnet/sshclient.h b/cygnal/libnet/sshclient.h
+--- a/cygnal/libnet/sshclient.h 2012-01-19 20:17:47.000000000 +0100
++++ b/cygnal/libnet/sshclient.h 2012-02-23 20:13:09.000000000 +0100
+@@ -32,9 +32,10 @@
+ #include <libssh/sftp.h>
+ }
+
++#include "../libamf/amf.h"
+ #include "cque.h"
+ #include "network.h"
+-#include "buffer.h"
++#include "../libamf/buffer.h"
+
+ namespace gnash
+ {
+diff -ur a/cygnal/libnet/sslclient.h b/cygnal/libnet/sslclient.h
+--- a/cygnal/libnet/sslclient.h 2012-01-19 20:17:47.000000000 +0100
++++ b/cygnal/libnet/sslclient.h 2012-02-23 20:13:21.000000000 +0100
+@@ -36,10 +36,11 @@
+ #include <openssl/err.h>
+ #endif
+
++#include "../libamf/amf.h"
+ #include "dsodefs.h"
+ #include "cque.h"
+ #include "network.h"
+-#include "buffer.h"
++#include "../libamf/buffer.h"
+
+
+ namespace gnash
diff --git a/www-plugins/gnash/files/gnash-0.8.10-boost-1.50.patch b/www-plugins/gnash/files/gnash-0.8.10-boost-1.50.patch
new file mode 100644
index 000000000000..ed774ed50a0b
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.10-boost-1.50.patch
@@ -0,0 +1,24 @@
+diff -ur a/macros/boost.m4 b/macros/boost.m4
+--- a/macros/boost.m4 2012-09-03 17:11:43.000000000 +0200
++++ b/macros/boost.m4 2012-10-16 01:58:28.000000000 +0200
+@@ -37,7 +37,7 @@
+ boost_headers="detail/lightweight_mutex.hpp thread/thread.hpp multi_index_container.hpp multi_index/key_extractors.hpp thread/mutex.hpp program_options/options_description.hpp iostreams/stream.hpp"
+ dnl this is a list of *required* libraries. If any of these are missing, this
+ dnl test will return a failure, and Gnash won't build.
+- boost_libs="thread program_options iostreams"
++ boost_libs="thread program_options iostreams system"
+
+ dnl this is a list of *recommended* libraries. If any of these are missing, this
+ dnl test will return a warning, and Gnash will build, but testing won't work.
+diff -ur a/plugin/npapi/Makefile.am b/plugin/npapi/Makefile.am
+--- a/plugin/npapi/Makefile.am 2012-09-03 17:11:43.000000000 +0200
++++ b/plugin/npapi/Makefile.am 2012-10-16 01:58:57.000000000 +0200
+@@ -78,7 +78,7 @@
+
+ libgnashplugin_la_LIBADD = \
+ $(GLIB_LIBS) \
+- -lboost_iostreams \
++ $(BOOST_LIBS) \
+ $(NULL)
+
+ # Scriptable plugin support
diff --git a/www-plugins/gnash/files/gnash-0.8.10-gettext-macro.patch b/www-plugins/gnash/files/gnash-0.8.10-gettext-macro.patch
new file mode 100644
index 000000000000..0501f745581f
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.10-gettext-macro.patch
@@ -0,0 +1,170 @@
+diff -ur a/libdevice/vaapi/VaapiImage.cpp b/libdevice/vaapi/VaapiImage.cpp
+--- a/libdevice/vaapi/VaapiImage.cpp 2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/vaapi/VaapiImage.cpp 2012-02-23 19:05:13.000000000 +0100
+@@ -35,7 +35,7 @@
+ : _format(format)
+ , _image_data(NULL)
+ {
+- log_debug(_("VaapiImage::VaapiImage(): format '%s'\n", string_of_FOURCC(format)));
++ log_debug("VaapiImage::VaapiImage(): format '%s'\n", string_of_FOURCC(format));
+
+ memset(&_image, 0, sizeof(_image));
+ _image.image_id = VA_INVALID_ID;
+@@ -79,7 +79,7 @@
+ if (!vaapi_check_status(status, "vaCreateImage()"))
+ return false;
+
+- log_debug(_(" image 0x%08x, format '%s'\n", get(), string_of_FOURCC(_format)));
++ log_debug(" image 0x%08x, format '%s'\n", get(), string_of_FOURCC(_format));
+
+ return true;
+ }
+diff -ur a/libdevice/vaapi/VaapiSubpicture.cpp b/libdevice/vaapi/VaapiSubpicture.cpp
+--- a/libdevice/vaapi/VaapiSubpicture.cpp 2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/vaapi/VaapiSubpicture.cpp 2012-02-23 19:05:13.000000000 +0100
+@@ -32,7 +32,7 @@
+ : _image(image)
+ , _subpicture(VA_INVALID_ID)
+ {
+- log_debug(_("VaapiSubpicture::VaapiSubpicture(): format '%s'\n", string_of_FOURCC(image->format())));
++ log_debug("VaapiSubpicture::VaapiSubpicture(): format '%s'\n", string_of_FOURCC(image->format()));
+
+ if (!create()) {
+ boost::format msg;
+diff -ur a/libdevice/vaapi/VaapiSurface.cpp b/libdevice/vaapi/VaapiSurface.cpp
+--- a/libdevice/vaapi/VaapiSurface.cpp 2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/vaapi/VaapiSurface.cpp 2012-02-23 19:05:13.000000000 +0100
+@@ -74,7 +74,7 @@
+
+ VaapiSurfaceImpl::~VaapiSurfaceImpl()
+ {
+- log_debug(_("VaapiSurface::~VaapiSurface(): surface 0x%08x\n", surface()));
++ log_debug("VaapiSurface::~VaapiSurface(): surface 0x%08x\n", surface());
+
+ if (surface() == VA_INVALID_SURFACE) {
+ return;
+diff -ur a/libdevice/vaapi/VaapiSurfaceGLX.cpp b/libdevice/vaapi/VaapiSurfaceGLX.cpp
+--- a/libdevice/vaapi/VaapiSurfaceGLX.cpp 2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/vaapi/VaapiSurfaceGLX.cpp 2012-02-23 19:05:13.000000000 +0100
+@@ -202,14 +202,14 @@
+
+ reset(reinterpret_cast<uintptr_t>(surface));
+
+- log_debug(_(" -> surface %p\n", this->surface()));
++ log_debug(" -> surface %p\n", this->surface());
+ }
+
+ VaapiSurfaceGLXImpl::~VaapiSurfaceGLXImpl()
+ {
+ // GNASH_REPORT_FUNCTION;
+
+- log_debug(_("VaapiSurface::~VaapiSurface(): surface %p\n", surface()));
++ log_debug("VaapiSurface::~VaapiSurface(): surface %p\n", surface());
+
+ if (!surface()) {
+ return;
+@@ -263,7 +263,7 @@
+
+ bool VaapiSurfaceGLX::update(boost::shared_ptr<VaapiSurface> surface)
+ {
+- log_debug(_("VaapiSurfaceGLX::update(): from surface 0x%08x\n", surface->get()));
++ log_debug("VaapiSurfaceGLX::update(): from surface 0x%08x\n", surface->get());
+
+ return dynamic_cast<VaapiSurfaceGLXImpl *>(_impl.get())->update(surface);
+ }
+diff -ur a/libdevice/vaapi/VaapiSurfaceProxy.cpp b/libdevice/vaapi/VaapiSurfaceProxy.cpp
+--- a/libdevice/vaapi/VaapiSurfaceProxy.cpp 2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/vaapi/VaapiSurfaceProxy.cpp 2012-02-23 19:05:13.000000000 +0100
+@@ -28,12 +28,12 @@
+ boost::shared_ptr<VaapiContext> context)
+ : _context(context), _surface(surface)
+ {
+- log_debug(_("VaapiSurfaceProxy::VaapiSurfaceProxy(): surface 0x%08x\n", _surface->get()));
++ log_debug("VaapiSurfaceProxy::VaapiSurfaceProxy(): surface 0x%08x\n", _surface->get());
+ }
+
+ VaapiSurfaceProxy::~VaapiSurfaceProxy()
+ {
+- log_debug(_("VaapiSurfaceProxy::~VaapiSurfaceProxy(): surface 0x%08x\n", _surface->get()));
++ log_debug("VaapiSurfaceProxy::~VaapiSurfaceProxy(): surface 0x%08x\n", _surface->get());
+
+ _context->releaseSurface(_surface);
+ }
+diff -ur a/libdevice/x11/X11Device.cpp b/libdevice/x11/X11Device.cpp
+--- a/libdevice/x11/X11Device.cpp 2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/x11/X11Device.cpp 2012-02-23 19:05:13.000000000 +0100
+@@ -85,7 +85,7 @@
+ GNASH_REPORT_FUNCTION;
+
+ if (!initDevice(0, 0)) {
+- log_error(_("Couldn't initialize X11 device!"));
++ log_error("Couldn't initialize X11 device!");
+ }
+ }
+
+@@ -103,7 +103,7 @@
+ GNASH_REPORT_FUNCTION;
+
+ if (!initDevice(argc, argv)) {
+- log_error(_("Couldn't initialize X11 device!"));
++ log_error("Couldn't initialize X11 device!");
+ }
+ }
+
+@@ -139,7 +139,7 @@
+
+ _display = XOpenDisplay(dpyName);
+ if (!_display) {
+- log_error(_("couldn't open X11 display!"));
++ log_error("couldn't open X11 display!");
+ return false;
+ }
+
+@@ -159,7 +159,7 @@
+ _vinfo = XGetVisualInfo(_display, VisualIDMask, &visTemplate, &num_visuals);
+ std::cerr << "Num Visuals: " << num_visuals << std::endl;
+ if (!_vinfo) {
+- log_error(_("Error: couldn't get X visual\n"));
++ log_error("Error: couldn't get X visual\n");
+ exit(1);
+ }
+ std::cerr << "X11 visual is: " << _vinfo->visual << std::endl;
+@@ -196,7 +196,7 @@
+ if (_display) {
+ XGetErrorText(_display, error, msg, 80);
+ } else {
+- log_error(_("The default Display is not set!"));
++ log_error("The default Display is not set!");
+ }
+
+ return msg;
+@@ -209,12 +209,12 @@
+ GNASH_REPORT_FUNCTION;
+
+ if (!_display) {
+- log_error(_("No Display device set!"));
++ log_error("No Display device set!");
+ return;
+ }
+
+ if (!_root) {
+- log_error(_("No drawable window set!"));
++ log_error("No drawable window set!");
+ return;
+ }
+
+@@ -279,11 +279,11 @@
+ case KeyPress:
+ {
+ char buffer[10];
+- int code;
++ int r, code;
+ code = XLookupKeysym(&event.xkey, 0);
+ if (!keyPress || !keyPress(code)) {
+- // int r = XLookupString(&event.xkey, buffer, sizeof(buffer),
+- // NULL, NULL);
++ r = XLookupString(&event.xkey, buffer, sizeof(buffer),
++ NULL, NULL);
+ if (buffer[0] == 27) {
+ // escape
+ return;
diff --git a/www-plugins/gnash/files/gnash-0.8.10-npapi-sdk.patch b/www-plugins/gnash/files/gnash-0.8.10-npapi-sdk.patch
new file mode 100644
index 000000000000..eb542959e3be
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.10-npapi-sdk.patch
@@ -0,0 +1,29 @@
+From 983a675c94ecec54ae14593744aa9a2198466499 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 15 Sep 2011 12:59:55 +0200
+Subject: [PATCH] Support building against NPAPI-SDK as well.
+
+---
+ macros/npapi.m4 | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/macros/npapi.m4 b/macros/npapi.m4
+index e3bde2f..522bbb1 100644
+--- a/macros/npapi.m4
++++ b/macros/npapi.m4
+@@ -34,7 +34,11 @@ AC_DEFUN([GNASH_PATH_NPAPI],
+
+ if test x$cross_compiling = xno; then
+ if test x"$PKG_CONFIG" != x -a x"${ac_cv_path_npapi_incl}" = x; then
+- $PKG_CONFIG --exists mozilla-plugin && NPAPI_CFLAGS="`$PKG_CONFIG --cflags mozilla-plugin`"
++ if $PKG_CONFIG --exists npapi-sdk; then
++ NPAPI_CFLAGS="`$PKG_CONFIG --cflags npapi-sdk`"
++ elif $PKG_CONFIG --exists mozilla-plugin; then
++ NPAPI_CFLAGS="`$PKG_CONFIG --cflags mozilla-plugin`"
++ fi
+ fi
+ fi
+
+--
+1.7.3.4
+
diff --git a/www-plugins/gnash/files/gnash-0.8.10_p20120903-bytesfmt.patch b/www-plugins/gnash/files/gnash-0.8.10_p20120903-bytesfmt.patch
new file mode 100644
index 000000000000..918be74369f6
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.10_p20120903-bytesfmt.patch
@@ -0,0 +1,32 @@
+commit 80989fcd47d33e30336785422ded17f4c607a113
+Author: Alexis Ballier <aballier@gentoo.org>
+Date: Thu Feb 14 17:21:50 2013 -0300
+
+ Use av_get_bytes_per_sample in SampleFormatToSampleSize (#38333)
+
+ This is more future proof against the addition of sample formats.
+
+ Signed-off-by: Sandro Santilli <strk@keybit.net>
+
+diff --git a/libmedia/ffmpeg/MediaParserFfmpeg.cpp b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
+index 136cc08..83b1d74 100644
+--- a/libmedia/ffmpeg/MediaParserFfmpeg.cpp
++++ b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
+@@ -646,6 +646,9 @@ MediaParserFfmpeg::seekMedia(boost::int64_t offset, int whence)
+ boost::uint16_t
+ MediaParserFfmpeg::SampleFormatToSampleSize(AVSampleFormat fmt)
+ {
++#if LIBAVUTIL_VERSION_INT > AV_VERSION_INT(51,4,0)
++ return av_get_bytes_per_sample(fmt);
++#else
+ switch (fmt)
+ {
+ case AV_SAMPLE_FMT_U8: // unsigned 8 bits
+@@ -668,6 +671,7 @@ MediaParserFfmpeg::SampleFormatToSampleSize(AVSampleFormat fmt)
+ default:
+ return 8; // arbitrary value
+ }
++#endif
+ }
+
+
diff --git a/www-plugins/gnash/files/gnash-0.8.10_p20120903-ffmpeg1.patch b/www-plugins/gnash/files/gnash-0.8.10_p20120903-ffmpeg1.patch
new file mode 100644
index 000000000000..0759e443255a
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.10_p20120903-ffmpeg1.patch
@@ -0,0 +1,252 @@
+commit 4b3dae970549d42723c2528c250a1f95248145c7
+Author: Alexis Ballier <aballier@gentoo.org>
+Date: Wed Feb 13 14:38:44 2013 -0300
+
+ Fix build with latest FFmpeg (second attempt)
+
+ Add ifdefery to be compatible with older versions.
+ See ticket #38122
+
+ Signed-off-by: Sandro Santilli <strk@keybit.net>
+
+diff --git a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+index 067e418..5c8e1ad 100644
+--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
++++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+@@ -84,8 +84,10 @@ AudioDecoderFfmpeg::~AudioDecoderFfmpeg()
+
+ void AudioDecoderFfmpeg::setup(SoundInfo& info)
+ {
+- // Init the avdecoder-decoder
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52,6,2)
++ // Starting from this version avcodec_register calls avcodec_init
+ avcodec_init();
++#endif
+ avcodec_register_all();// change this to only register need codec?
+
+ enum CodecID codec_id;
+@@ -158,14 +160,14 @@ void AudioDecoderFfmpeg::setup(SoundInfo& info)
+ case CODEC_ID_PCM_U16LE:
+ _audioCodecCtx->channels = (info.isStereo() ? 2 : 1);
+ _audioCodecCtx->sample_rate = info.getSampleRate();
+- _audioCodecCtx->sample_fmt = SAMPLE_FMT_S16; // ?! arbitrary ?
++ _audioCodecCtx->sample_fmt = AV_SAMPLE_FMT_S16; // ?! arbitrary ?
+ _audioCodecCtx->frame_size = 1;
+ break;
+
+ default:
+ _audioCodecCtx->channels = (info.isStereo() ? 2 : 1);
+ _audioCodecCtx->sample_rate = info.getSampleRate();
+- _audioCodecCtx->sample_fmt = SAMPLE_FMT_S16; // ?! arbitrary ?
++ _audioCodecCtx->sample_fmt = AV_SAMPLE_FMT_S16; // ?! arbitrary ?
+ break;
+ }
+ }
+@@ -173,7 +175,10 @@ void AudioDecoderFfmpeg::setup(SoundInfo& info)
+ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
+ {
+ // Init the avdecoder-decoder
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52,6,2)
++ // Starting from this version avcodec_register calls avcodec_init
+ avcodec_init();
++#endif
+ avcodec_register_all();// change this to only register need codec?
+
+ enum CodecID codec_id = CODEC_ID_NONE;
+@@ -297,7 +302,7 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
+ _audioCodecCtx->channels = (info.stereo ? 2 : 1);
+ _audioCodecCtx->sample_rate = info.sampleRate;
+ // was commented out (why?):
+- _audioCodecCtx->sample_fmt = SAMPLE_FMT_S16;
++ _audioCodecCtx->sample_fmt = AV_SAMPLE_FMT_S16;
+ break;
+ }
+
+diff --git a/libmedia/ffmpeg/MediaParserFfmpeg.cpp b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
+index d6e6902..136cc08 100644
+--- a/libmedia/ffmpeg/MediaParserFfmpeg.cpp
++++ b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
+@@ -344,8 +344,10 @@ MediaParserFfmpeg::initializeParser()
+ {
+ av_register_all(); // TODO: needs to be invoked only once ?
+
++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52,107,0)
+ _byteIOCxt.buffer = NULL;
+-
++#endif
++
+ _inputFmt = probeStream();
+
+ #ifdef GNASH_ALLOW_VCODEC_ENV
+@@ -366,7 +368,11 @@ MediaParserFfmpeg::initializeParser()
+ // which isn't needed.
+ _byteIOBuffer.reset(new unsigned char[byteIOBufferSize]);
+
++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52,107,0)
+ init_put_byte(&_byteIOCxt,
++#else
++ _avIOCxt = avio_alloc_context(
++#endif
+ _byteIOBuffer.get(), // buffer
+ byteIOBufferSize, // buffer size
+ 0, // write flags
+@@ -376,7 +382,11 @@ MediaParserFfmpeg::initializeParser()
+ MediaParserFfmpeg::seekMediaWrapper // seeker callback
+ );
+
++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52,107,0)
+ _byteIOCxt.is_streamed = 1;
++#else
++ _avIOCxt->seekable = 0;
++#endif
+
+ #if !defined(LIBAVCODEC_VERSION_MAJOR) || LIBAVCODEC_VERSION_MAJOR < 52
+ // Needed for Lenny.
+@@ -387,12 +397,19 @@ MediaParserFfmpeg::initializeParser()
+
+ assert(_formatCtx);
+
++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52,107,0)
+ // Otherwise av_open_input_stream will reallocate the context.
+ AVFormatParameters ap;
+ std::memset(&ap, 0, sizeof ap);
+ ap.prealloced_context = 1;
+
+ if (av_open_input_stream(&_formatCtx, &_byteIOCxt, "", _inputFmt, &ap) < 0)
++#else
++
++ _formatCtx->pb = _avIOCxt;
++
++ if (avformat_open_input(&_formatCtx, "", _inputFmt, NULL) < 0)
++#endif
+ {
+ throw IOException("MediaParserFfmpeg couldn't open input stream");
+ }
+@@ -400,10 +417,17 @@ MediaParserFfmpeg::initializeParser()
+ #if defined(LIBAVCODEC_VERSION_MAJOR) && LIBAVCODEC_VERSION_MAJOR >= 52
+ // Note: in at least some versions of ffmpeg, av_open_input_stream does
+ // not parse metadata; not sure why.
++#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(51,5,0)
+ AVMetadata* md = _formatCtx->metadata;
+ if (md) {
+ AVMetadataTag* tag = av_metadata_get(md, "album", 0,
+ AV_METADATA_MATCH_CASE);
++#else
++ AVDictionary* md = _formatCtx->metadata;
++ if (md) {
++ AVDictionaryEntry* tag = av_dict_get(md, "album", 0,
++ AV_DICT_MATCH_CASE);
++#endif
+ if (tag && tag->value) {
+ setId3Info(&Id3Info::album, std::string(tag->value),
+ _id3Object);
+@@ -620,27 +644,27 @@ MediaParserFfmpeg::seekMedia(boost::int64_t offset, int whence)
+ }
+
+ boost::uint16_t
+-MediaParserFfmpeg::SampleFormatToSampleSize(SampleFormat fmt)
++MediaParserFfmpeg::SampleFormatToSampleSize(AVSampleFormat fmt)
+ {
+ switch (fmt)
+ {
+- case SAMPLE_FMT_U8: // unsigned 8 bits
++ case AV_SAMPLE_FMT_U8: // unsigned 8 bits
+ return 1;
+
+- case SAMPLE_FMT_S16: // signed 16 bits
+- case SAMPLE_FMT_FLT: // float
++ case AV_SAMPLE_FMT_S16: // signed 16 bits
++ case AV_SAMPLE_FMT_FLT: // float
+ return 2;
+
+ #if !defined (LIBAVCODEC_VERSION_MAJOR) || LIBAVCODEC_VERSION_MAJOR < 52
+ // Was dropped for version 52.0.0
+- case SAMPLE_FMT_S24: // signed 24 bits
++ case AV_SAMPLE_FMT_S24: // signed 24 bits
+ return 3;
+ #endif
+
+- case SAMPLE_FMT_S32: // signed 32 bits
++ case AV_SAMPLE_FMT_S32: // signed 32 bits
+ return 4;
+
+- case SAMPLE_FMT_NONE:
++ case AV_SAMPLE_FMT_NONE:
+ default:
+ return 8; // arbitrary value
+ }
+diff --git a/libmedia/ffmpeg/MediaParserFfmpeg.h b/libmedia/ffmpeg/MediaParserFfmpeg.h
+index 4e410d8..a14cfb6 100644
+--- a/libmedia/ffmpeg/MediaParserFfmpeg.h
++++ b/libmedia/ffmpeg/MediaParserFfmpeg.h
+@@ -154,7 +154,13 @@ private:
+ AVStream* _audioStream;
+
+ /// ?
+- ByteIOContext _byteIOCxt;
++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52,107,0)
++// AVIOContext was introduced a bit earlier but without version bump, so let's
++// be safe
++ ByteIOContext _byteIOCxt;
++#else
++ AVIOContext* _avIOCxt;
++#endif
+
+ /// Size of the ByteIO context buffer
+ //
+@@ -172,7 +178,7 @@ private:
+ //
+ /// TODO: move somewhere in ffmpeg utils..
+ ///
+- boost::uint16_t SampleFormatToSampleSize(SampleFormat fmt);
++ boost::uint16_t SampleFormatToSampleSize(AVSampleFormat fmt);
+
+ /// Make an EncodedVideoFrame from an AVPacket and push to buffer
+ //
+diff --git a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
+index 40a5c80..eeefafe 100644
+--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
++++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
+@@ -171,7 +171,10 @@ VideoDecoderFfmpeg::init(enum CodecID codecId, int /*width*/, int /*height*/,
+ boost::uint8_t* extradata, int extradataSize)
+ {
+ // Init the avdecoder-decoder
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52,6,2)
++ // Starting from this version avcodec_register calls avcodec_init
+ avcodec_init();
++#endif
+ avcodec_register_all();// change this to only register need codec?
+
+ _videoCodec = avcodec_find_decoder(codecId);
+@@ -529,7 +532,11 @@ get_buffer(AVCodecContext* avctx, AVFrame* pic)
+
+ static unsigned int pic_num = 0;
+ pic->type = FF_BUFFER_TYPE_USER;
++#if LIBAVCODEC_VERSION_MAJOR < 54
++ // This field has been unused for longer but has been removed with
++ // libavcodec 54.
+ pic->age = ++pic_num - surface->getPicNum();
++#endif
+ surface->setPicNum(pic_num);
+ return 0;
+ #endif
+diff --git a/libmedia/ffmpeg/ffmpegHeaders.h b/libmedia/ffmpeg/ffmpegHeaders.h
+index 65a8d0c..7710121 100644
+--- a/libmedia/ffmpeg/ffmpegHeaders.h
++++ b/libmedia/ffmpeg/ffmpegHeaders.h
+@@ -83,5 +83,15 @@ extern "C" {
+ #define HAVE_SWSCALE_H 1
+ #endif
+
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52,94,1)
++#define AV_SAMPLE_FMT_NONE SAMPLE_FMT_NONE
++#define AV_SAMPLE_FMT_U8 SAMPLE_FMT_U8
++#define AV_SAMPLE_FMT_S16 SAMPLE_FMT_S16
++#define AV_SAMPLE_FMT_S32 SAMPLE_FMT_S32
++#define AV_SAMPLE_FMT_FLT SAMPLE_FMT_FLT
++#define AV_SAMPLE_FMT_DBL SAMPLE_FMT_DBL
++
++#define AVSampleFormat SampleFormat
++#endif
+
+ #endif // GNASH_MEDIA_FFMPEG_HEADERS_H
diff --git a/www-plugins/gnash/files/gnash-0.8.10_p20120903-libav9.patch b/www-plugins/gnash/files/gnash-0.8.10_p20120903-libav9.patch
new file mode 100644
index 000000000000..ab6baa7673dc
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.10_p20120903-libav9.patch
@@ -0,0 +1,85 @@
+commit dfba5258dc230669a7e1ad309e25ef190c77e854
+Author: Alexis Ballier <aballier@gentoo.org>
+Date: Thu Feb 14 16:54:08 2013 -0300
+
+ Fix build with libav-9 (#38333)
+
+ Signed-off-by: Sandro Santilli <strk@keybit.net>
+
+diff --git a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+index 5c8e1ad..50947fb 100644
+--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
++++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+@@ -133,12 +133,20 @@ void AudioDecoderFfmpeg::setup(SoundInfo& info)
+ }
+ }
+
++#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
++ _audioCodecCtx = avcodec_alloc_context3(_audioCodec);
++#else
+ _audioCodecCtx = avcodec_alloc_context();
++#endif
+ if (!_audioCodecCtx) {
+ throw MediaException(_("libavcodec couldn't allocate context"));
+ }
+
++#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
++ int ret = avcodec_open2(_audioCodecCtx, _audioCodec, NULL);
++#else
+ int ret = avcodec_open(_audioCodecCtx, _audioCodec);
++#endif
+ if (ret < 0) {
+ av_free(_audioCodecCtx);
+ _audioCodecCtx=0;
+@@ -259,7 +267,11 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
+ _needsParsing = (_parser != NULL);
+
+ // Create an audioCodecCtx from the ffmpeg parser if exists/possible
++#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
++ _audioCodecCtx = avcodec_alloc_context3(_audioCodec);
++#else
+ _audioCodecCtx = avcodec_alloc_context();
++#endif
+ if (!_audioCodecCtx) {
+ throw MediaException(_("AudioDecoderFfmpeg: libavcodec couldn't "
+ "allocate context"));
+@@ -310,7 +322,11 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
+ #ifdef GNASH_DEBUG_AUDIO_DECODING
+ log_debug(" Opening codec");
+ #endif // GNASH_DEBUG_AUDIO_DECODING
++#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
++ int ret = avcodec_open2(_audioCodecCtx, _audioCodec, NULL);
++#else
+ int ret = avcodec_open(_audioCodecCtx, _audioCodec);
++#endif
+ if (ret < 0) {
+ //avcodec_close(_audioCodecCtx);
+ av_free(_audioCodecCtx);
+diff --git a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
+index eeefafe..e5263c6 100644
+--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
++++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
+@@ -183,7 +183,11 @@ VideoDecoderFfmpeg::init(enum CodecID codecId, int /*width*/, int /*height*/,
+ throw MediaException(_("libavcodec can't decode this video format"));
+ }
+
++#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
++ _videoCodecCtx.reset(new CodecContextWrapper(avcodec_alloc_context3(_videoCodec)));
++#else
+ _videoCodecCtx.reset(new CodecContextWrapper(avcodec_alloc_context()));
++#endif
+ if (!_videoCodecCtx->getContext()) {
+ throw MediaException(_("libavcodec couldn't allocate context"));
+ }
+@@ -206,7 +210,11 @@ VideoDecoderFfmpeg::init(enum CodecID codecId, int /*width*/, int /*height*/,
+ }
+ #endif
+
++#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
++ int ret = avcodec_open2(ctx, _videoCodec, NULL);
++#else
+ int ret = avcodec_open(ctx, _videoCodec);
++#endif
+ if (ret < 0) {
+ boost::format msg = boost::format(_("libavcodec "
+ "failed to initialize FFMPEG "
diff --git a/www-plugins/gnash/files/gnash-0.8.11-gettext-macro.patch b/www-plugins/gnash/files/gnash-0.8.11-gettext-macro.patch
new file mode 100644
index 000000000000..7461cc2ec6eb
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.11-gettext-macro.patch
@@ -0,0 +1,29 @@
+diff -ur a/libdevice/vaapi/VaapiSurfaceGLX.cpp b/libdevice/vaapi/VaapiSurfaceGLX.cpp
+--- a/libdevice/vaapi/VaapiSurfaceGLX.cpp 2013-08-22 19:50:20.000000000 +0200
++++ b/libdevice/vaapi/VaapiSurfaceGLX.cpp 2013-08-22 22:43:55.060296748 +0200
+@@ -202,14 +202,14 @@
+
+ reset(reinterpret_cast<uintptr_t>(surface));
+
+- log_debug(_(" -> surface %p\n", this->surface()));
++ log_debug(_(" -> surface %p\n"), this->surface());
+ }
+
+ VaapiSurfaceGLXImpl::~VaapiSurfaceGLXImpl()
+ {
+ // GNASH_REPORT_FUNCTION;
+
+- log_debug(_("VaapiSurface::~VaapiSurface(): surface %p\n", surface()));
++ log_debug(_("VaapiSurface::~VaapiSurface(): surface %p\n"), surface());
+
+ if (!surface()) {
+ return;
+@@ -263,7 +263,7 @@
+
+ bool VaapiSurfaceGLX::update(boost::shared_ptr<VaapiSurface> surface)
+ {
+- log_debug(_("VaapiSurfaceGLX::update(): from surface 0x%08x\n", surface->get()));
++ log_debug(_("VaapiSurfaceGLX::update(): from surface 0x%08x\n"), surface->get());
+
+ return dynamic_cast<VaapiSurfaceGLXImpl *>(_impl.get())->update(surface);
+ }
diff --git a/www-plugins/gnash/files/gnash-0.8.9-external-dejagnu.patch b/www-plugins/gnash/files/gnash-0.8.9-external-dejagnu.patch
new file mode 100644
index 000000000000..eaffda77bc00
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.9-external-dejagnu.patch
@@ -0,0 +1,24 @@
+diff -ur a/plugin/npapi/test.cpp b/plugin/npapi/test.cpp
+--- a/plugin/npapi/test.cpp 2011-03-13 17:47:36.000000000 +0100
++++ b/plugin/npapi/test.cpp 2011-03-20 23:52:20.369998096 +0100
+@@ -35,7 +35,7 @@
+ #include "npfunctions.h"
+ #endif
+ #include "pluginbase.h"
+-#include "dejagnu.h"
++#include <dejagnu.h>
+ #include "../../testsuite/check.h"
+ #include <regex.h>
+
+diff -ur a/testsuite/check.h b/testsuite/check.h
+--- a/testsuite/check.h 2011-02-26 19:11:08.000000000 +0100
++++ b/testsuite/check.h 2011-03-20 23:52:32.570998094 +0100
+@@ -29,7 +29,7 @@
+
+ #define HAVE_DEJAGNU_H 1 // we ship our own now...
+ #ifdef HAVE_DEJAGNU_H
+-#include "dejagnu.h"
++#include <dejagnu.h>
+
+ #define info(x) note x
+
diff --git a/www-plugins/gnash/files/gnash-0.8.9-kde4-libdir.patch b/www-plugins/gnash/files/gnash-0.8.9-kde4-libdir.patch
new file mode 100644
index 000000000000..b3279441d2f0
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.9-kde4-libdir.patch
@@ -0,0 +1,12 @@
+diff -ur a/macros/kde4.m4 b/macros/kde4.m4
+--- a/macros/kde4.m4 2011-02-26 19:11:08.000000000 +0100
++++ b/macros/kde4.m4 2011-11-25 18:09:25.000000000 +0100
+@@ -198,7 +198,7 @@
+ if test -d ${KDE4_PREFIX}/lib64 -a -f /etc/redhat-release; then
+ KDE4_PLUGINDIR="${KDE4_PREFIX}/lib64/kde4"
+ else
+- KDE4_PLUGINDIR="${KDE4_PREFIX}/lib/kde4"
++ KDE4_PLUGINDIR="${KDE4_PREFIX}/${acl_libdirstem}/kde4"
+ fi
+ fi
+ if test x"${with_kde4_servicesdir}" != x ; then
diff --git a/www-plugins/gnash/files/gnash-0.8.9-klash.patch b/www-plugins/gnash/files/gnash-0.8.9-klash.patch
new file mode 100644
index 000000000000..e6afec04d293
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.9-klash.patch
@@ -0,0 +1,12 @@
+diff -ur a/macros/kde4.m4 b/macros/kde4.m4
+--- a/macros/kde4.m4 2011-02-26 19:11:08.000000000 +0100
++++ b/macros/kde4.m4 2011-03-21 00:04:38.845997945 +0100
+@@ -210,7 +210,7 @@
+ KDE4_CONFIGDIR="${KDE4_PREFIX}/share/kde4/config"
+ fi
+ if test x"${KDE4_APPSDATADIR}" = x ; then
+- KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde4/apps/klash"
++ KDE4_APPSDATADIR="${KDE4_PREFIX}/share/apps/klash"
+ fi
+
+ if test x"${ac_cv_path_kde4_incl}" != x ; then
diff --git a/www-plugins/gnash/gnash-0.8.10_p20131019.ebuild b/www-plugins/gnash/gnash-0.8.10_p20131019.ebuild
new file mode 100644
index 000000000000..bc768b1b6bdc
--- /dev/null
+++ b/www-plugins/gnash/gnash-0.8.10_p20131019.ebuild
@@ -0,0 +1,284 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+CMAKE_REQUIRED="never"
+KDE_REQUIRED="optional"
+AT_M4DIR="cygnal"
+# won't build with python-3, bug #392969
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils kde4-base multilib nsplugins python-any-r1 flag-o-matic
+
+DESCRIPTION="GNU Flash movie player that supports many SWF v7,8,9 features"
+HOMEPAGE="http://www.gnu.org/software/gnash/"
+
+if [[ ${PV} = 9999* ]]; then
+ SRC_URI=""
+ EGIT_REPO_URI="git://git.savannah.gnu.org/gnash.git"
+ inherit git-2
+else
+# Release tarball is b0rked, upstream #35612
+# SRC_URI="mirror://gnu/${PN}/${PV}/${P}.tar.bz2"
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 ~sparc x86"
+IUSE="X +agg cairo cygnal dbus directfb doc dump egl fbcon +ffmpeg gconf gnome gstreamer gtk harden jemalloc kde lirc mysql +nls nsplugin opengl openvg python sdl +sdl-sound ssh ssl test vaapi"
+REQUIRED_USE="dump? ( agg ffmpeg )
+ fbcon? ( agg )
+ nsplugin? ( gtk )
+ openvg? ( egl )
+ python? ( gtk )
+ vaapi? ( agg ffmpeg )
+ || ( agg cairo opengl openvg )
+ || ( dump fbcon gtk kde sdl )
+ "
+
+RDEPEND=">=dev-libs/boost-1.41.0:0=
+ dev-libs/expat
+ dev-libs/libxml2
+ virtual/jpeg
+ media-libs/libpng
+ net-misc/curl
+ x11-libs/libX11
+ x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXt
+ media-libs/giflib
+ x11-proto/xproto
+ agg? ( x11-libs/agg )
+ cairo? ( x11-libs/cairo )
+ directfb? (
+ dev-libs/DirectFB
+ )
+ doc? (
+ >=app-text/docbook2X-0.8.8
+ app-text/docbook-sgml-utils
+ )
+ egl? (
+ media-libs/mesa[egl]
+ )
+ fbcon? (
+ x11-libs/tslib
+ )
+ ffmpeg? (
+ virtual/ffmpeg[vaapi?]
+ )
+ gconf? (
+ gnome-base/gconf
+ )
+ gstreamer? (
+ media-plugins/gst-plugins-ffmpeg
+ media-plugins/gst-plugins-mad
+ media-plugins/gst-plugins-meta
+ )
+ gtk? (
+ x11-libs/gtk+:2
+ python? ( dev-python/pygtk:2 )
+ )
+ jemalloc? ( dev-libs/jemalloc )
+ kde? ( $(add_kdebase_dep kdebase-startkde) )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ gtk? ( x11-libs/gtkglext )
+ )
+ openvg? (
+ media-libs/mesa[openvg]
+ )
+ sdl? ( media-libs/libsdl[X] )
+ sdl-sound? ( media-libs/libsdl )
+ media-libs/speex[ogg]
+ sys-libs/zlib
+ >=sys-devel/libtool-2.2
+ mysql? ( virtual/mysql )
+ lirc? ( app-misc/lirc )
+ dbus? ( sys-apps/dbus )
+ ssh? ( >=net-libs/libssh-0.4[server] )
+ ssl? ( dev-libs/openssl )
+ vaapi? ( x11-libs/libva[opengl?] )
+ "
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ gnome? ( app-text/rarian )
+ nsplugin? ( net-misc/npapi-sdk )
+ test? ( dev-util/dejagnu )"
+# Tests hang with sandbox, bug #321017
+RESTRICT="test"
+
+pkg_setup() {
+ kde4-base_pkg_setup
+ python-any-r1_pkg_setup
+
+ if use !ffmpeg && use !gstreamer; then
+ ewarn "You are trying to build Gnash without choosing a media handler."
+ ewarn "Sound and video playback will not work."
+ fi
+}
+
+src_unpack() {
+ default
+ # rename git snapshot directory to what portage expects
+ mv ${PN}-*/ ${P} || die
+}
+
+src_prepare() {
+ # Fix paths for klash, bug #339610
+ epatch "${FILESDIR}"/${PN}-0.8.9-klash.patch
+
+ # Use external dejagnu for tests, bug #321017
+ epatch "${FILESDIR}"/${PN}-0.8.9-external-dejagnu.patch
+
+ # Fix building on ppc64, bug #342535
+ use ppc64 && append-flags -mminimal-toc
+
+ # Fix kde multilib library path, bug #391283
+ epatch "${FILESDIR}"/${PN}-0.8.9-kde4-libdir.patch
+
+ # Fix libamf includes
+ epatch "${FILESDIR}"/${PN}-0.8.10-amf-include.patch
+
+ # Allow building against npapi-sdk, bug #383071
+ epatch "${FILESDIR}"/${PN}-0.8.10-npapi-sdk.patch
+
+ eautoreconf
+}
+src_configure() {
+ local device gui input media myconf myext renderers
+
+ # Set nsplugin install directory.
+ use nsplugin && myconf="${myconf} --with-npapi-plugindir=/usr/$(get_libdir)/gnash/npapi/"
+
+ # Set hardware acceleration.
+ use X && device+=",x11"
+ use directfb && device+=",directfb"
+ use egl && device+=",egl"
+ use fbcon && device+=",rawfb"
+ use vaapi && device+=",vaapi"
+ [[ "${device}x" == "x" ]] && device+=",none"
+
+ # Set rendering engine.
+ use agg && renderers+=",agg"
+ use cairo && renderers+=",cairo"
+ use opengl && renderers+=",opengl"
+ use openvg && renderers+=",openvg"
+
+ # Set kde and konqueror plugin directories.
+ if use kde; then
+ myconf="${myconf}
+ --with-plugins-install=system
+ --with-kde4-incl=${KDEDIR}/include
+ --with-kde4-configdir=${KDEDIR}/share/config
+ --with-kde4-prefix=${KDEDIR}
+ --with-kde4-lib=${KDEDIR}/$(get_libdir)
+ --with-kde-appsdatadir=${KDEDIR}/share/apps/klash
+ --with-kde4-servicesdir=${KDEDIR}/share/kde4/services
+ --with-kde4-plugindir=${KDEDIR}/$(get_libdir)/kde4"
+ fi
+
+ # Set media handler.
+ use ffmpeg || use gstreamer || media+=",none"
+ use ffmpeg && media+=",ffmpeg"
+ use gstreamer && media+=",gst"
+
+ # Set gui.
+ use dump && gui="${gui},dump"
+ use fbcon && gui="${gui},fb"
+ use gtk && gui=",gtk"
+ use kde && gui="${gui},kde4"
+ use sdl && gui="${gui},sdl"
+
+ if use sdl-sound; then
+ myconf="${myconf} --enable-sound=sdl"
+ else
+ myconf="${myconf} --enable-sound=none"
+ fi
+
+ # Set extensions
+ use mysql && myext=",mysql"
+ use gtk && myext="${myext},gtk"
+ use lirc && myext="${myext},lirc"
+ use dbus && myext="${myext},dbus"
+
+ # Strip extra comma from gui, myext, hwaccel and renderers.
+ device=$( echo $device | sed -e 's/,//' )
+ gui=$( echo $gui | sed -e 's/,//' )
+ myext=$( echo $myext | sed -e 's/,//' )
+ renderers=$( echo $renderers | sed -e 's/,//' )
+ media=$( echo $media | sed -e 's/,//' )
+
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-dependency-tracking \
+ --disable-kparts3 \
+ $(use_enable cygnal) \
+ $(use_enable cygnal cgibins) \
+ $(use_enable doc docbook) \
+ $(use_enable gnome ghelp) \
+ $(use_enable harden) \
+ $(use_enable jemalloc) \
+ $(use_enable kde kparts4) \
+ $(use_enable nls) \
+ $(use_enable nsplugin npapi) \
+ $(use_enable python) \
+ $(use_enable ssh) \
+ $(use_enable ssl) \
+ $(use_enable test testsuite) \
+ $(use_with gconf) \
+ --enable-gui=${gui} \
+ --enable-device=${device} \
+ --enable-extensions=${myext} \
+ --enable-renderer=${renderers} \
+ --enable-media=${media} \
+ ${myconf}
+}
+src_test() {
+ local log=testsuite-results.txt
+ cd testsuite
+ emake check || die "make check failed"
+ ./anaylse-results.sh > $log || die "results analyze failed"
+ cat $log
+}
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # Install nsplugin in directory set by --with-npapi-plugindir.
+ if use nsplugin; then
+ emake DESTDIR="${D}" install-plugin || die "install plugins failed"
+ fi
+
+ # Install kde konqueror plugin.
+ if use kde; then
+ pushd "${S}/plugin/klash4" >& /dev/null || die
+ emake DESTDIR="${D}" install-plugin || die "install kde plugins failed"
+ popd >& /dev/null
+ fi
+ # Create a symlink in /usr/$(get_libdir)/nsbrowser/plugins to the nsplugin install directory.
+ use nsplugin && inst_plugin /usr/$(get_libdir)/gnash/npapi/libgnashplugin.so
+
+ # Remove eglinfo, bug #463654
+ if use egl; then
+ rm -f "${D}"/usr/bin/eglinfo || die
+ fi
+
+ dodoc AUTHORS ChangeLog NEWS README || die "dodoc failed"
+}
+pkg_postinst() {
+ if use !gnome || use !gstreamer && use !ffmpeg ; then
+ ewarn ""
+ ewarn "Gnash was built without a media handler and or http handler !"
+ ewarn ""
+ ewarn "If you want Gnash to support video then you will need to"
+ ewarn "rebuild Gnash with either the ffmpeg or gstreamer and gnome use flags set."
+ ewarn ""
+ fi
+ ewarn "${PN} is still in heavy development"
+ ewarn "Please first report bugs on upstream gnashdevs and deal with them"
+ ewarn "And then report a Gentoo bug to the maintainer"
+ use kde && kde4-base_pkg_postinst
+}
diff --git a/www-plugins/gnash/gnash-0.8.10_p20150316.ebuild b/www-plugins/gnash/gnash-0.8.10_p20150316.ebuild
new file mode 100644
index 000000000000..d13a38b90208
--- /dev/null
+++ b/www-plugins/gnash/gnash-0.8.10_p20150316.ebuild
@@ -0,0 +1,281 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+CMAKE_REQUIRED="never"
+KDE_REQUIRED="optional"
+AT_M4DIR="cygnal"
+# won't build with python-3, bug #392969
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils kde4-base multilib nsplugins python-any-r1 flag-o-matic
+
+DESCRIPTION="GNU Flash movie player that supports many SWF v7,8,9 features"
+HOMEPAGE="http://www.gnu.org/software/gnash/"
+
+if [[ ${PV} = 9999* ]]; then
+ SRC_URI=""
+ EGIT_REPO_URI="git://git.savannah.gnu.org/gnash.git"
+ inherit git-2
+else
+# Release tarball is b0rked, upstream #35612
+# SRC_URI="mirror://gnu/${PN}/${PV}/${P}.tar.bz2"
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="X +agg cairo cygnal dbus directfb doc dump egl fbcon +ffmpeg gconf gnome gstreamer gtk harden jemalloc kde lirc mysql +nls nsplugin opengl openvg python sdl +sdl-sound ssh ssl test vaapi"
+REQUIRED_USE="dump? ( agg ffmpeg )
+ fbcon? ( agg )
+ nsplugin? ( gtk )
+ openvg? ( egl )
+ python? ( gtk )
+ vaapi? ( agg ffmpeg )
+ || ( agg cairo opengl openvg )
+ || ( dump fbcon gtk kde sdl )
+ "
+
+RDEPEND=">=dev-libs/boost-1.41.0:0=
+ dev-libs/expat
+ dev-libs/libxml2
+ virtual/jpeg
+ media-libs/libpng
+ net-misc/curl
+ x11-libs/libX11
+ x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXt
+ media-libs/giflib
+ x11-proto/xproto
+ agg? ( x11-libs/agg )
+ cairo? ( x11-libs/cairo )
+ directfb? (
+ dev-libs/DirectFB
+ )
+ doc? (
+ >=app-text/docbook2X-0.8.8
+ app-text/docbook-sgml-utils
+ )
+ egl? (
+ media-libs/mesa[egl]
+ )
+ fbcon? (
+ x11-libs/tslib
+ )
+ ffmpeg? (
+ virtual/ffmpeg[vaapi?]
+ )
+ gconf? (
+ gnome-base/gconf
+ )
+ gstreamer? (
+ media-plugins/gst-plugins-ffmpeg
+ media-plugins/gst-plugins-mad
+ media-plugins/gst-plugins-meta
+ )
+ gtk? (
+ x11-libs/gtk+:2
+ python? ( dev-python/pygtk:2 )
+ )
+ jemalloc? ( dev-libs/jemalloc )
+ kde? ( $(add_kdebase_dep kdebase-startkde) )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ gtk? ( x11-libs/gtkglext )
+ )
+ openvg? (
+ media-libs/mesa[openvg]
+ )
+ sdl? ( media-libs/libsdl[X] )
+ sdl-sound? ( media-libs/libsdl )
+ media-libs/speex[ogg]
+ sys-libs/zlib
+ >=sys-devel/libtool-2.2
+ mysql? ( virtual/mysql )
+ lirc? ( app-misc/lirc )
+ dbus? ( sys-apps/dbus )
+ ssh? ( >=net-libs/libssh-0.4[server] )
+ ssl? ( dev-libs/openssl )
+ vaapi? ( x11-libs/libva[opengl?] )
+ "
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ gnome? ( app-text/rarian )
+ nsplugin? ( net-misc/npapi-sdk )
+ test? ( dev-util/dejagnu )"
+# Tests hang with sandbox, bug #321017
+RESTRICT="test"
+
+pkg_setup() {
+ kde4-base_pkg_setup
+ python-any-r1_pkg_setup
+
+ if use !ffmpeg && use !gstreamer; then
+ ewarn "You are trying to build Gnash without choosing a media handler."
+ ewarn "Sound and video playback will not work."
+ fi
+}
+
+src_unpack() {
+ default
+ # rename git snapshot directory to what portage expects
+ mv ${PN}-*/ ${P} || die
+}
+
+src_prepare() {
+ # Fix paths for klash, bug #339610
+ epatch "${FILESDIR}"/${PN}-0.8.9-klash.patch
+
+ # Use external dejagnu for tests, bug #321017
+ epatch "${FILESDIR}"/${PN}-0.8.9-external-dejagnu.patch
+
+ # Fix building on ppc64, bug #342535
+ use ppc64 && append-flags -mminimal-toc
+
+ # Fix kde multilib library path, bug #391283
+ epatch "${FILESDIR}"/${PN}-0.8.9-kde4-libdir.patch
+
+ # Fix libamf includes
+ epatch "${FILESDIR}"/${PN}-0.8.10-amf-include.patch
+
+ eautoreconf
+}
+src_configure() {
+ local device gui input media myconf myext renderers
+
+ # Set nsplugin install directory.
+ use nsplugin && myconf="${myconf} --with-npapi-plugindir=/usr/$(get_libdir)/gnash/npapi/"
+
+ # Set hardware acceleration.
+ use X && device+=",x11"
+ use directfb && device+=",directfb"
+ use egl && device+=",egl"
+ use fbcon && device+=",rawfb"
+ use vaapi && device+=",vaapi"
+ [[ "${device}x" == "x" ]] && device+=",none"
+
+ # Set rendering engine.
+ use agg && renderers+=",agg"
+ use cairo && renderers+=",cairo"
+ use opengl && renderers+=",opengl"
+ use openvg && renderers+=",openvg"
+
+ # Set kde and konqueror plugin directories.
+ if use kde; then
+ myconf="${myconf}
+ --with-plugins-install=system
+ --with-kde4-incl=${KDEDIR}/include
+ --with-kde4-configdir=${KDEDIR}/share/config
+ --with-kde4-prefix=${KDEDIR}
+ --with-kde4-lib=${KDEDIR}/$(get_libdir)
+ --with-kde-appsdatadir=${KDEDIR}/share/apps/klash
+ --with-kde4-servicesdir=${KDEDIR}/share/kde4/services
+ --with-kde4-plugindir=${KDEDIR}/$(get_libdir)/kde4"
+ fi
+
+ # Set media handler.
+ use ffmpeg || use gstreamer || media+=",none"
+ use ffmpeg && media+=",ffmpeg"
+ use gstreamer && media+=",gst"
+
+ # Set gui.
+ use dump && gui="${gui},dump"
+ use fbcon && gui="${gui},fb"
+ use gtk && gui=",gtk"
+ use kde && gui="${gui},kde4"
+ use sdl && gui="${gui},sdl"
+
+ if use sdl-sound; then
+ myconf="${myconf} --enable-sound=sdl"
+ else
+ myconf="${myconf} --enable-sound=none"
+ fi
+
+ # Set extensions
+ use mysql && myext=",mysql"
+ use gtk && myext="${myext},gtk"
+ use lirc && myext="${myext},lirc"
+ use dbus && myext="${myext},dbus"
+
+ # Strip extra comma from gui, myext, hwaccel and renderers.
+ device=$( echo $device | sed -e 's/,//' )
+ gui=$( echo $gui | sed -e 's/,//' )
+ myext=$( echo $myext | sed -e 's/,//' )
+ renderers=$( echo $renderers | sed -e 's/,//' )
+ media=$( echo $media | sed -e 's/,//' )
+
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ --disable-dependency-tracking \
+ --disable-kparts3 \
+ $(use_enable cygnal) \
+ $(use_enable cygnal cgibins) \
+ $(use_enable doc docbook) \
+ $(use_enable gnome ghelp) \
+ $(use_enable harden) \
+ $(use_enable jemalloc) \
+ $(use_enable kde kparts4) \
+ $(use_enable nls) \
+ $(use_enable nsplugin npapi) \
+ $(use_enable python) \
+ $(use_enable ssh) \
+ $(use_enable ssl) \
+ $(use_enable test testsuite) \
+ $(use_with gconf) \
+ --enable-gui=${gui} \
+ --enable-device=${device} \
+ --enable-extensions=${myext} \
+ --enable-renderer=${renderers} \
+ --enable-media=${media} \
+ ${myconf}
+}
+src_test() {
+ local log=testsuite-results.txt
+ cd testsuite
+ emake check || die "make check failed"
+ ./anaylse-results.sh > $log || die "results analyze failed"
+ cat $log
+}
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # Install nsplugin in directory set by --with-npapi-plugindir.
+ if use nsplugin; then
+ emake DESTDIR="${D}" install-plugin || die "install plugins failed"
+ fi
+
+ # Install kde konqueror plugin.
+ if use kde; then
+ pushd "${S}/plugin/klash4" >& /dev/null || die
+ emake DESTDIR="${D}" install-plugin || die "install kde plugins failed"
+ popd >& /dev/null
+ fi
+ # Create a symlink in /usr/$(get_libdir)/nsbrowser/plugins to the nsplugin install directory.
+ use nsplugin && inst_plugin /usr/$(get_libdir)/gnash/npapi/libgnashplugin.so
+
+ # Remove eglinfo, bug #463654
+ if use egl; then
+ rm -f "${D}"/usr/bin/eglinfo || die
+ fi
+
+ dodoc AUTHORS ChangeLog NEWS README || die "dodoc failed"
+}
+pkg_postinst() {
+ if use !gnome || use !gstreamer && use !ffmpeg ; then
+ ewarn ""
+ ewarn "Gnash was built without a media handler and or http handler !"
+ ewarn ""
+ ewarn "If you want Gnash to support video then you will need to"
+ ewarn "rebuild Gnash with either the ffmpeg or gstreamer and gnome use flags set."
+ ewarn ""
+ fi
+ ewarn "${PN} is still in heavy development"
+ ewarn "Please first report bugs on upstream gnashdevs and deal with them"
+ ewarn "And then report a Gentoo bug to the maintainer"
+ use kde && kde4-base_pkg_postinst
+}
diff --git a/www-plugins/gnash/metadata.xml b/www-plugins/gnash/metadata.xml
new file mode 100644
index 000000000000..9461ad4a46bd
--- /dev/null
+++ b/www-plugins/gnash/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>chithanh@gentoo.org</email>
+ <name>Chí-Thanh Christopher Nguyễn</name>
+ </maintainer>
+ <use>
+ <flag name='agg'>Rendering based on the Anti-Grain Geometry Rendering Engine library</flag>
+ <flag name='cygnal'>Enable building of the cygnal server</flag>
+ <flag name='dump'>Enable dump output module for creating video from SWF</flag>
+ <flag name='egl'>Enable EGL support for the OpenVG, OpenGL and X11 renderers</flag>
+ <flag name='gconf'>Enable GConf configuration backend</flag>
+ <flag name='harden'>Enable upstream recommended hardening build flags (may conflict with system ones)</flag>
+ <flag name='jemalloc'>Use dev-libs/jemalloc for allocations</flag>
+ <flag name='openvg'>Rendering based on the OpenVG graphics acceleration API</flag>
+ <flag name='sdl-sound'>Enable SDL audio output for the standalone player</flag>
+ <flag name='ssh'>Enable using SSH for network authentication in libnet</flag>
+ <flag name='ssl'>Enable directly using OpenSSL in libnet (not needed for nsplugin ssl support)</flag>
+ </use>
+</pkgmetadata>