Subject: [alpine-aports] [PATCH 00/15] community/ffmpeg: upgrade to 4.0.2

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:22 -0400

The following packages required version bumps:

- community/mpv
- community/tvheadend
- testing/handbrake

The following packages required patches:

- community/guvcview
- community/moc
- testing/motion

The following packages required abuild linter fixes:

- community/deadbeef
- community/cmus
- community/ffmpegthumbnailer
- community/minidlna
- community/pianobar
- community/unpaper
- community/vlc
- testing/openimageio

The following packages compiled without changes:

- community/keyfinder-cli
- testing/alsa-plugins
- testing/chromaprint
- testing/mgba

The following packages fail to build for reasons unrelated to ffmpeg:

- community/audacious-plugins
- community/gst-libav
- community/mpd
- testing/mlt
- testing/opencv

Also, vhr-softhdevice is listed as a dependent of ffmpeg, but I couldn't
find it. I was unable to test community/omxplayer because I don't have a
build machine with a supported architecture.

I was also unable to compile community/qt5-qtwebengine, it requires
patches but is a real pain to compile so it'll take me some time to get
this one done. Help would be appreciated.

Drew DeVault (15):
  community/ffmpeg: upgrade to 4.0.2
  community/mpv: upgrade to 0.29.1
  community/tvheadend: upgrade to 4.2.7
  testing/handbrake: upgrade to 1.1.2
  community/guvcview: add ffmpeg 4 patch
  community/moc: patch for ffmpeg 4
  testing/motion: patch for ffmpeg 4
  community/deadbeef: add !check
  community/cmus: add maintainer
  community/ffmpegthumbnailer: add !check
  community/minidlna: add !check
  community/pianobar: remove depends_dev
  community/unpaper: remove depends_dev
  community/vlc: fix various linting issues
  testing/openimageio: add !check

 community/cmus/APKBUILD              |   2 +-
 community/deadbeef/APKBUILD          |   1 +
 community/ffmpeg/APKBUILD            |   8 +-
 community/ffmpegthumbnailer/APKBUILD |   1 +
 community/guvcview/APKBUILD          |   8 +-
 community/guvcview/ffmpeg4.patch     | 220 +++++++++++++++++++++++++++
 community/minidlna/APKBUILD          |   2 +-
 community/moc/APKBUILD               |  12 +-
 community/moc/ffmpeg-3.patch         |  14 --
 community/moc/ffmpeg4.patch          |  34 +++++
 community/mpv/APKBUILD               |  22 +--
 community/mpv/fix-libva2.patch       |  88 -----------
 community/pianobar/APKBUILD          |   3 +-
 community/tvheadend/APKBUILD         |   4 +-
 community/unpaper/APKBUILD           |   3 +-
 community/vlc/APKBUILD               |   6 +-
 testing/handbrake/APKBUILD           |   9 +-
 testing/motion/APKBUILD              |   5 +-
 testing/motion/ffmpeg4.patch         |  43 ++++++
 testing/openimageio/APKBUILD         |   1 +
 20 files changed, 348 insertions(+), 138 deletions(-)
 create mode 100644 community/guvcview/ffmpeg4.patch
 delete mode 100644 community/moc/ffmpeg-3.patch
 create mode 100644 community/moc/ffmpeg4.patch
 delete mode 100644 community/mpv/fix-libva2.patch
 create mode 100644 testing/motion/ffmpeg4.patch

-- 
2.18.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:27 -0400

---
 community/guvcview/APKBUILD      |   8 +-
 community/guvcview/ffmpeg4.patch | 220 +++++++++++++++++++++++++++++++
 2 files changed, 226 insertions(+), 2 deletions(-)
 create mode 100644 community/guvcview/ffmpeg4.patch

diff --git a/community/guvcview/APKBUILD b/community/guvcview/APKBUILD
index 09f65f2bd8..090345ccd7 100644
--- a/community/guvcview/APKBUILD
+++ b/community/guvcview/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=guvcview
 pkgver=2.0.5
-pkgrel=1
+pkgrel=2
 pkgdesc="Webcam viewer"
 url="http://guvcview.sourceforge.net/"
 arch="all"
@@ -13,9 +13,12 @@ makedepends="gtk+3.0-dev eudev-dev sdl-dev portaudio-dev ffmpeg-dev gsl-dev
 	v4l-utils-dev libusb-dev linux-headers"
 install=
 subpackages="$pkgname-doc $pkgname-lang"
+# ffmpeg4.patch courtesy of gentoo
 source="https://downloads.sourceforge.net/project/guvcview/source/guvcview-src-$pkgver.tar.gz
 	0001-fix-building-with-musl-libc.patch
+	ffmpeg4.patch
 	"
+options="!check"
 
 builddir="$srcdir"/guvcview-src-$pkgver
 
@@ -37,4 +40,5 @@ package() {
 }
 
 sha512sums="b4a1216ab2effbd0022d5ba0ce266ac06a781e453d3dbedfe29b654864d3a26fe1e8b68245d76eff854281d42f1871a8a82b06f783b5115e94ec1c111aac05eb  guvcview-src-2.0.5.tar.gz
