diff options
-rw-r--r-- | app-text/goldendict/files/goldendict-1.5.0-ffmpeg-4.patch | 167 | ||||
-rw-r--r-- | app-text/goldendict/goldendict-1.5.0_rc2-r2.ebuild | 1 | ||||
-rw-r--r-- | eclass/cmake-utils.eclass | 2 | ||||
-rw-r--r-- | games-emulation/ppsspp/files/ppsspp-1.5.4-ffmpeg-4.patch | 34 | ||||
-rw-r--r-- | games-emulation/ppsspp/ppsspp-1.5.4-r2.ebuild | 1 | ||||
-rw-r--r-- | sys-firmware/intel-microcode/Manifest | 2 | ||||
-rw-r--r-- | sys-firmware/intel-microcode/intel-microcode-20180807a_p20180916.ebuild (renamed from sys-firmware/intel-microcode/intel-microcode-20180807a_p20180808.ebuild) | 0 |
7 files changed, 205 insertions, 2 deletions
diff --git a/app-text/goldendict/files/goldendict-1.5.0-ffmpeg-4.patch b/app-text/goldendict/files/goldendict-1.5.0-ffmpeg-4.patch new file mode 100644 index 000000000000..6e6d03675a4f --- /dev/null +++ b/app-text/goldendict/files/goldendict-1.5.0-ffmpeg-4.patch @@ -0,0 +1,167 @@ +From 03bbe01b79a1f07a6780cb60f23a087104c5d77b Mon Sep 17 00:00:00 2001 +From: Abs62 <ottomann@yandex.ru> +Date: Fri, 30 Mar 2018 22:53:24 +0300 +Subject: [PATCH] Fix warnings while compile with FFMpeg 3.4.2 (issue #978) + +--- + ffmpegaudio.cc | 68 +++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 62 insertions(+), 6 deletions(-) + +diff --git a/ffmpegaudio.cc b/ffmpegaudio.cc +index ed1172bd..56e8f788 100644 +--- a/ffmpegaudio.cc ++++ b/ffmpegaudio.cc +@@ -91,6 +91,7 @@ struct DecoderContext + QByteArray audioData_; + QDataStream audioDataStream_; + AVFormatContext * formatContext_; ++ AVCodec * codec_; + AVCodecContext * codecContext_; + AVIOContext * avioContext_; + AVStream * audioStream_; +@@ -114,6 +115,7 @@ DecoderContext::DecoderContext( QByteArray const & audioData, QAtomicInt & isCan + audioData_( audioData ), + audioDataStream_( audioData_ ), + formatContext_( NULL ), ++ codec_( NULL ), + codecContext_( NULL ), + avioContext_( NULL ), + audioStream_( NULL ), +@@ -143,7 +145,11 @@ bool DecoderContext::openCodec( QString & errorString ) + return false; + } + ++#if LIBAVCODEC_VERSION_MAJOR < 56 || ( LIBAVCODEC_VERSION_MAJOR == 56 && LIBAVCODEC_VERSION_MINOR < 56 ) + unsigned char * avioBuffer = ( unsigned char * )av_malloc( kBufferSize + FF_INPUT_BUFFER_PADDING_SIZE ); ++#else ++ unsigned char * avioBuffer = ( unsigned char * )av_malloc( kBufferSize + AV_INPUT_BUFFER_PADDING_SIZE ); ++#endif + if ( !avioBuffer ) + { + errorString = QObject::tr( "av_malloc() failed." ); +@@ -186,7 +192,11 @@ bool DecoderContext::openCodec( QString & errorString ) + // Find audio stream, use the first audio stream if available + for ( unsigned i = 0; i < formatContext_->nb_streams; i++ ) + { ++#if LIBAVCODEC_VERSION_MAJOR < 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR < 33 ) + if ( formatContext_->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO ) ++#else ++ if ( formatContext_->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO ) ++#endif + { + audioStream_ = formatContext_->streams[i]; + break; +@@ -198,22 +208,38 @@ bool DecoderContext::openCodec( QString & errorString ) + return false; + } + ++#if LIBAVCODEC_VERSION_MAJOR < 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR < 33 ) + codecContext_ = audioStream_->codec; +- AVCodec * codec = avcodec_find_decoder( codecContext_->codec_id ); +- if ( !codec ) ++ codec_ = avcodec_find_decoder( codecContext_->codec_id ); ++ if ( !codec_ ) + { + errorString = QObject::tr( "Codec [id: %1] not found." ).arg( codecContext_->codec_id ); + return false; + } ++#else ++ codec_ = avcodec_find_decoder( audioStream_->codecpar->codec_id ); ++ if ( !codec_ ) ++ { ++ errorString = QObject::tr( "Codec [id: %1] not found." ).arg( audioStream_->codecpar->codec_id ); ++ return false; ++ } ++ codecContext_ = avcodec_alloc_context3( codec_ ); ++ if ( !codecContext_ ) ++ { ++ errorString = QObject::tr( "avcodec_alloc_context3() failed." ); ++ return false; ++ } ++ avcodec_parameters_to_context( codecContext_, audioStream_->codecpar ); ++#endif + +- ret = avcodec_open2( codecContext_, codec, NULL ); ++ ret = avcodec_open2( codecContext_, codec_, NULL ); + if ( ret < 0 ) + { + errorString = QObject::tr( "avcodec_open2() failed: %1." ).arg( avErrorString( ret ) ); + return false; + } + +- av_log( NULL, AV_LOG_INFO, "Codec open: %s: channels: %d, rate: %d, format: %s\n", codec->long_name, ++ av_log( NULL, AV_LOG_INFO, "Codec open: %s: channels: %d, rate: %d, format: %s\n", codec_->long_name, + codecContext_->channels, codecContext_->sample_rate, av_get_sample_fmt_name( codecContext_->sample_fmt ) ); + return true; + } +@@ -252,10 +278,13 @@ void DecoderContext::closeCodec() + + // Closing a codec context without prior avcodec_open2() will result in + // a crash in ffmpeg +- if ( audioStream_ && audioStream_->codec && audioStream_->codec->codec ) ++ if ( audioStream_ && codecContext_ && codec_ ) + { + audioStream_->discard = AVDISCARD_ALL; +- avcodec_close( audioStream_->codec ); ++ avcodec_close( codecContext_ ); ++#if LIBAVCODEC_VERSION_MAJOR > 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR >= 33 ) ++ avcodec_free_context( &codecContext_ ); ++#endif + } + + avformat_close_input( &formatContext_ ); +@@ -356,6 +385,7 @@ bool DecoderContext::play( QString & errorString ) + if ( packet.stream_index == audioStream_->index ) + { + AVPacket pack = packet; ++#if LIBAVCODEC_VERSION_MAJOR < 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR < 37 ) + int gotFrame = 0; + do + { +@@ -370,6 +400,19 @@ bool DecoderContext::play( QString & errorString ) + pack.data += len; + } + while( pack.size > 0 ); ++#else ++ int ret = avcodec_send_packet( codecContext_, &pack ); ++ /* read all the output frames (in general there may be any number of them) */ ++ while( ret >= 0 ) ++ { ++ ret = avcodec_receive_frame( codecContext_, frame); ++ ++ if ( Qt4x5::AtomicInt::loadAcquire( isCancelled_ ) || ret < 0 ) ++ break; ++ ++ playFrame( frame ); ++ } ++#endif + } + // av_free_packet() must be called after each call to av_read_frame() + #if LIBAVCODEC_VERSION_MAJOR < 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR < 7 ) +@@ -379,6 +422,7 @@ bool DecoderContext::play( QString & errorString ) + #endif + } + ++#if LIBAVCODEC_VERSION_MAJOR < 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR < 37 ) + if ( !Qt4x5::AtomicInt::loadAcquire( isCancelled_ ) && + codecContext_->codec->capabilities & CODEC_CAP_DELAY ) + { +@@ -391,6 +435,18 @@ bool DecoderContext::play( QString & errorString ) + playFrame( frame ); + } + } ++#else ++ /* flush the decoder */ ++ av_init_packet( &packet ); ++ int ret = avcodec_send_packet(codecContext_, &packet ); ++ while( ret >= 0 ) ++ { ++ ret = avcodec_receive_frame(codecContext_, frame); ++ if ( Qt4x5::AtomicInt::loadAcquire( isCancelled_ ) || ret < 0 ) ++ break; ++ playFrame( frame ); ++ } ++#endif + + #if LIBAVCODEC_VERSION_MAJOR < 54 + av_free( frame ); diff --git a/app-text/goldendict/goldendict-1.5.0_rc2-r2.ebuild b/app-text/goldendict/goldendict-1.5.0_rc2-r2.ebuild index e25c25eb0628..866b4e88ea6c 100644 --- a/app-text/goldendict/goldendict-1.5.0_rc2-r2.ebuild +++ b/app-text/goldendict/goldendict-1.5.0_rc2-r2.ebuild @@ -51,6 +51,7 @@ DEPEND="${RDEPEND} PATCHES=( "${FILESDIR}/${PN}-1.5.0-qtsingleapplication-unbundle.patch" "${FILESDIR}/${PN}-1.5.0-qt-5.11.patch" + "${FILESDIR}/${PN}-1.5.0-ffmpeg-4.patch" ) S="${WORKDIR}/${PN}-${MY_PV}" diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index d69c79f83b41..98f5fa41b55a 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -610,6 +610,7 @@ cmake-utils_src_configure() { SET (CMAKE_INSTALL_LIBDIR ${libdir} CACHE PATH "Output directory for libraries") SET (CMAKE_INSTALL_INFODIR "${EPREFIX}/usr/share/info" CACHE PATH "") SET (CMAKE_INSTALL_MANDIR "${EPREFIX}/usr/share/man" CACHE PATH "") + SET (CMAKE_USER_MAKE_RULES_OVERRIDE "${build_rules}" CACHE FILEPATH "Gentoo override rules") _EOF_ [[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}" @@ -668,7 +669,6 @@ cmake-utils_src_configure() { "${mycmakeargs_local[@]}" -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" $([[ ${EAPI} == 5 ]] && echo -DCMAKE_INSTALL_DO_STRIP=OFF) - -DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}" -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}" "${MYCMAKEARGS}" ) diff --git a/games-emulation/ppsspp/files/ppsspp-1.5.4-ffmpeg-4.patch b/games-emulation/ppsspp/files/ppsspp-1.5.4-ffmpeg-4.patch new file mode 100644 index 000000000000..d738d4bc56c3 --- /dev/null +++ b/games-emulation/ppsspp/files/ppsspp-1.5.4-ffmpeg-4.patch @@ -0,0 +1,34 @@ +From 70c54a7d1ab15c0cf84a205b944db7e0339242e0 Mon Sep 17 00:00:00 2001 +From: Greg V <greg@unrelenting.technology> +Date: Sat, 21 Apr 2018 16:44:45 +0300 +Subject: [PATCH] Fix build with ffmpeg 4.0 + +--- + Core/HLE/sceMpeg.cpp | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp +index 592320515e..ae309d7b2e 100644 +--- a/Core/HLE/sceMpeg.cpp ++++ b/Core/HLE/sceMpeg.cpp +@@ -884,13 +884,16 @@ class H264Frames{ + } + }; + #ifndef USE_FFMPEG +-#define FF_INPUT_BUFFER_PADDING_SIZE 16 ++#define AV_INPUT_BUFFER_PADDING_SIZE 16 ++#endif ++#ifndef AV_INPUT_BUFFER_PADDING_SIZE ++#define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE + #endif + void addpadding(){ +- u8* str = new u8[size + FF_INPUT_BUFFER_PADDING_SIZE]; ++ u8* str = new u8[size + AV_INPUT_BUFFER_PADDING_SIZE]; + memcpy(str, stream, size); +- memset(str + size, 0, FF_INPUT_BUFFER_PADDING_SIZE); +- size += FF_INPUT_BUFFER_PADDING_SIZE; ++ memset(str + size, 0, AV_INPUT_BUFFER_PADDING_SIZE); ++ size += AV_INPUT_BUFFER_PADDING_SIZE; + delete[] stream; + stream = str; + } diff --git a/games-emulation/ppsspp/ppsspp-1.5.4-r2.ebuild b/games-emulation/ppsspp/ppsspp-1.5.4-r2.ebuild index 04fc2542f6a5..4e7f8f7f0271 100644 --- a/games-emulation/ppsspp/ppsspp-1.5.4-r2.ebuild +++ b/games-emulation/ppsspp/ppsspp-1.5.4-r2.ebuild @@ -49,6 +49,7 @@ DEPEND="${RDEPEND}" PATCHES=( "${FILESDIR}"/${PN}-1.4.2-assets-lookup.patch "${FILESDIR}"/${PN}-1.4-O2.patch + "${FILESDIR}"/${P}-ffmpeg-4.patch ) src_unpack() { diff --git a/sys-firmware/intel-microcode/Manifest b/sys-firmware/intel-microcode/Manifest index 242227288ea4..2730dbac48ea 100644 --- a/sys-firmware/intel-microcode/Manifest +++ b/sys-firmware/intel-microcode/Manifest @@ -1,2 +1,2 @@ -DIST intel-microcode-collection-20180808.tar.xz 4463768 BLAKE2B bf04d00db7e11b7ef6da9b4221aa2dfae1a20a39ab2f99ad78e735c9cf0f1d9a949b81ceba740238da98d34a934d8829b6882714ec21a1ffa3c1a7dfcfbfdcc6 SHA512 e5607127464c71e3ed413ca3b66cde0b5b994d837655208997841ec5358c32bb197f4ad0123b19bae4254aa35770cfec32cf2780f2cb5dd5f0a00d1ca14cf93c +DIST intel-microcode-collection-20180916.tar.xz 4414792 BLAKE2B e0dee0ef27e5d5460a4856b73a0a3940e563b649912f648cf45c109404666b7ebffb3bcce900f2eb48502b8ef2f0410cdde39eb478879e79cca4414f326c6947 SHA512 ac1964cbaffdf8a5e42ea80fd6898583f3f97a3163b0b661bcc0a83f6a1e9ba0c0a22bc79b8aadb759e5d02f77d2e2c04bd16c8811a277eb261a9a5e3bae3761 DIST microcode-20180807a.tgz 1628061 BLAKE2B a6b5a07596a0b1687efb95c207b2194865b2f975cc0d761a687d5b9d8fea63e777eb73373113f356a18592fd53651cf37d044d4e98cdfe6b306393b54ac06129 SHA512 3cd6794a5ce26e86f7b644e523ba978699316046e593da215b73b17c4b43049ac4a81636e2ce3e727d06c2efbac98657764aa3ff355edb429127585bb49a9b10 diff --git a/sys-firmware/intel-microcode/intel-microcode-20180807a_p20180808.ebuild b/sys-firmware/intel-microcode/intel-microcode-20180807a_p20180916.ebuild index 30301c72475e..30301c72475e 100644 --- a/sys-firmware/intel-microcode/intel-microcode-20180807a_p20180808.ebuild +++ b/sys-firmware/intel-microcode/intel-microcode-20180807a_p20180916.ebuild |