diff options
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 34 | ||||
-rw-r--r-- | alephone-r5002-remove-deprecated-ffmpeg-quality-setting.diff | 13 | ||||
-rw-r--r-- | alephone-r5009-support-newer-ffmpeg.diff | 385 | ||||
-rw-r--r-- | alephone-r5011-use-mkstemp.diff | 14 | ||||
-rw-r--r-- | alephone-r5012-include-iostream.diff | 13 |
6 files changed, 19 insertions, 464 deletions
@@ -1,22 +1,24 @@ pkgbase = alephone pkgdesc = A free, enhanced port of the classic FPS "Marathon 2" by Bungie Software - pkgver = 1.1_20140104 - pkgrel = 3 + pkgver = 1.2.1_20150620 + pkgrel = 1 url = http://marathon.sourceforge.net/ arch = i686 arch = x86_64 license = GPL3 makedepends = boost - makedepends = lua + makedepends = mesa makedepends = icoutils depends = sdl_ttf depends = sdl_image depends = sdl_net + depends = smpeg depends = libmad depends = glu - depends = mesa depends = zziplib depends = ffmpeg + depends = boost-libs + depends = curl optdepends = alephone-emr: community-made scenario optdepends = alephone-eternalx: community-made scenario optdepends = alephone-evil: community-made scenario @@ -26,18 +28,10 @@ pkgbase = alephone optdepends = alephone-red: community-made scenario optdepends = alephone-rubiconx: community-made scenario optdepends = alephone-tempus_irae: community-made scenario - source = http://downloads.sourceforge.net/marathon/AlephOne-20140104.tar.bz2 + source = http://downloads.sourceforge.net/marathon/AlephOne-20150620.tar.bz2 source = http://downloads.sourceforge.net/marathon/README.md - 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 = d792f675ad0a92f415f43f1cd15dd828520b1728b5d9b6129933a2abf72df43f - sha256sums = 40117efbd082d0b81b7ca0880bfaa313bd64061d80e29f1660eba6ce3c8b2eba - sha256sums = 44b8426b1d0260d152864eb473915a206554569833fe3bea5746285a8d7689d0 - sha256sums = d1d82464dd97621dfcec234e36d8b5d54c6251b5a792959e9ad8e28bf4bc3dc6 + sha256sums = c0f360dfb74a6264f95d375103a74000930cf0439ffb0464f915f5379443e133 + sha256sums = 2eb7fedcd6d4f85b3dc62b3c26f08d8f620fe670f504dafb411787e09ff3b9d9 pkgname = alephone @@ -5,15 +5,15 @@ # Contributor: Jacek Poplawski <jacekpoplawski__gmail> pkgname=alephone -_pkgdate=20140104 -pkgver=1.1_$_pkgdate -pkgrel=3 +_pkgdate=20150620 +pkgver=1.2.1_$_pkgdate +pkgrel=1 pkgdesc='A free, enhanced port of the classic FPS "Marathon 2" by Bungie Software' arch=('i686' 'x86_64') url="http://marathon.sourceforge.net/" license=('GPL3') -depends=('sdl_ttf' 'sdl_image' 'sdl_net' 'libmad' 'glu' 'mesa' 'zziplib' - 'ffmpeg') +depends=('sdl_ttf' 'sdl_image' 'sdl_net' 'smpeg' 'libmad' 'glu' 'zziplib' + 'ffmpeg' 'boost-libs' 'curl') # todo: figure out, if they are all compatible optdepends=('alephone-emr: community-made scenario' 'alephone-eternalx: community-made scenario' # ok! @@ -24,29 +24,15 @@ optdepends=('alephone-emr: community-made scenario' 'alephone-red: community-made scenario' 'alephone-rubiconx: community-made scenario' 'alephone-tempus_irae: community-made scenario') -makedepends=('boost' 'lua' 'icoutils') +makedepends=('boost' 'mesa' 'icoutils') source=("http://downloads.sourceforge.net/marathon/AlephOne-$_pkgdate.tar.bz2" - "http://downloads.sourceforge.net/marathon/README.md" - "$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' - 'd792f675ad0a92f415f43f1cd15dd828520b1728b5d9b6129933a2abf72df43f' - '40117efbd082d0b81b7ca0880bfaa313bd64061d80e29f1660eba6ce3c8b2eba' - '44b8426b1d0260d152864eb473915a206554569833fe3bea5746285a8d7689d0' - 'd1d82464dd97621dfcec234e36d8b5d54c6251b5a792959e9ad8e28bf4bc3dc6') + "http://downloads.sourceforge.net/marathon/README.md") +sha256sums=('c0f360dfb74a6264f95d375103a74000930cf0439ffb0464f915f5379443e133' + '2eb7fedcd6d4f85b3dc62b3c26f08d8f620fe670f504dafb411787e09ff3b9d9') prepare() { cd AlephOne-$_pkgdate - # 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 - # lowercase for (folder) name sed "s|PACKAGE='AlephOne'|PACKAGE='alephone'|g" -i configure @@ -75,6 +61,6 @@ package() { install -m644 Resources/*.png "$pkgdir"/usr/share/icons # docs - install -Dm644 ../README.md "$pkgdir"/usr/share/doc/$pkgname/README-1.1.md + install -Dm644 ../README.md "$pkgdir"/usr/share/doc/$pkgname/README-${pkgver%_*}.md install -m644 README docs/*.html "$pkgdir"/usr/share/doc/$pkgname } diff --git a/alephone-r5002-remove-deprecated-ffmpeg-quality-setting.diff b/alephone-r5002-remove-deprecated-ffmpeg-quality-setting.diff deleted file mode 100644 index 8fa65823d764..000000000000 --- a/alephone-r5002-remove-deprecated-ffmpeg-quality-setting.diff +++ /dev/null @@ -1,13 +0,0 @@ -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; -- audio_stream->codec->global_quality = audio_stream->quality = FF_QP2LAMBDA * (aq / 10); -+ audio_stream->codec->global_quality = FF_QP2LAMBDA * (aq / 10); - audio_stream->codec->flags |= CODEC_FLAG_QSCALE; - - // find correct sample format diff --git a/alephone-r5009-support-newer-ffmpeg.diff b/alephone-r5009-support-newer-ffmpeg.diff deleted file mode 100644 index d9d00677381b..000000000000 --- a/alephone-r5009-support-newer-ffmpeg.diff +++ /dev/null @@ -1,385 +0,0 @@ -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 deleted file mode 100644 index c627dd4a825a..000000000000 --- a/alephone-r5011-use-mkstemp.diff +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 94b8fcb5ddc4..000000000000 --- a/alephone-r5012-include-iostream.diff +++ /dev/null @@ -1,13 +0,0 @@ -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" |