-9ab9575bc41acc79581da8d43ef52fc9cf2bf46ef7df97951202e47f5516c38b42ebb715a4e8d6010ac9875c2c9c8cb1912d39282d4a632123424ab516632c98  0001-fix-building-with-musl-libc.patch"
+9ab9575bc41acc79581da8d43ef52fc9cf2bf46ef7df97951202e47f5516c38b42ebb715a4e8d6010ac9875c2c9c8cb1912d39282d4a632123424ab516632c98  0001-fix-building-with-musl-libc.patch
+aefec351851d31968a68b8cb6e3c95ae06ef025bb4a0988555146423daa4d3c84174d03d99897fe0588177efe0222aa57e42b87e38f4230425f3f714ef33526a  ffmpeg4.patch"
diff --git a/community/guvcview/ffmpeg4.patch b/community/guvcview/ffmpeg4.patch
new file mode 100644
index 0000000000..4a925eb204
--- /dev/null
+++ b/community/guvcview/ffmpeg4.patch
@@ -0,0 +1,220 @@
+Index: guvcview-src-2.0.5/guvcview/gui_gtk3_callbacks.c
+===================================================================
+--- guvcview-src-2.0.5.orig/guvcview/gui_gtk3_callbacks.c
++++ guvcview-src-2.0.5/guvcview/gui_gtk3_callbacks.c
+@@ -2158,9 +2158,9 @@
+ 	gtk_grid_attach (GTK_GRID(table), lbl_me_method, 0, line, 1 ,1);
+ 	gtk_widget_show (lbl_me_method);
+ 
+-	GtkWidget *me_method = gtk_spin_button_new_with_range(1,10,1);
++	GtkWidget *me_method = gtk_entry_new();
+ 	gtk_editable_set_editable(GTK_EDITABLE(me_method),TRUE);
+-	gtk_spin_button_set_value (GTK_SPIN_BUTTON(me_method), defaults->me_method);
++	gtk_entry_set_text(me_method, defaults->me_method);
+ 
+ 	gtk_grid_attach (GTK_GRID(table), me_method, 1, line, 1 ,1);
+ 	gtk_widget_show (me_method);
+@@ -2246,7 +2246,7 @@
+ 			defaults->qblur = (float) gtk_spin_button_get_value (GTK_SPIN_BUTTON(qblur));
+ 			defaults->subq = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(subq));
+ 			defaults->framerefs = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(framerefs));
+-			defaults->me_method = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(me_method));
++			defaults->me_method = gtk_entry_get_text (me_method);
+ 			defaults->mb_decision = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(mb_decision));
+ 			defaults->max_b_frames = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(max_b_frames));
+ 			defaults->num_threads = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(num_threads));Index: guvcview-src-2.0.5/guvcview/gui_qt5_callbacks.cpp
+===================================================================
+--- guvcview-src-2.0.5.orig/guvcview/gui_qt5_callbacks.cpp
++++ guvcview-src-2.0.5/guvcview/gui_qt5_callbacks.cpp
+@@ -1590,10 +1590,8 @@ void MainWindow::video_codec_properties(
+ 	framerefs->setValue(defaults->framerefs);
+ 	form.addRow(_("framerefs:   "), framerefs);
+ 	/*me method*/
+-	QSpinBox *me_method = new QSpinBox(&dialog);
+-	me_method->setRange(1, 10);
+-	me_method->setSingleStep(1);						
+-	me_method->setValue(defaults->me_method);
++	QLabel *me_method = new QLabel(&dialog);
++	me_method->setText(defaults->me_method);
+ 	form.addRow(_("me method:   "), me_method);
+ 	/*mb decision*/
+ 	QSpinBox *mb_decision = new QSpinBox(&dialog);
+@@ -1645,7 +1643,7 @@ void MainWindow::video_codec_properties(
+ 		defaults->qblur = qblur->value();
+ 		defaults->subq = subq->value();
+ 		defaults->framerefs = framerefs->value();
+-		defaults->me_method = me_method->value();
++		defaults->me_method = me_method->text().toLatin1().data();
+ 		defaults->mb_decision = mb_decision->value();
+ 		defaults->max_b_frames = max_b_frames->value();
+ 		defaults->num_threads = num_threads->value();
+Index: guvcview-src-2.0.5/gview_encoder/encoder.c
+===================================================================
+--- guvcview-src-2.0.5.orig/gview_encoder/encoder.c
++++ guvcview-src-2.0.5/gview_encoder/encoder.c
+@@ -445,10 +445,8 @@ static encoder_video_context_t *encoder_
+ #if !LIBAVCODEC_VER_AT_LEAST(56,60)
+ 	video_codec_data->codec_context->me_method = video_defaults->me_method;
+ #else
+-	if( video_defaults->codec_id == AV_CODEC_ID_H264 && video_defaults->me_method > 4)
+-		video_defaults->me_method = X264_ME_HEX;
+-
+-	av_dict_set_int(&video_codec_data->private_options, "motion-est", video_defaults->me_method, 0);
++	if(video_defaults->me_method)
++		av_dict_set(&video_codec_data->private_options, "motion-est", video_defaults->me_method, 0);
+ #endif
+ 
+ #if !LIBAVCODEC_VER_AT_LEAST(57,00)
+Index: guvcview-src-2.0.5/gview_encoder/gviewencoder.h
+===================================================================
+--- guvcview-src-2.0.5.orig/gview_encoder/gviewencoder.h
++++ guvcview-src-2.0.5/gview_encoder/gviewencoder.h
+@@ -104,7 +104,7 @@ typedef struct _video_codec_t
+ 	char codec_name[20];      //lavc codec_name
+ 	int mb_decision;          //lavc mb_decision
+ 	int trellis;              //lavc trellis quantization
+-	int me_method;            //lavc motion estimation method
++	const char* me_method;            //lavc motion estimation method
+ 	int mpeg_quant;           //lavc mpeg quantization
+ 	int max_b_frames;         //lavc max b frames
+ 	int num_threads;          //lavc num threads
+Index: guvcview-src-2.0.5/gview_encoder/video_codecs.c
+===================================================================
+--- guvcview-src-2.0.5.orig/gview_encoder/video_codecs.c
++++ guvcview-src-2.0.5/gview_encoder/video_codecs.c
+@@ -97,7 +97,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "none",
+ 		.mb_decision  = 0,
+ 		.trellis      = 0,
+-		.me_method    = 0,
++		.me_method    = NULL,
+ 		.mpeg_quant   = 0,
+ 		.max_b_frames = 0,
+ 		.num_threads  = 0,
+@@ -133,7 +133,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "mjpeg",
+ 		.mb_decision  = 0,
+ 		.trellis      = 0,
+-		.me_method    = ME_EPZS,
++		.me_method    = "epsz",
+ 		.mpeg_quant   = 0,
+ 		.max_b_frames = 0,
+ 		.num_threads  = 0,
+@@ -169,7 +169,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "mpeg1video",
+ 		.mb_decision  = FF_MB_DECISION_RD,
+ 		.trellis      = 1,
+-		.me_method    = ME_EPZS,
++		.me_method    = "epsz",
+ 		.mpeg_quant   = 0,
+ 		.max_b_frames = 0,
+ 		.num_threads  = 1,
+@@ -205,11 +205,11 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "flv",
+ 		.mb_decision  = FF_MB_DECISION_RD,
+ 		.trellis      = 1,
+-		.me_method    = ME_EPZS,
++		.me_method    = "epsz",
+ 		.mpeg_quant   = 0,
+ 		.max_b_frames = 0,
+ 		.num_threads  = 1,
+-		.flags        = CODEC_FLAG_4MV
++		.flags        = AV_CODEC_FLAG_4MV
+ 	},
+ 	{
+ 		.valid        = 1,
+@@ -241,7 +241,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "wmv1",
+ 		.mb_decision  = FF_MB_DECISION_RD,
+ 		.trellis      = 1,
+-		.me_method    = ME_EPZS,
++		.me_method    = "epsz",
+ 		.mpeg_quant   = 0,
+ 		.max_b_frames = 0,
+ 		.num_threads  = 1,
+@@ -277,7 +277,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "mpeg2video",
+ 		.mb_decision  = FF_MB_DECISION_RD,
+ 		.trellis      = 1,
+-		.me_method    = ME_EPZS,
++		.me_method    = "epsz",
+ 		.mpeg_quant   = 0,
+ 		.max_b_frames = 0,
+ 		.num_threads  = 1,
+@@ -313,7 +313,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "msmpeg4v3",
+ 		.mb_decision  = FF_MB_DECISION_RD,
+ 		.trellis      = 1,
+-		.me_method    = ME_EPZS,
++		.me_method    = "epsz",
+ 		.mpeg_quant   = 0,
+ 		.max_b_frames = 0,
+ 		.num_threads  = 1,
+@@ -349,7 +349,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "mpeg4",
+ 		.mb_decision  = FF_MB_DECISION_RD,
+ 		.trellis      = 1,
+-		.me_method    = ME_EPZS,
++		.me_method    = "epsz",
+ 		.mpeg_quant   = 1,
+ 		.max_b_frames = 0,
+ 		.num_threads  = 1,
+@@ -385,7 +385,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "libx264",
+ 		.mb_decision  = FF_MB_DECISION_RD,
+ 		.trellis      = 0,
+-		.me_method    = X264_ME_HEX,
++		.me_method    = "hex",
+ 		.mpeg_quant   = 1,
+ 		.max_b_frames = 16,
+ 		.num_threads  = 4,
+@@ -426,7 +426,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "libx265",
+ 		.mb_decision  = FF_MB_DECISION_RD,
+ 		.trellis      = 0,
+-		.me_method    = ME_HEX,
++		.me_method    = "hex",
+ 		.mpeg_quant   = 1,
+ 		.max_b_frames = 16,
+ 		.num_threads  = 4,
+@@ -463,7 +463,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "libvpx_vp8",
+ 		.mb_decision  = FF_MB_DECISION_RD,
+ 		.trellis      = 0,
+-		.me_method    = ME_HEX,
++		.me_method    = "hex",
+ 		.mpeg_quant   = 1,
+ 		.max_b_frames = 0,
+ 		.num_threads  = 4,
+@@ -500,7 +500,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "libvpx_vp9",
+ 		.mb_decision  = FF_MB_DECISION_RD,
+ 		.trellis      = 0,
+-		.me_method    = ME_HEX,
++		.me_method    = "hex",
+ 		.mpeg_quant   = 1,
+ 		.max_b_frames = 16,
+ 		.num_threads  = 4,
+@@ -537,7 +537,7 @@ static video_codec_t listSupCodecs[] =
+ 		.codec_name   = "libtheora",
+ 		.mb_decision  = FF_MB_DECISION_RD,
+ 		.trellis      = 0,
+-		.me_method    = ME_HEX,
++		.me_method    = "hex",
+ 		.mpeg_quant   = 1,
+ 		.max_b_frames = 0,
+ 		.num_threads  = 4,
+Index: guvcview-src-2.0.5/gview_v4l2core/uvc_h264.c
+===================================================================
+--- guvcview-src-2.0.5.orig/gview_v4l2core/uvc_h264.c
++++ guvcview-src-2.0.5/gview_v4l2core/uvc_h264.c
+@@ -1039,7 +1039,7 @@ int h264_init_decoder(int width, int hei
+ 		exit(-1);
+ 	}
+ 	
+-	h264_ctx->context->flags2 |= CODEC_FLAG2_FAST;
++	h264_ctx->context->flags2 |= AV_CODEC_FLAG2_FAST;
+ 	h264_ctx->context->pix_fmt = AV_PIX_FMT_YUV420P;
+ 	h264_ctx->context->width = width;
+ 	h264_ctx->context->height = height;
+
-- 
2.18.0

---

---

From: Leonardo Arena <[email-masked]>
Date: Tue, 30 Oct 2018 17:04:27 +0100

Hi,

> +++ b/community/guvcview/APKBUILD

looks like it's missing "intltool" for building

Thanks

/eo

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:32 -0400

---
 community/ffmpegthumbnailer/APKBUILD | 1 +
 1 file changed, 1 insertion(+)

diff --git a/community/ffmpegthumbnailer/APKBUILD b/community/ffmpegthumbnailer/APKBUILD
index 5563bcee0b..036b0ecc0d 100644
--- a/community/ffmpegthumbnailer/APKBUILD
+++ b/community/ffmpegthumbnailer/APKBUILD
@@ -11,6 +11,7 @@ makedepends="ffmpeg-dev libpng-dev libjpeg-turbo-dev cmake"
 subpackages="$pkgname-dev $pkgname-doc"
 source="$pkgname-$pkgver.tar.bz2::https://github.com/dirkvdb/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.bz2"
 builddir="$srcdir/$pkgname-$pkgver"
+options="!check"
 
 build() {
 	cd "$builddir"
-- 
2.18.0

---

---

From: Leonardo Arena <[email-masked]>
Date: Wed, 31 Oct 2018 08:22:24 +0100

Hi,

On Tue, Oct 30, 2018 at 1:12 AM Drew DeVault <[email-masked]> wrote:

>  source="$pkgname-$pkgver.tar.bz2::
> https://github.com/dirkvdb/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.bz2
> "
"make tests" seems to work. So it should enabled enabled and the proper
function added.

Thanks

/eo

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:23 -0400

---
 community/ffmpeg/APKBUILD | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/community/ffmpeg/APKBUILD b/community/ffmpeg/APKBUILD
index d88d83bc14..92d47f96c6 100644
--- a/community/ffmpeg/APKBUILD
+++ b/community/ffmpeg/APKBUILD
@@ -3,8 +3,8 @@
 # Contributor: Jakub Skrzypnik <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=ffmpeg
-pkgver=3.4.4
-pkgrel=1
+pkgver=4.0.2
+pkgrel=0
 pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
 url="http://ffmpeg.org/"
 arch="all"
@@ -85,7 +85,7 @@ build() {
 		$_asm $_dbg
 	make
 	${CC:-gcc} -o tools/qt-faststart $CFLAGS tools/qt-faststart.c
-	make doc/ffmpeg.1 doc/ffplay.1 doc/ffserver.1
+	make doc/ffmpeg.1 doc/ffplay.1
 }
 
 # https://ffmpeg.org/fate.html
@@ -112,5 +112,5 @@ libs() {
 	mv "$pkgdir"/usr/lib "$subpkgdir"/usr
 }
 
-sha512sums="f25461785ca253e657de00be3033a0fd3a19e5e659815adb6cca6257ac4181d4581512a8ce14ba890e6583b3d1ffef3f436c8ce78dfacc320d1744e7d08508ab  ffmpeg-3.4.4.tar.xz
+sha512sums="2dc2b8c66d9c31b6d06da5da336ef45415e3c24fac8c9063cd47f7d4cf688ec4846f88cdd9e841b956cea81e56bb3c6b7655aef503400c7367c32910c28990ac  ffmpeg-4.0.2.tar.xz
 32652e18d4eb231a2e32ad1cacffdf33264aac9d459e0e2e6dd91484fced4e1ca5a62886057b1f0b4b1589c014bbe793d17c78adbaffec195f9a75733b5b18cb  0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch"
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:24 -0400

Also enables the Wayland backend
---
 community/mpv/APKBUILD         | 22 +++++----
 community/mpv/fix-libva2.patch | 88 ----------------------------------
 2 files changed, 13 insertions(+), 97 deletions(-)
 delete mode 100644 community/mpv/fix-libva2.patch

diff --git a/community/mpv/APKBUILD b/community/mpv/APKBUILD
index b7f78291b4..e381750205 100644
--- a/community/mpv/APKBUILD
+++ b/community/mpv/APKBUILD
@@ -4,8 +4,8 @@
 # Contributor: Jakub Skrzypnik <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=mpv
-pkgver=0.27.2
-pkgrel=2
+pkgver=0.29.1
+pkgrel=0
 pkgdesc="Video player based on MPlayer/mplayer2"
 url="https://mpv.io/"
 arch="all"
@@ -14,15 +14,14 @@ makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev
 	libtheora-dev xvidcore-dev zlib-dev sdl-dev freetype-dev
 	x264-dev faac-dev ttf-dejavu libxvmc-dev alsa-lib-dev libva-dev
 	mesa-dev ffmpeg-dev libass-dev perl lua5.2-dev libvdpau-dev python2
-	libxext-dev libxinerama-dev libxscrnsaver-dev py-docutils libxrandr-dev"
+	libxext-dev libxinerama-dev libxscrnsaver-dev py-docutils libxrandr-dev
+	wayland-dev cmocka-dev"
 subpackages="
 	$pkgname-doc
 	$pkgname-libs
 	$pkgname-zsh-completion:zshcomp:noarch"
 options="net" # downloads a waf tarball
-source="$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/$pkgname/archive/v$pkgver.tar.gz
-	fix-libva2.patch
-	"
+source="$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/$pkgname/archive/v$pkgver.tar.gz"
 builddir="$srcdir/$pkgname-$pkgver"
 
 # secfixes:
@@ -45,10 +44,16 @@ build() {
 		--enable-alsa \
 		--enable-libass \
 		--enable-libmpv-shared \
-		--enable-zsh-comp
+		--enable-zsh-comp \
+		--enable-test
 	./waf build
 }
 
+check() {
+	cd "$builddir"
+	find build/test/ -perm -111 -exec '{}' ';'
+}
+
 package() {
 	cd "$builddir"
 
@@ -73,5 +78,4 @@ zshcomp() {
 		"$subpkgdir/usr/share/zsh/site-functions"
 }
 
-sha512sums="bf74a150b3732b8c233362e0902c54f85fbea9ca1765a2a8f946a6eecd9b37a72ede36a36d0dd98a770539c4f81fe24c8ce26be9db7cd6eddd8514a8f82d9cda  mpv-0.27.2.tar.gz
-43e89cf7e939cc30c4a70172f06d652005a251350dfc9335d51dde981f177b656bf3cf8f3eaa1a2b19fc563e9a09f6e32843eff2105fab7e3d9e10f3b2245f84  fix-libva2.patch"
+sha512sums="ec57c9ceaaf2915ee237dd5a1c5ea5d22725d8611e28a9b998e5bb0d8ab5bdf3631d0267fc7b54da31cb1eaa145ef35841e68846bd41c3b9e1024902e92fd086  mpv-0.29.1.tar.gz"
diff --git a/community/mpv/fix-libva2.patch b/community/mpv/fix-libva2.patch
deleted file mode 100644
index 843e844945..0000000000
--- a/community/mpv/fix-libva2.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 2ecf240b1cd20875991a5b18efafbe799864ff7f Mon Sep 17 00:00:00 2001
-From: Mark Thompson <[email-masked]>
-Date: Mon, 9 Oct 2017 20:10:26 +0100
-Subject: [PATCH] vaapi: Use libva2 message callbacks
-
-They are no longer global, so they work vaguely sensibly.
----
- video/vaapi.c | 32 +++++++++++++++++++++++++++++---
- 1 file changed, 29 insertions(+), 3 deletions(-)
-
-diff --git a/video/vaapi.c b/video/vaapi.c
-index 6bedbbaa18..3b1cb9cc41 100644
---- a/video/vaapi.c
-+++ b/video/vaapi.c
-@@ -40,9 +40,27 @@ int va_get_colorspace_flag(enum mp_csp csp)
-     return 0;
- }
- 
--// VA message callbacks are global and do not have a context parameter, so it's
--// impossible to know from which VADisplay they originate. Try to route them
--// to existing mpv/libmpv instances within this process.
-+#if VA_CHECK_VERSION(1, 0, 0)
-+static void va_message_callback(void *context, const char *msg, int mp_level)
-+{
-+    struct mp_vaapi_ctx *res = context;
-+    mp_msg(res->log, mp_level, "libva: %s", msg);
-+}
-+
-+static void va_error_callback(void *context, const char *msg)
-+{
-+    va_message_callback(context, msg, MSGL_ERR);
-+}
-+
-+static void va_info_callback(void *context, const char *msg)
-+{
-+    va_message_callback(context, msg, MSGL_V);
-+}
-+#else
-+// Pre-libva2 VA message callbacks are global and do not have a context
-+// parameter, so it's impossible to know from which VADisplay they
-+// originate.  Try to route them to existing mpv/libmpv instances within
-+// this process.
- static pthread_mutex_t va_log_mutex = PTHREAD_MUTEX_INITIALIZER;
- static struct mp_vaapi_ctx **va_mpv_clients;
- static int num_va_mpv_clients;
-@@ -77,6 +95,7 @@ static void va_info_callback(const char *msg)
- {
-     va_message_callback(msg, MSGL_V);
- }
-+#endif
- 
- static void open_lavu_vaapi_device(struct mp_vaapi_ctx *ctx)
- {
-@@ -108,6 +127,10 @@ struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *plog,
-         },
-     };
- 
-+#if VA_CHECK_VERSION(1, 0, 0)
-+    vaSetErrorCallback(display, va_error_callback, res);
-+    vaSetInfoCallback(display,  va_info_callback,  res);
-+#else
-     pthread_mutex_lock(&va_log_mutex);
-     MP_TARRAY_APPEND(NULL, va_mpv_clients, num_va_mpv_clients, res);
-     pthread_mutex_unlock(&va_log_mutex);
-@@ -117,6 +140,7 @@ struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *plog,
- #ifdef VA_FOURCC_I010
-     vaSetErrorCallback(va_error_callback);
-     vaSetInfoCallback(va_info_callback);
-+#endif
- #endif
- 
-     int major, minor;
-@@ -154,6 +178,7 @@ void va_destroy(struct mp_vaapi_ctx *ctx)
-         if (ctx->destroy_native_ctx)
-             ctx->destroy_native_ctx(ctx->native_ctx);
- 
-+#if !VA_CHECK_VERSION(1, 0, 0)
-         pthread_mutex_lock(&va_log_mutex);
-         for (int n = 0; n < num_va_mpv_clients; n++) {
-             if (va_mpv_clients[n] == ctx) {
-@@ -164,6 +189,7 @@ void va_destroy(struct mp_vaapi_ctx *ctx)
-         if (num_va_mpv_clients == 0)
-             TA_FREEP(&va_mpv_clients); // avoid triggering leak detectors
-         pthread_mutex_unlock(&va_log_mutex);
-+#endif
- 
-         talloc_free(ctx);
-     }
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:25 -0400

---
 community/tvheadend/APKBUILD | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/community/tvheadend/APKBUILD b/community/tvheadend/APKBUILD
index ddcb90136e..a73c19c450 100644
--- a/community/tvheadend/APKBUILD
+++ b/community/tvheadend/APKBUILD
@@ -1,6 +1,6 @@
 # Maintainer: Carlo Landmeter <[email-masked]>
 pkgname=tvheadend
-pkgver=4.2.6
+pkgver=4.2.7
 pkgrel=0
 pkgdesc="TV Streaming server for linux"
 url="http://tvheadend.org/"
@@ -85,7 +85,7 @@ satellites_xml() {
 		"$subpkgdir"/usr/share/tvheadend/data/dvb-scan/dvb-s
 }
 
-sha512sums="6291b0ba1d9af11d5295bf6804988835e746db2d3ebbd465a22e293a1108225c8c361762b78213c881cd15d7dedd16092f28a97c9e5b38f44920848bfbaf9709  tvheadend-4.2.6.tar.gz
+sha512sums="14dd4f452a785359614e2dfe3c210543e0bddf011b8bb994a282cfcff3f3e2573e48636e4c778c7fea39c01318053211e674911fcec3ad5f7b536bdd9e5f5aa9  tvheadend-4.2.7.tar.gz
 d0f0b090ee5bf084a478bb35c944d8e008d300d29db2a8dea3feadeee6226da0eff154ccee482fc10beab30a0b6fc176d5b7578f21fa187d3ea091f599621752  satellites-20180626.xml
 db275e263d52d0515544cc52836d99d1cf43b7c17a8037f897d5788e770b69be85cb709f71e7fae4d66c4a2cef8c4f9533fc2ab41490776ee437e4db4d27fa31  tvheadend.initd
 dd55c56ffb0b090fc03537556340ac0dd17741d2ce9eeabb388af43b566e2764385affc2e4457fa7a6d94e44c491d7cf43c6b6d89dc1ba60dd9724cc488c0ef1  tvheadend.confd"
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:26 -0400

---
 testing/handbrake/APKBUILD | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/testing/handbrake/APKBUILD b/testing/handbrake/APKBUILD
index ddedd3282e..8522b9c315 100644
--- a/testing/handbrake/APKBUILD
+++ b/testing/handbrake/APKBUILD
@@ -1,8 +1,8 @@
 # Maintainer: Nathan Angelacos <[email-masked]>
 pkgname=handbrake
 _pkgname=HandBrake
-pkgver=1.0.7
-pkgrel=7
+pkgver=1.1.2
+pkgrel=0
 pkgdesc="Handbrake video transcoder"
 url="https://handbrake.fr"
 arch="x86_64 x86 armhf armv7 ppc64le"
@@ -16,7 +16,7 @@ makedepends="yasm autoconf libtool zlib-dev libbz2 libogg-dev libtheora-dev
 	libbluray-dev x265-dev libvpx-dev fdk-aac-dev jansson-dev
 	opus-dev"
 subpackages="$pkgname-lang $pkgname-gtk"
-source="http://download.handbrake.fr/releases/$pkgver/HandBrake-$pkgver.tar.bz2
+source="https://download.handbrake.fr/releases/$pkgver/HandBrake-$pkgver-source.tar.bz2
 	handbrake-9999-fix-missing-x265-link-flag.patch
 	handbrake-9999-remove-dvdnav-dup.patch
 	handbrake-9999-remove-faac-dependency.patch
@@ -25,7 +25,6 @@ options="!check"
 builddir="$srcdir"/${_pkgname}-${pkgver}
 
 prepare() {
-	update_config_guess
 	cd "$builddir"
 	default_prepare
 	# build against external libs
@@ -60,7 +59,7 @@ gtk() {
 
 }
 
-sha512sums="bacc5ff105893a0fdea95174839663e00027c87a13f00fb67d39c347b55e35869c0b998ec52181389b98cc2cc358d221e41d729e76952e4cb21fe8d12ee5a44a  HandBrake-1.0.7.tar.bz2
+sha512sums="360f7fe3e4571bb623f54a00e9478a78d655448ffb1b8d72b7d32636a230f2ae4dabbfe803f6f9491537064ea4f6e238700b3d29912ae34383fbb1922e18e9b8  HandBrake-1.1.2-source.tar.bz2
 9ca716b290f384db839609d176b6883c4dc1aaf31206b206cfd1f29c85bb134e29fbf72bda1a8589f76e1885019dbdee5a39d8299f7f0a20a6ef8a01868f4845  handbrake-9999-fix-missing-x265-link-flag.patch
 a3d57dd37d518286a62554cfcc4722d6fd588a0c3966d30785100edc4476febb2b48fc4f9b2a7eb5b5dc049043fabd4398e1e190e10cbd63c25b2936824977d3  handbrake-9999-remove-dvdnav-dup.patch
 9d070e50a9b7d4b8ac25b7d56bd341aca6dc979ba506c84f4b95109909f70020723915cd120bed24e84a8fc242ee3c3a5775f43a78b7995e53cd499444c9f6dc  handbrake-9999-remove-faac-dependency.patch"
-- 
2.18.0

---

---

From: Leonardo Arena <[email-masked]>
Date: Tue, 30 Oct 2018 17:03:37 +0100

Hi,

> +++ b/testing/handbrake/APKBUILD

Looks like needs python for building.

Thanks

/eo

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 11:35:41 -0400

---
 community/vlc/APKBUILD | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/community/vlc/APKBUILD b/community/vlc/APKBUILD
index ac4dd66552..c766298ef4 100644
--- a/community/vlc/APKBUILD
+++ b/community/vlc/APKBUILD
@@ -3,7 +3,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=vlc
 pkgver=3.0.3
-pkgrel=1
+pkgrel=2
 pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
 triggers="vlc-libs.trigger=/usr/lib/vlc/plugins"
 pkgusers="vlc"
@@ -18,7 +18,7 @@ subpackages="$pkgname-dev
 	$pkgname-xorg
 	$pkgname-daemon::noarch
 	$pkgname-libs
-	$pkgname-plugins
+	$pkgname-plugins::noarch
 
 	$pkgname-plugins-access:plugins_access
 	$pkgname-plugins-access_output:plugins_access_output
@@ -33,7 +33,7 @@ subpackages="$pkgname-dev
 	$pkgname-plugins-meta_engine:plugins_meta_engine
 	$pkgname-plugins-misc:plugins_misc
 	$pkgname-plugins-mux:plugins_mux
-	$pkgname-plugins-notify:plugins_notify
+	$pkgname-plugins-notify:plugins_notify:noarch
 	$pkgname-plugins-packetizer:plugins_packetizer
 	$pkgname-plugins-services_discovery:plugins_services_discovery
 	$pkgname-plugins-stream_filter:plugins_stream_filter
@@ -117,7 +117,6 @@ source="https://get.videolan.org/vlc/$pkgver/$pkgname-$pkgver.tar.xz
 	check-headless.patch
 	disable-sub-autodetect-fuzzy-1-test.patch
 	test-s390x.patch
-	vlc-libs.trigger
 	fribidi_allow_deprecated.patch"
 
 builddir="$srcdir/$pkgname-$pkgver"
@@ -334,5 +333,4 @@ e13e398b7bfd977f6e099bcb6cf8dc5cd5bad6dea3eff715881826246dc4329468846084aff2576d
 22d80df599b8b65a5439cefbb7140af8e9530f326d54945da3769af65f37518b99ec2cc8647aafd2763324a0698280915afe043cc87e5720c4694881ed35bffa  check-headless.patch
 e214b407235cb3afb8bec93f20c9b42957b57e6fd3960679d3d4235e77762e03e64d03c01f00ef63d589e7c85aaad02ce6abbeeccd66b1867bc92451a5b5e9b0  disable-sub-autodetect-fuzzy-1-test.patch
 c0107655249687655846a9547ca1a5670b9207443180600e7a149c69ffb96d7226787c19b018d4033db9b284c1a5faa8d7d42188ed40c3b8bb051256febf11c5  test-s390x.patch
-b67b6e21e9d4027aef1006e6057f9ba8e65ce3895b08f7b911b1675cff9bc423f64ee2c187c584860e9e5d4635a30408a7781add9694d9bba753eac37f357406  vlc-libs.trigger
 8230a83306905cdda07fecdb6cb2b791196034775cc5c8986ab63e97cd3476317544011cbce92948059ac9f7b57ef450cd71820f0f134bc3ab3bed38463a67c3  fribidi_allow_deprecated.patch"
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:30 -0400

---

diff --git a/community/deadbeef/APKBUILD b/community/deadbeef/APKBUILD
index bafad8aff1..ee290de1d5 100644
--- a/community/deadbeef/APKBUILD
+++ b/community/deadbeef/APKBUILD
@@ -18,6 +18,7 @@ subpackages="$pkgname-dev $pkgname-lang $pkgname-doc"
 source="https://downloads.sourceforge.net/project/$pkgname/$pkgname-$_ver.tar.bz2
 	arm-buildfix.patch
 	ppc64le.patch"
+options="!check"
 
 builddir="${srcdir}/${pkgname}-$_ver"
 
-- 
2.18.0

---

---

From: Leonardo Arena <[email-masked]>
Date: Wed, 31 Oct 2018 08:19:11 +0100

Hi,

>  1 file changed, 1 insertion(+)
pkgrel needs to bumped.

Thanks

/eo

---

From: Drew DeVault <[email-masked]>
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
@@ -2,7 +2,7 @@
 # Maintainer: ScrumpyJack <[email-masked]>
 pkgname=moc
 pkgver=2.5.2
-pkgrel=0
+pkgrel=1
 pkgdesc="MOC is a console audio player"
 url="http://moc.daper.net/"
 arch="all"
@@ -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() {
@@ -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
@@ -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
-@@ -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
@@ -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)
+@@ -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);
+@@ -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)
+ 	{
+@@ -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

---

---

From: Leonardo Arena <[email-masked]>
Date: Tue, 30 Oct 2018 17:05:15 +0100

Hi,

> +++ b/community/moc/APKBUILD

"make check" works. Could you enable it?

Thanks

/eo

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:29 -0400

---
 testing/motion/APKBUILD      |  5 ++++-
 testing/motion/ffmpeg4.patch | 43 ++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 testing/motion/ffmpeg4.patch

diff --git a/testing/motion/APKBUILD b/testing/motion/APKBUILD
index ec74858b84..ca7f8eca6a 100644
--- a/testing/motion/APKBUILD
+++ b/testing/motion/APKBUILD
@@ -17,10 +17,12 @@ depends_dev=""
 makedepends="$depends_dev autoconf automake bash jpeg-dev v4l-utils-dev linux-headers ffmpeg-dev"
 install="$pkgname.pre-install"
 subpackages="$pkgname-doc"
+# ffmpeg4.patch courtesy of Arch Linux
 source="$pkgname-$pkgver.tar.gz::https://github.com/Motion-Project/$pkgname/archive/release-$pkgver.tar.gz
 	motion.confd
 	motion.initd
 	motion-dist.conf.in.patch
+	ffmpeg4.patch
 	"
 
 builddir="$srcdir"/$pkgname-release-$pkgver
@@ -55,4 +57,5 @@ package() {
 sha512sums="3b08d464f9243ccfc4b53b16cfc2001d1e0d206bf0295d55d8914914bc14ad0248ce5ac622cb7eb89ed32e1913a9a10add1b56497c4094ba876f7f85d6ad4143  motion-4.1.1.tar.gz
 8a67b5b0360924e58ba3136a737ce73bb43201a49b2b6e2c632426561b830f6ab55cbbeaa89be7f1683aa8fd322b4f31b9f560e67a93eaceb964c9f56ceef363  motion.confd
 be30f19595dba27f2d0ca8133c93e134161781935a152bd1701e581410039e37742acd11987c38e6e64f495b1fd2b0a74a8c61ae0e6e211a475fca7994172501  motion.initd
-c27d7ded3ed7a56101791bca86eb083450f5b8a1f431b3f7ee8538f682ac5f5d4b50104d9d61f40be964f1f1975a114313ba3d30d7357035dc25ebe925db6a89  motion-dist.conf.in.patch"
+c27d7ded3ed7a56101791bca86eb083450f5b8a1f431b3f7ee8538f682ac5f5d4b50104d9d61f40be964f1f1975a114313ba3d30d7357035dc25ebe925db6a89  motion-dist.conf.in.patch
+808a43fe51dd2d9436320fa3ba3ac3b3f87c829b276f175b52c77313acaa647dda43cd2acc0f9c6a3106ca0dec568ee12c6db7ad89cc49f501e34cd223bfb65e  ffmpeg4.patch"
diff --git a/testing/motion/ffmpeg4.patch b/testing/motion/ffmpeg4.patch
new file mode 100644
index 0000000000..3ac4c7967b
--- /dev/null
+++ b/testing/motion/ffmpeg4.patch
@@ -0,0 +1,43 @@
+diff --git a/ffmpeg.c b/ffmpeg.c
+index 1e6cdf6..4299ba3 100644
+--- a/ffmpeg.c
++++ b/ffmpeg.c
+@@ -67,6 +67,19 @@
+ 
+ #endif
+ 
++/*********************************************/
++#if (LIBAVCODEC_VERSION_MAJOR >= 57)
++
++#define MY_CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
++#define MY_CODEC_FLAG_QSCALE        AV_CODEC_FLAG_QSCALE
++
++#else
++
++#define MY_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER
++#define MY_CODEC_FLAG_QSCALE        CODEC_FLAG_QSCALE
++
++#endif
++
+ /*********************************************/
+ AVFrame *my_frame_alloc(void){
+     AVFrame *pic;
+@@ -548,7 +561,7 @@ static int ffmpeg_set_quality(struct ffmpeg *ffmpeg){
+         /* The selection of 8000 is a subjective number based upon viewing output files */
+         if (ffmpeg->vbr > 0){
+             ffmpeg->vbr =(int)(((100-ffmpeg->vbr)*(100-ffmpeg->vbr)*(100-ffmpeg->vbr) * 8000) / 1000000) + 1;
+-            ffmpeg->ctx_codec->flags |= CODEC_FLAG_QSCALE;
++            ffmpeg->ctx_codec->flags |= MY_CODEC_FLAG_QSCALE;
+             ffmpeg->ctx_codec->global_quality=ffmpeg->vbr;
+         }
+     }
+@@ -673,7 +686,7 @@ static int ffmpeg_set_codec(struct ffmpeg *ffmpeg){
+       ffmpeg->ctx_codec->strict_std_compliance = -2;
+       ffmpeg->ctx_codec->level = 3;
+     }
+-    ffmpeg->ctx_codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
++    ffmpeg->ctx_codec->flags |= MY_CODEC_FLAG_GLOBAL_HEADER;
+ 
+     retcd = ffmpeg_set_quality(ffmpeg);
+     if (retcd < 0){
+
-- 
2.18.0

---

---

From: Leonardo Arena <[email-masked]>
Date: Thu, 1 Nov 2018 16:21:40 +0100

Hi,

>  create mode 100644 testing/motion/ffmpeg4.patch

pkgrel needs to be bumped anytime APKBUILD is touched.

Thanks

/eo

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:31 -0400

---
I picked Bartłomiej arbitrarily, Sören might prefer to pick this up
instead.

 community/cmus/APKBUILD | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/community/cmus/APKBUILD b/community/cmus/APKBUILD
index cabba2627c..03c927ee01 100644
--- a/community/cmus/APKBUILD
+++ b/community/cmus/APKBUILD
@@ -1,6 +1,6 @@
 # Contributor: Sören Tempel <[email-masked]>
 # Contributor: Bartłomiej Piotrowski <[email-masked]>
-# Maintainer:
+# Maintainer: Bartłomiej Piotrowski <[email-masked]>
 pkgname=cmus
 pkgver=2.8.0_rc0
 _pkgver=${pkgver/_rc/-rc}
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:34 -0400

There is no pianobar-dev package.
---
 community/pianobar/APKBUILD | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/community/pianobar/APKBUILD b/community/pianobar/APKBUILD
index 8334caed0f..b6cc9690df 100644
--- a/community/pianobar/APKBUILD
+++ b/community/pianobar/APKBUILD
@@ -7,8 +7,7 @@ pkgdesc="Commandline player for pandora webradio"
 url="https://github.com/PromyLOPh/pianobar"
 arch="all"
 license="MIT"
-depends_dev="ffmpeg-dev libao-dev libgcrypt-dev gnutls-dev json-c-dev curl-dev"
-makedepends="$depends_dev"
+makedepends="ffmpeg-dev libao-dev libgcrypt-dev gnutls-dev json-c-dev curl-dev"
 subpackages="$pkgname-doc"
 source="pianobar-${pkgver}.tar.gz::https://github.com/PromyLOPh/pianobar/archive/$pkgver.tar.gz"
 
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:33 -0400

---

diff --git a/community/minidlna/APKBUILD b/community/minidlna/APKBUILD
index f0e2cfa933..00c7754eae 100644
--- a/community/minidlna/APKBUILD
+++ b/community/minidlna/APKBUILD
@@ -8,7 +8,7 @@ url="https://sourceforge.net/projects/minidlna/"
 arch="all"
 license="GPL"
 depends=
-options=
+options="!check"
 makedepends="
 	bsd-compat-headers
 	libvorbis-dev
-- 
2.18.0

---

---

From: Leonardo Arena <[email-masked]>
Date: Wed, 31 Oct 2018 08:24:22 +0100

Hi,

>  1 file changed, 1 insertion(+), 1 deletion(-)
pkgrel should be bumped.

Thanks

/eo

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:35 -0400

There is no unpaper-dev package.
---
 community/unpaper/APKBUILD | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/community/unpaper/APKBUILD b/community/unpaper/APKBUILD
index 3192151193..42d350ee7c 100644
--- a/community/unpaper/APKBUILD
+++ b/community/unpaper/APKBUILD
@@ -8,8 +8,7 @@ url="https://github.com/Flameeyes/unpaper"
 arch="all"
 license="GPL"
 depends=""
-depends_dev="ffmpeg-dev"
-makedepends="$depends_dev automake autoconf libtool libxslt"
+makedepends="ffmpeg-dev automake autoconf libtool libxslt"
 install=""
 subpackages="$pkgname-doc"
 source="$pkgname-$pkgver.tar.gz::https://github.com/Flameeyes/unpaper/tarball/unpaper-$pkgver"
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:36 -0400

---
 community/vlc/APKBUILD | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

index ac4dd66552..72d41e4d82 100644

---

---

From: Drew DeVault <[email-masked]>
Date: Mon, 29 Oct 2018 20:11:37 -0400

---

diff --git a/testing/openimageio/APKBUILD b/testing/openimageio/APKBUILD
index ebf051ca6f..a642ad09b8 100644
--- a/testing/openimageio/APKBUILD
+++ b/testing/openimageio/APKBUILD
@@ -18,6 +18,7 @@ subpackages="py2-$pkgname:_python $pkgname-dev $pkgname-doc $pkgname-tools"
 source="$pkgname-$pkgver.tar.gz::https://github.com/OpenImageIO/oiio/archive/Release-${pkgver}.tar.gz
 	boost-python.patch
 	"
+options="!check"
 builddir="$srcdir/oiio-Release-$pkgver"
 
 build() {
-- 
2.18.0

---

---

From: Leonardo Arena <[email-masked]>
Date: Wed, 31 Oct 2018 08:38:15 +0100

Hi,

>  1 file changed, 1 insertion(+)

pkgrel needs to be bumped.

Thanks

/eo

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 08:37:36 -0400

---
 testing/handbrake/APKBUILD | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

index ddedd3282e..059be41536 100644
@@ -14,9 +14,9 @@ makedepends="yasm autoconf libtool zlib-dev libbz2 libogg-dev libtheora-dev
 	gstreamer0.10-dev x264-dev lame-dev linux-headers cmake
 	autoconf automake ffmpeg-dev coreutils libdvdnav-dev
-	opus-dev"
+	opus-dev python2"
 
 prepare() {
-	update_config_guess
 	cd "$builddir"
 	default_prepare
 
 }

---

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 08:37:37 -0400

---
 community/guvcview/APKBUILD      |  10 +-
 community/guvcview/ffmpeg4.patch | 220 +++++++++++++++++++++++++++++++
 2 files changed, 227 insertions(+), 3 deletions(-)
 create mode 100644 community/guvcview/ffmpeg4.patch

diff --git a/community/guvcview/APKBUILD b/community/guvcview/APKBUILD
index 09f65f2bd8..d92c6050d9 100644
--- a/community/guvcview/APKBUILD
+++ b/community/guvcview/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=guvcview
 pkgver=2.0.5
-pkgrel=1
+pkgrel=2
 pkgdesc="Webcam viewer"
 url="http://guvcview.sourceforge.net/"
 arch="all"
@@ -10,12 +10,15 @@ license="GPL-3.0"
 depends=
 depends_dev=
 makedepends="gtk+3.0-dev eudev-dev sdl-dev portaudio-dev ffmpeg-dev gsl-dev
-	v4l-utils-dev libusb-dev linux-headers"
+	v4l-utils-dev libusb-dev linux-headers intltool"
 install=
 subpackages="$pkgname-doc $pkgname-lang"
+# ffmpeg4.patch courtesy of gentoo
 source="https://downloads.sourceforge.net/project/guvcview/source/guvcview-src-$pkgver.tar.gz
 	0001-fix-building-with-musl-libc.patch
+	ffmpeg4.patch
 	"
+options="!check"

 

---

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 08:37:38 -0400

---
 community/moc/APKBUILD       | 16 +++++++++++++---
 community/moc/ffmpeg-3.patch | 14 --------------
 community/moc/ffmpeg4.patch  | 34 ++++++++++++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 17 deletions(-)
 delete mode 100644 community/moc/ffmpeg-3.patch
 create mode 100644 community/moc/ffmpeg4.patch

index 54ac61de50..dd6ad0fa44 100644
@@ -10,7 +10,11 @@ license="GPL"
 
 builddir="${srcdir}/${pkgname}-${pkgver}"
 prepare() {
@@ -45,9 +49,15 @@ build() {
 	make
 }
 
+check() {
+	cd "$builddir"
+	make check
+}
+
 package() {
 	cd "$builddir"

---

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 08:37:40 -0400

---
 community/deadbeef/APKBUILD | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/community/deadbeef/APKBUILD b/community/deadbeef/APKBUILD
index bafad8aff1..cd775a4525 100644
--- a/community/deadbeef/APKBUILD
+++ b/community/deadbeef/APKBUILD
@@ -4,7 +4,7 @@
 pkgname=deadbeef
 pkgver=0.7.2
 _ver=${pkgver/_rc/-rc}
-pkgrel=2
+pkgrel=3
 pkgdesc="fairly capable playlist-oriented audio player"
 url="http://deadbeef.sourceforge.net/"
 arch="all"
@@ -18,6 +18,7 @@ subpackages="$pkgname-dev $pkgname-lang $pkgname-doc"
 source="https://downloads.sourceforge.net/project/$pkgname/$pkgname-$_ver.tar.bz2
 	arm-buildfix.patch
 	ppc64le.patch"
+options="!check"

-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 08:37:42 -0400

---
 community/ffmpegthumbnailer/APKBUILD | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/community/ffmpegthumbnailer/APKBUILD b/community/ffmpegthumbnailer/APKBUILD
index 5563bcee0b..d8cb9cc8d2 100644
--- a/community/ffmpegthumbnailer/APKBUILD
+++ b/community/ffmpegthumbnailer/APKBUILD
@@ -23,6 +23,11 @@ build() {
 	make || return 1
 }
 
+check() {
+	cd "$builddir"
+	make test
+}
+
 package() {
 	cd "$builddir"
 
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 08:37:43 -0400

---
 community/minidlna/APKBUILD | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/community/minidlna/APKBUILD b/community/minidlna/APKBUILD
index f0e2cfa933..eafbf0867c 100644
--- a/community/minidlna/APKBUILD
+++ b/community/minidlna/APKBUILD
@@ -2,13 +2,13 @@
 # Maintainer: Francesco Colista <[email-masked]>
 pkgname=minidlna
 pkgver=1.2.1
-pkgrel=0
+pkgrel=1
 pkgdesc="A small dlna server"
 url="https://sourceforge.net/projects/minidlna/"
 arch="all"
 license="GPL"
 depends=
-options=
+options="!check"
 makedepends="
 	bsd-compat-headers
 	libvorbis-dev
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 08:37:47 -0400

---
 testing/openimageio/APKBUILD | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testing/openimageio/APKBUILD b/testing/openimageio/APKBUILD
index ebf051ca6f..957795fd32 100644
--- a/testing/openimageio/APKBUILD
+++ b/testing/openimageio/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Mark Riedesel <[email-masked]>
 pkgname=openimageio
 pkgver=1.8.15
-pkgrel=0
+pkgrel=1
 pkgdesc="Image I/O library supporting a multitude of image formats"
 url="https://sites.google.com/site/openimageio/"
 arch="all"
@@ -18,6 +18,7 @@ subpackages="py2-$pkgname:_python $pkgname-dev $pkgname-doc $pkgname-tools"
 source="$pkgname-$pkgver.tar.gz::https://github.com/OpenImageIO/oiio/archive/Release-${pkgver}.tar.gz
 	boost-python.patch
 	"
+options="!check"
 builddir="$srcdir/oiio-Release-$pkgver"
 
 build() {
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 11:35:34 -0400

---
 testing/motion/APKBUILD      |  7 ++++--
 testing/motion/ffmpeg4.patch | 43 ++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100644 testing/motion/ffmpeg4.patch

diff --git a/testing/motion/APKBUILD b/testing/motion/APKBUILD
index ec74858b84..f4b3036c15 100644
--- a/testing/motion/APKBUILD
+++ b/testing/motion/APKBUILD
@@ -4,7 +4,7 @@
 # Maintainer: Mika Havela <[email-masked]>
 pkgname=motion
 pkgver=4.1.1
-pkgrel=0
+pkgrel=1
 pkgdesc="Detect if a significant part of the picture has changed (e.g. from a webcam)."
 url="https://motion-project.github.io"
 arch="all"
@@ -17,10 +17,12 @@ depends_dev=""
 makedepends="$depends_dev autoconf automake bash jpeg-dev v4l-utils-dev linux-headers ffmpeg-dev"
 install="$pkgname.pre-install"
 subpackages="$pkgname-doc"
+# ffmpeg4.patch courtesy of Arch Linux
 source="$pkgname-$pkgver.tar.gz::https://github.com/Motion-Project/$pkgname/archive/release-$pkgver.tar.gz
 	motion.confd
 	motion.initd
 	motion-dist.conf.in.patch
+	ffmpeg4.patch
 	"

---

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 11:35:37 -0400

---
 community/ffmpegthumbnailer/APKBUILD | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/community/ffmpegthumbnailer/APKBUILD b/community/ffmpegthumbnailer/APKBUILD
index 5563bcee0b..7c754e4167 100644
--- a/community/ffmpegthumbnailer/APKBUILD
+++ b/community/ffmpegthumbnailer/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Stuart Cardall <[email-masked]>
 pkgname=ffmpegthumbnailer
 pkgver=2.2.0
-pkgrel=0
+pkgrel=1
 pkgdesc="Lightweight video thumbnailer that can be used by file managers"
 url="https://github.com/dirkvdb/ffmpegthumbnailer"
 arch="all"
@@ -23,6 +23,11 @@ build() {
 	make || return 1
 }
 
+check() {
+	cd "$builddir"
+	make test
+}
+
 package() {
 	cd "$builddir"
 
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 11:35:39 -0400

There is no pianobar-dev package.
---
 community/pianobar/APKBUILD | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/community/pianobar/APKBUILD b/community/pianobar/APKBUILD
index 8334caed0f..f95856fdd2 100644
--- a/community/pianobar/APKBUILD
+++ b/community/pianobar/APKBUILD
@@ -2,13 +2,12 @@
 # Maintainer: William Pitcock <[email-masked]>
 pkgname=pianobar
 pkgver=2018.06.22
-pkgrel=0
+pkgrel=1
 pkgdesc="Commandline player for pandora webradio"
 url="https://github.com/PromyLOPh/pianobar"
 arch="all"
 license="MIT"
-depends_dev="ffmpeg-dev libao-dev libgcrypt-dev gnutls-dev json-c-dev curl-dev"
-makedepends="$depends_dev"
+makedepends="ffmpeg-dev libao-dev libgcrypt-dev gnutls-dev json-c-dev curl-dev"
 subpackages="$pkgname-doc"
 source="pianobar-${pkgver}.tar.gz::https://github.com/PromyLOPh/pianobar/archive/$pkgver.tar.gz"
 
-- 
2.18.0

---

---

From: Drew DeVault <[email-masked]>
Date: Thu, 1 Nov 2018 11:35:40 -0400

There is no unpaper-dev package.
---
 community/unpaper/APKBUILD | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/community/unpaper/APKBUILD b/community/unpaper/APKBUILD
index 3192151193..cbff73ce23 100644
--- a/community/unpaper/APKBUILD
+++ b/community/unpaper/APKBUILD
@@ -2,14 +2,13 @@
 # Maintainer: Carlo Landmeter <[email-masked]>
 pkgname=unpaper
 pkgver=6.1
-pkgrel=0
+pkgrel=1
 pkgdesc="post-processing tool for scanned sheets of paper"
 url="https://github.com/Flameeyes/unpaper"
 arch="all"
 license="GPL"
 depends=""
-depends_dev="ffmpeg-dev"
-makedepends="$depends_dev automake autoconf libtool libxslt"
+makedepends="ffmpeg-dev automake autoconf libtool libxslt"
 install=""
 subpackages="$pkgname-doc"
 source="$pkgname-$pkgver.tar.gz::https://github.com/Flameeyes/unpaper/tarball/unpaper-$pkgver"
-- 
2.18.0

---