From 0615a909b089a81d068ae10517ceff31dabfece1 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 10 Jul 2012 00:01:37 +0000 Subject: Tue Jul 10 00:01:37 UTC 2012 --- community/performous/PKGBUILD | 17 ++++++++------ community/performous/ffmpeg-0.11.patch | 42 ++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 community/performous/ffmpeg-0.11.patch (limited to 'community/performous') diff --git a/community/performous/PKGBUILD b/community/performous/PKGBUILD index ebeef0028..76728e4b1 100644 --- a/community/performous/PKGBUILD +++ b/community/performous/PKGBUILD @@ -1,26 +1,26 @@ -# $Id: PKGBUILD 67200 2012-03-05 08:58:33Z ibiru $ +# $Id: PKGBUILD 73483 2012-07-08 09:31:23Z ibiru $ # Maintainer : Laurent Carlier # Contributor: Christoph Zeiler pkgname=performous pkgver=0.6.1 -pkgrel=13 +pkgrel=14 pkgdesc='A free game like "Singstar", "Rockband" or "Stepmania"' arch=('i686' 'x86_64') url="http://performous.org/" license=('GPL') -depends=('boost-libs>=1.48' 'imagemagick' 'glew>=1.7.0' 'libxml++' 'portaudio' 'portmidi' 'opencv' 'librsvg') +depends=('boost-libs' 'imagemagick' 'glew' 'libxml++' 'portaudio' 'portmidi' 'opencv' 'librsvg') #depends=('boost-libs>=1.48' 'sdl' 'jack' 'imagemagick' 'ffmpeg' 'glew>=1.7.0' 'libxml++' 'portaudio' 'portmidi' \ # 'opencv' 'librsvg' 'libjpeg' 'libpng' 'cairo') makedepends=('cmake' 'pkgconfig' 'help2man' 'boost>=1.48') optdepends=('performous-freesongs: free songs for performous') source=(http://sourceforge.net/projects/$pkgname/files/$pkgname/$pkgver/Performous-$pkgver-Source.tar.bz2 boost-filesystem-v3.patch - ffmpeg-0.8.patch::"http://performous.git.sourceforge.net/git/gitweb.cgi?p=performous/performous;a=patch;h=18449f6e56451f68b980c8359a4d1dc06f82db1a" + ffmpeg-0.11.patch png15.patch) md5sums=('451a759de77984b5a699e91107fe52e2' '42a8c825d80b0de16bd5752d2a80e585' - 'ff0ffa681dfaa09c4f42133a65309bf0' + '07e52e926595d053155bbfb7168e308f' '89157d5e21b0efd09fcbeee299d23c7e') build() { @@ -28,10 +28,13 @@ build() { # fix to built against boost 1.46 and later, upstream (git) now support v3 patch -Np1 -i ../boost-filesystem-v3.patch - # fix with ffmpeg-0.8 - patch -Np1 -i ../ffmpeg-0.8.patch + # fix with ffmpeg-0.11 + patch -Np1 -i ../ffmpeg-0.11.patch # fix for libpng 1.5 patch -Np1 -i ../png15.patch + # fix glib2.0 building + # #error "Only can be included directly." + sed -i -e 's#/gconvert.h#.h#g' game/unicode.cc mkdir -p build cd build diff --git a/community/performous/ffmpeg-0.11.patch b/community/performous/ffmpeg-0.11.patch new file mode 100644 index 000000000..2962123ed --- /dev/null +++ b/community/performous/ffmpeg-0.11.patch @@ -0,0 +1,42 @@ +diff -ru Performous-0.6.1-Source/game/ffmpeg.cc Performous-0.6.1a-Source/game/ffmpeg.cc +--- Performous-0.6.1-Source/game/ffmpeg.cc 2010-10-31 16:05:43.000000000 +0000 ++++ Performous-0.6.1a-Source/game/ffmpeg.cc 2012-06-08 21:40:10.876636789 +0000 +@@ -47,11 +47,17 @@ + return d >= 0.0 ? d : getInf(); + } + ++// FFMPEG has fluctuating API ++#if LIBAVCODEC_VERSION_INT < ((52<<16)+(64<<8)+0) ++#define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO ++#define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO ++#endif ++ + void FFmpeg::open() { + boost::mutex::scoped_lock l(s_avcodec_mutex); + av_register_all(); + av_log_set_level(AV_LOG_ERROR); +- if (av_open_input_file(&pFormatCtx, m_filename.c_str(), NULL, 0, NULL)) throw std::runtime_error("Cannot open input file"); ++ if (avformat_open_input(&pFormatCtx, m_filename.c_str(), NULL, NULL)) throw std::runtime_error("Cannot open input file"); + if (av_find_stream_info(pFormatCtx) < 0) throw std::runtime_error("Cannot find stream information"); + pFormatCtx->flags |= AVFMT_FLAG_GENPTS; + videoStream = -1; +@@ -60,8 +66,8 @@ + for (unsigned int i=0; inb_streams; i++) { + AVCodecContext* cc = pFormatCtx->streams[i]->codec; + cc->workaround_bugs = FF_BUG_AUTODETECT; +- if (videoStream == -1 && cc->codec_type==CODEC_TYPE_VIDEO) videoStream = i; +- if (audioStream == -1 && cc->codec_type==CODEC_TYPE_AUDIO) audioStream = i; ++ if (videoStream == -1 && cc->codec_type==AVMEDIA_TYPE_VIDEO) videoStream = i; ++ if (audioStream == -1 && cc->codec_type==AVMEDIA_TYPE_AUDIO) audioStream = i; + } + if (videoStream == -1 && decodeVideo) throw std::runtime_error("No video stream found"); + if (audioStream == -1 && decodeAudio) throw std::runtime_error("No audio stream found"); +@@ -92,7 +98,7 @@ + pAudioCodecCtx = cc; + #if LIBAVCODEC_VERSION_INT > ((52<<16)+(12<<8)+0) + pResampleCtx = av_audio_resample_init(AUDIO_CHANNELS, cc->channels, m_rate, cc->sample_rate, +- SAMPLE_FMT_S16, SAMPLE_FMT_S16, 16, 10, 0, 0.8); ++ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16, 16, 10, 0, 0.8); + #else + pResampleCtx = audio_resample_init(AUDIO_CHANNELS, cc->channels, m_rate, cc->sample_rate); + #endif -- cgit v1.2.3-54-g00ecf