Mail archive
alpine-aports

[alpine-aports] [PATCH 06/15] community/moc: patch for ffmpeg 4

From: Drew DeVault <sir_at_cmpwn.com>
Date: Mon, 29 Oct 2018 20:11:28 -0400

---
 community/moc/APKBUILD       | 12 +++++++++---
 community/moc/ffmpeg-3.patch | 14 --------------
 community/moc/ffmpeg4.patch  | 34 ++++++++++++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 17 deletions(-)
 delete mode 100644 community/moc/ffmpeg-3.patch
 create mode 100644 community/moc/ffmpeg4.patch
diff --git a/community/moc/APKBUILD b/community/moc/APKBUILD
index 54ac61de50..ccafc33188 100644
--- a/community/moc/APKBUILD
+++ b/community/moc/APKBUILD
_at_@ -2,7 +2,7 @@
 # Maintainer: ScrumpyJack <scrumpyjack_at_st.ilet.to>
 pkgname=moc
 pkgver=2.5.2
-pkgrel=0
+pkgrel=1
 pkgdesc="MOC is a console audio player"
 url="http://moc.daper.net/"
 arch="all"
_at_@ -10,7 +10,12 @@ license="GPL"
 makedepends="curl-dev libtool file ffmpeg-dev speex-dev alsa-lib-dev
 		libmodplug-dev faad2-dev jack-dev libmad-dev ncurses-dev"
 subpackages="$pkgname-doc"
-source="http://ftp.daper.net/pub/soft/moc/stable/moc-${pkgver}.tar.bz2"
+# ffmpeg4.patch courtesy of Arch Linux
+source="
+	http://ftp.daper.net/pub/soft/moc/stable/moc-${pkgver}.tar.bz2
+	ffmpeg4.patch
+"
+options="!check"
 
 builddir="${srcdir}/${pkgname}-${pkgver}"
 prepare() {
_at_@ -50,4 +55,5 @@ package() {
 	make DESTDIR="${pkgdir}" install
 }
 
-sha512sums="992d06809fb52e58dcee63704bde05795b99edbac46edd8381f314c564490013b18e1853926f419c2c3c7f1bb68ff35e97048de03ace3232b800cf4b3b7dbe0f  moc-2.5.2.tar.bz2"
+sha512sums="992d06809fb52e58dcee63704bde05795b99edbac46edd8381f314c564490013b18e1853926f419c2c3c7f1bb68ff35e97048de03ace3232b800cf4b3b7dbe0f  moc-2.5.2.tar.bz2
+a2af41467573b6f674be4007fda5990035513da6733030b882874dd44562b75c88c63e60c1d84a7b6522191bb4dbc38fb4e7d8462ba4add7425643dcbbf6d315  ffmpeg4.patch"
diff --git a/community/moc/ffmpeg-3.patch b/community/moc/ffmpeg-3.patch
deleted file mode 100644
index f6d3225444..0000000000
--- a/community/moc/ffmpeg-3.patch
+++ /dev/null
_at_@ -1,14 +0,0 @@
-diff --git a/decoder_plugins/ffmpeg/ffmpeg.c b/decoder_plugins/ffmpeg/ffmpeg.c
-index 206b2b1..6af6759 100644
---- a/decoder_plugins/ffmpeg/ffmpeg.c
-+++ b/decoder_plugins/ffmpeg/ffmpeg.c
-_at_@ -66,9 +66,6 @@ GCC_DIAG_OFF(deprecated-declarations)
- #include <libavformat/avformat.h>
- GCC_DIAG_ON(deprecated-declarations)
- #include <libavutil/mathematics.h>
--#ifdef HAVE_AV_GET_CHANNEL_LAYOUT_NB_CHANNELS
--#include <libavutil/audioconvert.h>
--#endif
- #else
- #include <ffmpeg/avformat.h>
- #endif
diff --git a/community/moc/ffmpeg4.patch b/community/moc/ffmpeg4.patch
new file mode 100644
index 0000000000..8ebd946615
--- /dev/null
+++ b/community/moc/ffmpeg4.patch
_at_@ -0,0 +1,34 @@
+Index: a/decoder_plugins/ffmpeg/ffmpeg.c
+===================================================================
+--- a/decoder_plugins/ffmpeg/ffmpeg.c	(revisiĆ³n: 2963)
++++ b/decoder_plugins/ffmpeg/ffmpeg.c	(copia de trabajo)
+_at_@ -697,7 +697,7 @@
+ 	 * FFmpeg/LibAV in use.  For some versions this will be caught in
+ 	 * *_find_stream_info() above and misreported as an unfound codec
+ 	 * parameters error. */
+-	if (data->codec->capabilities & CODEC_CAP_EXPERIMENTAL) {
++	if (data->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) {
+ 		decoder_error (&data->error, ERROR_FATAL, 0,
+ 				"The codec is experimental and may damage MOC: %s",
+ 				data->codec->name);
+_at_@ -705,8 +705,8 @@
+ 	}
+ 
+ 	set_downmixing (data);
+-	if (data->codec->capabilities & CODEC_CAP_TRUNCATED)
+-		data->enc->flags |= CODEC_FLAG_TRUNCATED;
++	if (data->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
++		data->enc->flags |= AV_CODEC_FLAG_TRUNCATED;
+ 
+ 	if (avcodec_open2 (data->enc, data->codec, NULL) < 0)
+ 	{
+_at_@ -725,7 +725,7 @@
+ 
+ 	data->sample_width = sfmt_Bps (data->fmt);
+ 
+-	if (data->codec->capabilities & CODEC_CAP_DELAY)
++	if (data->codec->capabilities & AV_CODEC_CAP_DELAY)
+ 		data->delay = true;
+ 	data->seek_broken = is_seek_broken (data);
+ 	data->timing_broken = is_timing_broken (data->ic);
+
-- 
2.18.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Oct 29 2018 - 20:11:28 UTC