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/lightspark/files
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/lightspark/files')
-rw-r--r--www-plugins/lightspark/files/lightspark-0.7.2-ffmpeg20.patch155
-rw-r--r--www-plugins/lightspark/files/lightspark-0.7.2-llvm33.patch103
2 files changed, 258 insertions, 0 deletions
diff --git a/www-plugins/lightspark/files/lightspark-0.7.2-ffmpeg20.patch b/www-plugins/lightspark/files/lightspark-0.7.2-ffmpeg20.patch
new file mode 100644
index 000000000000..c0a1f5f3610c
--- /dev/null
+++ b/www-plugins/lightspark/files/lightspark-0.7.2-ffmpeg20.patch
@@ -0,0 +1,155 @@
+From fff7e63650c1569908bf80f11a123e051e993f31 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ludger=20Kr=C3=A4mer?= <dbluelle@blau-weissoedingen.de>
+Date: Fri, 16 Aug 2013 20:30:28 +0200
+Subject: [PATCH] fix compilation with ffmpeg 2.0 avcodec_decode_audio4 seems
+ not to deliver data in AV_SAMPLE_FMT_S16 format, so we have to use
+ libavresample for resampling
+
+---
+ CMakeLists.txt | 2 +-
+ conf/FindFFMpeg.cmake | 6 ++++-
+ src/backends/decoder.cpp | 64 ++++++++++++++++++++++++++++++++++++++++++------
+ src/backends/decoder.h | 8 ++++++
+ 4 files changed, 70 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 33dbb85..d3a964b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -286,7 +286,7 @@ IF(AUDIO_BACKEND)
+ ENDIF(AUDIO_BACKEND)
+
+ IF(ENABLE_LIBAVCODEC)
+- pkg_check_modules(FFMPEG libavcodec libavutil libavformat)
++ pkg_check_modules(FFMPEG libavcodec libavutil libavformat libavresample)
+ IF(NOT(FFMPEG_FOUND))
+ INCLUDE(FindFFMpeg REQUIRED)
+ ENDIF(NOT(FFMPEG_FOUND))
+diff --git a/conf/FindFFMpeg.cmake b/conf/FindFFMpeg.cmake
+index 2b4dd98..8246c15 100644
+--- a/conf/FindFFMpeg.cmake
++++ b/conf/FindFFMpeg.cmake
+@@ -23,7 +23,11 @@ FIND_LIBRARY(FFMPEG_AVFORMAT_LIBRARY NAMES
+ avformat
+ )
+
+-SET(FFMPEG_LIBRARY ${FFMPEG_AVCODEC_LIBRARY} ${FFMPEG_AVUTIL_LIBRARY} ${FFMPEG_AVFORMAT_LIBRARY})
++FIND_LIBRARY(FFMPEG_AVRESAMPLE_LIBRARY NAMES
++ avresample
++)
++
++SET(FFMPEG_LIBRARY ${FFMPEG_AVCODEC_LIBRARY} ${FFMPEG_AVUTIL_LIBRARY} ${FFMPEG_AVFORMAT_LIBRARY} ${FFMPEG_AVRESAMPLE_LIBRARY})
+ MARK_AS_ADVANCED(FFMPEG_LIBRARY)
+
+ # handle the QUIETLY and REQUIRED arguments and set FFMPEG_FOUND to TRUE if
+diff --git a/src/backends/decoder.cpp b/src/backends/decoder.cpp
+index 22eac2e..4b3148c 100755
+--- a/src/backends/decoder.cpp
++++ b/src/backends/decoder.cpp
+@@ -295,6 +295,8 @@ bool FFMpegVideoDecoder::decodePacket(AVPacket* pkt, uint32_t time)
+ #else
+ int ret=avcodec_decode_video(codecContext, frameIn, &frameOk, pkt->data, pkt->size);
+ #endif
++ if (ret < 0)
++ return false;
+
+ assert_and_throw(ret==(int)pkt->size);
+ if(frameOk)
+@@ -612,10 +614,33 @@ uint32_t FFMpegAudioDecoder::decodeData(uint8_t* data, int32_t datalen, uint32_t
+ ret=-1;
+ else
+ {
+- //This is suboptimal but equivalent to what libavcodec
+- //does for the compatibility version of avcodec_decode_audio3
+- memcpy(curTail.samples, frameIn->extended_data[0], frameIn->linesize[0]);
+- maxLen=frameIn->linesize[0];
++ if (frameIn->format != AV_SAMPLE_FMT_S16)
++ {
++ AVAudioResampleContext * avr = avresample_alloc_context();
++ av_opt_set_int(avr, "in_channel_layout", frameIn->channel_layout, 0);
++ av_opt_set_int(avr, "out_channel_layout", frameIn->channel_layout, 0);
++ av_opt_set_int(avr, "in_sample_rate", frameIn->sample_rate, 0);
++ av_opt_set_int(avr, "out_sample_rate", frameIn->sample_rate, 0);
++ av_opt_set_int(avr, "in_sample_fmt", frameIn->format, 0);
++ av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);
++ avresample_open(avr);
++
++ uint8_t *output;
++ int out_linesize;
++ int out_samples = avresample_available(avr) + av_rescale_rnd(avresample_get_delay(avr) + frameIn->linesize[0], frameIn->sample_rate, frameIn->sample_rate, AV_ROUND_UP);
++ av_samples_alloc(&output, &out_linesize, frameIn->nb_samples, out_samples, AV_SAMPLE_FMT_S16, 0);
++ maxLen = avresample_convert(avr, &output, out_linesize, out_samples, frameIn->extended_data, frameIn->linesize[0], frameIn->nb_samples)*4;
++ memcpy(curTail.samples, output, maxLen);
++ av_freep(&output);
++ avresample_free(&avr);
++ }
++ else
++ {
++ //This is suboptimal but equivalent to what libavcodec
++ //does for the compatibility version of avcodec_decode_audio3
++ memcpy(curTail.samples, frameIn->extended_data[0], frameIn->linesize[0]);
++ maxLen=frameIn->linesize[0];
++ }
+ }
+ #else
+ int32_t ret=avcodec_decode_audio3(codecContext, curTail.samples, &maxLen, &pkt);
+@@ -660,10 +685,33 @@ uint32_t FFMpegAudioDecoder::decodePacket(AVPacket* pkt, uint32_t time)
+ ret=-1;
+ else
+ {
+- //This is suboptimal but equivalent to what libavcodec
+- //does for the compatibility version of avcodec_decode_audio3
+- memcpy(curTail.samples, frameIn->extended_data[0], frameIn->linesize[0]);
+- maxLen=frameIn->linesize[0];
++ if (frameIn->format != AV_SAMPLE_FMT_S16)
++ {
++ AVAudioResampleContext * avr = avresample_alloc_context();
++ av_opt_set_int(avr, "in_channel_layout", frameIn->channel_layout, 0);
++ av_opt_set_int(avr, "out_channel_layout", frameIn->channel_layout, 0);
++ av_opt_set_int(avr, "in_sample_rate", frameIn->sample_rate, 0);
++ av_opt_set_int(avr, "out_sample_rate", frameIn->sample_rate, 0);
++ av_opt_set_int(avr, "in_sample_fmt", frameIn->format, 0);
++ av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);
++ avresample_open(avr);
++
++ uint8_t *output;
++ int out_linesize;
++ int out_samples = avresample_available(avr) + av_rescale_rnd(avresample_get_delay(avr) + frameIn->linesize[0], frameIn->sample_rate, frameIn->sample_rate, AV_ROUND_UP);
++ av_samples_alloc(&output, &out_linesize, frameIn->nb_samples, out_samples, AV_SAMPLE_FMT_S16, 0);
++ maxLen = avresample_convert(avr, &output, out_linesize, out_samples, frameIn->extended_data, frameIn->linesize[0], frameIn->nb_samples)*4;
++ memcpy(curTail.samples, output, maxLen);
++ av_freep(&output);
++ avresample_free(&avr);
++ }
++ else
++ {
++ //This is suboptimal but equivalent to what libavcodec
++ //does for the compatibility version of avcodec_decode_audio3
++ memcpy(curTail.samples, frameIn->extended_data[0], frameIn->linesize[0]);
++ maxLen=frameIn->linesize[0];
++ }
+ }
+ #elif HAVE_AVCODEC_DECODE_AUDIO3
+ int ret=avcodec_decode_audio3(codecContext, curTail.samples, &maxLen, pkt);
+diff --git a/src/backends/decoder.h b/src/backends/decoder.h
+index 93950ad..28bd232 100644
+--- a/src/backends/decoder.h
++++ b/src/backends/decoder.h
+@@ -28,6 +28,14 @@
+ {
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
++#include <libavresample/avresample.h>
++#include <libavutil/opt.h>
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++#endif
++#ifndef CodecID
++#define CodecID AVCodecID
++#endif
+ #define MAX_AUDIO_FRAME_SIZE AVCODEC_MAX_AUDIO_FRAME_SIZE
+ }
+ #else
+--
+1.8.4
+
diff --git a/www-plugins/lightspark/files/lightspark-0.7.2-llvm33.patch b/www-plugins/lightspark/files/lightspark-0.7.2-llvm33.patch
new file mode 100644
index 000000000000..2e452331ce38
--- /dev/null
+++ b/www-plugins/lightspark/files/lightspark-0.7.2-llvm33.patch
@@ -0,0 +1,103 @@
+diff -up lightspark-0.7.2/conf/FindLLVM.cmake.llvm33 lightspark-0.7.2/conf/FindLLVM.cmake
+--- lightspark-0.7.2/conf/FindLLVM.cmake.llvm33 2013-03-16 12:19:18.000000000 +0100
++++ lightspark-0.7.2/conf/FindLLVM.cmake 2013-05-11 11:57:36.455450049 +0200
+@@ -168,11 +168,16 @@ else (LLVM_INCLUDE_DIR)
+
+ set(CMAKE_REQUIRED_INCLUDES ${LLVM_INCLUDE_DIR})
+ check_include_file_cxx("llvm/DataLayout.h" HAVE_DATALAYOUT_H)
++ check_include_file_cxx("llvm/IR/DataLayout.h" HAVE_IR_DATALAYOUT_H)
+ unset(CMAKE_REQUIRED_INCLUDES)
+ MESSAGE(STATUS "HAVE_DATALAYOUT_H: " ${HAVE_DATALAYOUT_H})
++ MESSAGE(STATUS "HAVE_IR_DATALAYOUT_H: " ${HAVE_IR_DATALAYOUT_H})
+ IF(HAVE_DATALAYOUT_H)
+ ADD_DEFINITIONS(-DHAVE_DATALAYOUT_H)
+ ENDIF(HAVE_DATALAYOUT_H)
++ IF(HAVE_IR_DATALAYOUT_H)
++ ADD_DEFINITIONS(-DHAVE_IR_DATALAYOUT_H)
++ ENDIF(HAVE_IR_DATALAYOUT_H)
+
+ exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE LLVM_COMPILE_FLAGS )
+ MESSAGE(STATUS "LLVM CXX flags: " ${LLVM_COMPILE_FLAGS})
+diff -up lightspark-0.7.2/src/scripting/abc.cpp.llvm33 lightspark-0.7.2/src/scripting/abc.cpp
+--- lightspark-0.7.2/src/scripting/abc.cpp.llvm33 2013-03-16 12:19:18.000000000 +0100
++++ lightspark-0.7.2/src/scripting/abc.cpp 2013-05-11 11:57:36.451450048 +0200
+@@ -23,12 +23,19 @@
+
+ #include "compat.h"
+
+-#include <llvm/Module.h>
+ #include <llvm/ExecutionEngine/ExecutionEngine.h>
+ #include <llvm/ExecutionEngine/JIT.h>
+ #include <llvm/PassManager.h>
+-#include <llvm/LLVMContext.h>
+-#ifdef HAVE_DATALAYOUT_H
++#ifdef HAVE_IR_DATALAYOUT_H
++# include <llvm/IR/Module.h>
++# include <llvm/IR/LLVMContext.h>
++#else
++# include <llvm/Module.h>
++# include <llvm/LLVMContext.h>
++#endif
++#ifdef HAVE_IR_DATALAYOUT_H
++# include <llvm/IR/DataLayout.h>
++#elif defined HAVE_DATALAYOUT_H
+ # include <llvm/DataLayout.h>
+ #else
+ # include <llvm/Target/TargetData.h>
+@@ -1489,7 +1496,7 @@ void ABCVm::Run(ABCVm* th)
+ assert_and_throw(th->ex);
+
+ th->FPM=new llvm::FunctionPassManager(th->module);
+-#ifdef HAVE_DATALAYOUT_H
++#if defined HAVE_DATALAYOUT_H || defined HAVE_IR_DATALAYOUT_H
+ th->FPM->add(new llvm::DataLayout(*th->ex->getDataLayout()));
+ #else
+ th->FPM->add(new llvm::TargetData(*th->ex->getTargetData()));
+diff -up lightspark-0.7.2/src/scripting/abc_codesynt.cpp.llvm33 lightspark-0.7.2/src/scripting/abc_codesynt.cpp
+--- lightspark-0.7.2/src/scripting/abc_codesynt.cpp.llvm33 2013-03-16 12:19:18.000000000 +0100
++++ lightspark-0.7.2/src/scripting/abc_codesynt.cpp 2013-05-11 11:59:23.066458300 +0200
+@@ -25,18 +25,29 @@
+ #endif
+
+ #include "compat.h"
+-#include <llvm/Module.h>
+-#include <llvm/DerivedTypes.h>
+ #include <llvm/ExecutionEngine/ExecutionEngine.h>
+ #include <llvm/PassManager.h>
+-#include <llvm/Constants.h>
+-#ifdef HAVE_IRBUILDER_H
++#ifdef HAVE_IR_DATALAYOUT_H
++# include <llvm/IR/Constants.h>
++# include <llvm/IR/DerivedTypes.h>
++# include <llvm/IR/Module.h>
++# include <llvm/IR/LLVMContext.h>
++#else
++# include <llvm/Constants.h>
++# include <llvm/DerivedTypes.h>
++# include <llvm/Module.h>
++# include <llvm/LLVMContext.h>
++#endif
++#ifdef HAVE_IR_DATALAYOUT_H
++# include <llvm/IR/IRBuilder.h>
++#elif defined HAVE_IRBUILDER_H
+ # include <llvm/IRBuilder.h>
+ #else
+ # include <llvm/Support/IRBuilder.h>
+ #endif
+-#include <llvm/LLVMContext.h>
+-#ifdef HAVE_DATALAYOUT_H
++#ifdef HAVE_IR_DATALAYOUT_H
++# include <llvm/IR/DataLayout.h>
++#elif defined HAVE_DATALAYOUT_H
+ # include <llvm/DataLayout.h>
+ #else
+ # include <llvm/Target/TargetData.h>
+@@ -279,7 +290,7 @@ void ABCVm::registerFunctions()
+ llvm::FunctionType* FT=NULL;
+
+ //Create types
+-#ifdef HAVE_DATALAYOUT_H
++#if defined HAVE_DATALAYOUT_H || defined HAVE_IR_DATALAYOUT_H
+ ptr_type=ex->getDataLayout()->getIntPtrType(llvm_context());
+ #else
+ ptr_type=ex->getTargetData()->getIntPtrType(llvm_context());