summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD35
-rw-r--r--alephone-ffmpeg-add-magic-number.diff15
-rw-r--r--alephone-r5002-remove-deprecated-ffmpeg-quality-setting.diff (renamed from alephone-remove-deprecated-r5002.diff)9
-rw-r--r--alephone-r5009-support-newer-ffmpeg.diff385
-rw-r--r--alephone-r5011-use-mkstemp.diff14
-rw-r--r--alephone-r5012-include-iostream.diff13
7 files changed, 446 insertions, 39 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bcd66dabf952..e9a2009d5abc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = alephone
pkgdesc = A free, enhanced port of the classic FPS "Marathon 2" by Bungie Software
pkgver = 1.1_20140104
- pkgrel = 1
+ pkgrel = 2
url = http://marathon.sourceforge.net/
arch = i686
arch = x86_64
@@ -28,12 +28,16 @@ pkgbase = alephone
optdepends = alephone-tempus_irae: community-made scenario
source = http://downloads.sourceforge.net/marathon/AlephOne-20140104.tar.bz2
source = http://downloads.sourceforge.net/marathon/README.md
- source = alephone-remove-deprecated-r5002.diff
- source = alephone-ffmpeg-add-magic-number.diff
+ source = alephone-r5002-remove-deprecated-ffmpeg-quality-setting.diff
+ source = alephone-r5009-support-newer-ffmpeg.diff
+ source = alephone-r5011-use-mkstemp.diff
+ source = alephone-r5012-include-iostream.diff
sha256sums = 7f7d35c1d99cddd7cd0b47d3e4b84311373b04c60402ce86e9d85c36dfbaabcd
sha256sums = b2b01a3120b61e56cecb6409585118a5e907171fef0e4dc25afaf13fcea5c5d5
- sha256sums = b06a57cffbf5ae3df916de1baa457e53c78a7ed5af22e7e330da3fc405602351
- sha256sums = cd0f169ea4a79d4b782ee0c03c35b254d947b8fc6af88cc5563d71f864b891f8
+ sha256sums = d792f675ad0a92f415f43f1cd15dd828520b1728b5d9b6129933a2abf72df43f
+ sha256sums = 40117efbd082d0b81b7ca0880bfaa313bd64061d80e29f1660eba6ce3c8b2eba
+ sha256sums = 44b8426b1d0260d152864eb473915a206554569833fe3bea5746285a8d7689d0
+ sha256sums = d1d82464dd97621dfcec234e36d8b5d54c6251b5a792959e9ad8e28bf4bc3dc6
pkgname = alephone
diff --git a/PKGBUILD b/PKGBUILD
index 1ea97977890b..3b649df6e635 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,4 @@
-# Maintainer: carstene1ns <url/mail: arch carsten-teibes de>
+# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
# Contributor: Marcin Skory <armitage at q84fh dot net>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
@@ -7,7 +7,7 @@
pkgname=alephone
_pkgdate=20140104
pkgver=1.1_$_pkgdate
-pkgrel=1
+pkgrel=2
pkgdesc='A free, enhanced port of the classic FPS "Marathon 2" by Bungie Software'
arch=('i686' 'x86_64')
url="http://marathon.sourceforge.net/"
@@ -18,32 +18,37 @@ depends=('sdl_ttf' 'sdl_image' 'sdl_net' 'libmad' 'glu' 'mesa' 'zziplib'
optdepends=('alephone-emr: community-made scenario'
'alephone-eternalx: community-made scenario'
'alephone-evil: community-made scenario'
- 'alephone-infinity: original data for Marathon Infinity'
- 'alephone-marathon: M1A1 data converted for AlephOne'
- 'alephone-marathon2: original data for Marathon 2: Durandal'
+ 'alephone-infinity: original data for Marathon Infinity' # ok!
+ 'alephone-marathon: M1A1 data converted for AlephOne' # ok!
+ 'alephone-marathon2: original data for Marathon 2: Durandal' # ok!
'alephone-red: community-made scenario'
'alephone-rubiconx: community-made scenario'
'alephone-tempus_irae: community-made scenario')
makedepends=('boost' 'lua')
source=("http://downloads.sourceforge.net/marathon/AlephOne-$_pkgdate.tar.bz2"
"http://downloads.sourceforge.net/marathon/README.md"
- "$pkgname-remove-deprecated-r5002.diff"
- "$pkgname-ffmpeg-add-magic-number.diff")
+ "$pkgname-r5002-remove-deprecated-ffmpeg-quality-setting.diff"
+ "$pkgname-r5009-support-newer-ffmpeg.diff"
+ "$pkgname-r5011-use-mkstemp.diff"
+ "$pkgname-r5012-include-iostream.diff")
sha256sums=('7f7d35c1d99cddd7cd0b47d3e4b84311373b04c60402ce86e9d85c36dfbaabcd'
'b2b01a3120b61e56cecb6409585118a5e907171fef0e4dc25afaf13fcea5c5d5'
- 'b06a57cffbf5ae3df916de1baa457e53c78a7ed5af22e7e330da3fc405602351'
- 'cd0f169ea4a79d4b782ee0c03c35b254d947b8fc6af88cc5563d71f864b891f8')
+ 'd792f675ad0a92f415f43f1cd15dd828520b1728b5d9b6129933a2abf72df43f'
+ '40117efbd082d0b81b7ca0880bfaa313bd64061d80e29f1660eba6ce3c8b2eba'
+ '44b8426b1d0260d152864eb473915a206554569833fe3bea5746285a8d7689d0'
+ 'd1d82464dd97621dfcec234e36d8b5d54c6251b5a792959e9ad8e28bf4bc3dc6')
prepare() {
cd AlephOne-$_pkgdate
- # add removed ffmpeg define
- patch -Np1 < ../$pkgname-ffmpeg-add-magic-number.diff
- # remove old setting
- patch -Np1 < ../$pkgname-remove-deprecated-r5002.diff
+ # backport some patches to make it compile correctly
+ patch -Np0 < ../$pkgname-r5002-remove-deprecated-ffmpeg-quality-setting.diff
+ patch -Np0 < ../$pkgname-r5009-support-newer-ffmpeg.diff
+ patch -Np0 < ../$pkgname-r5011-use-mkstemp.diff
+ patch -Np0 < ../$pkgname-r5012-include-iostream.diff
- # this is a leftover from old version (needed?)
- #sed "s|PACKAGE='AlephOne'|PACKAGE='alephone'|g" -i configure
+ # lowercase for (folder) name
+ sed "s|PACKAGE='AlephOne'|PACKAGE='alephone'|g" -i configure
}
build() {
diff --git a/alephone-ffmpeg-add-magic-number.diff b/alephone-ffmpeg-add-magic-number.diff
deleted file mode 100644
index d23c3104b91e..000000000000
--- a/alephone-ffmpeg-add-magic-number.diff
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -rupN AlephOne-20140104/Source_Files/FFmpeg/SDL_ffmpeg.c AlephOne-20140104.new/Source_Files/FFmpeg/SDL_ffmpeg.c
---- AlephOne-20140104/Source_Files/FFmpeg/SDL_ffmpeg.c 2013-07-05 02:33:29.000000000 +0200
-+++ AlephOne-20140104.new/Source_Files/FFmpeg/SDL_ffmpeg.c 2014-03-16 01:53:19.327213212 +0100
-@@ -48,6 +48,11 @@ extern "C"
- }
- #endif
-
-+/* set magic number for 1 second of 48khz 32bit audio (removed from upstream) */
-+#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
-+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
-+#endif
-+
- #include "SDL_ffmpeg.h"
-
- #ifdef MSVC
diff --git a/alephone-remove-deprecated-r5002.diff b/alephone-r5002-remove-deprecated-ffmpeg-quality-setting.diff
index bae81dd7968b..8fa65823d764 100644
--- a/alephone-remove-deprecated-r5002.diff
+++ b/alephone-r5002-remove-deprecated-ffmpeg-quality-setting.diff
@@ -1,7 +1,8 @@
-diff -rupN AlephOne-20140104/Source_Files/FFmpeg/Movie.cpp AlephOne-20140104.new/Source_Files/FFmpeg/Movie.cpp
---- AlephOne-20140104/Source_Files/FFmpeg/Movie.cpp 2014-01-04 03:19:57.000000000 +0100
-+++ AlephOne-20140104.new/Source_Files/FFmpeg/Movie.cpp 2014-03-16 01:43:32.030011019 +0100
-@@ -491,7 +491,7 @@ bool Movie::Setup()
+Index: Source_Files/FFmpeg/Movie.cpp
+===================================================================
+--- Source_Files/FFmpeg/Movie.cpp (Revision 5001)
++++ Source_Files/FFmpeg/Movie.cpp (Revision 5002)
+@@ -491,7 +491,7 @@
// tuning options
int aq = graphics_preferences->movie_export_audio_quality;
diff --git a/alephone-r5009-support-newer-ffmpeg.diff b/alephone-r5009-support-newer-ffmpeg.diff
new file mode 100644
index 000000000000..d9d00677381b
--- /dev/null
+++ b/alephone-r5009-support-newer-ffmpeg.diff
@@ -0,0 +1,385 @@
+Index: Source_Files/Sound/FFmpegDecoder.cpp
+===================================================================
+--- Source_Files/Sound/FFmpegDecoder.cpp (Revision 5008)
++++ Source_Files/Sound/FFmpegDecoder.cpp (Revision 5009)
+@@ -199,10 +199,13 @@
+
+ while (pkt_temp.size > 0)
+ {
+- AVFrame frame;
+- avcodec_get_frame_defaults(&frame);
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,0)
++ AVFrame *dframe = avcodec_alloc_frame();
++#else
++ AVFrame *dframe = av_frame_alloc();
++#endif
+ int got_frame = 0;
+- int bytes_read = avcodec_decode_audio4(dec_ctx, &frame, &got_frame, &pkt_temp);
++ int bytes_read = avcodec_decode_audio4(dec_ctx, dframe, &got_frame, &pkt_temp);
+ if (bytes_read < 0)
+ {
+ av_free_packet(&pkt);
+@@ -216,12 +219,12 @@
+
+ int stride = -1;
+ if (channels > 1 && av_sample_fmt_is_planar(in_fmt))
+- stride = frame.extended_data[1] - frame.extended_data[0];
++ stride = dframe->extended_data[1] - dframe->extended_data[0];
+
+- int written = convert_audio(frame.nb_samples, channels,
++ int written = convert_audio(dframe->nb_samples, channels,
+ stride,
+- in_fmt, frame.extended_data[0],
+- frame.nb_samples, channels,
++ in_fmt, dframe->extended_data[0],
++ dframe->nb_samples, channels,
+ -1,
+ out_fmt, av->temp_data);
+
+@@ -230,6 +233,12 @@
+ pkt_temp.data += bytes_read;
+ pkt_temp.size -= bytes_read;
+ }
++
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,0)
++ av_freep(&dframe);
++#else
++ av_frame_free(&dframe);
++#endif
+ }
+
+ av_free_packet(&pkt);
+Index: Source_Files/FFmpeg/Movie.cpp
+===================================================================
+--- Source_Files/FFmpeg/Movie.cpp (Revision 5008)
++++ Source_Files/FFmpeg/Movie.cpp (Revision 5009)
+@@ -85,6 +85,15 @@
+ }
+ #endif
+
++// FFmpeg compatibility
++#ifndef AV_CODEC_ID_VP8
++#define AV_CODEC_ID_VP8 CODEC_ID_VP8
++#endif
++#ifndef AV_CODEC_ID_VORBIS
++#define AV_CODEC_ID_VORBIS CODEC_ID_VORBIS
++#endif
++
++
+ // shamelessly stolen from SDL 2.0
+ static int get_cpu_count(void)
+ {
+@@ -399,7 +408,7 @@
+ AVStream *video_stream;
+ if (success)
+ {
+- video_codec = avcodec_find_encoder(CODEC_ID_VP8);
++ video_codec = avcodec_find_encoder(AV_CODEC_ID_VP8);
+ success = video_codec;
+ if (!success) err_msg = "Could not find VP8 encoder";
+ }
+@@ -445,7 +454,11 @@
+ }
+ if (success)
+ {
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,0)
+ av->video_frame = avcodec_alloc_frame();
++#else
++ av->video_frame = av_frame_alloc();
++#endif
+ success = av->video_frame;
+ if (!success) err_msg = "Could not allocate video frame";
+ }
+@@ -466,7 +479,7 @@
+ AVStream *audio_stream;
+ if (success)
+ {
+- audio_codec = avcodec_find_encoder(CODEC_ID_VORBIS);
++ audio_codec = avcodec_find_encoder(AV_CODEC_ID_VORBIS);
+ success = audio_codec;
+ if (!success) err_msg = "Could not find Vorbis encoder";
+ }
+@@ -511,7 +524,11 @@
+ }
+ if (success)
+ {
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,0)
+ av->audio_frame = avcodec_alloc_frame();
++#else
++ av->audio_frame = av_frame_alloc();
++#endif
+ success = av->audio_frame;
+ if (!success) err_msg = "Could not allocate audio frame";
+ }
+@@ -550,6 +567,7 @@
+ // Start movie file
+ if (success)
+ {
++ video_stream->time_base = (AVRational){1, TICKS_PER_SECOND};
+ avformat_write_header(av->fmt_ctx, NULL);
+ }
+
+@@ -615,13 +633,15 @@
+ while (!done)
+ {
+ // add video
+- int vsize = avcodec_encode_video(vcodec,
+- av->video_buf, av->video_bufsize,
+- frame);
++ AVPacket pkt;
++ av_init_packet(&pkt);
++ pkt.data = av->video_buf;
++ pkt.size = av->video_bufsize;
++
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54,0,0)
++ int vsize = avcodec_encode_video(vcodec, av->video_buf, av->video_bufsize, frame);
+ if (vsize > 0)
+ {
+- AVPacket pkt;
+- av_init_packet(&pkt);
+ if (vcodec->coded_frame->pts != AV_NOPTS_VALUE)
+ {
+ pkt.pts = av_rescale_q(vcodec->coded_frame->pts,
+@@ -630,12 +650,19 @@
+ }
+ if (vcodec->coded_frame->key_frame)
+ pkt.flags |= AV_PKT_FLAG_KEY;
++ pkt.size = vsize;
++ }
++
++#else
++ int got_packet = 0;
++ int vsize = avcodec_encode_video2(vcodec, &pkt, frame, &got_packet);
++#endif
++ if (vsize > 0)
++ {
+ pkt.stream_index = vstream->index;
+- pkt.data = av->video_buf;
+- pkt.size = vsize;
+ av_interleaved_write_frame(av->fmt_ctx, &pkt);
+- av_free_packet(&pkt);
+ }
++ av_free_packet(&pkt);
+
+ if (!last || vsize <= 0)
+ done = true;
+@@ -679,7 +706,11 @@
+ write_samples, acodec->channels, write_samples * write_bps,
+ acodec->sample_fmt, av->audio_data_conv);
+
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1)
+ avcodec_get_frame_defaults(av->audio_frame);
++#else
++ av_frame_unref(av->audio_frame);
++#endif
+ av->audio_frame->nb_samples = write_samples;
+ int asize = avcodec_fill_audio_frame(av->audio_frame, acodec->channels,
+ acodec->sample_fmt,
+@@ -695,7 +726,7 @@
+ if (0 == avcodec_encode_audio2(acodec, &pkt, av->audio_frame, &got_pkt)
+ && got_pkt)
+ {
+- if (acodec->coded_frame->pts != AV_NOPTS_VALUE)
++ if (acodec->coded_frame && acodec->coded_frame->pts != AV_NOPTS_VALUE)
+ {
+ pkt.pts = av_rescale_q(acodec->coded_frame->pts,
+ acodec->time_base,
+Index: Source_Files/FFmpeg/SDL_ffmpeg.c
+===================================================================
+--- Source_Files/FFmpeg/SDL_ffmpeg.c (Revision 5008)
++++ Source_Files/FFmpeg/SDL_ffmpeg.c (Revision 5009)
+@@ -48,6 +48,38 @@
+ }
+ #endif
+
++// FFmpeg compatibility
++#ifndef AV_CODEC_ID_MPEG1VIDEO
++#define AV_CODEC_ID_MPEG1VIDEO CODEC_ID_MPEG1VIDEO
++#endif
++#ifndef AV_CODEC_ID_MPEG2VIDEO
++#define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
++#endif
++#ifndef AV_CODEC_ID_MP2
++#define AV_CODEC_ID_MP2 CODEC_ID_MP2
++#endif
++#ifndef AV_CODEC_ID_DVVIDEO
++#define AV_CODEC_ID_DVVIDEO CODEC_ID_DVVIDEO
++#endif
++#ifndef AV_CODEC_ID_DVAUDIO
++#define AV_CODEC_ID_DVAUDIO CODEC_ID_DVAUDIO
++#endif
++#ifndef AV_CODEC_ID_PCM_S16LE
++#define AV_CODEC_ID_PCM_S16LE CODEC_ID_PCM_S16LE
++#endif
++#ifndef AV_CODEC_ID_PCM_S16BE
++#define AV_CODEC_ID_PCM_S16BE CODEC_ID_PCM_S16BE
++#endif
++#ifndef AV_CODEC_ID_PCM_U16LE
++#define AV_CODEC_ID_PCM_U16LE CODEC_ID_PCM_U16LE
++#endif
++#ifndef AV_CODEC_ID_PCM_U16BE
++#define AV_CODEC_ID_PCM_U16BE CODEC_ID_PCM_U16BE
++#endif
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
++#endif
++
+ #include "SDL_ffmpeg.h"
+
+ #ifdef MSVC
+@@ -169,12 +201,12 @@
+
+ const SDL_ffmpegCodec SDL_ffmpegCodecPALDVD =
+ {
+- CODEC_ID_MPEG2VIDEO,
++ AV_CODEC_ID_MPEG2VIDEO,
+ 720, 576,
+ 1, 25,
+ 6000000,
+ -1, -1,
+- CODEC_ID_MP2,
++ AV_CODEC_ID_MP2,
+ 2, 48000,
+ 192000,
+ -1, -1
+@@ -182,12 +214,12 @@
+
+ const SDL_ffmpegCodec SDL_ffmpegCodecPALDV =
+ {
+- CODEC_ID_DVVIDEO,
++ AV_CODEC_ID_DVVIDEO,
+ 720, 576,
+ 1, 25,
+ 6553600,
+ -1, -1,
+- CODEC_ID_DVAUDIO,
++ AV_CODEC_ID_DVAUDIO,
+ 2, 48000,
+ 256000,
+ -1, -1
+@@ -324,7 +356,11 @@
+ {
+ if ( file->type == SDL_ffmpegInputStream )
+ {
++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53,17,0)
+ av_close_input_file( file->_ffmpeg );
++#else
++ avformat_close_input( &file->_ffmpeg );
++#endif
+ }
+ else if ( file->type == SDL_ffmpegOutputStream )
+ {
+@@ -448,7 +484,11 @@
+ {
+ stream->mutex = SDL_CreateMutex();
+
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,0)
+ stream->decodeFrame = avcodec_alloc_frame();
++#else
++ stream->decodeFrame = av_frame_alloc();
++#endif
+
+ SDL_ffmpegStream **s = &file->vs;
+ while ( *s )
+@@ -1301,11 +1341,17 @@
+ {
+ if ( stream && stream->_ffmpeg && stream->_ffmpeg->codec )
+ {
+- if ( nominator ) *nominator = stream->_ffmpeg->r_frame_rate.num;
++ AVRational frate;
++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(55,12,100)
++ frate = stream->_ffmpeg->r_frame_rate;
++#else
++ frate = av_stream_get_r_frame_rate(stream->_ffmpeg);
++#endif
++ if ( nominator ) *nominator = frate.num;
+
+- if ( denominator ) *denominator = stream->_ffmpeg->r_frame_rate.den;
++ if ( denominator ) *denominator = frate.den;
+
+- return ( float )stream->_ffmpeg->r_frame_rate.num / stream->_ffmpeg->r_frame_rate.den;
++ return ( float )frate.num / frate.den;
+ }
+ else
+ {
+@@ -1587,13 +1633,13 @@
+ stream->codec->pix_fmt = PIX_FMT_YUV420P;
+
+ /* set mpeg2 codec parameters */
+- if ( stream->codec->codec_id == CODEC_ID_MPEG2VIDEO )
++ if ( stream->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO )
+ {
+ stream->codec->max_b_frames = 2;
+ }
+
+ /* set mpeg1 codec parameters */
+- if ( stream->codec->codec_id == CODEC_ID_MPEG1VIDEO )
++ if ( stream->codec->codec_id == AV_CODEC_ID_MPEG1VIDEO )
+ {
+ /* needed to avoid using macroblocks in which some coeffs overflow
+ this doesnt happen with normal video, it just happens here as the
+@@ -1757,10 +1803,10 @@
+
+ switch ( stream->codec->codec_id )
+ {
+- case CODEC_ID_PCM_S16LE:
+- case CODEC_ID_PCM_S16BE:
+- case CODEC_ID_PCM_U16LE:
+- case CODEC_ID_PCM_U16BE:
++ case AV_CODEC_ID_PCM_S16LE:
++ case AV_CODEC_ID_PCM_S16BE:
++ case AV_CODEC_ID_PCM_U16LE:
++ case AV_CODEC_ID_PCM_U16BE:
+ str->encodeAudioInputSize >>= 1;
+ break;
+ default:
+@@ -2032,19 +2078,41 @@
+ while ( size > 0 )
+ {
+ /* Decode the packet */
+-
+-#if ( LIBAVCODEC_VERSION_MAJOR <= 52 && LIBAVCODEC_VERSION_MINOR <= 20 )
+- int len = avcodec_decode_audio2( file->audioStream->_ffmpeg->codec, ( int16_t* )file->audioStream->sampleBuffer, &audioSize, pack->data, pack->size );
+-#else
+- int len = avcodec_decode_audio3( file->audioStream->_ffmpeg->codec, ( int16_t* )file->audioStream->sampleBuffer, &audioSize, pack );
++ AVCodecContext *avctx = file->audioStream->_ffmpeg->codec;
++ AVFrame dframe;
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1)
++ avcodec_get_frame_defaults(&dframe);
+ #endif
+-
+- /* if an error occured, we skip the frame */
+- if ( len <= 0 || !audioSize )
++ int got_frame = 0;
++ int len = avcodec_decode_audio4( avctx, &dframe, &got_frame, pack );
++
++ if (len < 0 || !got_frame)
+ {
+ SDL_ffmpegSetError( "error decoding audio frame" );
+ break;
+ }
++
++ int planar = av_sample_fmt_is_planar( avctx->sample_fmt );
++ int plane_size;
++ int data_size = av_samples_get_buffer_size( &plane_size, avctx->channels, dframe.nb_samples, avctx->sample_fmt, 1 );
++ if ( data_size > 10000 )
++ {
++ SDL_ffmpegSetError( "too much data in decoded audio frame" );
++ break;
++ }
++ memcpy( file->audioStream->sampleBuffer, dframe.extended_data[0], plane_size );
++ audioSize = plane_size;
++ if ( planar && avctx->channels > 1 )
++ {
++ int8_t *out = file->audioStream->sampleBuffer + plane_size;
++ int ch;
++ for ( ch = 1; ch < avctx->channels; ch++ )
++ {
++ memcpy( out, dframe.extended_data[ch], plane_size );
++ out += plane_size;
++ audioSize += plane_size;
++ }
++ }
+
+ /* change pointers */
+ data += len;
diff --git a/alephone-r5011-use-mkstemp.diff b/alephone-r5011-use-mkstemp.diff
new file mode 100644
index 000000000000..c627dd4a825a
--- /dev/null
+++ b/alephone-r5011-use-mkstemp.diff
@@ -0,0 +1,14 @@
+Index: Source_Files/Lua/luaconf.h
+===================================================================
+--- Source_Files/Lua/luaconf.h (Revision 5010)
++++ Source_Files/Lua/luaconf.h (Revision 5011)
+@@ -11,6 +11,9 @@
+ #include <limits.h>
+ #include <stddef.h>
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
+
+ /*
+ ** ==================================================================
diff --git a/alephone-r5012-include-iostream.diff b/alephone-r5012-include-iostream.diff
new file mode 100644
index 000000000000..94b8fcb5ddc4
--- /dev/null
+++ b/alephone-r5012-include-iostream.diff
@@ -0,0 +1,13 @@
+Index: Source_Files/Sound/SoundManager.cpp
+===================================================================
+--- Source_Files/Sound/SoundManager.cpp (Revision 5011)
++++ Source_Files/Sound/SoundManager.cpp (Revision 5012)
+@@ -20,6 +20,8 @@
+
+ */
+
++#include <iostream>
++
+ #include "SoundManager.h"
+ #include "ReplacementSounds.h"
+ #include "sound_definitions.h"