Github messages for voidlinux
 help / color / mirror / Atom feed
From: zlice <zlice@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] ffmpeg6 split
Date: Mon, 13 May 2024 19:56:58 +0200	[thread overview]
Message-ID: <20240513175658.0E12F246F1@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43761@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 5117 bytes --]

There is an updated pull request by zlice against master on the void-packages repository

https://github.com/zlice/void-packages ffmpeg6-split
https://github.com/void-linux/void-packages/pull/43761

ffmpeg6 split
[ci skip]


#### Testing the changes

- I tested the changes in this PR: **YES**

main testing has been vaapi in Firefox Nightly and enc/dec in Shotcut on Intel A770

#### New package

- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing

- I built this PR locally for my native architecture, **x86_64**

#### Discussion

Continuation of https://github.com/void-linux/void-packages/pull/36315

`libavresample` is deprecated, but marked as a dependency when trying to build other packages and install `ffmpeg`(6). I think the right way to handle this is make a meta package and the add to removals?


##### Commit naming / misc

~~Commits are 'dirty' right now, running with [gstreamer 1.22.1 updates](https://github.com/void-linux/void-packages/pull/42861) and [Intel OpenCL](https://github.com/void-linux/void-packages/pull/43084). This will also make [intel packages pr](https://github.com/void-linux/void-packages/pull/41132) obsolete.~~ (see Requirements below)

Maintainer for previous ffmpeg(4) was orphaned, I can put my name in there if that matters, though I don't exactly see myself keeping up on ffmpeg.

~~This updates QT5 which looks like it is usually hosted by Johnny. Not sure if there's any reason to stay there or these sources are fine.~~ Using qt5.15.11 now, revbumps and some patches.

##### STILL FFMPEG4

These are a mix of emulators, games and/or older packages.

- ~~attract~~ (2.7 builds)
- ~~audacity (https://github.com/audacity/audacity/issues/2305 and https://sourceforge.net/p/portmedia/wiki/portsmf/ is 'beta')~~ (updated to 3.x, compiles with ffmpeg6)
- ~~ccextractor~~ (master patches)
- ~~vice (3.8 compiles, needs makedepends libcurl-devel)~~ ty yosh
- kodi
- mlt (only dep left is flowblade - flowblade 2.12.0.2 with mlt7-python3 can 'render' videos with cpu and gpu - https://github.com/void-linux/void-packages/pull/47195)
- ~~synfig (mlt)~~ (work with mlt7, bump synfigstudio)
- tvheadend (download page recommends using 4.3 which compiles fine, 4.4 eta is Q1 2024)
- ~~ssr~~ (patches)
- ~~spek-alternative~~ (replace with spek-x)
- ~~ppsspp~~ ~~(1.17.1 is out, but there's 5+ distfiles that are all git commits)~~ (minor patch)
- olive (has been in alpha since 2020, seems they do nightly builds and appimages)
- moc
- mediastreamer (linphone links are dead, changed to github belladonne. their stuff never worked for me but there are updates if someone wants to give it a try)
- ~~libextractor (1.13 compiles, remove exiv2 patch)~~ (as yosh pointed out, 1.13 just removes ffmpeg bits)
- idjc (0.9.8 compiles, remove python3.10 patch, needs makedepends libebur128-devel and libshout-idjc 2.4.6 with '-r1' for distfile)
- hedgewars
- ~~ffmpegthumbnailer~~ (patches for moviedecoder.xxx files)
- ~~ffmpegthumbs~~ (latest compiles)
- deadbeef (1.9.6 may work but requires libdispatch from apple)
- ~~omxplayer~~ (package removed, deprecated in favor of vlc)
- qtav (fork has ffmpeg 5 patch - https://github.com/cmguo/QtAV)
- `vlc` (vlc4 will support ffmpeg5, there's a patch to build 3.x with ffmpeg5 but it will lack vaapi)
- `osg` (OpenSceneGraph plus `xine-lib`) (patches from osg issue build with ffmpeg6, [ffmpeg5.patch.txt](https://github.com/void-linux/void-packages/files/14743246/ffmpeg5.patch.txt))



##### HAVE NOT BUILT YET

- ~~omxplayer (rpi only? ffmpeg4)~~ (removed)
- kodi (big, but ffmpeg4)


##### UPDATED (for ffmpeg6)

- ~~blender: update to 3.5.1~~ ~~will be revbump with~~ https://github.com/void-linux/void-packages/pull/43992
- unpaper: update to 7.0.0.
- guvcview: update to 2.0.8.
- ~~qt5: update to 5.15.8~~ updated by another PR to 5.15.11
- ~~qt5-webengine: update to 5.18.15~~ updated by another PR to 5.15.16 (some patching for ffmpeg build)
- ~~shiboken2: revbump for qt5.15.8 (patch)~~ updated by another PR to 5.15.10
- ~~python3-pyside2: update to 5.15.8 (patch)~~ updated by another PR to 5.15.10
- New package: spex-x replaces spek-alternative for ffmpeg-6.0


##### Requirements

- ~~[gstreamer 1.22.2](https://github.com/void-linux/void-packages/pull/42861)~~ - a few packages use ffmpeg-devel and require a revbump

- ~~[Intel Packages](https://github.com/void-linux/void-packages/pull/41132) [Intel Packages v2](https://github.com/void-linux/void-packages/pull/47330) - ffmpeg4 uses different libraries than 6 (libmfx / Intel-MediaSDK vs only oneVPL that Intel is moving to), both are included here~~. Using replacement oneVPL from OBS update.

- ~~[shotcut 23.05.14](https://github.com/void-linux/void-packages/pull/44260)~~

- https://github.com/void-linux/void-packages/pull/44781 will remove from this PR

A patch file from https://github.com/void-linux/void-packages/pull/43761.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ffmpeg6-split-43761.patch --]
[-- Type: text/x-diff, Size: 240103 bytes --]

From 6746d73d65c59ce464e08e68a41d4e7eae567c54 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 15 Oct 2023 21:16:56 -0400
Subject: [PATCH 001/108] ffmpeg: update to 6.0.1.

---
 common/shlibs                                 | 26 ++++---
 srcpkgs/ffmpeg/files/altivec.patch            | 60 ---------------
 .../patches/armv5tel-floating-point.patch     | 18 -----
 srcpkgs/ffmpeg/patches/binutils-2.41.patch    | 73 -------------------
 ...h-libavcodec-libsvtav1-ten_bit_format.diff | 40 ----------
 .../workaround-mesa-readeon-vaapi-bug.patch   | 28 -------
 srcpkgs/ffmpeg/template                       | 40 +++++-----
 7 files changed, 37 insertions(+), 248 deletions(-)
 delete mode 100644 srcpkgs/ffmpeg/files/altivec.patch
 delete mode 100644 srcpkgs/ffmpeg/patches/armv5tel-floating-point.patch
 delete mode 100644 srcpkgs/ffmpeg/patches/binutils-2.41.patch
 delete mode 100644 srcpkgs/ffmpeg/patches/patch-libavcodec-libsvtav1-ten_bit_format.diff
 delete mode 100644 srcpkgs/ffmpeg/patches/workaround-mesa-readeon-vaapi-bug.patch

diff --git a/common/shlibs b/common/shlibs
index 9220340b482a4a..35ddbb7af4e710 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -391,15 +391,23 @@ libid3tag.so.0 libid3tag-0.15.1b_1
 libgif.so.7 giflib-5.1.0_1
 libImlib2.so.1 imlib2-1.4.2_1
 libmp3lame.so.0 lame-3.98.2_1
-libavdevice.so.58 libavdevice-4.0_1
-libavformat.so.58 libavformat-4.0_1
-libswscale.so.5 libswscale-4.0_1
-libswresample.so.3 libswresample-4.0_1
-libavresample.so.4 libavresample-4.0_1
-libpostproc.so.55 libpostproc-4.0_1
-libavcodec.so.58 libavcodec-4.0_1
-libavutil.so.56 libavutil-4.0_1
-libavfilter.so.7 libavfilter-4.0_1
+libavdevice.so.60 libavdevice-6.0_1
+libavformat.so.60 libavformat-6.0_1
+libswscale.so.7 libswscale-6.0_1
+libswresample.so.4 libswresample-6.0_1
+libpostproc.so.57 libpostproc-6.0_1
+libavcodec.so.60 libavcodec-6.0_1
+libavutil.so.58 libavutil-6.0_1
+libavfilter.so.9 libavfilter-6.0_1
+libavdevice.so.58 libavdevice4-4.0_1
+libavformat.so.58 libavformat4-4.0_1
+libswscale.so.5 libswscale4-4.0_1
+libswresample.so.3 libswresample4-4.0_1
+libavresample.so.4 libavresample4-4.0_1
+libpostproc.so.55 libpostproc4-4.0_1
+libavcodec.so.58 libavcodec4-4.0_1
+libavutil.so.56 libavutil4-4.0_1
+libavfilter.so.7 libavfilter4-4.0_1
 libSDL-1.2.so.0 SDL-1.2.14_1
 libSDL_image-1.2.so.0 SDL_image-1.2.10_1
 libx264.so.157 x264-20190507.2245_1
diff --git a/srcpkgs/ffmpeg/files/altivec.patch b/srcpkgs/ffmpeg/files/altivec.patch
deleted file mode 100644
index 9c57200463320e..00000000000000
--- a/srcpkgs/ffmpeg/files/altivec.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-revert some altivec specific change on all ppc* except ppc64le*
-
-q66: "We should also throw in a revert of FFmpeg/FFmpeg@3a557c5 but only
-conditionally, for ppc* but not ppc64le* (the new code is valid for
-POWER8 VSX which LE targets as a baseline but not BE)"
-
-
-This reverts commit 3a557c5d88b7b15b5954ba2743febb055549b536.
----
- libswscale/ppc/yuv2rgb_altivec.c | 24 ++++++++++++++++++++----
- 1 file changed, 20 insertions(+), 4 deletions(-)
-
-diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c
-index 536545293d..c1e2852adb 100644
---- a/libswscale/ppc/yuv2rgb_altivec.c
-+++ b/libswscale/ppc/yuv2rgb_altivec.c
-@@ -305,6 +305,9 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in,          \
-     vector signed short R1, G1, B1;                                           \
-     vector unsigned char R, G, B;                                             \
-                                                                               \
-+    const vector unsigned char *y1ivP, *y2ivP, *uivP, *vivP;                  \
-+    vector unsigned char align_perm;                                          \
-+                                                                              \
-     vector signed short lCY       = c->CY;                                    \
-     vector signed short lOY       = c->OY;                                    \
-     vector signed short lCRV      = c->CRV;                                   \
-@@ -335,13 +338,26 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in,          \
-         vec_dstst(oute, (0x02000002 | (((w * 3 + 32) / 32) << 16)), 1);       \
-                                                                               \
-         for (j = 0; j < w / 16; j++) {                                        \
--            y0 = vec_xl(0, y1i);                                              \
-+            y1ivP = (const vector unsigned char *) y1i;                       \
-+            y2ivP = (const vector unsigned char *) y2i;                       \
-+            uivP  = (const vector unsigned char *) ui;                        \
-+            vivP  = (const vector unsigned char *) vi;                        \
-+                                                                              \
-+            align_perm = vec_lvsl(0, y1i);                                    \
-+            y0 = (vector unsigned char)                                       \
-+                     vec_perm(y1ivP[0], y1ivP[1], align_perm);                \
-                                                                               \
--            y1 = vec_xl(0, y2i);                                              \
-+            align_perm = vec_lvsl(0, y2i);                                    \
-+            y1 = (vector unsigned char)                                       \
-+                     vec_perm(y2ivP[0], y2ivP[1], align_perm);                \
-                                                                               \
--            u = (vector signed char) vec_xl(0, ui);                           \
-+            align_perm = vec_lvsl(0, ui);                                     \
-+            u = (vector signed char)                                          \
-+                    vec_perm(uivP[0], uivP[1], align_perm);                   \
-                                                                               \
--            v = (vector signed char) vec_xl(0, vi);                           \
-+            align_perm = vec_lvsl(0, vi);                                     \
-+            v = (vector signed char)                                          \
-+                    vec_perm(vivP[0], vivP[1], align_perm);                   \
-                                                                               \
-             u = (vector signed char)                                          \
-                     vec_sub(u,                                                \
--- 
-2.27.0
-
diff --git a/srcpkgs/ffmpeg/patches/armv5tel-floating-point.patch b/srcpkgs/ffmpeg/patches/armv5tel-floating-point.patch
deleted file mode 100644
index 9a55178c74f0fd..00000000000000
--- a/srcpkgs/ffmpeg/patches/armv5tel-floating-point.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/libavfilter/vf_drawtext.c	2017-10-26 21:03:03.000000000 +0200
-+++ b/libavfilter/vf_drawtext.c	2017-11-21 11:06:49.602284422 +0100
-@@ -39,6 +39,15 @@
- #endif
- #include <fenv.h>
- 
-+#if (FE_ALL_EXCEPT == 0)
-+/* E.g. ARM soft float does not define these */
-+#define FE_INVALID    0
-+#define FE_DIVBYZERO  0
-+#define FE_OVERFLOW   0
-+#define FE_UNDERFLOW  0
-+#define FE_INEXACT    0
-+#endif
-+
- #if CONFIG_LIBFONTCONFIG
- #include <fontconfig/fontconfig.h>
- #endif
diff --git a/srcpkgs/ffmpeg/patches/binutils-2.41.patch b/srcpkgs/ffmpeg/patches/binutils-2.41.patch
deleted file mode 100644
index 53a596d0ee7d4e..00000000000000
--- a/srcpkgs/ffmpeg/patches/binutils-2.41.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
-Date: Sun, 16 Jul 2023 18:18:02 +0300
-Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
- instructions within inline assembly
-
-Fixes assembling with binutil as >= 2.41
-
-Signed-off-by: James Almer <jamrial@gmail.com>
----
- libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
- 1 file changed, 23 insertions(+), 3 deletions(-)
-
-diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
-index 6298f5ed1983b..ca7e2dffc1076 100644
---- a/libavcodec/x86/mathops.h
-+++ b/libavcodec/x86/mathops.h
-@@ -35,12 +35,20 @@
- static av_always_inline av_const int MULL(int a, int b, unsigned shift)
- {
-     int rt, dummy;
-+    if (__builtin_constant_p(shift))
-     __asm__ (
-         "imull %3               \n\t"
-         "shrdl %4, %%edx, %%eax \n\t"
-         :"=a"(rt), "=d"(dummy)
--        :"a"(a), "rm"(b), "ci"((uint8_t)shift)
-+        :"a"(a), "rm"(b), "i"(shift & 0x1F)
-     );
-+    else
-+        __asm__ (
-+            "imull %3               \n\t"
-+            "shrdl %4, %%edx, %%eax \n\t"
-+            :"=a"(rt), "=d"(dummy)
-+            :"a"(a), "rm"(b), "c"((uint8_t)shift)
-+        );
-     return rt;
- }
- 
-@@ -113,19 +121,31 @@ __asm__ volatile(\
- // avoid +32 for shift optimization (gcc should do that ...)
- #define NEG_SSR32 NEG_SSR32
- static inline  int32_t NEG_SSR32( int32_t a, int8_t s){
-+    if (__builtin_constant_p(s))
-     __asm__ ("sarl %1, %0\n\t"
-          : "+r" (a)
--         : "ic" ((uint8_t)(-s))
-+         : "i" (-s & 0x1F)
-     );
-+    else
-+        __asm__ ("sarl %1, %0\n\t"
-+               : "+r" (a)
-+               : "c" ((uint8_t)(-s))
-+        );
-     return a;
- }
- 
- #define NEG_USR32 NEG_USR32
- static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
-+    if (__builtin_constant_p(s))
-     __asm__ ("shrl %1, %0\n\t"
-          : "+r" (a)
--         : "ic" ((uint8_t)(-s))
-+         : "i" (-s & 0x1F)
-     );
-+    else
-+        __asm__ ("shrl %1, %0\n\t"
-+               : "+r" (a)
-+               : "c" ((uint8_t)(-s))
-+        );
-     return a;
- }
- 
diff --git a/srcpkgs/ffmpeg/patches/patch-libavcodec-libsvtav1-ten_bit_format.diff b/srcpkgs/ffmpeg/patches/patch-libavcodec-libsvtav1-ten_bit_format.diff
deleted file mode 100644
index aa948f7a8a2dfb..00000000000000
--- a/srcpkgs/ffmpeg/patches/patch-libavcodec-libsvtav1-ten_bit_format.diff
+++ /dev/null
@@ -1,40 +0,0 @@
-#==================================================================================================
-# From 031f1561cd286596cdb374da32f8aa816ce3b135 Mon Sep 17 00:00:00 2001
-# From: Christopher Degawa <christopher.degawa@intel.com>
-# Date: Thu, 20 Oct 2022 22:55:27 -0500
-# Subject: [PATCH] avcodec/libsvtav1: remove compressed_ten_bit_format and simplify alloc_buffer
-#
-# compressed_ten_bit_format has been deprecated upstream and has no effect
-# and can be removed. Plus, technically it was never used in the first place
-# since it would require the app (ffmpeg) to set it and do additional
-# processing of the input frames.
-#
-# Also simplify alloc_buffer by removing calculations relating to the non-existant processing.
-#
-# Signed-off-by: Christopher Degawa <christopher.degawa@intel.com>
-#==================================================================================================
---- a/libavcodec/libsvtav1.c
-+++ b/libavcodec/libsvtav1.c
-@@ -124,16 +124,12 @@ static int svt_print_error(void *log_ctx, EbErrorType err,
- 
- static int alloc_buffer(EbSvtAv1EncConfiguration *config, SvtContext *svt_enc)
- {
--    const int    pack_mode_10bit =
--        (config->encoder_bit_depth > 8) && (config->compressed_ten_bit_format == 0) ? 1 : 0;
--    const size_t luma_size_8bit  =
--        config->source_width * config->source_height * (1 << pack_mode_10bit);
--    const size_t luma_size_10bit =
--        (config->encoder_bit_depth > 8 && pack_mode_10bit == 0) ? luma_size_8bit : 0;
-+    const size_t luma_size = config->source_width * config->source_height *
-+        (config->encoder_bit_depth > 8 ? 2 : 1);
- 
-     EbSvtIOFormat *in_data;
- 
--    svt_enc->raw_size = (luma_size_8bit + luma_size_10bit) * 3 / 2;
-+    svt_enc->raw_size = luma_size * 3 / 2;
- 
-     // allocate buffer for in and out
-     svt_enc->in_buf           = av_mallocz(sizeof(*svt_enc->in_buf));
--- 
-GitLab
-
diff --git a/srcpkgs/ffmpeg/patches/workaround-mesa-readeon-vaapi-bug.patch b/srcpkgs/ffmpeg/patches/workaround-mesa-readeon-vaapi-bug.patch
deleted file mode 100644
index 00e3f68a415b84..00000000000000
--- a/srcpkgs/ffmpeg/patches/workaround-mesa-readeon-vaapi-bug.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 811d290844206fc73dc39c3e5b67d5d895baedf8 Mon Sep 17 00:00:00 2001
-From: Rainer Hochecker <fernetmenta@online.de>
-Date: Sat, 26 Jan 2019 19:48:35 +0100
-Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices
-
-This fixes / workarounds https://bugs.freedesktop.org/show_bug.cgi?id=105368.
-It was hit frequently when watching h264 channels received via DVB-X.
-Corresponding kodi bug: https://github.com/xbmc/xbmc/issues/15704
----
- libavcodec/vaapi_h264.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
-index 5854587a255..f12fdc457a4 100644
---- a/libavcodec/vaapi_h264.c
-+++ b/libavcodec/vaapi_h264.c
-@@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx)
-     H264SliceContext *sl = &h->slice_ctx[0];
-     int ret;
- 
-+    if (pic->nb_slices == 0) {
-+        ret = AVERROR_INVALIDDATA;
-+        goto finish;
-+    }
-+
-     ret = ff_vaapi_decode_issue(avctx, pic);
-     if (ret < 0)
-         goto finish;
diff --git a/srcpkgs/ffmpeg/template b/srcpkgs/ffmpeg/template
index 1ebb436135938d..f1e4712c41d087 100644
--- a/srcpkgs/ffmpeg/template
+++ b/srcpkgs/ffmpeg/template
@@ -1,15 +1,15 @@
 # Template file for 'ffmpeg'
 # audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname!
 pkgname=ffmpeg
-version=4.4.4
-revision=6
+version=6.0.1
+revision=1
 short_desc="Decoding, encoding and streaming software"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="https://www.ffmpeg.org"
 changelog="https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog"
 distfiles="https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz"
-checksum=e80b380d595c809060f66f96a5d849511ef4a76a26b76eacf5778b94c3570309
+checksum=9b16b8731d78e596b4be0d720428ca42df642bb2d78342881ff7f5bc29fc9623
 
 hostmakedepends="pkg-config perl"
 makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-devel
@@ -26,12 +26,13 @@ makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-deve
  $(vopt_if webp libwebp-devel) $(vopt_if sofa libmysofa-devel)
  $(vopt_if drm libdrm-devel) $(vopt_if svtav1 libsvt-av1-devel)
  $(vopt_if srt srt-devel) $(vopt_if rist librist-devel)
- $(vopt_if vulkan 'vulkan-loader Vulkan-Headers')
+ $(vopt_if vulkan 'vulkan-loader Vulkan-Headers Vulkan-Tools Vulkan-ValidationLayers')
+ $(vopt_if onevpl 'oneVPL oneVPL-devel')
  $(vopt_if nvenc nv-codec-headers) $(vopt_if nvdec nv-codec-headers)"
 depends="ffplay>=${version}_${revision}"
 
 build_options="x265 v4l2 vaapi vdpau vpx fdk_aac aom nvenc sndio pulseaudio
- dav1d zimg webp sofa vulkan drm svtav1 srt rist nvdec"
+ dav1d zimg webp sofa vulkan drm svtav1 srt rist nvdec onevpl"
 build_options_default="x265 v4l2 vpx aom sndio pulseaudio dav1d webp vulkan drm srt rist"
 desc_option_srt="Enable support for SRT (Secure, Reliable, Transport)"
 desc_option_rist="Enable support for RIST (Reliable Internet Stream Transport)"
@@ -39,9 +40,13 @@ desc_option_sofa="Enable support for AES SOFA"
 desc_option_webp="Enable support for WebP"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*)
-		hostmakedepends+=" nasm"
+	i686*)
 		build_options_default+=" vaapi vdpau nvenc nvdec"
+		hostmakedepends+=" nasm"
+		;;
+	x86_64*)
+		hostmakedepends+=" nasm"
+		build_options_default+=" vaapi vdpau nvenc nvdec onevpl"
 		;;
 	ppc64*) build_options_default+=" vaapi vdpau";;
 	mips*) CFLAGS="-mnan=legacy";;
@@ -65,8 +70,6 @@ post_patch() {
 		ppc64le*) ;;
 		ppc*) _apply_patch -p1 ${FILESDIR}/altivec.patch ;;
 	esac
-
-	vsed -i libavfilter/vf_libvmaf.c -e 's!/usr/local/share/model/\(vmaf_v0.6.1\).pkl!/usr/share/vmaf/\1.json!'
 }
 
 do_configure() {
@@ -115,18 +118,19 @@ do_configure() {
 		$(vopt_enable x265 libx265) \
 		$(vopt_enable v4l2 libv4l2) \
 		$(vopt_enable aom libaom) $(vopt_enable vaapi) $(vopt_enable vdpau) \
-		--enable-libbs2b --enable-avresample --enable-libvidstab \
+		--enable-libbs2b --enable-libvidstab \
 		$(vopt_enable dav1d libdav1d) \
 		$(vopt_enable zimg libzimg) \
 		$(vopt_enable webp libwebp) \
 		$(vopt_enable sofa libmysofa) \
 		$(vopt_enable vulkan) \
+		$(vopt_enable onevpl libvpl) \
 		$(vopt_enable drm libdrm) \
 		$(vopt_enable svtav1 libsvtav1) \
 		$(vopt_enable srt libsrt) \
 		$(vopt_enable rist librist) \
-		$(vopt_if nvenc '--enable-nvenc') \
-		$(vopt_if nvdec '--enable-nvdec')
+		$(vopt_enable nvenc nvenc) \
+		$(vopt_enable nvdec nvdec)
 }
 
 do_build() {
@@ -153,10 +157,8 @@ libavdevice_package() {
 }
 
 libavresample_package() {
-	short_desc="FFmpeg audio resampling library"
-	pkg_install() {
-		vmove "usr/lib/libavresample.so.*"
-	}
+	short_desc="Package deprecated, removal needed"
+	build_style=meta
 }
 
 libavformat_package() {
@@ -210,15 +212,13 @@ ffmpeg-devel_package() {
 		libavfilter>=${version}_${revision}
 		libpostproc>=${version}_${revision}
 		libswscale>=${version}_${revision}
-		libswresample>=${version}_${revision}
-		libavresample>=${version}_${revision}"
+		libswresample>=${version}_${revision}"
 	short_desc+=" - development files"
-
+	conflicts="ffmpeg4-devel"
 	if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
 		# /usr/bin/strip: error: the input file '/destdir//ffmpeg-devel-4.4.4/usr/lib/libavfilter.a(vf_atadenoise.o)' has no sections
 		nostrip_files="/usr/lib/libavfilter.a"
 	fi
-
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig

From 8674ea8b1421c8e4f05c8a15dc53d707b28f9770 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 15 Oct 2023 21:18:14 -0400
Subject: [PATCH 002/108] openshot: revbump for ffmpeg6

---
 srcpkgs/openshot/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/openshot/template b/srcpkgs/openshot/template
index 3849858fe963b5..12789bc9867499 100644
--- a/srcpkgs/openshot/template
+++ b/srcpkgs/openshot/template
@@ -1,7 +1,7 @@
 # Template file for 'openshot'
 pkgname=openshot
 version=3.1.1
-revision=1
+revision=2
 build_style=python3-module
 hostmakedepends="python3 python3-setuptools"
 makedepends="ffmpeg-devel python3-PyQt5"

From 0ffa2ed06458b1de82f37df9f06e3d783753af39 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 15 Oct 2023 21:18:36 -0400
Subject: [PATCH 003/108] sumo: revbump for ffmpeg6

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index a730afa9fafa92..e2def06fa4bd7d 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=7
+revision=8
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From cf91cbd03581c4b4e8453b00f48f5c69a5183a1a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 19:56:22 -0400
Subject: [PATCH 004/108] New package: ffmpeg4-4.4.4.

---
 srcpkgs/ffmpeg4-devel                         |   1 +
 srcpkgs/ffmpeg4/files/altivec.patch           |  60 +++++
 .../patches/armv5tel-floating-point.patch     |  18 ++
 srcpkgs/ffmpeg4/patches/binutils-2.41.patch   |  73 ++++++
 ...h-libavcodec-libsvtav1-ten_bit_format.diff |  40 +++
 .../workaround-mesa-readeon-vaapi-bug.patch   |  28 +++
 srcpkgs/ffmpeg4/template                      | 234 ++++++++++++++++++
 srcpkgs/libavcodec4                           |   1 +
 srcpkgs/libavdevice4                          |   1 +
 srcpkgs/libavfilter4                          |   1 +
 srcpkgs/libavformat4                          |   1 +
 srcpkgs/libavresample4                        |   1 +
 srcpkgs/libavutil4                            |   1 +
 srcpkgs/libpostproc4                          |   1 +
 srcpkgs/libswresample4                        |   1 +
 srcpkgs/libswscale4                           |   1 +
 16 files changed, 463 insertions(+)
 create mode 120000 srcpkgs/ffmpeg4-devel
 create mode 100644 srcpkgs/ffmpeg4/files/altivec.patch
 create mode 100644 srcpkgs/ffmpeg4/patches/armv5tel-floating-point.patch
 create mode 100644 srcpkgs/ffmpeg4/patches/binutils-2.41.patch
 create mode 100644 srcpkgs/ffmpeg4/patches/patch-libavcodec-libsvtav1-ten_bit_format.diff
 create mode 100644 srcpkgs/ffmpeg4/patches/workaround-mesa-readeon-vaapi-bug.patch
 create mode 100644 srcpkgs/ffmpeg4/template
 create mode 120000 srcpkgs/libavcodec4
 create mode 120000 srcpkgs/libavdevice4
 create mode 120000 srcpkgs/libavfilter4
 create mode 120000 srcpkgs/libavformat4
 create mode 120000 srcpkgs/libavresample4
 create mode 120000 srcpkgs/libavutil4
 create mode 120000 srcpkgs/libpostproc4
 create mode 120000 srcpkgs/libswresample4
 create mode 120000 srcpkgs/libswscale4

diff --git a/srcpkgs/ffmpeg4-devel b/srcpkgs/ffmpeg4-devel
new file mode 120000
index 00000000000000..887f354e7c6be3
--- /dev/null
+++ b/srcpkgs/ffmpeg4-devel
@@ -0,0 +1 @@
+ffmpeg4
\ No newline at end of file
diff --git a/srcpkgs/ffmpeg4/files/altivec.patch b/srcpkgs/ffmpeg4/files/altivec.patch
new file mode 100644
index 00000000000000..9c57200463320e
--- /dev/null
+++ b/srcpkgs/ffmpeg4/files/altivec.patch
@@ -0,0 +1,60 @@
+revert some altivec specific change on all ppc* except ppc64le*
+
+q66: "We should also throw in a revert of FFmpeg/FFmpeg@3a557c5 but only
+conditionally, for ppc* but not ppc64le* (the new code is valid for
+POWER8 VSX which LE targets as a baseline but not BE)"
+
+
+This reverts commit 3a557c5d88b7b15b5954ba2743febb055549b536.
+---
+ libswscale/ppc/yuv2rgb_altivec.c | 24 ++++++++++++++++++++----
+ 1 file changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c
+index 536545293d..c1e2852adb 100644
+--- a/libswscale/ppc/yuv2rgb_altivec.c
++++ b/libswscale/ppc/yuv2rgb_altivec.c
+@@ -305,6 +305,9 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in,          \
+     vector signed short R1, G1, B1;                                           \
+     vector unsigned char R, G, B;                                             \
+                                                                               \
++    const vector unsigned char *y1ivP, *y2ivP, *uivP, *vivP;                  \
++    vector unsigned char align_perm;                                          \
++                                                                              \
+     vector signed short lCY       = c->CY;                                    \
+     vector signed short lOY       = c->OY;                                    \
+     vector signed short lCRV      = c->CRV;                                   \
+@@ -335,13 +338,26 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in,          \
+         vec_dstst(oute, (0x02000002 | (((w * 3 + 32) / 32) << 16)), 1);       \
+                                                                               \
+         for (j = 0; j < w / 16; j++) {                                        \
+-            y0 = vec_xl(0, y1i);                                              \
++            y1ivP = (const vector unsigned char *) y1i;                       \
++            y2ivP = (const vector unsigned char *) y2i;                       \
++            uivP  = (const vector unsigned char *) ui;                        \
++            vivP  = (const vector unsigned char *) vi;                        \
++                                                                              \
++            align_perm = vec_lvsl(0, y1i);                                    \
++            y0 = (vector unsigned char)                                       \
++                     vec_perm(y1ivP[0], y1ivP[1], align_perm);                \
+                                                                               \
+-            y1 = vec_xl(0, y2i);                                              \
++            align_perm = vec_lvsl(0, y2i);                                    \
++            y1 = (vector unsigned char)                                       \
++                     vec_perm(y2ivP[0], y2ivP[1], align_perm);                \
+                                                                               \
+-            u = (vector signed char) vec_xl(0, ui);                           \
++            align_perm = vec_lvsl(0, ui);                                     \
++            u = (vector signed char)                                          \
++                    vec_perm(uivP[0], uivP[1], align_perm);                   \
+                                                                               \
+-            v = (vector signed char) vec_xl(0, vi);                           \
++            align_perm = vec_lvsl(0, vi);                                     \
++            v = (vector signed char)                                          \
++                    vec_perm(vivP[0], vivP[1], align_perm);                   \
+                                                                               \
+             u = (vector signed char)                                          \
+                     vec_sub(u,                                                \
+-- 
+2.27.0
+
diff --git a/srcpkgs/ffmpeg4/patches/armv5tel-floating-point.patch b/srcpkgs/ffmpeg4/patches/armv5tel-floating-point.patch
new file mode 100644
index 00000000000000..9a55178c74f0fd
--- /dev/null
+++ b/srcpkgs/ffmpeg4/patches/armv5tel-floating-point.patch
@@ -0,0 +1,18 @@
+--- a/libavfilter/vf_drawtext.c	2017-10-26 21:03:03.000000000 +0200
++++ b/libavfilter/vf_drawtext.c	2017-11-21 11:06:49.602284422 +0100
+@@ -39,6 +39,15 @@
+ #endif
+ #include <fenv.h>
+ 
++#if (FE_ALL_EXCEPT == 0)
++/* E.g. ARM soft float does not define these */
++#define FE_INVALID    0
++#define FE_DIVBYZERO  0
++#define FE_OVERFLOW   0
++#define FE_UNDERFLOW  0
++#define FE_INEXACT    0
++#endif
++
+ #if CONFIG_LIBFONTCONFIG
+ #include <fontconfig/fontconfig.h>
+ #endif
diff --git a/srcpkgs/ffmpeg4/patches/binutils-2.41.patch b/srcpkgs/ffmpeg4/patches/binutils-2.41.patch
new file mode 100644
index 00000000000000..53a596d0ee7d4e
--- /dev/null
+++ b/srcpkgs/ffmpeg4/patches/binutils-2.41.patch
@@ -0,0 +1,73 @@
+From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
+Date: Sun, 16 Jul 2023 18:18:02 +0300
+Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
+ instructions within inline assembly
+
+Fixes assembling with binutil as >= 2.41
+
+Signed-off-by: James Almer <jamrial@gmail.com>
+---
+ libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
+ 1 file changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
+index 6298f5ed1983b..ca7e2dffc1076 100644
+--- a/libavcodec/x86/mathops.h
++++ b/libavcodec/x86/mathops.h
+@@ -35,12 +35,20 @@
+ static av_always_inline av_const int MULL(int a, int b, unsigned shift)
+ {
+     int rt, dummy;
++    if (__builtin_constant_p(shift))
+     __asm__ (
+         "imull %3               \n\t"
+         "shrdl %4, %%edx, %%eax \n\t"
+         :"=a"(rt), "=d"(dummy)
+-        :"a"(a), "rm"(b), "ci"((uint8_t)shift)
++        :"a"(a), "rm"(b), "i"(shift & 0x1F)
+     );
++    else
++        __asm__ (
++            "imull %3               \n\t"
++            "shrdl %4, %%edx, %%eax \n\t"
++            :"=a"(rt), "=d"(dummy)
++            :"a"(a), "rm"(b), "c"((uint8_t)shift)
++        );
+     return rt;
+ }
+ 
+@@ -113,19 +121,31 @@ __asm__ volatile(\
+ // avoid +32 for shift optimization (gcc should do that ...)
+ #define NEG_SSR32 NEG_SSR32
+ static inline  int32_t NEG_SSR32( int32_t a, int8_t s){
++    if (__builtin_constant_p(s))
+     __asm__ ("sarl %1, %0\n\t"
+          : "+r" (a)
+-         : "ic" ((uint8_t)(-s))
++         : "i" (-s & 0x1F)
+     );
++    else
++        __asm__ ("sarl %1, %0\n\t"
++               : "+r" (a)
++               : "c" ((uint8_t)(-s))
++        );
+     return a;
+ }
+ 
+ #define NEG_USR32 NEG_USR32
+ static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
++    if (__builtin_constant_p(s))
+     __asm__ ("shrl %1, %0\n\t"
+          : "+r" (a)
+-         : "ic" ((uint8_t)(-s))
++         : "i" (-s & 0x1F)
+     );
++    else
++        __asm__ ("shrl %1, %0\n\t"
++               : "+r" (a)
++               : "c" ((uint8_t)(-s))
++        );
+     return a;
+ }
+ 
diff --git a/srcpkgs/ffmpeg4/patches/patch-libavcodec-libsvtav1-ten_bit_format.diff b/srcpkgs/ffmpeg4/patches/patch-libavcodec-libsvtav1-ten_bit_format.diff
new file mode 100644
index 00000000000000..aa948f7a8a2dfb
--- /dev/null
+++ b/srcpkgs/ffmpeg4/patches/patch-libavcodec-libsvtav1-ten_bit_format.diff
@@ -0,0 +1,40 @@
+#==================================================================================================
+# From 031f1561cd286596cdb374da32f8aa816ce3b135 Mon Sep 17 00:00:00 2001
+# From: Christopher Degawa <christopher.degawa@intel.com>
+# Date: Thu, 20 Oct 2022 22:55:27 -0500
+# Subject: [PATCH] avcodec/libsvtav1: remove compressed_ten_bit_format and simplify alloc_buffer
+#
+# compressed_ten_bit_format has been deprecated upstream and has no effect
+# and can be removed. Plus, technically it was never used in the first place
+# since it would require the app (ffmpeg) to set it and do additional
+# processing of the input frames.
+#
+# Also simplify alloc_buffer by removing calculations relating to the non-existant processing.
+#
+# Signed-off-by: Christopher Degawa <christopher.degawa@intel.com>
+#==================================================================================================
+--- a/libavcodec/libsvtav1.c
++++ b/libavcodec/libsvtav1.c
+@@ -124,16 +124,12 @@ static int svt_print_error(void *log_ctx, EbErrorType err,
+ 
+ static int alloc_buffer(EbSvtAv1EncConfiguration *config, SvtContext *svt_enc)
+ {
+-    const int    pack_mode_10bit =
+-        (config->encoder_bit_depth > 8) && (config->compressed_ten_bit_format == 0) ? 1 : 0;
+-    const size_t luma_size_8bit  =
+-        config->source_width * config->source_height * (1 << pack_mode_10bit);
+-    const size_t luma_size_10bit =
+-        (config->encoder_bit_depth > 8 && pack_mode_10bit == 0) ? luma_size_8bit : 0;
++    const size_t luma_size = config->source_width * config->source_height *
++        (config->encoder_bit_depth > 8 ? 2 : 1);
+ 
+     EbSvtIOFormat *in_data;
+ 
+-    svt_enc->raw_size = (luma_size_8bit + luma_size_10bit) * 3 / 2;
++    svt_enc->raw_size = luma_size * 3 / 2;
+ 
+     // allocate buffer for in and out
+     svt_enc->in_buf           = av_mallocz(sizeof(*svt_enc->in_buf));
+-- 
+GitLab
+
diff --git a/srcpkgs/ffmpeg4/patches/workaround-mesa-readeon-vaapi-bug.patch b/srcpkgs/ffmpeg4/patches/workaround-mesa-readeon-vaapi-bug.patch
new file mode 100644
index 00000000000000..00e3f68a415b84
--- /dev/null
+++ b/srcpkgs/ffmpeg4/patches/workaround-mesa-readeon-vaapi-bug.patch
@@ -0,0 +1,28 @@
+From 811d290844206fc73dc39c3e5b67d5d895baedf8 Mon Sep 17 00:00:00 2001
+From: Rainer Hochecker <fernetmenta@online.de>
+Date: Sat, 26 Jan 2019 19:48:35 +0100
+Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices
+
+This fixes / workarounds https://bugs.freedesktop.org/show_bug.cgi?id=105368.
+It was hit frequently when watching h264 channels received via DVB-X.
+Corresponding kodi bug: https://github.com/xbmc/xbmc/issues/15704
+---
+ libavcodec/vaapi_h264.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
+index 5854587a255..f12fdc457a4 100644
+--- a/libavcodec/vaapi_h264.c
++++ b/libavcodec/vaapi_h264.c
+@@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx)
+     H264SliceContext *sl = &h->slice_ctx[0];
+     int ret;
+ 
++    if (pic->nb_slices == 0) {
++        ret = AVERROR_INVALIDDATA;
++        goto finish;
++    }
++
+     ret = ff_vaapi_decode_issue(avctx, pic);
+     if (ret < 0)
+         goto finish;
diff --git a/srcpkgs/ffmpeg4/template b/srcpkgs/ffmpeg4/template
new file mode 100644
index 00000000000000..9ba14bdb8ddf32
--- /dev/null
+++ b/srcpkgs/ffmpeg4/template
@@ -0,0 +1,234 @@
+# Template file for 'ffmpeg4'
+# audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname!
+pkgname=ffmpeg4
+version=4.4.4
+revision=1
+short_desc="Decoding, encoding and streaming software - ffmpeg4 libraries only"
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-3.0-or-later"
+homepage="https://www.ffmpeg.org"
+changelog="https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog"
+distfiles="https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz"
+checksum=e80b380d595c809060f66f96a5d849511ef4a76a26b76eacf5778b94c3570309
+
+hostmakedepends="pkg-config perl"
+makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-devel
+ libXext-devel libXvMC-devel libxcb-devel lame-devel libtheora-devel
+ libvorbis-devel x264-devel xvidcore-devel jack-devel SDL2-devel
+ libcdio-paranoia-devel librtmp-devel libmodplug-devel gnutls-devel
+ speex-devel celt-devel harfbuzz-devel libass-devel opus-devel ocl-icd-devel
+ libbs2b-devel libvidstab-devel vmaf-devel $(vopt_if pulseaudio pulseaudio-devel)
+ $(vopt_if vaapi libva-devel) $(vopt_if vdpau libvdpau-devel)
+ $(vopt_if x265 x265-devel) $(vopt_if v4l2 v4l-utils-devel)
+ $(vopt_if fdk_aac fdk-aac-devel) $(vopt_if vpx libvpx-devel)
+ $(vopt_if aom libaom-devel) $(vopt_if sndio sndio-devel)
+ $(vopt_if dav1d libdav1d-devel) $(vopt_if zimg zimg-devel)
+ $(vopt_if webp libwebp-devel) $(vopt_if sofa libmysofa-devel)
+ $(vopt_if drm libdrm-devel) $(vopt_if svtav1 libsvt-av1-devel)
+ $(vopt_if srt srt-devel) $(vopt_if rist librist-devel)
+ $(vopt_if vulkan 'vulkan-loader Vulkan-Headers')
+ $(vopt_if nvenc nv-codec-headers) $(vopt_if nvdec nv-codec-headers)"
+
+build_options="x265 v4l2 vaapi vdpau vpx fdk_aac aom nvenc sndio pulseaudio
+ dav1d zimg webp sofa vulkan drm svtav1 srt rist nvdec"
+build_options_default="x265 v4l2 vpx aom sndio pulseaudio dav1d webp vulkan drm srt rist"
+
+desc_option_srt="Enable support for SRT (Secure, Reliable, Transport)"
+desc_option_rist="Enable support for RIST (Reliable Internet Stream Transport)"
+desc_option_sofa="Enable support for AES SOFA"
+desc_option_webp="Enable support for WebP"
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*|x86_64*)
+			hostmakedepends+=" nasm"
+			build_options_default+=" vaapi vdpau nvenc nvdec"
+			;;
+	ppc64*) build_options_default+=" vaapi vdpau";;
+	mips*) CFLAGS="-mnan=legacy";;
+esac
+
+if [ "$XBPS_TARGET_WORDSIZE" != "32" ]; then
+	build_options_default+=" svtav1"
+fi
+
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+	makedepends+=" libatomic-devel"
+fi
+
+_apply_patch() {
+	local args="$1" pname="$(basename $2)"
+
+	if [ ! -f ".${pname}_done" ]; then
+		patch -N $args -i $2
+		touch .${pname}_done
+	fi
+}
+
+post_patch() {
+	case "$XBPS_TARGET_MACHINE" in
+		ppc64le*) ;;
+		ppc*) _apply_patch -p1 ${FILESDIR}/altivec.patch ;;
+	esac
+
+	vsed -i libavfilter/vf_libvmaf.c -e 's!/usr/local/share/model/\(vmaf_v0.6.1\).pkl!/usr/share/vmaf/\1.json!'
+}
+
+do_configure() {
+	# Fix gcc on x86_64-musl only
+	if [ "$XBPS_TARGET_MACHINE" = "x86_64-musl" ]; then
+		vsed -i configure -e "s;_cflags_speed='-O3';_cflags_speed='-O2';"
+	fi
+
+	if [ "$CROSS_BUILD" ]; then
+		case "$XBPS_TARGET_MACHINE" in
+			arm*) _arch="arm";;
+			aarch64*) _arch="aarch64";;
+			mips*) _arch="mips";;
+			ppc64*) _arch="ppc64";;
+			ppc*) _arch="ppc";;
+			*) _arch="${XBPS_TARGET_MACHINE%%-musl}";;
+		esac
+
+		_args+=" --enable-cross-compile
+			--sysroot=$XBPS_CROSS_BASE
+			--cross-prefix=${XBPS_CROSS_TRIPLET}-
+			--target-os=linux --arch=${_arch}"
+	fi
+
+	case "$XBPS_TARGET_MACHINE" in
+		ppc|ppc-musl) _args+=" --disable-altivec";;
+	esac
+
+	if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+		_args+=" --extra-libs=-latomic"
+	fi
+
+	./configure --prefix=/usr --disable-debug --enable-gpl --enable-gnutls \
+		--disable-stripping \
+		--enable-libcdio --enable-version3 --enable-runtime-cpudetect \
+		--enable-libmp3lame --enable-libvorbis --enable-libxvid \
+		--enable-libx264 $(vopt_enable vpx libvpx) --enable-libtheora \
+		--enable-shared --enable-static --enable-libxcb \
+		$(vopt_enable pulseaudio libpulse) --enable-libfreetype --enable-libmodplug \
+		--enable-libspeex --enable-libcelt --enable-libass \
+		--enable-libopus --enable-librtmp --enable-libjack \
+		$(vopt_if fdk_aac '--enable-nonfree --enable-libfdk-aac') \
+		--disable-libopencore_amrnb --disable-libopencore_amrwb \
+		--disable-libopenjpeg \
+		--enable-postproc --enable-opencl ${_args} --enable-libvmaf ${_args} \
+		$(vopt_enable x265 libx265) \
+		$(vopt_enable v4l2 libv4l2) \
+		$(vopt_enable aom libaom) $(vopt_enable vaapi) $(vopt_enable vdpau) \
+		--enable-libbs2b --enable-avresample --enable-libvidstab \
+		$(vopt_enable dav1d libdav1d) \
+		$(vopt_enable zimg libzimg) \
+		$(vopt_enable webp libwebp) \
+		$(vopt_enable sofa libmysofa) \
+		$(vopt_enable vulkan) \
+		$(vopt_enable drm libdrm) \
+		$(vopt_enable svtav1 libsvtav1) \
+		$(vopt_enable srt libsrt) \
+		$(vopt_enable rist librist) \
+		$(vopt_if nvenc '--enable-nvenc') \
+		$(vopt_if nvdec '--enable-nvdec')
+}
+
+do_build() {
+	make ${makejobs}
+	make doc/ff{mpeg,play}.1
+}
+
+do_install() {
+	make DESTDIR=${DESTDIR} install install-man
+	rm -rf ${DESTDIR}/usr/bin
+}
+
+libavcodec4_package() {
+	short_desc="FFmpeg codec library"
+	pkg_install() {
+		vmove "usr/lib/libavcodec.so.*"
+	}
+}
+
+libavdevice4_package() {
+	short_desc="FFmpeg device handling library"
+	pkg_install() {
+		vmove "usr/lib/libavdevice.so.*"
+	}
+}
+
+libavresample4_package() {
+	short_desc="FFmpeg audio resampling library"
+	pkg_install() {
+		vmove "usr/lib/libavresample.so.*"
+	}
+}
+
+libavformat4_package() {
+	short_desc="FFmpeg file format library"
+	pkg_install() {
+		vmove "usr/lib/libavformat.so.*"
+	}
+}
+
+libavutil4_package() {
+	short_desc="FFmpeg utility library"
+	pkg_install() {
+		vmove "usr/lib/libavutil.so.*"
+	}
+}
+
+libavfilter4_package() {
+	short_desc="FFmpeg audio/video filter library"
+	pkg_install() {
+		vmove "usr/lib/libavfilter.so.*"
+	}
+}
+
+libpostproc4_package() {
+	short_desc="FFmpeg video postprocessing library"
+	pkg_install() {
+		vmove "usr/lib/libpostproc.so.*"
+	}
+}
+
+libswscale4_package() {
+	short_desc="FFmpeg video scaling library"
+	pkg_install() {
+		vmove "usr/lib/libswscale.so.*"
+	}
+}
+
+libswresample4_package() {
+	short_desc="FFmpeg video resampling library"
+	pkg_install() {
+		vmove "usr/lib/libswresample.so.*"
+	}
+}
+
+ffmpeg4-devel_package() {
+	depends="
+		libavcodec4>=${version}_${revision}
+		libavdevice4>=${version}_${revision}
+		libavformat4>=${version}_${revision}
+		libavutil4>=${version}_${revision}
+		libavfilter4>=${version}_${revision}
+		libpostproc4>=${version}_${revision}
+		libswscale4>=${version}_${revision}
+		libswresample4>=${version}_${revision}
+		libavresample4>=${version}_${revision}"
+	short_desc+=" - development files"
+	conflicts="ffmpeg-devel"
+	if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+		# /usr/bin/strip: error: the input file '/destdir//ffmpeg-devel-4.4.4/usr/lib/libavfilter.a(vf_atadenoise.o)' has no sections
+		nostrip_files="/usr/lib/libavfilter.a"
+	fi
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+		vmove usr/share/ffmpeg/examples
+		vmove usr/share/man/man3
+	}
+}
diff --git a/srcpkgs/libavcodec4 b/srcpkgs/libavcodec4
new file mode 120000
index 00000000000000..887f354e7c6be3
--- /dev/null
+++ b/srcpkgs/libavcodec4
@@ -0,0 +1 @@
+ffmpeg4
\ No newline at end of file
diff --git a/srcpkgs/libavdevice4 b/srcpkgs/libavdevice4
new file mode 120000
index 00000000000000..887f354e7c6be3
--- /dev/null
+++ b/srcpkgs/libavdevice4
@@ -0,0 +1 @@
+ffmpeg4
\ No newline at end of file
diff --git a/srcpkgs/libavfilter4 b/srcpkgs/libavfilter4
new file mode 120000
index 00000000000000..887f354e7c6be3
--- /dev/null
+++ b/srcpkgs/libavfilter4
@@ -0,0 +1 @@
+ffmpeg4
\ No newline at end of file
diff --git a/srcpkgs/libavformat4 b/srcpkgs/libavformat4
new file mode 120000
index 00000000000000..887f354e7c6be3
--- /dev/null
+++ b/srcpkgs/libavformat4
@@ -0,0 +1 @@
+ffmpeg4
\ No newline at end of file
diff --git a/srcpkgs/libavresample4 b/srcpkgs/libavresample4
new file mode 120000
index 00000000000000..887f354e7c6be3
--- /dev/null
+++ b/srcpkgs/libavresample4
@@ -0,0 +1 @@
+ffmpeg4
\ No newline at end of file
diff --git a/srcpkgs/libavutil4 b/srcpkgs/libavutil4
new file mode 120000
index 00000000000000..887f354e7c6be3
--- /dev/null
+++ b/srcpkgs/libavutil4
@@ -0,0 +1 @@
+ffmpeg4
\ No newline at end of file
diff --git a/srcpkgs/libpostproc4 b/srcpkgs/libpostproc4
new file mode 120000
index 00000000000000..887f354e7c6be3
--- /dev/null
+++ b/srcpkgs/libpostproc4
@@ -0,0 +1 @@
+ffmpeg4
\ No newline at end of file
diff --git a/srcpkgs/libswresample4 b/srcpkgs/libswresample4
new file mode 120000
index 00000000000000..887f354e7c6be3
--- /dev/null
+++ b/srcpkgs/libswresample4
@@ -0,0 +1 @@
+ffmpeg4
\ No newline at end of file
diff --git a/srcpkgs/libswscale4 b/srcpkgs/libswscale4
new file mode 120000
index 00000000000000..887f354e7c6be3
--- /dev/null
+++ b/srcpkgs/libswscale4
@@ -0,0 +1 @@
+ffmpeg4
\ No newline at end of file

From 392995888216c3d12120187252d59476c6bac7a5 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 19:59:04 -0400
Subject: [PATCH 005/108] opencv: update to 4.7.0.

---
 common/shlibs           | 104 ++++++++++++++++++++--------------------
 srcpkgs/opencv/template |   8 ++--
 2 files changed, 56 insertions(+), 56 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 35ddbb7af4e710..cdac82fba3c73d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2179,58 +2179,58 @@ libcapstone.so.5 capstone-5.0.1_1
 libhavege.so.2 libhaveged-1.9.11_1
 libnih.so.1 libnih-1.0.3_1
 libnih-dbus.so.1 libnih-1.0.3_1
-libopencv_quality.so.406 libopencv-4.6.0_1
-libopencv_reg.so.406 libopencv-4.6.0_1
-libopencv_surface_matching.so.406 libopencv-4.6.0_1
-libopencv_xphoto.so.406 libopencv-4.6.0_1
-libopencv_freetype.so.406 libopencv-4.6.0_1
-libopencv_fuzzy.so.406 libopencv-4.6.0_1
-libopencv_hfs.so.406 libopencv-4.6.0_1
-libopencv_img_hash.so.406 libopencv-4.6.0_1
-libopencv_line_descriptor.so.406 libopencv-4.6.0_1
-libopencv_saliency.so.406 libopencv-4.6.0_1
-libopencv_structured_light.so.406 libopencv-4.6.0_1
-libopencv_aruco.so.406 libopencv-4.6.0_1
-libopencv_bgsegm.so.406 libopencv-4.6.0_1
-libopencv_bioinspired.so.406 libopencv-4.6.0_1
-libopencv_ccalib.so.406 libopencv-4.6.0_1
-libopencv_face.so.406 libopencv-4.6.0_1
-libopencv_tracking.so.406 libopencv-4.6.0_1
-libopencv_xfeatures2d.so.406 libopencv-4.6.0_1
-libopencv_optflow.so.406 libopencv-4.6.0_1
-libopencv_ximgproc.so.406 libopencv-4.6.0_1
-libopencv_plot.so.406 libopencv-4.6.0_1
-libopencv_text.so.406 libopencv-4.6.0_1
-libopencv_ml.so.406 libopencv-4.6.0_1
-libopencv_objdetect.so.406 libopencv-4.6.0_1
-libopencv_dnn.so.406 libopencv-4.6.0_1
-libopencv_shape.so.406 libopencv-4.6.0_1
-libopencv_stitching.so.406 libopencv-4.6.0_1
-libopencv_photo.so.406 libopencv-4.6.0_1
-libopencv_video.so.406 libopencv-4.6.0_1
-libopencv_calib3d.so.406 libopencv-4.6.0_1
-libopencv_features2d.so.406 libopencv-4.6.0_1
-libopencv_flann.so.406 libopencv-4.6.0_1
-libopencv_highgui.so.406 libopencv-4.6.0_1
-libopencv_videoio.so.406 libopencv-4.6.0_1
-libopencv_imgcodecs.so.406 libopencv-4.6.0_1
-libopencv_imgproc.so.406 libopencv-4.6.0_1
-libopencv_core.so.406 libopencv-4.6.0_1
-libopencv_superres.so.406 libopencv-4.6.0_1
-libopencv_videostab.so.406 libopencv-4.6.0_1
-libopencv_gapi.so.406 libopencv-4.6.0_1
-libopencv_xobjdetect.so.406 libopencv-4.6.0_1
-libopencv_datasets.so.406 libopencv-4.6.0_1
-libopencv_dnn_objdetect.so.406 libopencv-4.6.0_1
-libopencv_dnn_superres.so.406 libopencv-4.6.0_1
-libopencv_dpm.so.406 libopencv-4.6.0_1
-libopencv_phase_unwrapping.so.406 libopencv-4.6.0_1
-libopencv_stereo.so.406 libopencv-4.6.0_1
-libopencv_rapid.so.406 libopencv-4.6.0_1
-libopencv_intensity_transform.so.406 libopencv-4.6.0_1
-libopencv_alphamat.so.406 libopencv-4.6.0_1
-libopencv_barcode.so.406 libopencv-4.6.0_1
-libopencv_mcc.so.406 libopencv-4.6.0_1
+libopencv_quality.so.407 libopencv-4.7.0_1
+libopencv_reg.so.407 libopencv-4.7.0_1
+libopencv_surface_matching.so.407 libopencv-4.7.0_1
+libopencv_xphoto.so.407 libopencv-4.7.0_1
+libopencv_freetype.so.407 libopencv-4.7.0_1
+libopencv_fuzzy.so.407 libopencv-4.7.0_1
+libopencv_hfs.so.407 libopencv-4.7.0_1
+libopencv_img_hash.so.407 libopencv-4.7.0_1
+libopencv_line_descriptor.so.407 libopencv-4.7.0_1
+libopencv_saliency.so.407 libopencv-4.7.0_1
+libopencv_structured_light.so.407 libopencv-4.7.0_1
+libopencv_aruco.so.407 libopencv-4.7.0_1
+libopencv_bgsegm.so.407 libopencv-4.7.0_1
+libopencv_bioinspired.so.407 libopencv-4.7.0_1
+libopencv_ccalib.so.407 libopencv-4.7.0_1
+libopencv_face.so.407 libopencv-4.7.0_1
+libopencv_tracking.so.407 libopencv-4.7.0_1
+libopencv_xfeatures2d.so.407 libopencv-4.7.0_1
+libopencv_optflow.so.407 libopencv-4.7.0_1
+libopencv_ximgproc.so.407 libopencv-4.7.0_1
+libopencv_plot.so.407 libopencv-4.7.0_1
+libopencv_text.so.407 libopencv-4.7.0_1
+libopencv_ml.so.407 libopencv-4.7.0_1
+libopencv_objdetect.so.407 libopencv-4.7.0_1
+libopencv_dnn.so.407 libopencv-4.7.0_1
+libopencv_shape.so.407 libopencv-4.7.0_1
+libopencv_stitching.so.407 libopencv-4.7.0_1
+libopencv_photo.so.407 libopencv-4.7.0_1
+libopencv_video.so.407 libopencv-4.7.0_1
+libopencv_calib3d.so.407 libopencv-4.7.0_1
+libopencv_features2d.so.407 libopencv-4.7.0_1
+libopencv_flann.so.407 libopencv-4.7.0_1
+libopencv_highgui.so.407 libopencv-4.7.0_1
+libopencv_videoio.so.407 libopencv-4.7.0_1
+libopencv_imgcodecs.so.407 libopencv-4.7.0_1
+libopencv_imgproc.so.407 libopencv-4.7.0_1
+libopencv_core.so.407 libopencv-4.7.0_1
+libopencv_superres.so.407 libopencv-4.7.0_1
+libopencv_videostab.so.407 libopencv-4.7.0_1
+libopencv_gapi.so.407 libopencv-4.7.0_1
+libopencv_xobjdetect.so.407 libopencv-4.7.0_1
+libopencv_datasets.so.407 libopencv-4.7.0_1
+libopencv_dnn_objdetect.so.407 libopencv-4.7.0_1
+libopencv_dnn_superres.so.407 libopencv-4.7.0_1
+libopencv_dpm.so.407 libopencv-4.7.0_1
+libopencv_phase_unwrapping.so.407 libopencv-4.7.0_1
+libopencv_stereo.so.407 libopencv-4.7.0_1
+libopencv_rapid.so.407 libopencv-4.7.0_1
+libopencv_intensity_transform.so.407 libopencv-4.7.0_1
+libopencv_alphamat.so.407 libopencv-4.7.0_1
+libopencv_barcode.so.407 libopencv-4.7.0_1
+libopencv_mcc.so.407 libopencv-4.7.0_1
 libuniconf.so.4.6 wvstreams-4.6.1_20
 libwvbase.so.4.6 wvstreams-4.6.1_20
 libwvutils.so.4.6 wvstreams-4.6.1_20
diff --git a/srcpkgs/opencv/template b/srcpkgs/opencv/template
index aea4bfc3a265cf..ce94de9424d18d 100644
--- a/srcpkgs/opencv/template
+++ b/srcpkgs/opencv/template
@@ -1,7 +1,7 @@
 # Template file for 'opencv'
 pkgname=opencv
-version=4.6.0
-revision=6
+version=4.7.0
+revision=1
 create_wrksrc=yes
 build_wrksrc=${pkgname}-${version}
 build_style=cmake
@@ -24,8 +24,8 @@ homepage="https://opencv.org"
 changelog="https://github.com/opencv/opencv/wiki/ChangeLog"
 distfiles="https://github.com/opencv/opencv/archive/${version}.tar.gz
  https://github.com/opencv/opencv_contrib/archive/${version}.tar.gz>contrib.tar.gz"
-checksum="1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277
- 1777d5fd2b59029cf537e5fd6f8aa68d707075822f90bde683fcde086f85f7a7"
+checksum="8df0079cdbe179748a18d44731af62a245a45ebf5085223dc03133954c662973
+ 42df840cf9055e59d0e22c249cfb19f04743e1bdad113d31b1573d3934d62584"
 patch_args="-Np1 -d ${build_wrksrc}"
 # tests hang indenfinitely, even with test data included
 make_check=no

From 943f28df4e9b66de66f1e06d59ca59d39d3ff06e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 19:59:45 -0400
Subject: [PATCH 006/108] actiona: revbump for opencv-4.7.0

---
 srcpkgs/actiona/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/actiona/template b/srcpkgs/actiona/template
index cf5f0b7a2ae610..0d899311e6df75 100644
--- a/srcpkgs/actiona/template
+++ b/srcpkgs/actiona/template
@@ -1,7 +1,7 @@
 # Template file for 'actiona'
 pkgname=actiona
 version=3.10.1
-revision=2
+revision=3
 build_style=qmake
 configure_args="PKGCONFIG_OPENCV=opencv4"
 hostmakedepends="pkg-config qt5-plugin-mysql qt5-qmake qt5-host-tools"

From 24fc3d21c755d39a94592c95265ce6598794a050 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 19:59:46 -0400
Subject: [PATCH 007/108] retroshare: revbump for opencv-4.7.0

---
 srcpkgs/retroshare/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/retroshare/template b/srcpkgs/retroshare/template
index 35a2732c77f634..31a40a6ac6d4a7 100644
--- a/srcpkgs/retroshare/template
+++ b/srcpkgs/retroshare/template
@@ -1,7 +1,7 @@
 # Template file for 'retroshare'
 pkgname=retroshare
 version=0.6.6
-revision=4
+revision=5
 build_style=qmake
 #XXX broadcast feature requires an ancient udp-discovery-cpp which either needs
 # to be fetched+patched (FTBFS) here or packaged :/

From 74a9689051e5058897aa0441e461908ea31891e7 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 19:59:46 -0400
Subject: [PATCH 008/108] waifu2x-converter-cpp: revbump for opencv-4.7.0

---
 srcpkgs/waifu2x-converter-cpp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/waifu2x-converter-cpp/template b/srcpkgs/waifu2x-converter-cpp/template
index 361b8a23b94977..c5ac17eb54ea4c 100644
--- a/srcpkgs/waifu2x-converter-cpp/template
+++ b/srcpkgs/waifu2x-converter-cpp/template
@@ -1,7 +1,7 @@
 # Template file for 'waifu2x-converter-cpp'
 pkgname=waifu2x-converter-cpp
 version=5.2.4
-revision=2
+revision=3
 build_style=cmake
 configure_args="-DINSTALL_MODELS=ON"
 hostmakedepends="pkg-config"

From 934696596738b95320674274b53c1d02a0452aa5 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:00:38 -0400
Subject: [PATCH 009/108] vlc: revbump for ffmpeg4

---
 srcpkgs/vlc/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/vlc/template b/srcpkgs/vlc/template
index 559b1c4fff339f..fc399f1a6e9bfc 100644
--- a/srcpkgs/vlc/template
+++ b/srcpkgs/vlc/template
@@ -1,7 +1,7 @@
 # Template file for 'vlc'
 pkgname=vlc
 version=3.0.20
-revision=4
+revision=5
 build_style=gnu-configure
 configure_args="--disable-gme --disable-libtar --enable-jack
  --enable-live555 --disable-fluidsynth --enable-dvdread
@@ -25,7 +25,7 @@ lib32disabled=yes
 hostmakedepends="automake libtool pkg-config flex gettext libgcrypt-devel
  live555-devel gettext-devel $(vopt_if lua lua52) $(vopt_if chromecast protobuf)"
 makedepends="
- avahi-libs-devel dbus-glib-devel faad2-devel ffmpeg-devel freefont-ttf
+ avahi-libs-devel dbus-glib-devel faad2-devel ffmpeg4-devel freefont-ttf
  gnutls-devel jack-devel liba52-devel libass-devel libbluray-devel
  libcdio-devel libdca-devel libdvbpsi-devel libdvdnav-devel libmad-devel
  libmatroska-devel libmodplug-devel libmpcdec-devel libmpeg2-devel

From eb583e3362e3797ed959e8e5f2a4b6a22d83f8ed Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:00:55 -0400
Subject: [PATCH 010/108] osg: revbump for ffmpeg4

---
 srcpkgs/osg/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 8ef0efc599a1b1..a131ceaf7a867b 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -8,7 +8,7 @@ build_helper="qemu"
 configure_args="-DLIB_POSTFIX="
 hostmakedepends="pkg-config xrandr"
 makedepends="MesaLib-devel gtkglext-devel libcurl-devel giflib-devel librsvg-devel
- jasper-devel tiff-devel libgdal-devel libgta-devel ffmpeg-devel xine-lib-devel
+ jasper-devel tiff-devel libgdal-devel libgta-devel ffmpeg4-devel xine-lib-devel
  SDL2-devel gst-plugins-base1-devel
  $(vopt_if openexr libopenexr-devel)
  $(vopt_if poppler poppler-glib-devel)

From df1a0518af80e5528f2bcec46e965d615f25e59b Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:13 -0400
Subject: [PATCH 011/108] xine-lib: revbump for ffmpeg4

---
 srcpkgs/xine-lib/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/xine-lib/template b/srcpkgs/xine-lib/template
index 3be4d08eac77a3..ed6194c17d11e8 100644
--- a/srcpkgs/xine-lib/template
+++ b/srcpkgs/xine-lib/template
@@ -1,14 +1,14 @@
 # Template file for 'xine-lib'
 pkgname=xine-lib
-version=1.2.12
-revision=3
+version=1.2.13
+revision=1
 build_style=gnu-configure
 configure_args="--disable-vcd --disable-gnomevfs --without-esound --disable-dxr3
  --disable-oss"
 hostmakedepends="automake gettext-devel libtool pkg-config perl"
 makedepends="
  zlib-devel alsa-lib-devel libxcb-devel libSM-devel libXext-devel libXv-devel
- libXvMC-devel liba52-devel libmad-devel ffmpeg-devel pulseaudio-devel
+ libXvMC-devel liba52-devel libmad-devel ffmpeg4-devel pulseaudio-devel
  jack-devel samba-devel libflac-devel libmodplug-devel libmpcdec-devel
  speex-devel libtheora-devel libvorbis-devel libdca-devel faad2-devel
  libcdio-devel libbluray-devel aalib-devel libcaca-devel libXinerama-devel
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later, LGPL-2.0-or-later"
 homepage="http://www.xine-project.org"
 changelog="https://sourceforge.net/projects/xine/files/xine-lib/${version}/README.txt/view"
 distfiles="${SOURCEFORGE_SITE}/xine/${pkgname}-${version}.tar.xz"
-checksum=d606270468e1540c2a89c0d7f5fdf11e17ecc0c2698cc0bcb1065ff26abee098
+checksum=5f10d6d718a4a51c17ed1b32b031d4f9b80b061e8276535b2be31e5ac4b75e6f
 
 case "$XBPS_TARGET_MACHINE" in
 	i686-musl)

From 0a4c2cea761518c71b53760155f681c39dc482db Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:45 -0400
Subject: [PATCH 012/108] attract: revbump for ffmpeg6

---
 srcpkgs/attract/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/attract/template b/srcpkgs/attract/template
index e769fb15456217..776cbe4ebd2c93 100644
--- a/srcpkgs/attract/template
+++ b/srcpkgs/attract/template
@@ -1,7 +1,7 @@
 # Template file for 'attract'
 pkgname=attract
 version=2.7.0
-revision=1
+revision=2
 build_style=gnu-makefile
 make_build_args="VERBOSE=1"
 make_use_env=yes

From 9ee9722b3209403cf43843ad05d05c989bdae993 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:45 -0400
Subject: [PATCH 013/108] aubio: revbump for ffmpeg6

---
 srcpkgs/aubio/patches/ffmpeg5.patch | 25 +++++++++++++++++++++++++
 srcpkgs/aubio/template              |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/aubio/patches/ffmpeg5.patch

diff --git a/srcpkgs/aubio/patches/ffmpeg5.patch b/srcpkgs/aubio/patches/ffmpeg5.patch
new file mode 100644
index 00000000000000..aace41a6e6d9a4
--- /dev/null
+++ b/srcpkgs/aubio/patches/ffmpeg5.patch
@@ -0,0 +1,25 @@
+From 8a05420e5dd8c7b8b2447f82dc919765876511b3 Mon Sep 17 00:00:00 2001
+From: Paul Brossier <piem@piem.org>
+Date: Tue, 25 Jan 2022 18:30:27 +0100
+Subject: [PATCH] [source_avcodec] define FF_API_LAVF_AVCTX for libavcodec >
+ 59, thx @berolinux (closes gh-353)
+
+---
+ src/io/source_avcodec.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c
+index e0ae93b5..1421bd9a 100644
+--- a/src/io/source_avcodec.c
++++ b/src/io/source_avcodec.c
+@@ -68,6 +68,10 @@
+ #define AUBIO_AVCODEC_MAX_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE
+ #endif
+ 
++#if LIBAVCODEC_VERSION_MAJOR >= 59
++#define FF_API_LAVF_AVCTX 1
++#endif
++
+ struct _aubio_source_avcodec_t {
+   uint_t hop_size;
+   uint_t samplerate;
diff --git a/srcpkgs/aubio/template b/srcpkgs/aubio/template
index ad1c4b25699178..7d875cc02541a7 100644
--- a/srcpkgs/aubio/template
+++ b/srcpkgs/aubio/template
@@ -1,7 +1,7 @@
 # Template file for 'aubio'
 pkgname=aubio
 version=0.4.9
-revision=1
+revision=2
 build_style=waf3
 # XXX lash, pure and swig support.
 hostmakedepends="pkg-config txt2man"

From 1a0cfb049aeb2579aeba194137e3c9261f70a5fb Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:45 -0400
Subject: [PATCH 014/108] audacious-plugins: revbump for ffmpeg6

---
 .../audacious-plugins/patches/ffmpeg5.patch   | 43 +++++++++++++++++++
 srcpkgs/audacious-plugins/template            |  2 +-
 2 files changed, 44 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/audacious-plugins/patches/ffmpeg5.patch

diff --git a/srcpkgs/audacious-plugins/patches/ffmpeg5.patch b/srcpkgs/audacious-plugins/patches/ffmpeg5.patch
new file mode 100644
index 00000000000000..4e5e34099d71c4
--- /dev/null
+++ b/srcpkgs/audacious-plugins/patches/ffmpeg5.patch
@@ -0,0 +1,43 @@
+commit 298aa371c56c2f52c25a33d9bdec4918b11cebdc
+Author: tibequadorian <tibequadorian@posteo.de>
+Date:   Sat Mar 19 18:40:12 2022 +0100
+
+    audacious-plugins: rebuild against ffmpeg-5.0
+
+diff --git a/srcpkgs/audacious-plugins/patches/ffmpeg-5.0.patch b/srcpkgs/audacious-plugins/patches/ffmpeg-5.0.patch
+new file mode 100644
+index 0000000000..617c11215b
+--- /dev/null
++++ b/srcpkgs/audacious-plugins/patches/ffmpeg-5.0.patch
+@@ -0,0 +1,31 @@
++From f60beb400eeb1e4778bbfd738bc4a4ccef3de539 Mon Sep 17 00:00:00 2001
++From: John Lindgren <john@jlindgren.net>
++Date: Sat, 5 Mar 2022 12:05:34 -0500
++Subject: [PATCH] Fix build with FFmpeg 5.0
++
++---
++ src/ffaudio/ffaudio-core.cc | 4 ++--
++ 1 file changed, 2 insertions(+), 2 deletions(-)
++
++diff --git a/src/ffaudio/ffaudio-core.cc b/src/ffaudio/ffaudio-core.cc
++index 16dc63e3a..a2b95fd6c 100644
++--- a/src/ffaudio/ffaudio-core.cc
+++++ b/src/ffaudio/ffaudio-core.cc
++@@ -274,7 +274,7 @@ static AVInputFormat * get_format_by_content (const char * name, VFSFile & file)
++         AVProbeData d = {name, buf, filled};
++         score = target;
++ 
++-        f = av_probe_input_format2 (& d, true, & score);
+++        f = (AVInputFormat *) av_probe_input_format2 (& d, true, & score);
++         if (f)
++             break;
++ 
++@@ -347,7 +347,7 @@ static bool find_codec (AVFormatContext * c, CodecInfo * cinfo)
++ #endif
++         if (stream && stream->codecpar && stream->codecpar->codec_type == AVMEDIA_TYPE_AUDIO)
++         {
++-            AVCodec * codec = avcodec_find_decoder (stream->codecpar->codec_id);
+++            AVCodec * codec = (AVCodec *) avcodec_find_decoder (stream->codecpar->codec_id);
++ 
++             if (codec)
++             {
diff --git a/srcpkgs/audacious-plugins/template b/srcpkgs/audacious-plugins/template
index 05e53a9adf78ff..4b1968e03de781 100644
--- a/srcpkgs/audacious-plugins/template
+++ b/srcpkgs/audacious-plugins/template
@@ -2,7 +2,7 @@
 #Keep in sync with audacious!
 pkgname=audacious-plugins
 version=4.3.1
-revision=3
+revision=4
 build_style=meson
 configure_args="$(vopt_bool gtk3 gtk) $(vopt_bool gtk3)
  $(vopt_bool qt) $(vopt_bool qt qt6)"

From ff03c3b7713f5db1570a07e1cb15d0f817d16492 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:45 -0400
Subject: [PATCH 015/108] audacity: revbump for ffmpeg6

---
 srcpkgs/audacity/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/audacity/template b/srcpkgs/audacity/template
index 7b838119ab2611..84b49305edcef1 100644
--- a/srcpkgs/audacity/template
+++ b/srcpkgs/audacity/template
@@ -1,7 +1,7 @@
 # Template file for 'audacity'
 pkgname=audacity
 version=3.4.2
-revision=1
+revision=2
 build_style=cmake
 build_helper="cmake-wxWidgets-gtk3 qemu"
 configure_args="-Daudacity_use_ffmpeg=loaded -Daudacity_lib_preference=system

From a2ae5058e5b6e77357224c1a34c6c0903d77025a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:45 -0400
Subject: [PATCH 016/108] avidemux: revbump for ffmpeg6

---
 srcpkgs/avidemux/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/avidemux/template b/srcpkgs/avidemux/template
index 253a0243e22599..557285982d2b8f 100644
--- a/srcpkgs/avidemux/template
+++ b/srcpkgs/avidemux/template
@@ -1,7 +1,7 @@
 # Template file for 'avidemux'
 pkgname=avidemux
 version=2.8.0
-revision=2
+revision=3
 # Can't be compiled for aarch64, arm* or mips*
 archs="x86_64* i686*"
 hostmakedepends="cmake pkg-config qt5-host-tools qt5-devel tar yasm"

From 72e6a683c067a871b3cd1970037e682853cd6ed7 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 017/108] blender: revbump for ffmpeg6

---
 srcpkgs/blender/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/blender/template b/srcpkgs/blender/template
index 68787b76a26c18..e2e090e6dfa41c 100644
--- a/srcpkgs/blender/template
+++ b/srcpkgs/blender/template
@@ -1,7 +1,7 @@
 # Template file for 'blender'
 pkgname=blender
 version=4.0.2
-revision=2
+revision=3
 archs="x86_64* ppc64*"
 build_style="cmake"
 pycompile_dirs="usr/share/blender/${version%.*}/scripts"

From 2062077e5d66895acb778ec18be76220f221653d Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 018/108] cantata: revbump for ffmpeg6

---
 srcpkgs/cantata/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cantata/template b/srcpkgs/cantata/template
index 4b417d80d5c2da..8a90aaa4c07a2a 100644
--- a/srcpkgs/cantata/template
+++ b/srcpkgs/cantata/template
@@ -1,7 +1,7 @@
 # Template file for 'cantata'
 pkgname=cantata
 version=2.5.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="pkg-config qt5-qmake qt5-host-tools qt5-tools"
 makedepends="qt5-devel qt5-tools-devel qt5-svg-devel qt5-xmlpatterns-devel

From 9c6b24f2defa6da9610c529eebb4c563548e8e9c Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 019/108] ccextractor: revbump for ffmpeg6

---
 ...5-and-tesseract-5-compatibility-1479.patch | 168 ++++++++++++++++++
 srcpkgs/ccextractor/template                  |   2 +-
 2 files changed, 169 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/ccextractor/patches/0001-fix-ffmpeg-5-and-tesseract-5-compatibility-1479.patch

diff --git a/srcpkgs/ccextractor/patches/0001-fix-ffmpeg-5-and-tesseract-5-compatibility-1479.patch b/srcpkgs/ccextractor/patches/0001-fix-ffmpeg-5-and-tesseract-5-compatibility-1479.patch
new file mode 100644
index 00000000000000..bcab4890554b9a
--- /dev/null
+++ b/srcpkgs/ccextractor/patches/0001-fix-ffmpeg-5-and-tesseract-5-compatibility-1479.patch
@@ -0,0 +1,168 @@
+From b1cbfcea9b9c687143bf0d80bc179b563e99d025 Mon Sep 17 00:00:00 2001
+From: Prateek Sunal <prtksunal@gmail.com>
+Date: Thu, 9 Mar 2023 01:44:53 +0530
+Subject: [PATCH] fix: ffmpeg 5 and tesseract 5 compatibility (#1479)
+
+* fix: replace deprecated `codec` property with `codecpar`
+
+* fix: replace deprecated method `avcodec_decode_video2` with `avcodec_receive_frame` and `avcodec_send_packet`
+
+* Update CHANGES.TXT
+
+* fix: remove deprecated `av_register_all` function
+
+* fix: formatting
+
+* fix: add support for tesseract 5
+
+* fix: tesseract v5
+
+* fix: hardsubx codec context error
+
+* fix: lint const warning
+---
+ docs/CHANGES.TXT               |  1 +
+ src/lib_ccx/ffmpeg_intgr.c     |  7 +++---
+ src/lib_ccx/hardsubx.c         | 25 ++++++++++++------
+ src/lib_ccx/hardsubx_decoder.c | 27 ++++++++------------
+ src/lib_ccx/ocr.c              | 46 ++++++++++++----------------------
+ 5 files changed, 47 insertions(+), 59 deletions(-)
+
+diff --git a/src/lib_ccx/ffmpeg_intgr.c b/src/lib_ccx/ffmpeg_intgr.c
+index be988890..e6f21e20 100644
+--- a/src/lib_ccx/ffmpeg_intgr.c
++++ b/src/lib_ccx/ffmpeg_intgr.c
+@@ -66,7 +66,6 @@ void *init_ffmpeg(const char *path)
+ 	struct ffmpeg_ctx *ctx;
+ 	AVCodec *dec = NULL;
+ 	avcodec_register_all();
+-	av_register_all();
+ 
+ 	if (ccx_options.debug_mask & CCX_DMT_VERBOSE)
+ 		av_log_set_level(AV_LOG_INFO);
+@@ -133,7 +132,6 @@ int ff_get_ccframe(void *arg, unsigned char *data, int maxlen)
+ 	struct ffmpeg_ctx *ctx = arg;
+ 	int len = 0;
+ 	int ret = 0;
+-	int got_frame;
+ 	AVPacket packet;
+ 
+ 	ret = av_read_frame(ctx->ifmt, &packet);
+@@ -151,12 +149,13 @@ int ff_get_ccframe(void *arg, unsigned char *data, int maxlen)
+ 		return AVERROR(EAGAIN);
+ 	}
+ 
+-	ret = avcodec_decode_video2(ctx->dec_ctx, ctx->frame, &got_frame, &packet);
++	avcodec_send_packet(ctx->codec_ctx, &ctx->packet);
++	ret = avcodec_receive_frame(ctx->dec_ctx, ctx->frame);
+ 	if (ret < 0)
+ 	{
+ 		av_log(NULL, AV_LOG_ERROR, "unable to decode packet\n");
+ 	}
+-	else if (!got_frame)
++	else if (ret != 0)
+ 	{
+ 		return AVERROR(EAGAIN);
+ 	}
+diff --git a/src/lib_ccx/hardsubx.c b/src/lib_ccx/hardsubx.c
+index 411377f9..fb844c91 100644
+--- a/src/lib_ccx/hardsubx.c
++++ b/src/lib_ccx/hardsubx.c
+@@ -12,9 +12,6 @@
+
+ int hardsubx_process_data(struct lib_hardsubx_ctx *ctx)
+ {
+-	// Get the required media attributes and initialize structures
+-	av_register_all();
+-
+ 	if (avformat_open_input(&ctx->format_ctx, ctx->inputfile[0], NULL, NULL) != 0)
+ 	{
+ 		fatal(EXIT_READ_ERROR, "Error reading input file!\n");
+@@ -32,7 +29,7 @@
+ 	ctx->video_stream_id = -1;
+ 	for (int i = 0; i < ctx->format_ctx->nb_streams; i++)
+ 	{
+-		if (ctx->format_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
++		if (ctx->format_ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
+ 		{
+ 			ctx->video_stream_id = i;
+ 			break;
+@@ -43,8 +40,21 @@
+ 		fatal(EXIT_READ_ERROR, "Video Stream not found!\n");
+ 	}
+
+-	ctx->codec_ctx = ctx->format_ctx->streams[ctx->video_stream_id]->codec;
+-	ctx->codec = avcodec_find_decoder(ctx->codec_ctx->codec_id);
++	ctx->codec_ctx = avcodec_alloc_context3(NULL);
++	if (!ctx->codec_ctx)
++	{
++		    fatal(EXIT_NOT_ENOUGH_MEMORY, "Could not allocate codec context!\n");
++	}
++
++	// Assign codec parameters to codec context
++	if (avcodec_parameters_to_context(ctx->codec_ctx, ctx->format_ctx->streams[ctx->video_stream_id]->codecpar) < 0)
++	{
++		    fatal(EXIT_READ_ERROR, "Could not initialize codec context!\n");
++	}
++
++	// Find decoder for the codec context
++	ctx->codec = (AVCodec *)avcodec_find_decoder(ctx->codec_ctx->codec_id);
++
+ 	if (ctx->codec == NULL)
+ 	{
+ 		fatal(EXIT_READ_ERROR, "Input codec is not supported!\n");
+diff --git a/src/lib_ccx/hardsubx_decoder.c b/src/lib_ccx/hardsubx_decoder.c
+index bd9b0980..b5dfaec4 100644
+--- a/src/lib_ccx/hardsubx_decoder.c
++++ b/src/lib_ccx/hardsubx_decoder.c
+@@ -371,7 +371,6 @@
+ int hardsubx_process_frames_tickertext(struct lib_hardsubx_ctx *ctx, struct encoder_ctx *enc_ctx)
+ {
+ 	// Search for ticker text at the bottom of the screen, such as in Russia TV1 or stock prices
+-	int got_frame;
+ 	int cur_sec = 0, total_sec, progress;
+ 	int frame_number = 0;
+ 	char *ticker_text = NULL;
+@@ -382,8 +381,8 @@
+ 		{
+ 			frame_number++;
+ 			//Decode the video stream packet
+-			avcodec_decode_video2(ctx->codec_ctx, ctx->frame, &got_frame, &ctx->packet);
+-			if (got_frame && frame_number % 1000 == 0)
++      avcodec_send_packet(ctx->codec_ctx, &ctx->packet);
++      if (avcodec_receive_frame(ctx->codec_ctx, ctx->frame) == 0 && frame_number % 1000 == 0)
+ 			{
+ 				// sws_scale is used to convert the pixel format to RGB24 from all other cases
+ 				sws_scale(
+@@ -434,9 +433,8 @@
+ 			frame_number++;
+
+ 			//Decode the video stream packet
+-			avcodec_decode_video2(ctx->codec_ctx, ctx->frame, &got_frame, &ctx->packet);
+-
+-			if (got_frame && frame_number % 25 == 0)
++			avcodec_send_packet(ctx->codec_ctx, &ctx->packet);
++      if (avcodec_receive_frame(ctx->codec_ctx, ctx->frame) == 0 && frame_number % 25 == 0)
+ 			{
+ 				float diff = (float)convert_pts_to_ms(ctx->packet.pts - prev_packet_pts, ctx->format_ctx->streams[ctx->video_stream_id]->time_base);
+ 				if (fabsf(diff) < 1000 * ctx->min_sub_duration) //If the minimum duration of a subtitle line is exceeded, process packet
+@@ -548,7 +546,6 @@
+ {
+ 	// Do a binary search over the input video for faster processing
+ 	// printf("Duration: %d\n", (int)ctx->format_ctx->duration);
+-	int got_frame;
+ 	int seconds_time = 0;
+ 	for (seconds_time = 0; seconds_time < 20; seconds_time++)
+ 	{
+@@ -568,8 +565,9 @@
+ 			{
+ 				if (ctx->packet.stream_index == ctx->video_stream_id)
+ 				{
+-					avcodec_decode_video2(ctx->codec_ctx, ctx->frame, &got_frame, &ctx->packet);
+-					if (got_frame)
++          avcodec_send_packet(ctx->codec_ctx, &ctx->packet);
++          if (avcodec_receive_frame(ctx->codec_ctx, ctx->frame) == 0)
++
+ 					{
+ 						// printf("%d\n", seek_time);
+ 						if (ctx->packet.pts < seek_time)
diff --git a/srcpkgs/ccextractor/template b/srcpkgs/ccextractor/template
index 84059ffd02398a..a670758bcbe41b 100644
--- a/srcpkgs/ccextractor/template
+++ b/srcpkgs/ccextractor/template
@@ -1,7 +1,7 @@
 # Template file for 'ccextractor'
 pkgname=ccextractor
 version=0.93
-revision=2
+revision=3
 build_wrksrc="linux"
 build_style=gnu-configure
 configure_args="--enable-ocr --enable-hardsubx"

From 1436ce82948a74b788312203c883d90d861bba1c Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 020/108] chromaprint: revbump for ffmpeg6

---
 srcpkgs/chromaprint/patches/ffmpeg5.patch | 569 ++++++++++++++++++++++
 srcpkgs/chromaprint/template              |   2 +-
 2 files changed, 570 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/chromaprint/patches/ffmpeg5.patch

diff --git a/srcpkgs/chromaprint/patches/ffmpeg5.patch b/srcpkgs/chromaprint/patches/ffmpeg5.patch
new file mode 100644
index 00000000000000..a9fd307a23c8a4
--- /dev/null
+++ b/srcpkgs/chromaprint/patches/ffmpeg5.patch
@@ -0,0 +1,569 @@
+From 8ccad6937177b1b92e40ab8f4447ea27bac009a7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= <lalinsky@gmail.com>
+Date: Fri, 4 Nov 2022 21:47:38 +0100
+Subject: [PATCH] Use FFmpeg 5.x (#120)
+
+* Use FFmpeg 5.1.2 for CI builds
+
+* Build on Ubuntu 20.04
+
+* Upgrade code to FFmpeg 5.x APIs
+
+* Only set FFmpeg include dirs if building tools
+
+* No longer needed
+
+* Use ubuntu 20.04
+---
+ .github/workflows/build.yml                   |   6 +-
+ CMakeLists.txt                                |  16 --
+ package/build.sh                              |   4 +-
+ src/audio/ffmpeg_audio_processor.h            |   2 -
+ src/audio/ffmpeg_audio_processor_avresample.h |  72 -------
+ src/audio/ffmpeg_audio_processor_swresample.h |  18 +-
+ src/audio/ffmpeg_audio_reader.h               | 197 +++++++++---------
+ tests/CMakeLists.txt                          |   6 +
+ 8 files changed, 122 insertions(+), 199 deletions(-)
+ delete mode 100644 src/audio/ffmpeg_audio_processor_avresample.h
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f8d6a32..4da2405 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -84,9 +84,6 @@ find_package(FFmpeg)
+ if(FFMPEG_LIBRARIES)
+ 	cmake_push_check_state(RESET)
+ 	set(CMAKE_REQUIRED_LIBRARIES ${FFMPEG_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} -lm)
+-	check_function_exists(av_packet_unref HAVE_AV_PACKET_UNREF)
+-	check_function_exists(av_frame_alloc HAVE_AV_FRAME_ALLOC)
+-	check_function_exists(av_frame_free HAVE_AV_FRAME_FREE)
+ 	cmake_pop_check_state()
+ endif()
+
+@@ -163,14 +160,11 @@ message(STATUS "Using ${FFT_LIB} for FFT calculations")
+ if(NOT AUDIO_PROCESSOR_LIB)
+ 	if(FFMPEG_LIBSWRESAMPLE_FOUND)
+ 		set(AUDIO_PROCESSOR_LIB "swresample")
+-	elseif(FFMPEG_LIBAVRESAMPLE_FOUND)
+-		set(AUDIO_PROCESSOR_LIB "avresample")
+ 	endif()
+ endif()
+
+ if(AUDIO_PROCESSOR_LIB STREQUAL "swresample")
+ 	if(FFMPEG_LIBSWRESAMPLE_FOUND)
+-		set(USE_AVRESAMPLE OFF)
+ 		set(USE_SWRESAMPLE ON)
+ 		set(AUDIO_PROCESSOR_LIBRARIES ${FFMPEG_LIBSWRESAMPLE_LIBRARIES})
+ 		set(AUDIO_PROCESSOR_INCLUDE_DIRS ${FFMPEG_LIBSWRESAMPLE_INCLUDE_DIRS})
+@@ -178,16 +172,6 @@ if(AUDIO_PROCESSOR_LIB STREQUAL "swresample")
+ 		message(FATAL_ERROR "Selected ${AUDIO_PROCESSOR_LIB} for audio processing, but the library is not found")
+ 	endif()
+ 	message(STATUS "Using ${AUDIO_PROCESSOR_LIB} for audio conversion")
+-elseif(AUDIO_PROCESSOR_LIB STREQUAL "avresample")
+-	if(FFMPEG_LIBAVRESAMPLE_FOUND)
+-		set(USE_AVRESAMPLE ON)
+-		set(USE_SWRESAMPLE OFF)
+-		set(AUDIO_PROCESSOR_LIBRARIES ${FFMPEG_LIBAVRESAMPLE_LIBRARIES})
+-		set(AUDIO_PROCESSOR_INCLUDE_DIRS ${FFMPEG_LIBAVRESAMPLE_INCLUDE_DIRS})
+-	else()
+-		message(FATAL_ERROR "Selected ${AUDIO_PROCESSOR_LIB} for audio processing, but the library is not found")
+-	endif()
+-	message(STATUS "Using ${AUDIO_PROCESSOR_LIB} for audio conversion")
+ else()
+ 	message(STATUS "Building without audio conversion support, please install FFmpeg with libswresample")
+ endif()
+diff --git a/package/build.sh b/package/build.sh
+index da631ae..b41d36e 100755
+--- a/package/build.sh
++++ b/package/build.sh
+@@ -7,8 +7,8 @@ set -eux
+
+ BASE_DIR=$(cd $(dirname $0)/.. && pwd)
+
+-FFMPEG_VERSION=4.4.1
+-FFMPEG_BUILD_TAG=v4.4.1-1
++FFMPEG_VERSION=5.1.2
++FFMPEG_BUILD_TAG=v${FFMPEG_VERSION}-1
+
+ TMP_BUILD_DIR=$BASE_DIR/$(mktemp -d build.XXXXXXXX)
+ trap 'rm -rf $TMP_BUILD_DIR' EXIT
+diff --git a/src/audio/ffmpeg_audio_processor.h b/src/audio/ffmpeg_audio_processor.h
+index 7628fc7..39f4f6d 100644
+--- a/src/audio/ffmpeg_audio_processor.h
++++ b/src/audio/ffmpeg_audio_processor.h
+@@ -10,8 +10,6 @@
+
+ #if defined(USE_SWRESAMPLE)
+ #include "audio/ffmpeg_audio_processor_swresample.h"
+-#elif defined(USE_AVRESAMPLE)
+-#include "audio/ffmpeg_audio_processor_avresample.h"
+ #else
+ #error "no audio processing library"
+ #endif
+diff --git a/src/audio/ffmpeg_audio_processor_avresample.h b/src/audio/ffmpeg_audio_processor_avresample.h
+deleted file mode 100644
+index bd85f92..0000000
+--- a/src/audio/ffmpeg_audio_processor_avresample.h
++++ /dev/null
+@@ -1,72 +0,0 @@
+-// Copyright (C) 2016  Lukas Lalinsky
+-// Distributed under the MIT license, see the LICENSE file for details.
+-
+-#ifndef CHROMAPRINT_AUDIO_FFMPEG_AUDIO_PROCESSOR_AVRESAMPLE_H_
+-#define CHROMAPRINT_AUDIO_FFMPEG_AUDIO_PROCESSOR_AVRESAMPLE_H_
+-
+-extern "C" {
+-#include <libavresample/avresample.h>
+-}
+-
+-namespace chromaprint {
+-
+-class FFmpegAudioProcessor {
+-public:
+-	FFmpegAudioProcessor() {
+-		m_resample_ctx = avresample_alloc_context();
+-	}
+-
+-	~FFmpegAudioProcessor() {
+-		avresample_free(&m_resample_ctx);
+-	}
+-
+-	void SetCompatibleMode() {
+-		av_opt_set_int(m_resample_ctx, "filter_size", 16, 0);
+-		av_opt_set_int(m_resample_ctx, "phase_shift", 8, 0);
+-		av_opt_set_int(m_resample_ctx, "linear_interp", 1, 0);
+-		av_opt_set_double(m_resample_ctx, "cutoff", 0.8, 0);
+-	}
+-
+-	void SetInputChannelLayout(int64_t channel_layout) {
+-		av_opt_set_int(m_resample_ctx, "in_channel_layout", channel_layout, 0);
+-	}
+-
+-	void SetInputSampleFormat(AVSampleFormat sample_format) {
+-		av_opt_set_int(m_resample_ctx, "in_sample_fmt", sample_format, 0);
+-	}
+-
+-	void SetInputSampleRate(int sample_rate) {
+-		av_opt_set_int(m_resample_ctx, "in_sample_rate", sample_rate, 0);
+-	}
+-
+-	void SetOutputChannelLayout(int64_t channel_layout) {
+-		av_opt_set_int(m_resample_ctx, "out_channel_layout", channel_layout, 0);
+-	}
+-
+-	void SetOutputSampleFormat(AVSampleFormat sample_format) {
+-		av_opt_set_int(m_resample_ctx, "out_sample_fmt", sample_format, 0);
+-	}
+-
+-	void SetOutputSampleRate(int sample_rate) {
+-		av_opt_set_int(m_resample_ctx, "out_sample_fmt", sample_rate, 0);
+-	}
+-
+-	int Init() {
+-		return avresample_open(m_resample_ctx);
+-	}
+-
+-	int Convert(uint8_t **out, int out_count, const uint8_t **in, int in_count) {
+-		return avresample_convert(m_resample_ctx, out, 0, out_count, (uint8_t **) in, 0, in_count);
+-	}
+-
+-	int Flush(uint8_t **out, int out_count) {
+-		return avresample_read(m_resample_ctx, out, out_count);
+-	}
+-
+-private:
+-	AVAudioResampleContext *m_resample_ctx = nullptr;
+-};
+-
+-}; // namespace chromaprint
+-
+-#endif
+diff --git a/src/audio/ffmpeg_audio_processor_swresample.h b/src/audio/ffmpeg_audio_processor_swresample.h
+index b86266b..b1d4bea 100644
+--- a/src/audio/ffmpeg_audio_processor_swresample.h
++++ b/src/audio/ffmpeg_audio_processor_swresample.h
+@@ -28,30 +28,28 @@ public:
+ 		av_opt_set_double(m_swr_ctx, "cutoff", 0.8, 0);
+ 	}
+
+-	void SetInputChannelLayout(int64_t channel_layout) {
+-		av_opt_set_int(m_swr_ctx, "icl", channel_layout, 0);
+-		av_opt_set_int(m_swr_ctx, "ich", av_get_channel_layout_nb_channels(channel_layout), 0);
++	void SetInputChannelLayout(AVChannelLayout *channel_layout) {
++		av_opt_set_int(m_swr_ctx, "in_channel_layout", channel_layout->u.mask, 0);
+ 	}
+
+ 	void SetInputSampleFormat(AVSampleFormat sample_format) {
+-		av_opt_set_int(m_swr_ctx, "isf", sample_format, 0);
++		av_opt_set_sample_fmt(m_swr_ctx, "in_sample_fmt", sample_format, 0);
+ 	}
+
+ 	void SetInputSampleRate(int sample_rate) {
+-		av_opt_set_int(m_swr_ctx, "isr", sample_rate, 0);
++		av_opt_set_int(m_swr_ctx, "in_sample_rate", sample_rate, 0);
+ 	}
+
+-	void SetOutputChannelLayout(int64_t channel_layout) {
+-		av_opt_set_int(m_swr_ctx, "ocl", channel_layout, 0);
+-		av_opt_set_int(m_swr_ctx, "och", av_get_channel_layout_nb_channels(channel_layout), 0);
++	void SetOutputChannelLayout(AVChannelLayout *channel_layout) {
++		av_opt_set_int(m_swr_ctx, "out_channel_layout", channel_layout->u.mask, 0);
+ 	}
+
+ 	void SetOutputSampleFormat(AVSampleFormat sample_format) {
+-		av_opt_set_int(m_swr_ctx, "osf", sample_format, 0);
++		av_opt_set_sample_fmt(m_swr_ctx, "out_sample_fmt", sample_format, 0);
+ 	}
+
+ 	void SetOutputSampleRate(int sample_rate) {
+-		av_opt_set_int(m_swr_ctx, "osr", sample_rate, 0);
++		av_opt_set_int(m_swr_ctx, "out_sample_rate", sample_rate, 0);
+ 	}
+
+ 	int Init() {
+diff --git a/src/audio/ffmpeg_audio_reader.h b/src/audio/ffmpeg_audio_reader.h
+index 5550164..1c6b346 100644
+--- a/src/audio/ffmpeg_audio_reader.h
++++ b/src/audio/ffmpeg_audio_reader.h
+@@ -62,7 +62,7 @@ public:
+ 	bool Read(const int16_t **data, size_t *size);
+
+ 	bool IsOpen() const { return m_opened; }
+-	bool IsFinished() const { return m_finished && !m_got_frame; }
++	bool IsFinished() const { return !m_has_more_packets && !m_has_more_frames; }
+
+ 	std::string GetError() const { return m_error; }
+ 	int GetErrorCode() const { return m_error_code; }
+@@ -74,20 +74,19 @@ private:
+ 	uint8_t *m_convert_buffer[1] = { nullptr };
+ 	int m_convert_buffer_nb_samples = 0;
+
+-	AVInputFormat *m_input_fmt = nullptr;
++	const AVInputFormat *m_input_fmt = nullptr;
+ 	AVDictionary *m_input_opts = nullptr;
+
+ 	AVFormatContext *m_format_ctx = nullptr;
+ 	AVCodecContext *m_codec_ctx = nullptr;
+-	AVFrame *m_frame = nullptr;
+ 	int m_stream_index = -1;
+ 	std::string m_error;
+ 	int m_error_code = 0;
+-	bool m_finished = false;
+ 	bool m_opened = false;
+-	int m_got_frame = 0;
+-	AVPacket m_packet;
+-	AVPacket m_packet0;
++	bool m_has_more_packets = true;
++	bool m_has_more_frames = true;
++	AVPacket *m_packet = nullptr;
++	AVFrame *m_frame = nullptr;
+
+ 	int m_output_sample_rate = 0;
+ 	int m_output_channels = 0;
+@@ -98,19 +97,12 @@ private:
+
+ inline FFmpegAudioReader::FFmpegAudioReader() {
+ 	av_log_set_level(AV_LOG_QUIET);
+-
+-	av_init_packet(&m_packet);
+-	m_packet.data = nullptr;
+-	m_packet.size = 0;
+-
+-	m_packet0 = m_packet;
+ }
+
+ inline FFmpegAudioReader::~FFmpegAudioReader() {
+ 	Close();
+ 	av_dict_free(&m_input_opts);
+ 	av_freep(&m_convert_buffer[0]);
+-	av_packet_unref(&m_packet0);
+ }
+
+ inline bool FFmpegAudioReader::SetInputFormat(const char *name) {
+@@ -135,11 +127,10 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) {
+
+ 	Close();
+
+-    av_init_packet(&m_packet);
+-	m_packet.data = nullptr;
+-	m_packet.size = 0;
+-
+-	m_packet0 = m_packet;
++	m_packet = av_packet_alloc();
++	if (!m_packet) {
++		return false;
++	}
+
+ 	ret = avformat_open_input(&m_format_ctx, file_name.c_str(), m_input_fmt, &m_input_opts);
+ 	if (ret < 0) {
+@@ -153,26 +144,31 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) {
+ 		return false;
+ 	}
+
+-	AVCodec *codec;
++	const AVCodec *codec;
+ 	ret = av_find_best_stream(m_format_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
+ 	if (ret < 0) {
+ 		SetError("Could not find any audio stream in the file", ret);
+ 		return false;
+ 	}
+ 	m_stream_index = ret;
++	auto stream = m_format_ctx->streams[m_stream_index];
+
+-	m_codec_ctx = m_format_ctx->streams[m_stream_index]->codec;
++	m_codec_ctx = avcodec_alloc_context3(codec);
+ 	m_codec_ctx->request_sample_fmt = AV_SAMPLE_FMT_S16;
+
++	ret = avcodec_parameters_to_context(m_codec_ctx, stream->codecpar);
++	if (ret < 0) {
++		SetError("Could not copy the stream parameters", ret);
++		return false;
++	}
++
+ 	ret = avcodec_open2(m_codec_ctx, codec, nullptr);
+ 	if (ret < 0) {
+ 		SetError("Could not open the codec", ret);
+ 		return false;
+ 	}
+
+-	if (!m_codec_ctx->channel_layout) {
+-		m_codec_ctx->channel_layout = av_get_default_channel_layout(m_codec_ctx->channels);
+-	}
++	av_dump_format(m_format_ctx, 0, "foo", 0);
+
+ 	m_frame = av_frame_alloc();
+ 	if (!m_frame) {
+@@ -183,19 +179,23 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) {
+ 		m_output_sample_rate = m_codec_ctx->sample_rate;
+ 	}
+
+-	if (!m_output_channels) {
+-		m_output_channels = m_codec_ctx->channels;
++	AVChannelLayout output_channel_layout;
++	if (m_output_channels) {
++		av_channel_layout_default(&output_channel_layout, m_output_channels);
++	} else {
++		m_output_channels = m_codec_ctx->ch_layout.nb_channels;
++		av_channel_layout_default(&output_channel_layout, m_output_channels);
+ 	}
+
+-	if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16 || m_codec_ctx->channels != m_output_channels || m_codec_ctx->sample_rate != m_output_sample_rate) {
++	if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16 || m_codec_ctx->ch_layout.nb_channels != m_output_channels || m_codec_ctx->sample_rate != m_output_sample_rate) {
+ 		m_converter.reset(new FFmpegAudioProcessor());
+ 		m_converter->SetCompatibleMode();
+ 		m_converter->SetInputSampleFormat(m_codec_ctx->sample_fmt);
+ 		m_converter->SetInputSampleRate(m_codec_ctx->sample_rate);
+-		m_converter->SetInputChannelLayout(m_codec_ctx->channel_layout);
++		m_converter->SetInputChannelLayout(&(m_codec_ctx->ch_layout));
+ 		m_converter->SetOutputSampleFormat(AV_SAMPLE_FMT_S16);
+ 		m_converter->SetOutputSampleRate(m_output_sample_rate);
+-		m_converter->SetOutputChannelLayout(av_get_default_channel_layout(m_output_channels));
++		m_converter->SetOutputChannelLayout(&output_channel_layout);
+ 		auto ret = m_converter->Init();
+ 		if (ret != 0) {
+ 			SetError("Could not create an audio converter instance", ret);
+@@ -203,10 +203,11 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) {
+ 		}
+ 	}
+
++	av_channel_layout_uninit(&output_channel_layout);
++
+ 	m_opened = true;
+-	m_finished = false;
+-	m_got_frame = 0;
+-	m_nb_packets = 0;
++	m_has_more_packets = true;
++	m_has_more_frames = true;
+ 	m_decode_error = 0;
+
+ 	return true;
+@@ -214,6 +215,7 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) {
+
+ inline void FFmpegAudioReader::Close() {
+ 	av_frame_free(&m_frame);
++	av_packet_free(&m_packet);
+
+ 	m_stream_index = -1;
+
+@@ -252,91 +254,98 @@ inline bool FFmpegAudioReader::Read(const int16_t **data, size_t *size) {
+ 		return false;
+ 	}
+
++	*data = nullptr;
++	*size = 0;
++
+ 	int ret;
++	bool needs_packet = false;
+ 	while (true) {
+-		while (m_packet.size <= 0) {
+-			av_packet_unref(&m_packet0);
+-			av_init_packet(&m_packet);
+-			m_packet.data = nullptr;
+-			m_packet.size = 0;
+-			ret = av_read_frame(m_format_ctx, &m_packet);
++		while (needs_packet && m_packet->size == 0) {
++			ret = av_read_frame(m_format_ctx, m_packet);
+ 			if (ret < 0) {
+ 				if (ret == AVERROR_EOF) {
+-					m_finished = true;
++					needs_packet = false;
++					m_has_more_packets = false;
+ 					break;
+-				} else {
++				}
++				SetError("Error reading from the audio source", ret);
++				return false;
++			}
++			if (m_packet->stream_index == m_stream_index) {
++				needs_packet = false;
++			} else {
++				av_packet_unref(m_packet);
++			}
++		}
++
++		if (m_packet->size != 0) {
++			ret = avcodec_send_packet(m_codec_ctx, m_packet);
++			if (ret < 0) {
++				if (ret != AVERROR(EAGAIN)) {
+ 					SetError("Error reading from the audio source", ret);
+ 					return false;
+ 				}
+-			}
+-			m_packet0 = m_packet;
+-			if (m_packet.stream_index != m_stream_index) {
+-				m_packet.data = nullptr;
+-				m_packet.size = 0;
+ 			} else {
+-				m_nb_packets++;
++				av_packet_unref(m_packet);
+ 			}
+ 		}
+
+-		ret = avcodec_decode_audio4(m_codec_ctx, m_frame, &m_got_frame, &m_packet);
++		ret = avcodec_receive_frame(m_codec_ctx, m_frame);
+ 		if (ret < 0) {
+-			if (m_decode_error) {
+-				SetError("Error decoding audio frame", m_decode_error);
+-				return false;
++			if (ret == AVERROR_EOF) {
++				m_has_more_frames = false;
++			} else if (ret == AVERROR(EAGAIN)) {
++				if (m_has_more_packets) {
++					needs_packet = true;
++					continue;
++				} else {
++					m_has_more_frames = false;
++				}
+ 			}
+-			m_decode_error = ret;
+-			m_packet.data = nullptr;
+-			m_packet.size = 0;
+-			continue;
++			SetError("Error decoding the audio source", ret);
++			return false;
+ 		}
+
+-		break;
+-	}
+-
+-	m_decode_error = 0;
+-
+-	const int decoded = std::min(ret, m_packet.size);
+-	m_packet.data += decoded;
+-	m_packet.size -= decoded;
+-
+-	if (m_got_frame) {
+-		if (m_converter) {
+-			if (m_frame->nb_samples > m_convert_buffer_nb_samples) {
+-				int linsize;
+-				av_freep(&m_convert_buffer[0]);
+-				m_convert_buffer_nb_samples = std::max(1024 * 8, m_frame->nb_samples);
+-				ret = av_samples_alloc(m_convert_buffer, &linsize, m_codec_ctx->channels, m_convert_buffer_nb_samples, AV_SAMPLE_FMT_S16, 1);
+-				if (ret < 0) {
+-					SetError("Couldn't allocate audio converter buffer", ret);
++		if (m_frame->nb_samples > 0) {
++			if (m_converter) {
++				if (m_frame->nb_samples > m_convert_buffer_nb_samples) {
++					int linsize;
++					av_freep(&m_convert_buffer[0]);
++					m_convert_buffer_nb_samples = std::max(1024 * 8, m_frame->nb_samples);
++					ret = av_samples_alloc(m_convert_buffer, &linsize, m_codec_ctx->ch_layout.nb_channels, m_convert_buffer_nb_samples, AV_SAMPLE_FMT_S16, 1);
++					if (ret < 0) {
++						SetError("Couldn't allocate audio converter buffer", ret);
++						return false;
++					}
++				}
++				auto nb_samples = m_converter->Convert(m_convert_buffer, m_convert_buffer_nb_samples, (const uint8_t **) m_frame->data, m_frame->nb_samples);
++				if (nb_samples < 0) {
++					SetError("Couldn't convert audio", ret);
+ 					return false;
+ 				}
+-			}
+-			auto nb_samples = m_converter->Convert(m_convert_buffer, m_convert_buffer_nb_samples, (const uint8_t **) m_frame->data, m_frame->nb_samples);
+-			if (nb_samples < 0) {
+-				SetError("Couldn't convert audio", ret);
+-				return false;
+-			}
+-			*data = (const int16_t *) m_convert_buffer[0];
+-			*size = nb_samples;
+-		} else {
+-			*data = (const int16_t *) m_frame->data[0];
+-			*size = m_frame->nb_samples;
+-		}
+-	} else {
+-		if (m_finished && m_converter) {
+-			auto nb_samples = m_converter->Flush(m_convert_buffer, m_convert_buffer_nb_samples);
+-			if (nb_samples < 0) {
+-				SetError("Couldn't convert audio", ret);
+-				return false;
+-			} else if (nb_samples > 0) {
+-				m_got_frame = 1;
+ 				*data = (const int16_t *) m_convert_buffer[0];
+ 				*size = nb_samples;
++			} else {
++				*data = (const int16_t *) m_frame->data[0];
++				*size = m_frame->nb_samples;
++			}
++		} else {
++			if (m_converter) {
++				if (IsFinished()) {
++					auto nb_samples = m_converter->Flush(m_convert_buffer, m_convert_buffer_nb_samples);
++					if (nb_samples < 0) {
++						SetError("Couldn't convert audio", ret);
++						return false;
++					} else if (nb_samples > 0) {
++						*data = (const int16_t *) m_convert_buffer[0];
++						*size = nb_samples;
++					}
++				}
+ 			}
+ 		}
+-	}
+
+-	return true;
++		return true;
++	}
+ }
+
+ inline void FFmpegAudioReader::SetError(const char *message, int errnum) {
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index a2b517b..123e643 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -38,6 +38,12 @@ set(SRCS
+
+ if(BUILD_TOOLS)
+ 	set(SRCS ${SRCS} ../src/audio/ffmpeg_audio_reader_test.cpp)
++    include_directories(
++        ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS}
++        ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS}
++        ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS}
++        ${AUDIO_PROCESSOR_INCLUDE_DIRS}
++    )
+ 	link_libraries(fpcalc_libs)
+ endif()
+
+-- 
+2.38.1
+
+
diff --git a/srcpkgs/chromaprint/template b/srcpkgs/chromaprint/template
index 7ef7838949f3a3..1f7bbc70a22c80 100644
--- a/srcpkgs/chromaprint/template
+++ b/srcpkgs/chromaprint/template
@@ -1,7 +1,7 @@
 # Template file for 'chromaprint'
 pkgname=chromaprint
 version=1.5.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DBUILD_TOOLS=ON"
 make_check_target="check"

From df23d7a1334d7ba38f669de0522594c80edc046d Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 021/108] chromium: revbump for ffmpeg6

---
 srcpkgs/chromium/patches/ffmpeg5.patch | 47 ++++++++++++++++++++++++++
 srcpkgs/chromium/template              |  2 +-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/chromium/patches/ffmpeg5.patch

diff --git a/srcpkgs/chromium/patches/ffmpeg5.patch b/srcpkgs/chromium/patches/ffmpeg5.patch
new file mode 100644
index 00000000000000..24e2da38e34ca2
--- /dev/null
+++ b/srcpkgs/chromium/patches/ffmpeg5.patch
@@ -0,0 +1,47 @@
+--- a/media/filters/ffmpeg_demuxer.cc	2023-01-23 17:33:57.366213805 +0200
++++ b/media/filters/ffmpeg_demuxer.cc	2023-01-23 17:43:09.283436983 +0200
+@@ -92,24 +92,12 @@
+ 
+ static base::TimeDelta ExtractStartTime(AVStream* stream) {
+   // The default start time is zero.
+-  base::TimeDelta start_time;
++  base::TimeDelta start_time = kNoTimestamp;
+ 
+   // First try to use  the |start_time| value as is.
+-  if (stream->start_time != kNoFFmpegTimestamp)
++  if (stream->start_time != kNoFFmpegTimestamp) // AV_NOPTS_VALUE
+     start_time = ConvertFromTimeBase(stream->time_base, stream->start_time);
+ 
+-  // Next try to use the first DTS value, for codecs where we know PTS == DTS
+-  // (excludes all H26x codecs). The start time must be returned in PTS.
+-  if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
+-      stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
+-      stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
+-      stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
+-    const base::TimeDelta first_pts =
+-        ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
+-    if (first_pts < start_time)
+-      start_time = first_pts;
+-  }
+-
+   return start_time;
+ }
+ 
+@@ -1597,7 +1585,7 @@
+   for (const auto& stream : streams_) {
+     if (!stream || stream->IsEnabled() != enabled)
+       continue;
+-    if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
++    if (stream->av_stream()->start_time == AV_NOPTS_VALUE)
+       continue;
+     if (!lowest_start_time_stream ||
+         stream->start_time() < lowest_start_time_stream->start_time()) {
+@@ -1618,7 +1606,7 @@
+     if (stream->type() != DemuxerStream::VIDEO)
+       continue;
+ 
+-    if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
++    if (stream->av_stream()->start_time == AV_NOPTS_VALUE)
+       continue;
+ 
+     if (!stream->IsEnabled())
diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template
index ce0cdc70a4cee9..1737180bb3a062 100644
--- a/srcpkgs/chromium/template
+++ b/srcpkgs/chromium/template
@@ -2,7 +2,7 @@
 pkgname=chromium
 # See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version
 version=124.0.6367.60
-revision=1
+revision=2
 archs="i686* x86_64* aarch64* armv7l*"
 hostmakedepends="
  $(vopt_if clang "clang17 lld17 llvm17 compiler-rt")

From aff135c9d4d3caf3d18bb902daa8ac83288ad553 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 022/108] cmus: revbump for ffmpeg6

---
 srcpkgs/chromium/patches/ffmpeg5.patch | 47 --------------------------
 srcpkgs/cmus/patches/ffmpeg6.patch     | 12 +++++++
 srcpkgs/cmus/template                  |  2 +-
 3 files changed, 13 insertions(+), 48 deletions(-)
 delete mode 100644 srcpkgs/chromium/patches/ffmpeg5.patch
 create mode 100644 srcpkgs/cmus/patches/ffmpeg6.patch

diff --git a/srcpkgs/chromium/patches/ffmpeg5.patch b/srcpkgs/chromium/patches/ffmpeg5.patch
deleted file mode 100644
index 24e2da38e34ca2..00000000000000
--- a/srcpkgs/chromium/patches/ffmpeg5.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/media/filters/ffmpeg_demuxer.cc	2023-01-23 17:33:57.366213805 +0200
-+++ b/media/filters/ffmpeg_demuxer.cc	2023-01-23 17:43:09.283436983 +0200
-@@ -92,24 +92,12 @@
- 
- static base::TimeDelta ExtractStartTime(AVStream* stream) {
-   // The default start time is zero.
--  base::TimeDelta start_time;
-+  base::TimeDelta start_time = kNoTimestamp;
- 
-   // First try to use  the |start_time| value as is.
--  if (stream->start_time != kNoFFmpegTimestamp)
-+  if (stream->start_time != kNoFFmpegTimestamp) // AV_NOPTS_VALUE
-     start_time = ConvertFromTimeBase(stream->time_base, stream->start_time);
- 
--  // Next try to use the first DTS value, for codecs where we know PTS == DTS
--  // (excludes all H26x codecs). The start time must be returned in PTS.
--  if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
--      stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
--      stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
--      stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
--    const base::TimeDelta first_pts =
--        ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
--    if (first_pts < start_time)
--      start_time = first_pts;
--  }
--
-   return start_time;
- }
- 
-@@ -1597,7 +1585,7 @@
-   for (const auto& stream : streams_) {
-     if (!stream || stream->IsEnabled() != enabled)
-       continue;
--    if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
-+    if (stream->av_stream()->start_time == AV_NOPTS_VALUE)
-       continue;
-     if (!lowest_start_time_stream ||
-         stream->start_time() < lowest_start_time_stream->start_time()) {
-@@ -1618,7 +1606,7 @@
-     if (stream->type() != DemuxerStream::VIDEO)
-       continue;
- 
--    if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
-+    if (stream->av_stream()->start_time == AV_NOPTS_VALUE)
-       continue;
- 
-     if (!stream->IsEnabled())
diff --git a/srcpkgs/cmus/patches/ffmpeg6.patch b/srcpkgs/cmus/patches/ffmpeg6.patch
new file mode 100644
index 00000000000000..ffa95ab811101b
--- /dev/null
+++ b/srcpkgs/cmus/patches/ffmpeg6.patch
@@ -0,0 +1,12 @@
+--- a/ip/ffmpeg.c
++++ b/ip/ffmpeg.c
+@@ -202,9 +202,6 @@ static int ffmpeg_open(struct input_plugin_data *ip_data)
+ 			break;
+ 		}
+ 
+-		if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
+-			cc->flags |= AV_CODEC_FLAG_TRUNCATED;
+-
+ 		if (avcodec_open2(cc, codec, NULL) < 0) {
+ 			d_print("could not open codec: %d, %s\n", cc->codec_id, avcodec_get_name(cc->codec_id));
+ 			err = -IP_ERROR_UNSUPPORTED_FILE_TYPE;
diff --git a/srcpkgs/cmus/template b/srcpkgs/cmus/template
index 0d1436744f1b2c..a6e4b4fa86cb83 100644
--- a/srcpkgs/cmus/template
+++ b/srcpkgs/cmus/template
@@ -1,7 +1,7 @@
 # Template file for 'cmus'
 pkgname=cmus
 version=2.10.0
-revision=3
+revision=4
 build_style=configure
 configure_args="prefix=/usr LD=$CC"
 hostmakedepends="pkg-config"

From 2f484b0f7a863e9d1770501c616a994c7b241abf Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 023/108] cyanrip: revbump for ffmpeg6

---
 srcpkgs/cyanrip/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cyanrip/template b/srcpkgs/cyanrip/template
index 9796e3461601a7..5db30e020d17ee 100644
--- a/srcpkgs/cyanrip/template
+++ b/srcpkgs/cyanrip/template
@@ -1,7 +1,7 @@
 # Template file for 'cyanrip'
 pkgname=cyanrip
 version=0.9.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config"
 makedepends="ffmpeg-devel libcdio-devel libcdio-paranoia-devel libcurl-devel libmusicbrainz5-devel"

From 55ea22a6ef6ea1a7d3750cfbcc7083d07fc46223 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 024/108] deadbeef: revbump for ffmpeg4

---
 srcpkgs/deadbeef/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/deadbeef/template b/srcpkgs/deadbeef/template
index f5f4bf24b8cb6d..7b47e615cd48ef 100644
--- a/srcpkgs/deadbeef/template
+++ b/srcpkgs/deadbeef/template
@@ -1,14 +1,14 @@
 # Template file for 'deadbeef'
 pkgname=deadbeef
 version=1.8.8
-revision=3
+revision=4
 create_wrksrc=yes
 build_style=gnu-configure
 configure_args="--disable-oss --disable-lfm --disable-notify --disable-gtk2"
 hostmakedepends="automake libtool gettext gettext-devel intltool pkg-config
  yasm clang glib-devel"
 makedepends="
- alsa-lib-devel dbus-devel faad2-devel ffmpeg-devel gtk+3-devel imlib2-devel
+ alsa-lib-devel dbus-devel faad2-devel ffmpeg4-devel gtk+3-devel imlib2-devel
  jansson-devel libcddb-devel libcdio-devel libcurl-devel libflac-devel
  libmad-devel libpng-devel libsamplerate-devel libsndfile-devel libvorbis-devel
  libzip-devel mpg123-devel opusfile-devel pulseaudio-devel wavpack-devel"

From a1348af2376e36f38b1283d98027ebb25e6ed1a6 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 025/108] droidcam-obs-plugin: revbump for ffmpeg6

---
 srcpkgs/droidcam-obs-plugin/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/droidcam-obs-plugin/template b/srcpkgs/droidcam-obs-plugin/template
index 9dc6648efe94ad..93a72adf3d3c30 100644
--- a/srcpkgs/droidcam-obs-plugin/template
+++ b/srcpkgs/droidcam-obs-plugin/template
@@ -1,7 +1,7 @@
 # Template file for 'droidcam-obs-plugin'
 pkgname=droidcam-obs-plugin
 version=2.3.2
-revision=1
+revision=2
 build_style=gnu-makefile
 make_use_env=yes
 make_build_args="ALLOW_STATIC=no"

From baf7ec1806fea7cf8ac3d0e14598d67c0fc2c889 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 026/108] droidcam: revbump for ffmpeg6

---
 srcpkgs/droidcam/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/droidcam/template b/srcpkgs/droidcam/template
index 1c3f1b8b1fc676..32a9220b79a4d1 100644
--- a/srcpkgs/droidcam/template
+++ b/srcpkgs/droidcam/template
@@ -1,7 +1,7 @@
 # Template file for 'droidcam'
 pkgname=droidcam
 version=1.8.2
-revision=2
+revision=3
 build_style=gnu-makefile
 make_build_args="USBMUXD=-lusbmuxd-2.0 JPEG=-lturbojpeg"
 hostmakedepends="pkg-config"

From 87c44ae912584ce0e09b72286785525a34d2cff8 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 027/108] ffmpegthumbnailer: revbump for ffmpeg6

---
 .../ffmpegthumbnailer/patches/ffmpeg6.patch   | 202 ++++++++++++++++++
 srcpkgs/ffmpegthumbnailer/template            |   6 +-
 2 files changed, 205 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/ffmpegthumbnailer/patches/ffmpeg6.patch

diff --git a/srcpkgs/ffmpegthumbnailer/patches/ffmpeg6.patch b/srcpkgs/ffmpegthumbnailer/patches/ffmpeg6.patch
new file mode 100644
index 00000000000000..363ff35a28419d
--- /dev/null
+++ b/srcpkgs/ffmpegthumbnailer/patches/ffmpeg6.patch
@@ -0,0 +1,202 @@
+--- a/libffmpegthumbnailer/moviedecoder.cpp	2017-11-21 14:06:57.000000000 -0500
++++ b/libffmpegthumbnailer/moviedecoder.cpp	2023-05-05 13:14:47.946560668 -0400
+@@ -41,11 +41,6 @@
+ namespace ffmpegthumbnailer
+ {
+ 
+-struct SilenceLogLevel
+-{
+-    SilenceLogLevel() { av_log_set_level(AV_LOG_QUIET); }
+-};
+-
+ MovieDecoder::MovieDecoder(AVFormatContext* pavContext)
+ : m_VideoStream(-1)
+ , m_pFormatContext(pavContext)
+@@ -70,8 +65,6 @@
+ 
+ void MovieDecoder::initialize(const string& filename, bool preferEmbeddedMetadata)
+ {
+-    av_register_all();
+-    avcodec_register_all();
+     avformat_network_init();
+ 
+     string inputFile = filename == "-" ? "pipe:" : filename;
+@@ -97,8 +90,7 @@
+ {
+     if (m_pVideoCodecContext)
+     {
+-        avcodec_close(m_pVideoCodecContext);
+-        m_pVideoCodecContext = nullptr;
++        avcodec_free_context(&m_pVideoCodecContext);
+     }
+ 
+     if ((!m_FormatContextWasGiven) && m_pFormatContext)
+@@ -152,10 +144,10 @@
+     for (unsigned int i = 0; i < m_pFormatContext->nb_streams; ++i)
+     {
+         AVStream *stream = m_pFormatContext->streams[i];
+-        auto ctx = m_pFormatContext->streams[i]->codec;
+-        if (ctx->codec_type == AVMEDIA_TYPE_VIDEO)
++        auto par = m_pFormatContext->streams[i]->codecpar;
++        if (par->codec_type == AVMEDIA_TYPE_VIDEO)
+         {
+-            if (!preferEmbeddedMetadata || !isStillImageCodec(ctx->codec_id))
++            if (!preferEmbeddedMetadata || !isStillImageCodec(par->codec_id))
+             {
+                 videoStreams.push_back(i);
+                 continue;
+@@ -203,8 +195,7 @@
+     }
+ 
+     m_pVideoStream = m_pFormatContext->streams[m_VideoStream];
+-    m_pVideoCodecContext = m_pVideoStream->codec;
+-    m_pVideoCodec = avcodec_find_decoder(m_pVideoCodecContext->codec_id);
++    m_pVideoCodec = avcodec_find_decoder(m_pVideoStream->codecpar->codec_id);
+ 
+     if (m_pVideoCodec == nullptr)
+     {
+@@ -214,6 +205,20 @@
+         throw logic_error("Video Codec not found");
+     }
+ 
++    m_pVideoCodecContext = avcodec_alloc_context3(m_pVideoCodec);
++
++    if (m_pVideoCodecContext == nullptr)
++    {
++        destroy();
++        throw logic_error("Could not allocate video codec context");
++    }
++
++    if (avcodec_parameters_to_context(m_pVideoCodecContext, m_pVideoStream->codecpar) < 0)
++    {
++        destroy();
++        throw logic_error("Could not configure video codec context");
++    }
++
+     m_pVideoCodecContext->workaround_bugs = 1;
+ 
+     if (avcodec_open2(m_pVideoCodecContext, m_pVideoCodec, nullptr) < 0)
+@@ -386,13 +391,6 @@
+ 
+ void MovieDecoder::initializeFilterGraph(const AVRational& timeBase, const std::string& size, bool maintainAspectRatio)
+ {
+-    static const AVPixelFormat pixelFormats[] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE };
+-
+-    auto del = [] (AVBufferSinkParams* p) { av_freep(p); };
+-    std::unique_ptr<AVBufferSinkParams, decltype(del)> buffersinkParams(av_buffersink_params_alloc(), del);
+-
+-    avfilter_register_all();
+-
+     m_pFilterGraph = avfilter_graph_alloc();
+     assert(m_pFilterGraph);
+ 
+@@ -404,10 +402,8 @@
+ 
+     checkRc(avfilter_graph_create_filter(&m_pFilterSource, avfilter_get_by_name("buffer"), "thumb_buffer", ss.str().c_str(), nullptr, m_pFilterGraph),
+             "Failed to create filter source");
+-    buffersinkParams->pixel_fmts = pixelFormats;
+-    checkRc(avfilter_graph_create_filter(&m_pFilterSink, avfilter_get_by_name("buffersink"), "thumb_buffersink", nullptr, buffersinkParams.get(), m_pFilterGraph),
++    checkRc(avfilter_graph_create_filter(&m_pFilterSink, avfilter_get_by_name("buffersink"), "thumb_buffersink", nullptr, nullptr, m_pFilterGraph),
+             "Failed to create filter sink");
+-    buffersinkParams.release();
+ 
+     AVFilterContext* yadifFilter = nullptr;
+     if (m_pFrame->interlaced_frame != 0)
+@@ -500,15 +496,15 @@
+     }
+ 
+     checkRc(av_seek_frame(m_pFormatContext, -1, timestamp, 0), "Seeking in video failed");
+-    avcodec_flush_buffers(m_pFormatContext->streams[m_VideoStream]->codec);
++    avcodec_flush_buffers(m_pVideoCodecContext);
+ 
+     int keyFrameAttempts = 0;
+-    bool gotFrame = 0;
++    bool gotFrame;
+ 
+     do
+     {
+         int count = 0;
+-        gotFrame = 0;
++        gotFrame = false;
+ 
+         while (!gotFrame && count < 20)
+         {
+@@ -552,17 +548,33 @@
+         return false;
+     }
+ 
+-    av_frame_unref(m_pFrame);
+-
+-    int frameFinished;
++    int rc = avcodec_send_packet(m_pVideoCodecContext, m_pPacket);
++    if(rc == AVERROR(EAGAIN))
++    {
++        rc = 0;
++    }
+ 
+-    int bytesDecoded = avcodec_decode_video2(m_pVideoCodecContext, m_pFrame, &frameFinished, m_pPacket);
+-    if (bytesDecoded < 0)
++    if(rc == AVERROR_EOF)
++    {
++        return false;
++    }
++    else if(rc < 0)
+     {
+-        throw logic_error("Failed to decode video frame: bytesDecoded < 0");
++        throw logic_error("Failed to decode video frame: avcodec_send_packet() < 0");
+     }
+ 
+-    return frameFinished > 0;
++    rc = avcodec_receive_frame(m_pVideoCodecContext, m_pFrame);
++    switch(rc)
++    {
++        case 0:
++            return true;
++
++        case AVERROR(EAGAIN):
++            return false;
++
++        default:
++            throw logic_error("Failed to decode video frame: avcodec_receive_frame() < 0");
++    }
+ }
+ 
+ bool MovieDecoder::getVideoPacket()
+@@ -570,8 +582,6 @@
+     bool framesAvailable = true;
+     bool frameDecoded = false;
+ 
+-    int attempts = 0;
+-
+     if (m_pPacket)
+     {
+         av_packet_unref(m_pPacket);
+@@ -580,6 +590,7 @@
+ 
+     m_pPacket = new AVPacket();
+ 
++
+     while (framesAvailable && !frameDecoded)
+     {
+         framesAvailable = av_read_frame(m_pFormatContext, m_pPacket) >= 0;
+@@ -644,7 +655,7 @@
+ 
+ int32_t MovieDecoder::getStreamRotation()
+ {
+-    int32_t* matrix = reinterpret_cast<int32_t*>(av_stream_get_side_data(m_pVideoStream, AV_PKT_DATA_DISPLAYMATRIX, nullptr));
++    auto matrix = reinterpret_cast<int32_t*>(av_stream_get_side_data(m_pVideoStream, AV_PKT_DATA_DISPLAYMATRIX, nullptr));
+     if (matrix)
+     {
+         auto angle = lround(av_display_rotation_get(matrix));
+
+--- a/libffmpegthumbnailer/moviedecoder.h	2017-11-12 04:23:38.000000000 -0500
++++ b/libffmpegthumbnailer/moviedecoder.h	2023-05-05 13:26:07.095529911 -0400
+@@ -78,7 +78,7 @@
+     int                     m_VideoStream;
+     AVFormatContext*        m_pFormatContext;
+     AVCodecContext*         m_pVideoCodecContext;
+-    AVCodec*                m_pVideoCodec;
++    const AVCodec*          m_pVideoCodec;
+     AVFilterGraph*          m_pFilterGraph;
+     AVFilterContext*        m_pFilterSource;
+     AVFilterContext*        m_pFilterSink;
diff --git a/srcpkgs/ffmpegthumbnailer/template b/srcpkgs/ffmpegthumbnailer/template
index 039eea7622b391..35d546018d12af 100644
--- a/srcpkgs/ffmpegthumbnailer/template
+++ b/srcpkgs/ffmpegthumbnailer/template
@@ -1,7 +1,7 @@
 # Template file for 'ffmpegthumbnailer'
 pkgname=ffmpegthumbnailer
 version=2.2.2
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="libpng-devel libjpeg-turbo-devel ffmpeg-devel"
@@ -9,8 +9,8 @@ depends="ffmpeg"
 short_desc="Lightweight video thumbnailer"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
-homepage="https://github.com/dirkvdb/${pkgname}"
-distfiles="${homepage}/releases/download/${version}/${pkgname}-${version}.tar.bz2"
+homepage="https://github.com/dirkvdb"
+distfiles="${homepage}/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.bz2"
 checksum=1cb24059c38223f657b300c84dd80491b7040d4b69471c4fea69be862bc99b5b
 
 post_install() {

From 28ffee66c9b9310c69453647735b54533345ffeb Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 028/108] ffmpegthumbs: revbump for ffmpeg6

---
 srcpkgs/ffmpegthumbs/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ffmpegthumbs/template b/srcpkgs/ffmpegthumbs/template
index 2e2a96de83ce8a..dfd7e9dede36d3 100644
--- a/srcpkgs/ffmpegthumbs/template
+++ b/srcpkgs/ffmpegthumbs/template
@@ -1,7 +1,7 @@
 # Template file for 'ffmpegthumbs'
 pkgname=ffmpegthumbs
 version=23.08.5
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons kconfig-devel
  pkg-config qt5-host-tools qt5-qmake gettext"

From 7c4ef8a3eefe7b7b2c6c52cbbc391ad6dba053af Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 029/108] ffms2: revbump for ffmpeg6

---
 srcpkgs/ffms2/patches/ffmpeg5.patch | 424 ++++++++++++++++++++++++++++
 srcpkgs/ffms2/template              |   2 +-
 2 files changed, 425 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/ffms2/patches/ffmpeg5.patch

diff --git a/srcpkgs/ffms2/patches/ffmpeg5.patch b/srcpkgs/ffms2/patches/ffmpeg5.patch
new file mode 100644
index 00000000000000..1479fabcafcb4e
--- /dev/null
+++ b/srcpkgs/ffms2/patches/ffmpeg5.patch
@@ -0,0 +1,424 @@
+From 45673149e9a2f5586855ad472e3059084eaa36b1 Mon Sep 17 00:00:00 2001
+From: Derek Buitenhuis <derek.buitenhuis@gmail.com>
+Date: Tue, 4 May 2021 14:41:21 +0100
+Subject: [PATCH] Use auto for AVCodec
+
+The geniuses over at FFmpeg decided to constify this API, so old
+versions of the library will return AVCodec *, while new versions
+of the libary will return const AVCodec *, which, in C++, are not
+OK to convert between.
+
+Rather than use some macro hell in ffmscompat.h, we can work around
+this by using auto.
+
+Gross.
+
+Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
+---
+ src/core/audiosource.cpp | 2 +-
+ src/core/indexing.cpp    | 6 +++---
+ src/core/videosource.cpp | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/core/audiosource.cpp b/src/core/audiosource.cpp
+index e4ce97c..ac09666 100644
+--- a/src/core/audiosource.cpp
++++ b/src/core/audiosource.cpp
+@@ -469,7 +469,7 @@ void FFMS_AudioSource::OpenFile() {
+ 
+     LAVFOpenFile(SourceFile.c_str(), FormatContext, TrackNumber);
+ 
+-    AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[TrackNumber]->codecpar->codec_id);
++    auto *Codec = avcodec_find_decoder(FormatContext->streams[TrackNumber]->codecpar->codec_id);
+     if (Codec == nullptr)
+         throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC,
+             "Audio codec not found");
+diff --git a/src/core/indexing.cpp b/src/core/indexing.cpp
+index e547c5a..59fb4e8 100644
+--- a/src/core/indexing.cpp
++++ b/src/core/indexing.cpp
+@@ -384,7 +384,7 @@ FFMS_TrackType FFMS_Indexer::GetTrackType(int Track) {
+ }
+ 
+ const char *FFMS_Indexer::GetTrackCodec(int Track) {
+-    AVCodec *codec = avcodec_find_decoder(FormatContext->streams[Track]->codecpar->codec_id);
++    auto *codec = avcodec_find_decoder(FormatContext->streams[Track]->codecpar->codec_id);
+     return codec ? codec->name : nullptr;
+ }
+ 
+@@ -402,7 +402,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() {
+             UseDTS);
+ 
+         if (IndexMask.count(i) && FormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
+-            AVCodec *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id);
++            auto *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id);
+             if (!VideoCodec) {
+                 FormatContext->streams[i]->discard = AVDISCARD_ALL;
+                 IndexMask.erase(i);
+@@ -433,7 +433,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() {
+                 IndexMask.insert(i);
+             }
+         } else if (IndexMask.count(i) && FormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
+-            AVCodec *AudioCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id);
++            auto *AudioCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id);
+             if (AudioCodec == nullptr)
+                 throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_UNSUPPORTED,
+                     "Audio codec not found");
+diff --git a/src/core/videosource.cpp b/src/core/videosource.cpp
+index b889970..8956c22 100644
+--- a/src/core/videosource.cpp
++++ b/src/core/videosource.cpp
+@@ -171,7 +171,7 @@ FFMS_VideoSource::FFMS_VideoSource(const char *SourceFile, FFMS_Index &Index, in
+ 
+         LAVFOpenFile(SourceFile, FormatContext, VideoTrack);
+ 
+-        AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[VideoTrack]->codecpar->codec_id);
++        auto *Codec = avcodec_find_decoder(FormatContext->streams[VideoTrack]->codecpar->codec_id);
+         if (Codec == nullptr)
+             throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC,
+                 "Video codec not found");
+-- 
+2.40.0
+
+From 96cbf38ea9381829a1314f432a2c60495dcefaad Mon Sep 17 00:00:00 2001
+From: Derek Buitenhuis <derek.buitenhuis@gmail.com>
+Date: Tue, 4 May 2021 14:12:41 +0100
+Subject: [PATCH] all: Update AVPacket API usage
+
+AVPackets must all be on the heap now, since it is no longer
+part of the libav* ABI.
+
+Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
+---
+ src/core/audiosource.cpp | 16 ++++++----
+ src/core/indexing.cpp    | 63 ++++++++++++++++++++++------------------
+ src/core/indexing.h      |  4 +--
+ src/core/utils.cpp       |  6 ----
+ src/core/utils.h         |  1 -
+ src/core/videosource.cpp | 30 ++++++++++---------
+ 6 files changed, 64 insertions(+), 56 deletions(-)
+
+diff --git a/src/core/audiosource.cpp b/src/core/audiosource.cpp
+index 37cf9ae..e4ce97c 100644
+--- a/src/core/audiosource.cpp
++++ b/src/core/audiosource.cpp
+@@ -285,10 +285,15 @@ FFMS_AudioSource::AudioBlock *FFMS_AudioSource::CacheBlock(CacheIterator &pos) {
+ int FFMS_AudioSource::DecodeNextBlock(CacheIterator *pos) {
+     CurrentFrame = &Frames[PacketNumber];
+ 
+-    AVPacket Packet;
+-    if (!ReadPacket(&Packet))
++    AVPacket *Packet = av_packet_alloc();
++    if (!Packet)
++        throw FFMS_Exception(FFMS_ERROR_PARSER, FFMS_ERROR_ALLOCATION_FAILED,
++            "Could not allocate packet.");
++    if (!ReadPacket(Packet)) {
++        av_packet_free(&Packet);
+         throw FFMS_Exception(FFMS_ERROR_PARSER, FFMS_ERROR_UNKNOWN,
+             "ReadPacket unexpectedly failed to read a packet");
++    }
+ 
+     // ReadPacket may have changed the packet number
+     CurrentFrame = &Frames[PacketNumber];
+@@ -297,8 +302,9 @@ int FFMS_AudioSource::DecodeNextBlock(CacheIterator *pos) {
+     int NumberOfSamples = 0;
+     AudioBlock *CachedBlock = nullptr;
+     
+-    int Ret = avcodec_send_packet(CodecContext, &Packet);
+-    av_packet_unref(&Packet);
++    int Ret = avcodec_send_packet(CodecContext, Packet);
++    av_packet_unref(Packet);
++    av_packet_free(&Packet);
+ 
+     av_frame_unref(DecodeFrame);
+     Ret = avcodec_receive_frame(CodecContext, DecodeFrame);
+@@ -513,8 +519,6 @@ void FFMS_AudioSource::Seek() {
+ }
+ 
+ bool FFMS_AudioSource::ReadPacket(AVPacket *Packet) {
+-    InitNullPacket(*Packet);
+-
+     while (av_read_frame(FormatContext, Packet) >= 0) {
+         if (Packet->stream_index == TrackNumber) {
+             // Required because not all audio packets, especially in ogg, have a pts. Use the previous valid packet's pts instead.
+diff --git a/src/core/indexing.cpp b/src/core/indexing.cpp
+index 23fb95b..e547c5a 100644
+--- a/src/core/indexing.cpp
++++ b/src/core/indexing.cpp
+@@ -320,7 +320,7 @@ void FFMS_Indexer::CheckAudioProperties(int Track, AVCodecContext *Context) {
+     }
+ }
+ 
+-void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt, int *RepeatPict,
++void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket *pkt, int *RepeatPict,
+                                     int *FrameType, bool *Invisible, enum AVPictureStructure *LastPicStruct) {
+     if (VideoContext.Parser) {
+         uint8_t *OB;
+@@ -330,8 +330,8 @@ void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt
+         av_parser_parse2(VideoContext.Parser,
+             VideoContext.CodecContext,
+             &OB, &OBSize,
+-            pkt.data, pkt.size,
+-            pkt.pts, pkt.dts, pkt.pos);
++            pkt->data, pkt->size,
++            pkt->pts, pkt->dts, pkt->pos);
+ 
+         // H.264 (PAFF) and HEVC may have one field per packet, so we need to track
+         // when we have a full or half frame available, and mark one of them as
+@@ -351,15 +351,15 @@ void FFMS_Indexer::ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt
+ 
+         *RepeatPict = VideoContext.Parser->repeat_pict;
+         *FrameType = VideoContext.Parser->pict_type;
+-        *Invisible = (IncompleteFrame || VideoContext.Parser->repeat_pict < 0 || (pkt.flags & AV_PKT_FLAG_DISCARD));
++        *Invisible = (IncompleteFrame || VideoContext.Parser->repeat_pict < 0 || (pkt->flags & AV_PKT_FLAG_DISCARD));
+     } else {
+-        *Invisible = !!(pkt.flags & AV_PKT_FLAG_DISCARD);
++        *Invisible = !!(pkt->flags & AV_PKT_FLAG_DISCARD);
+     }
+ 
+     if (VideoContext.CodecContext->codec_id == AV_CODEC_ID_VP8)
+-        ParseVP8(pkt.data[0], Invisible, FrameType);
++        ParseVP8(pkt->data[0], Invisible, FrameType);
+     else if (VideoContext.CodecContext->codec_id == AV_CODEC_ID_VP9)
+-        ParseVP9(pkt.data[0], Invisible, FrameType);
++        ParseVP9(pkt->data[0], Invisible, FrameType);
+ }
+ 
+ void FFMS_Indexer::Free() {
+@@ -458,32 +458,36 @@ FFMS_Index *FFMS_Indexer::DoIndexing() {
+         }
+     }
+ 
+-    AVPacket Packet;
+-    InitNullPacket(Packet);
++    AVPacket *Packet = av_packet_alloc();
++    if (!Packet)
++        throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_ALLOCATION_FAILED,
++            "Could not allocate packet.");
+     std::vector<int64_t> LastValidTS(FormatContext->nb_streams, AV_NOPTS_VALUE);
+ 
+     int64_t filesize = avio_size(FormatContext->pb);
+     enum AVPictureStructure LastPicStruct = AV_PICTURE_STRUCTURE_UNKNOWN;
+-    while (av_read_frame(FormatContext, &Packet) >= 0) {
++    while (av_read_frame(FormatContext, Packet) >= 0) {
+         // Update progress
+         // FormatContext->pb can apparently be NULL when opening images.
+         if (IC && FormatContext->pb) {
+-            if ((*IC)(FormatContext->pb->pos, filesize, ICPrivate))
++            if ((*IC)(FormatContext->pb->pos, filesize, ICPrivate)) {
++                av_packet_free(&Packet);
+                 throw FFMS_Exception(FFMS_ERROR_CANCELLED, FFMS_ERROR_USER,
+                     "Cancelled by user");
++            }
+         }
+-        if (!IndexMask.count(Packet.stream_index)) {
+-            av_packet_unref(&Packet);
++        if (!IndexMask.count(Packet->stream_index)) {
++            av_packet_unref(Packet);
+             continue;
+         }
+ 
+-        int Track = Packet.stream_index;
++        int Track = Packet->stream_index;
+         FFMS_Track &TrackInfo = (*TrackIndices)[Track];
+-        bool KeyFrame = !!(Packet.flags & AV_PKT_FLAG_KEY);
++        bool KeyFrame = !!(Packet->flags & AV_PKT_FLAG_KEY);
+         ReadTS(Packet, LastValidTS[Track], (*TrackIndices)[Track].UseDTS);
+ 
+         if (FormatContext->streams[Track]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
+-            int64_t PTS = TrackInfo.UseDTS ? Packet.dts : Packet.pts;
++            int64_t PTS = TrackInfo.UseDTS ? Packet->dts : Packet->pts;
+             if (PTS == AV_NOPTS_VALUE) {
+                 // VPx alt-refs are output as packets which lack timestmps or durations, since
+                 // they are invisible. Currently, the timestamp mangling code in libavformat
+@@ -495,9 +499,11 @@ FFMS_Index *FFMS_Indexer::DoIndexing() {
+                 // FFMS2 currently sorts packets by PTS, which will break decoding, otherwise.
+                 bool HasAltRefs = (FormatContext->streams[Track]->codecpar->codec_id == AV_CODEC_ID_VP8 ||
+                                    FormatContext->streams[Track]->codecpar->codec_id == AV_CODEC_ID_VP9);
+-                if (Packet.duration == 0 && !HasAltRefs)
++                if (Packet->duration == 0 && !HasAltRefs) {
++                    av_packet_free(&Packet);
+                     throw FFMS_Exception(FFMS_ERROR_INDEXING, FFMS_ERROR_PARSER,
+                         "Invalid packet pts, dts, and duration");
++                }
+ 
+                 if (TrackInfo.empty())
+                     PTS = 0;
+@@ -513,7 +519,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() {
+             ParseVideoPacket(AVContexts[Track], Packet, &RepeatPict, &FrameType, &Invisible, &LastPicStruct);
+ 
+             TrackInfo.AddVideoFrame(PTS, RepeatPict, KeyFrame,
+-                FrameType, Packet.pos, Invisible);
++                FrameType, Packet->pos, Invisible);
+         } else if (FormatContext->streams[Track]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
+             // For video seeking timestamps are used only if all packets have
+             // timestamps, while for audio they're used if any have timestamps,
+@@ -522,28 +528,29 @@ FFMS_Index *FFMS_Indexer::DoIndexing() {
+                 TrackInfo.HasTS = true;
+ 
+             int64_t StartSample = AVContexts[Track].CurrentSample;
+-            uint32_t SampleCount = IndexAudioPacket(Track, &Packet, AVContexts[Track], *TrackIndices);
++            uint32_t SampleCount = IndexAudioPacket(Track, Packet, AVContexts[Track], *TrackIndices);
+             TrackInfo.SampleRate = AVContexts[Track].CodecContext->sample_rate;
+ 
+             TrackInfo.AddAudioFrame(LastValidTS[Track],
+-                StartSample, SampleCount, KeyFrame, Packet.pos, Packet.flags & AV_PKT_FLAG_DISCARD);
++                StartSample, SampleCount, KeyFrame, Packet->pos, Packet->flags & AV_PKT_FLAG_DISCARD);
+         }
+ 
+-        if (!(Packet.flags & AV_PKT_FLAG_DISCARD))
+-            TrackInfo.LastDuration = Packet.duration;
++        if (!(Packet->flags & AV_PKT_FLAG_DISCARD))
++            TrackInfo.LastDuration = Packet->duration;
+ 
+-        av_packet_unref(&Packet);
++        av_packet_unref(Packet);
+     }
++    av_packet_free(&Packet);
+ 
+     TrackIndices->Finalize(AVContexts, FormatContext->iformat->name);
+     return TrackIndices.release();
+ }
+ 
+-void FFMS_Indexer::ReadTS(const AVPacket &Packet, int64_t &TS, bool &UseDTS) {
+-    if (!UseDTS && Packet.pts != AV_NOPTS_VALUE)
+-        TS = Packet.pts;
++void FFMS_Indexer::ReadTS(const AVPacket *Packet, int64_t &TS, bool &UseDTS) {
++    if (!UseDTS && Packet->pts != AV_NOPTS_VALUE)
++        TS = Packet->pts;
+     if (TS == AV_NOPTS_VALUE)
+         UseDTS = true;
+-    if (UseDTS && Packet.dts != AV_NOPTS_VALUE)
+-        TS = Packet.dts;
++    if (UseDTS && Packet->dts != AV_NOPTS_VALUE)
++        TS = Packet->dts;
+ }
+diff --git a/src/core/indexing.h b/src/core/indexing.h
+index 3cfc3c3..5c06868 100644
+--- a/src/core/indexing.h
++++ b/src/core/indexing.h
+@@ -80,10 +80,10 @@ private:
+     int64_t Filesize;
+     uint8_t Digest[20];
+ 
+-    void ReadTS(const AVPacket &Packet, int64_t &TS, bool &UseDTS);
++    void ReadTS(const AVPacket *Packet, int64_t &TS, bool &UseDTS);
+     void CheckAudioProperties(int Track, AVCodecContext *Context);
+     uint32_t IndexAudioPacket(int Track, AVPacket *Packet, SharedAVContext &Context, FFMS_Index &TrackIndices);
+-    void ParseVideoPacket(SharedAVContext &VideoContext, AVPacket &pkt, int *RepeatPict, int *FrameType, bool *Invisible, enum AVPictureStructure *LastPicStruct);
++    void ParseVideoPacket(SharedAVContext &VideoContext, AVPacket *pkt, int *RepeatPict, int *FrameType, bool *Invisible, enum AVPictureStructure *LastPicStruct);
+     void Free();
+ public:
+     FFMS_Indexer(const char *Filename);
+diff --git a/src/core/utils.cpp b/src/core/utils.cpp
+index ce67533..8a2e997 100644
+--- a/src/core/utils.cpp
++++ b/src/core/utils.cpp
+@@ -62,12 +62,6 @@ void ClearErrorInfo(FFMS_ErrorInfo *ErrorInfo) {
+     }
+ }
+ 
+-void InitNullPacket(AVPacket &pkt) {
+-    av_init_packet(&pkt);
+-    pkt.data = nullptr;
+-    pkt.size = 0;
+-}
+-
+ void FillAP(FFMS_AudioProperties &AP, AVCodecContext *CTX, FFMS_Track &Frames) {
+     AP.SampleFormat = static_cast<FFMS_SampleFormat>(av_get_packed_sample_fmt(CTX->sample_fmt));
+     AP.BitsPerSample = av_get_bytes_per_sample(CTX->sample_fmt) * 8;
+diff --git a/src/core/utils.h b/src/core/utils.h
+index 9819dc7..003ab79 100644
+--- a/src/core/utils.h
++++ b/src/core/utils.h
+@@ -58,7 +58,6 @@ std::unique_ptr<T> make_unique(Args&&... args) {
+ }
+ 
+ void ClearErrorInfo(FFMS_ErrorInfo *ErrorInfo);
+-void InitNullPacket(AVPacket &pkt);
+ void FillAP(FFMS_AudioProperties &AP, AVCodecContext *CTX, FFMS_Track &Frames);
+ 
+ void LAVFOpenFile(const char *SourceFile, AVFormatContext *&FormatContext, int Track);
+diff --git a/src/core/videosource.cpp b/src/core/videosource.cpp
+index 06bd161..b889970 100644
+--- a/src/core/videosource.cpp
++++ b/src/core/videosource.cpp
+@@ -673,30 +673,34 @@ void FFMS_VideoSource::DecodeNextFrame(int64_t &AStartTime, int64_t &Pos) {
+     if (HasPendingDelayedFrames())
+         return;
+ 
+-    AVPacket Packet;
+-    InitNullPacket(Packet);
+-
+-    while (ReadFrame(&Packet) >= 0) {
+-        if (Packet.stream_index != VideoTrack) {
+-            av_packet_unref(&Packet);
++    AVPacket *Packet = av_packet_alloc();
++    if (!Packet)
++        throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_ALLOCATION_FAILED,
++            "Could not allocate packet.");
++
++    while (ReadFrame(Packet) >= 0) {
++        if (Packet->stream_index != VideoTrack) {
++            av_packet_unref(Packet);
+             continue;
+         }
+ 
+         if (AStartTime < 0)
+-            AStartTime = Frames.UseDTS ? Packet.dts : Packet.pts;
++            AStartTime = Frames.UseDTS ? Packet->dts : Packet->pts;
+ 
+         if (Pos < 0)
+-            Pos = Packet.pos;
++            Pos = Packet->pos;
+ 
+-        bool FrameFinished = DecodePacket(&Packet);
+-        av_packet_unref(&Packet);
+-        if (FrameFinished)
++        bool FrameFinished = DecodePacket(Packet);
++        av_packet_unref(Packet);
++        if (FrameFinished) {
++            av_packet_free(&Packet);
+             return;
++        }
+     }
+ 
+     // Flush final frames
+-    InitNullPacket(Packet);
+-    DecodePacket(&Packet);
++    DecodePacket(Packet);
++    av_packet_free(&Packet);
+ }
+ 
+ bool FFMS_VideoSource::SeekTo(int n, int SeekOffset) {
+-- 
+2.40.0
+
+From bf9e03e9e08534c024e5a744a6437c4aac160201 Mon Sep 17 00:00:00 2001
+From: Derek Buitenhuis <derek.buitenhuis@gmail.com>
+Date: Tue, 4 May 2021 14:20:47 +0100
+Subject: [PATCH 2/3] configure: Remove deprecated API use
+
+Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b35ef80bc..d19714d0f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -102,10 +102,10 @@ CFLAGS="$_CFLAGS $FFMPEG_CFLAGS"
+
+ AC_DEFUN([TEST_FFMPEG],
+          [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+-            #include <libavcodec/avcodec.h>
++            #include <libavformat/avformat.h>
+             #include <libswscale/swscale.h>
+             ]],[[
+-                avcodec_register_all();
++                avformat_network_init();
+                 swscale_version();
+             ]])], [eval $1=yes], [eval $1=no])
+         ])
+
diff --git a/srcpkgs/ffms2/template b/srcpkgs/ffms2/template
index 365f64d10cbabf..1641ecf43be5bb 100644
--- a/srcpkgs/ffms2/template
+++ b/srcpkgs/ffms2/template
@@ -1,7 +1,7 @@
 # Template file for 'ffms2'
 pkgname=ffms2
 version=2.40
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--enable-shared --disable-static"
 hostmakedepends="pkg-config autoconf automake libtool"

From 1cc6fa4d8980bc78a0c9bd516b7a49b5a38d901e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 030/108] freerdp: revbump for ffmpeg6

---
 .../freerdp/patches/ffmpeg6_aa2cb9aa.patch    | 42 +++++++++++++++++++
 srcpkgs/freerdp/template                      |  2 +-
 2 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/freerdp/patches/ffmpeg6_aa2cb9aa.patch

diff --git a/srcpkgs/freerdp/patches/ffmpeg6_aa2cb9aa.patch b/srcpkgs/freerdp/patches/ffmpeg6_aa2cb9aa.patch
new file mode 100644
index 00000000000000..a4324da3a8822b
--- /dev/null
+++ b/srcpkgs/freerdp/patches/ffmpeg6_aa2cb9aa.patch
@@ -0,0 +1,42 @@
+From aa2cb9aa5ff5562433598ba168a466e0752bca0e Mon Sep 17 00:00:00 2001
+From: akallabeth <akallabeth@posteo.net>
+Date: Tue, 14 Feb 2023 07:48:54 +0100
+Subject: [PATCH] Fixed #8686: Update h264 to use new FFMPEG API
+
+---
+ channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 2 ++
+ libfreerdp/codec/h264_ffmpeg.c            | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+index 339462d865f..beea80b7a1e 100644
+--- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
++++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+@@ -239,8 +239,10 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYP
+ 		}
+ 	}
+ 
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 18, 100)
+ 	if (mdecoder->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
+ 		mdecoder->codec_context->flags |= AV_CODEC_FLAG_TRUNCATED;
++#endif
+ 
+ 	return TRUE;
+ }
+diff --git a/libfreerdp/codec/h264_ffmpeg.c b/libfreerdp/codec/h264_ffmpeg.c
+index 8a23db2473c..896a333019b 100644
+--- a/libfreerdp/codec/h264_ffmpeg.c
++++ b/libfreerdp/codec/h264_ffmpeg.c
+@@ -615,10 +615,12 @@ static BOOL libavcodec_init(H264_CONTEXT* h264)
+ 			goto EXCEPTION;
+ 		}
+ 
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 18, 100)
+ 		if (sys->codecDecoder->capabilities & AV_CODEC_CAP_TRUNCATED)
+ 		{
+ 			sys->codecDecoderContext->flags |= AV_CODEC_FLAG_TRUNCATED;
+ 		}
++#endif
+ 
+ #ifdef WITH_VAAPI
+ 
diff --git a/srcpkgs/freerdp/template b/srcpkgs/freerdp/template
index 16fddfbe8f5287..bf3a4d2e2b3ae7 100644
--- a/srcpkgs/freerdp/template
+++ b/srcpkgs/freerdp/template
@@ -1,7 +1,7 @@
 # Template file for 'freerdp'
 pkgname=freerdp
 version=2.11.4
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DWITH_ALSA=ON -DWITH_CUPS=OFF -DWITH_FFMPEG=ON
  -DWITH_GSTREAMER_0_10=OFF -DWITH_GSTREAMER_1_0=OFF -DWITH_JPEG=ON

From 3b28a38b373e31e777a24acb82f1123a40c23d46 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 031/108] gerbera: revbump for ffmpeg6

---
 srcpkgs/gerbera/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gerbera/template b/srcpkgs/gerbera/template
index ae14f35c767c03..2dc0ac0ce03b55 100644
--- a/srcpkgs/gerbera/template
+++ b/srcpkgs/gerbera/template
@@ -1,7 +1,7 @@
 # Template file for 'gerbera'
 pkgname=gerbera
 version=1.12.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DWITH_SYSTEMD=0 -DWITH_AVCODEC=1"
 hostmakedepends="pkg-config"

From 3b6626a320b789fcf9031c20a109fd591658012d Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 032/108] goldendict: revbump for ffmpeg6

---
 srcpkgs/goldendict/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/goldendict/template b/srcpkgs/goldendict/template
index f4a05759f693d3..97f44347b03a6a 100644
--- a/srcpkgs/goldendict/template
+++ b/srcpkgs/goldendict/template
@@ -1,7 +1,7 @@
 # Template file for 'goldendict'
 pkgname=goldendict
 version=1.5.0
-revision=1
+revision=2
 build_style=qmake
 configure_args="CONFIG+=zim_support goldendict.pro"
 hostmakedepends="qt5-qmake pkg-config qt5-host-tools"
@@ -10,7 +10,7 @@ makedepends="tiff-devel qt5-devel libvorbis-devel zlib-devel
  qt5-webkit-devel lzo-devel bzip2-devel libao-devel qt5-svg-devel
  libeb-devel qt5-x11extras-devel ffmpeg-devel liblzma-devel
  qt5-multimedia-devel"
-short_desc="A feature-rich dictionary lookup program"
+short_desc="Feature-rich dictionary lookup program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"
 homepage="http://goldendict.org/"

From 040a7012aaee2fbeba50fb660e470b3a61ec5bb1 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 033/108] gst-libav: revbump for ffmpeg6

---
 srcpkgs/gst-libav/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gst-libav/template b/srcpkgs/gst-libav/template
index bb084291a6b0ba..e98d87d7c06838 100644
--- a/srcpkgs/gst-libav/template
+++ b/srcpkgs/gst-libav/template
@@ -1,7 +1,7 @@
 # Template file for 'gst-libav'
 pkgname=gst-libav
 version=1.24.2
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config yasm"
 makedepends="orc-devel gst-plugins-base1-devel ffmpeg-devel"

From a51806aeb525bc7967243b9ffd4c72e30c4cce8a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sat, 3 Feb 2024 01:52:46 -0500
Subject: [PATCH 034/108] gst-plugins-bad1: revbump for ffmpeg6

---
 srcpkgs/gst-plugins-bad1/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/gst-plugins-bad1/template b/srcpkgs/gst-plugins-bad1/template
index ac45a5ab80b12b..2a7d0ccf71d7dd 100644
--- a/srcpkgs/gst-plugins-bad1/template
+++ b/srcpkgs/gst-plugins-bad1/template
@@ -1,7 +1,7 @@
 # Template file for 'gst-plugins-bad1'
 pkgname=gst-plugins-bad1
 version=1.24.2
-revision=1
+revision=2
 build_helper="gir"
 build_style=meson
 configure_args="-Dpackage-origin=https://voidlinux.org -Ddoc=disabled
@@ -27,8 +27,7 @@ makedepends="alsa-lib-devel celt-devel openssl-devel exempi-devel
  fdk-aac-devel flite-devel fluidsynth-devel liblrdf-devel ladspa-sdk
  lilv-devel lv2 libopenjpeg2-devel sbc-devel spandsp-devel vulkan-loader
  Vulkan-Headers webrtc-audio-processing-devel libzbar-devel ffmpeg-devel
- srt-devel libva-devel
- $(vopt_if gme libgme-devel)"
+ srt-devel libva-devel $(vopt_if onevpl oneVPL-devel) $(vopt_if gme libgme-devel)"
 depends="gst-plugins-base1>=${version}"
 short_desc="GStreamer plugins from the bad set (v1.x)"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -38,7 +37,7 @@ changelog="https://gstreamer.freedesktop.org/releases/${version%.*}/#${version}"
 distfiles="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${version}.tar.xz"
 checksum=448e32787bc82b586c6cb2f81c9a8ef404fea4f77f25566fe06e597a3f59136b
 
-build_options="gir gme wayland"
+build_options="gir gme onevpl wayland"
 build_options_default="gir wayland"
 desc_option_gme="Build with Game Music Emulator support"
 
@@ -46,6 +45,7 @@ CFLAGS="-fcommon"
 
 case "$XBPS_TARGET_MACHINE" in
 	mips*) ;; # libgme cannot be built for mips*
+	x86_64*) build_options_default+=" gme onevpl" ;; # onevpl only supports 64bit
 	*) build_options_default+=" gme" ;;
 esac
 

From 619b8fd37949c5ce7cab25bc8d30dd0a53ae9a69 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 035/108] gst-rtsp-server: revbump for ffmpeg6

---
 srcpkgs/gst-rtsp-server/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gst-rtsp-server/template b/srcpkgs/gst-rtsp-server/template
index ab0baf1e7d35ae..dde825fcf7fe12 100644
--- a/srcpkgs/gst-rtsp-server/template
+++ b/srcpkgs/gst-rtsp-server/template
@@ -1,7 +1,7 @@
 # Template file for 'gst-rtsp-server'
 pkgname=gst-rtsp-server
 version=1.24.2
-revision=1
+revision=2
 build_style=meson
 build_helper=gir
 configure_args="-Dintrospection=enabled"

From c1ada7f688377fc80330236a757c4a214e8f89f6 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 036/108] guvcview: update to 2.0.8.

---
 srcpkgs/guvcview/patches/fix-include.patch | 10 ++++++++++
 srcpkgs/guvcview/template                  |  7 +++----
 2 files changed, 13 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/guvcview/patches/fix-include.patch

diff --git a/srcpkgs/guvcview/patches/fix-include.patch b/srcpkgs/guvcview/patches/fix-include.patch
new file mode 100644
index 00000000000000..503c2af3b78c1a
--- /dev/null
+++ b/srcpkgs/guvcview/patches/fix-include.patch
@@ -0,0 +1,10 @@
+--- a/guvcview/guvcview.c
++++ b/guvcview/guvcview.c
+@@ -28,6 +28,7 @@
+ #include <sys/stat.h>
+ #include <sys/resource.h>
+ #include <errno.h>
++#include <locale.h>
+ 
+ #include "gview.h"
+ #include "gviewv4l2core.h"
diff --git a/srcpkgs/guvcview/template b/srcpkgs/guvcview/template
index d42fd38fa4ad12..86a7fd619612c8 100644
--- a/srcpkgs/guvcview/template
+++ b/srcpkgs/guvcview/template
@@ -1,8 +1,7 @@
 # Template file for 'guvcview'
 pkgname=guvcview
-version=2.0.7
-revision=2
-create_wrksrc=yes
+version=2.0.8
+revision=1
 build_style=gnu-configure
 configure_args="--disable-static --disable-debian-menu"
 hostmakedepends="pkg-config intltool autoconf automake libtool glib-devel"
@@ -14,7 +13,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://guvcview.sourceforge.net/"
 distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-src-${version}.tar.bz2"
-checksum=f47d51fbd06e44eeaa1a82f4a153c927527c90d94514197a70b2956028cc8ad4
+checksum=a21f4e448286666cf27bafef5290cc953a0a1796b752e5bbe521266dc1230c81
 
 post_patch() {
 	sed '31a#include <locale.h>' -i  guvcview/guvcview.c

From 84d98bea361ae04dbaac7b095b6c71cadc5415bc Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 037/108] handbrake: update to 1.6.1

---
 .../patches/fix-missing-x265-link-flag.patch    | 11 ++++++-----
 .../handbrake/patches/libhb-vpl-include.patch   | 15 +++++++++++++++
 srcpkgs/handbrake/template                      | 17 ++++++++++-------
 3 files changed, 31 insertions(+), 12 deletions(-)
 create mode 100644 srcpkgs/handbrake/patches/libhb-vpl-include.patch

diff --git a/srcpkgs/handbrake/patches/fix-missing-x265-link-flag.patch b/srcpkgs/handbrake/patches/fix-missing-x265-link-flag.patch
index 26db03867a0c83..d6bb2eda627a36 100644
--- a/srcpkgs/handbrake/patches/fix-missing-x265-link-flag.patch
+++ b/srcpkgs/handbrake/patches/fix-missing-x265-link-flag.patch
@@ -1,14 +1,15 @@
 --- a/gtk/configure.ac
 +++ b/gtk/configure.ac
 @@ -203,7 +203,7 @@
- 
+
  AM_CONDITIONAL([MINGW], [test "x$mingw_flag" = "xyes"])
- 
--HB_LIBS="$HB_LIBS -lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -lturbojpeg -llzma -lzimg"
-+HB_LIBS="$HB_LIBS -lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -lturbojpeg -llzma -lzimg -ldl"
+
+-HB_LIBS="$HB_LIBS -lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -lturbojpeg -llzma -lzimg -lSvtAv1Enc"
++HB_LIBS="$HB_LIBS -lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -lturbojpeg -llzma -lzimg -lSvtAv1Enc -ldl"
  HB_CPPFLAGS="$HB_CPPFLAGS $HBINC"
- 
+
  PKG_CHECK_MODULES([x264], [x264], sys_x264=yes, sys_x264=no)
+
 --- a/test/module.defs
 +++ b/test/module.defs
 @@ -69,6 +69,9 @@
diff --git a/srcpkgs/handbrake/patches/libhb-vpl-include.patch b/srcpkgs/handbrake/patches/libhb-vpl-include.patch
new file mode 100644
index 00000000000000..298f9f4ab28f2a
--- /dev/null
+++ b/srcpkgs/handbrake/patches/libhb-vpl-include.patch
@@ -0,0 +1,15 @@
+--- a/libhb/module.defs	2023-01-22 11:36:49.000000000 -0500
++++ b/libhb/module.defs	2023-04-03 22:37:52.395467010 -0400
+@@ -46,11 +46,7 @@
+ LIBHB.GCC.I += $(LIBHB.build/) $(CONTRIB.build/)include
+ 
+ ifeq (1,$(FEATURE.qsv))
+-    ifeq ($(HOST.system),freebsd))
+-        LIBHB.GCC.I += $(LOCALBASE)/include/vpl
+-    else
+-        LIBHB.GCC.I += $(CONTRIB.build/)include/vpl
+-    endif
++    LIBHB.GCC.I += /usr/include/vpl
+ endif
+ 
+ ifneq (,$(filter $(HOST.system),freebsd netbsd openbsd))
diff --git a/srcpkgs/handbrake/template b/srcpkgs/handbrake/template
index ca5e4571e49c37..c32cb1bfa31f4b 100644
--- a/srcpkgs/handbrake/template
+++ b/srcpkgs/handbrake/template
@@ -1,10 +1,10 @@
 # Template file for 'handbrake'
 pkgname=handbrake
-version=1.5.1
+version=1.6.1
 revision=1
 build_style=gnu-configure
 configure_args="--force --disable-gtk-update-checks --disable-df-fetch --harden
- $(vopt_enable fdk_aac fdk-aac) $(vopt_enable nvenc)"
+ $(vopt_enable fdk_aac fdk-aac) $(vopt_enable nvenc) $(vopt_enable qsv)"
 make_build_args="-C ${XBPS_TRIPLET}"
 make_install_args="-C ${XBPS_TRIPLET}"
 hostmakedepends="automake cmake gettext-devel glib-devel intltool libtool m4 meson nasm pkg-config python3"
@@ -12,8 +12,11 @@ makedepends="bzip2-devel ffmpeg-devel gst-plugins-base1-devel gtk+3-devel
  jansson-devel lame-devel libass-devel libbluray-devel libdav1d-devel
  libdvdnav-devel libdvdread-devel libgudev-devel libnuma-devel
  libsamplerate-devel libtheora-devel libvorbis-devel libvpx-devel libxml2-devel
- opus-devel speex-devel x264-devel x265-devel zimg-devel
+ opus-devel speex-devel x264-devel x265-devel zimg-devel libsvt-av1-devel
  $(vopt_if fdk_aac fdk-aac-devel)
+ $(vopt_if qsv libva-devel)
+ $(vopt_if qsv libdrm-devel)
+ $(vopt_if qsv onevpl-devel)
  $(vopt_if nvenc nv-codec-headers)"
 depends="desktop-file-utils gst-plugins-good1 hicolor-icon-theme"
 short_desc="Multithreaded video transcoder"
@@ -21,15 +24,15 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-2.0-only"
 homepage="https://handbrake.fr/"
 distfiles="https://github.com/HandBrake/HandBrake/releases/download/${version}/HandBrake-${version}-source.tar.bz2"
-checksum=3999fe06d5309c819799a73a968a8ec3840e7840c2b64af8f5cdb7fd8c9430f0
+checksum=94ccfe03db917a91650000c510f7fd53f844da19f19ad4b4be1b8f6bc31a8d4c
 nocross=yes
 
-build_options="fdk_aac nvenc"
+build_options="fdk_aac nvenc qsv"
 
 case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686*)
 		CFLAGS="-msse"
-		build_options_default="nvenc"
+		build_options_default="nvenc qsv"
 		;;
 esac
 
@@ -37,7 +40,7 @@ pre_configure() {
 	# use system libraries, don't download them
 	rm -rf contrib/
 	for module in fdk-aac ffmpeg libbluray libdav1d libdvdnav libdvdread nvenc \
-		x265 zimg; do
+		x265 zimg svt-av1 libvpl; do
 	    vsed -i "/MODULES += contrib\/${module}/d" make/include/main.defs
 	done
 }

From debcdf5fdf1021d986b4857cc667a24e4c4fbee0 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 038/108] hedgewars: revbump for ffmpeg4

---
 srcpkgs/hedgewars/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/hedgewars/template b/srcpkgs/hedgewars/template
index 94b6db673b0c3a..402ccfaaecbc2d 100644
--- a/srcpkgs/hedgewars/template
+++ b/srcpkgs/hedgewars/template
@@ -1,13 +1,13 @@
 # Template file for 'hedgewars'
 pkgname=hedgewars
 version=1.0.2
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DNOSERVER=1 -DDATA_INSTALL_DIR=/usr/share/${pkgname}
  -DPHYSFS_SYSTEM=1 -DMINIMAL_FLAGS=1"
 make_cmd=make
 hostmakedepends="lua51 pkg-config qt5-qmake qt5-host-tools"
-makedepends="ffmpeg-devel lua51-devel physfs-devel qt5-tools-devel SDL2_image-devel
+makedepends="ffmpeg4-devel lua51-devel physfs-devel qt5-tools-devel SDL2_image-devel
  SDL2_mixer-devel SDL2_net-devel SDL2_ttf-devel"
 depends="libfreeglut"
 short_desc="Funny turn-based artillery game, featuring fighting Hedgehogs!"

From 0b4a403253bafacaf74b248498c237af0e56506e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 039/108] idjc: revbump for ffmpeg4

---
 srcpkgs/idjc/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/idjc/template b/srcpkgs/idjc/template
index a9cde0665d55b1..f41e1e4fabbae7 100644
--- a/srcpkgs/idjc/template
+++ b/srcpkgs/idjc/template
@@ -1,11 +1,11 @@
 # Template file for 'idjc'
 pkgname=idjc
 version=0.9.1
-revision=5
+revision=6
 build_style=gnu-configure
 hostmakedepends="pkg-config git python3 automake gettext-devel libtool"
 makedepends="libvorbis-devel libogg-devel jack-devel libsamplerate-devel
- libflac-devel libsndfile-devel mpg123-devel ffmpeg-devel speex-devel
+ libflac-devel libsndfile-devel mpg123-devel ffmpeg4-devel speex-devel
  glib-devel pixman-devel lame-devel python3-gobject-devel libshout-idjc-devel
  opus-devel twolame-devel python3-mutagen python3-devel"
 depends="python3-gobject python3-mutagen desktop-file-utils shared-mime-info python3-dbus jack"

From ab2871b8a5de82b9a8ef3921cf3c12793a8f2e5d Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 040/108] kid3: revbump for ffmpeg6

---
 srcpkgs/kid3/patches/ffmpeg5.patch | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/kid3/patches/ffmpeg5.patch

diff --git a/srcpkgs/kid3/patches/ffmpeg5.patch b/srcpkgs/kid3/patches/ffmpeg5.patch
new file mode 100644
index 00000000000000..135fc50e07c9ba
--- /dev/null
+++ b/srcpkgs/kid3/patches/ffmpeg5.patch
@@ -0,0 +1,17 @@
+# https://aur.archlinux.org/cgit/aur.git/diff/ffmpeg5.patch?h=kid3-cli&id=12410a74906612e7efc0ec8fbce739b4a0fef7e7
+diff --git a/src/plugins/acoustidimport/ffmpegfingerprintdecoder.cpp b/src/plugins/acoustidimport/ffmpegfingerprintdecoder.cpp
+index e156d424..e12b9abd 100644
+--- a/src/plugins/acoustidimport/ffmpegfingerprintdecoder.cpp
++++ b/src/plugins/acoustidimport/ffmpegfingerprintdecoder.cpp
+@@ -232,7 +232,11 @@ private:
+   friend class Format;
+   friend class Converter;
+   AVCodecContext* m_ptr;
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 0, 0)
+   AVCodec* m_impl;
++#else
++  const AVCodec* m_impl;
++#endif
+   AVFrame* m_frame;
+   bool m_opened;
+ };

From de80b134bd5637c122a5e17f52f73f9068b8542e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 041/108] kodi: revbump for ffmpeg4

---
 srcpkgs/kodi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/kodi/template b/srcpkgs/kodi/template
index d37a5918cd6758..ea78e0aca0fe3e 100644
--- a/srcpkgs/kodi/template
+++ b/srcpkgs/kodi/template
@@ -1,7 +1,7 @@
 # Template file for 'kodi'
 pkgname=kodi
 version=19.4
-revision=9
+revision=10
 _codename="Matrix"
 build_style=cmake
 configure_args="-DWITH_FFMPEG=/usr -DENABLE_LDGOLD=OFF
@@ -54,7 +54,7 @@ makedepends="
  libmad-devel fontconfig-devel libXinerama-devel libsamplerate-devel libmms-devel
  enca-devel boost-devel libcurl-devel libva-devel libvdpau-devel libass-devel
  libbluetooth-devel yajl-devel libplist-devel librtmp-devel tinyxml-devel
- taglib-devel libcap-devel lame-devel libbluray-devel libnfs-devel ffmpeg-devel
+ taglib-devel libcap-devel lame-devel libbluray-devel libnfs-devel ffmpeg4-devel
  giflib-devel libxslt-devel gnutls-devel libssh-devel libmicrohttpd-devel
  libcec-devel dcadec-devel flatbuffers-devel fmt-devel lcms2-devel
  libfstrcmp-devel rapidjson libcdio-paranoia spdlog libwaylandpp-devel

From eeeeffcd108e198218d499bc787ff7b2cac19774 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 042/108] kpipewire: revbump for ffmpeg6

---
 srcpkgs/kpipewire/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kpipewire/template b/srcpkgs/kpipewire/template
index 826af070468b65..a7bf8772e36702 100644
--- a/srcpkgs/kpipewire/template
+++ b/srcpkgs/kpipewire/template
@@ -1,7 +1,7 @@
 # Template file for 'kpipewire'
 pkgname=kpipewire
 version=6.0.4
-revision=1
+revision=2
 build_style=cmake
 build_helper=qemu
 configure_args="-DKDE_INSTALL_QMLDIR=lib/qt6/qml"

From cf4267e651b0ae98246558b8b89448945abda6de Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 043/108] libopenal: revbump for ffmpeg6

---
 srcpkgs/libopenal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libopenal/template b/srcpkgs/libopenal/template
index 88d0f11307d81a..8308fca0393e33 100644
--- a/srcpkgs/libopenal/template
+++ b/srcpkgs/libopenal/template
@@ -1,7 +1,7 @@
 # Template file for 'libopenal'
 pkgname=libopenal
 version=1.23.1
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DALSOFT_EXAMPLES=OFF"
 hostmakedepends="pkg-config"

From f367653fb240024340ad3b79994bb81c5756de0b Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 044/108] loudgain: revbump for ffmpeg6

---
 srcpkgs/loudgain/patches/ffmpeg5.patch | 11 +++++++++++
 srcpkgs/loudgain/template              |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/loudgain/patches/ffmpeg5.patch

diff --git a/srcpkgs/loudgain/patches/ffmpeg5.patch b/srcpkgs/loudgain/patches/ffmpeg5.patch
new file mode 100644
index 00000000000000..16d4510ee98faa
--- /dev/null
+++ b/srcpkgs/loudgain/patches/ffmpeg5.patch
@@ -0,0 +1,11 @@
+--- a/src/scan.c	2019-09-06 11:31:19.000000000 -0400
++++ b/src/scan.c	2023-03-23 11:15:40.867968521 -0400
+@@ -69,8 +69,6 @@
+ 	 * It is now useless
+ 	 * https://github.com/FFmpeg/FFmpeg/blob/70d25268c21cbee5f08304da95be1f647c630c15/doc/APIchanges#L86
+ 	 */
+-  if (avformat_version() < AV_VERSION_INT(58,9,100))
+-    av_register_all();
+ 
+ 	av_log_set_callback(scan_av_log);
+ 
diff --git a/srcpkgs/loudgain/template b/srcpkgs/loudgain/template
index da4f2d56e94c3d..4d6bf29efb4fdd 100644
--- a/srcpkgs/loudgain/template
+++ b/srcpkgs/loudgain/template
@@ -1,7 +1,7 @@
 # Template file for 'loudgain'
 pkgname=loudgain
 version=0.6.8
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="libebur128-devel taglib-devel ffmpeg-devel"

From 0ec4b070a98f9b2abfe54f5e9152ffbd99304ab7 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 045/108] mediastreamer: revbump for ffmpeg4

---
 srcpkgs/mediastreamer/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/mediastreamer/template b/srcpkgs/mediastreamer/template
index 0fcffa7653d18e..e888626b945e55 100644
--- a/srcpkgs/mediastreamer/template
+++ b/srcpkgs/mediastreamer/template
@@ -1,11 +1,11 @@
 # Template file for 'mediastreamer'
 pkgname=mediastreamer
 version=5.2.111
-revision=2
+revision=3
 build_style=cmake
 configure_args="-DENABLE_STRICT=0 -DENABLE_UNIT_TESTS=0"
 hostmakedepends="python3"
-makedepends="bzrtp-devel ffmpeg-devel glew-devel libXv-devel libsrtp-devel
+makedepends="bzrtp-devel ffmpeg4-devel glew-devel libXv-devel libsrtp-devel
  libupnp-devel libvpx-devel mbedtls-devel opus-devel ortp-devel pulseaudio-devel
  libtheora-devel speex-devel v4l-utils-devel bcg729-devel bcmatroska2-devel libgsm-devel
  zxing-cpp-devel"

From 97fdb4bc38d67c82a6e6aa00aa7945e78eb58fe0 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 046/108] mgba: revbump for ffmpeg6

---
 srcpkgs/mgba/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mgba/template b/srcpkgs/mgba/template
index 6cd65650312543..93401adb618bd8 100644
--- a/srcpkgs/mgba/template
+++ b/srcpkgs/mgba/template
@@ -1,7 +1,7 @@
 # Template file for 'mgba'
 pkgname=mgba
 version=0.10.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="pkg-config qt5-host-tools qt5-qmake desktop-file-utils"
 makedepends="SDL2-devel ffmpeg-devel libedit-devel libepoxy-devel libmagick-devel

From bc853f2940fe3377974e413f05c72d3aca4c94f7 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:49 -0400
Subject: [PATCH 047/108] mlt: revbump for ffmpeg4

---
 srcpkgs/mlt/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/mlt/template b/srcpkgs/mlt/template
index 73e3915aaab9ac..d7ed4c4b30a868 100644
--- a/srcpkgs/mlt/template
+++ b/srcpkgs/mlt/template
@@ -1,14 +1,14 @@
 # Template file for 'mlt'
 pkgname=mlt
 version=6.26.1
-revision=3
+revision=4
 build_style=configure
 configure_args="--prefix=/usr --libdir=/usr/lib$XBPS_TARGET_WORDSIZE
  --enable-gpl --enable-gpl3 --disable-swfdec --without-kde
  --swig-languages=python"
 hostmakedepends="doxygen pkg-config ladspa-sdk swig python3 which"
 # XXX: movit vid.stab
-makedepends="alsa-lib-devel ffmpeg-devel gtk+-devel jack-devel ladspa-sdk
+makedepends="alsa-lib-devel ffmpeg4-devel gtk+-devel jack-devel ladspa-sdk
  libexif-devel libsamplerate-devel libxml2-devel sox-devel SDL_image-devel
  fftw-devel frei0r-plugins python3-devel pulseaudio-devel movit-devel
  libvidstab-devel"

From fed8032e1c1088f479b158969698f6323b4b2ff9 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:49 -0400
Subject: [PATCH 048/108] moc: revbump for ffmpeg4

---
 srcpkgs/moc/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/moc/template b/srcpkgs/moc/template
index 3a04932c8f1e61..838755f88db09e 100644
--- a/srcpkgs/moc/template
+++ b/srcpkgs/moc/template
@@ -1,10 +1,10 @@
 # Template file for 'moc'
 pkgname=moc
 version=2.5.2
-revision=7
+revision=8
 build_style=gnu-configure
 hostmakedepends="pkg-config"
-makedepends="db-devel ncurses-devel libcurl-devel popt-devel ffmpeg-devel
+makedepends="db-devel ncurses-devel libcurl-devel popt-devel ffmpeg4-devel
  jack-devel alsa-lib-devel libltdl-devel libflac-devel libvorbis-devel
  libmad-devel libmpcdec-devel libmodplug-devel libid3tag-devel faad2-devel
  taglib-devel libsndfile-devel wavpack-devel speex-devel libsamplerate-devel

From b13844c6c8e5f599a4655bd4d89d5af7d2296356 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:49 -0400
Subject: [PATCH 049/108] motion: revbump for ffmpeg6

---
 srcpkgs/motion/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/motion/template b/srcpkgs/motion/template
index 607ebeb3c7b242..bf63a91d9764f6 100644
--- a/srcpkgs/motion/template
+++ b/srcpkgs/motion/template
@@ -1,7 +1,7 @@
 # Template file for 'motion'
 pkgname=motion
 version=4.6.0
-revision=1
+revision=2
 build_style=gnu-configure
 hostmakedepends="automake pkg-config gettext-devel tar"
 makedepends="ffmpeg-devel libmicrohttpd-devel v4l-utils-devel gettext-devel"

From 78fc6a5e374d4669b2b2de2286d2e8648aeec042 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:49 -0400
Subject: [PATCH 050/108] olive: revbump for ffmpeg4

---
 srcpkgs/olive/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/olive/template b/srcpkgs/olive/template
index 12a46936c99003..5c2917b9c51245 100644
--- a/srcpkgs/olive/template
+++ b/srcpkgs/olive/template
@@ -1,10 +1,10 @@
 # Template file for 'olive'
 pkgname=olive
 version=0.1.2
-revision=2
+revision=3
 build_style=qmake
 hostmakedepends="qt5-qmake qt5-host-tools pkg-config"
-makedepends="qt5-devel qt5-multimedia-devel qt5-svg-devel ffmpeg-devel frei0r-plugins"
+makedepends="qt5-devel qt5-multimedia-devel qt5-svg-devel ffmpeg4-devel frei0r-plugins"
 short_desc="Non-linear video editor"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"

From 914e050e03a70dd5da3fca46d6972870435494d1 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 051/108] opentoonz: revbump for ffmpeg6

---
 srcpkgs/opentoonz/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/opentoonz/template b/srcpkgs/opentoonz/template
index ee9f7603f55fd8..3e81834ca0eddf 100644
--- a/srcpkgs/opentoonz/template
+++ b/srcpkgs/opentoonz/template
@@ -1,7 +1,7 @@
 # Template file for 'opentoonz'
 pkgname=opentoonz
 version=1.6.0
-revision=2
+revision=3
 build_wrksrc="toonz/sources"
 build_style=cmake
 make_cmd=make

From 95732695aa750e1ba6b65b1f5b4a173fab5720ab Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 052/108] pianobar: revbump for ffmpeg6

---
 srcpkgs/pianobar/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/pianobar/template b/srcpkgs/pianobar/template
index e3febb821a4510..1e3dc1bf9308ee 100644
--- a/srcpkgs/pianobar/template
+++ b/srcpkgs/pianobar/template
@@ -1,7 +1,7 @@
 # Template file for 'pianobar'
 pkgname=pianobar
 version=2022.04.01
-revision=1
+revision=2
 build_style=gnu-makefile
 make_build_args="V=1"
 hostmakedepends="pkg-config"

From ccf6c4c167814c2821bc3d2b0660a7db7857a30f Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 053/108] ppsspp: revbump for ffmpeg6

---
 srcpkgs/ppsspp/patches/ffmpeg6.patch | 15 +++++++++++++++
 srcpkgs/ppsspp/template              |  3 +--
 2 files changed, 16 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/ppsspp/patches/ffmpeg6.patch

diff --git a/srcpkgs/ppsspp/patches/ffmpeg6.patch b/srcpkgs/ppsspp/patches/ffmpeg6.patch
new file mode 100644
index 00000000000000..5803c7bf227309
--- /dev/null
+++ b/srcpkgs/ppsspp/patches/ffmpeg6.patch
@@ -0,0 +1,15 @@
+--- a/Core/HW/SimpleAudioDec.cpp	2024-02-04 08:08:02.000000000 -0500
++++ b/Core/HW/SimpleAudioDec.cpp	2024-02-15 14:48:27.114362051 -0500
+@@ -81,7 +81,11 @@
+ 		return;
+ 	}
+ 	// Find decoder
++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 18, 100)
+ 	codec_ = avcodec_find_decoder((AVCodecID)audioCodecId);
++#else // this is a macro to const in the header
++	codec_ = (AVCodec*)avcodec_find_decoder((AVCodecID)audioCodecId);
++#endif
+ 	if (!codec_) {
+ 		// Eh, we shouldn't even have managed to compile. But meh.
+ 		ERROR_LOG(ME, "This version of FFMPEG does not support AV_CODEC_ctx for audio (%s). Update your submodule.", GetCodecName(audioType));
+
diff --git a/srcpkgs/ppsspp/template b/srcpkgs/ppsspp/template
index 2238a7601c0af8..1fda55268a2d39 100644
--- a/srcpkgs/ppsspp/template
+++ b/srcpkgs/ppsspp/template
@@ -1,7 +1,7 @@
 # Template file for 'ppsspp'
 pkgname=ppsspp
 version=1.17.1
-revision=1
+revision=2
 _glslang_commit=b34f619e1c85810dcb3c578107d2e48ba4ee2b37
 _SPIRV_Cross_commit=4212eef67ed0ca048cb726a6767185504e7695e5
 _armips_commit=a8d71f0f279eb0d30ecf6af51473b66ae0cf8e8d
@@ -91,7 +91,6 @@ post_configure() {
 }
 
 do_install() {
-	vlicense LICENSE.TXT
 	vinstall icons/icon.svg 644 usr/share/pixmaps ppsspp.svg
 	vinstall Qt/PPSSPP.desktop 644 usr/share/applications
 	vbin build/PPSSPPHeadless ppsspp-headless

From 5379254960438480e0cde539235f0929337f0afc Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 054/108] pqiv: revbump for ffmpeg6

---
 srcpkgs/pqiv/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/pqiv/template b/srcpkgs/pqiv/template
index f9f7751196d4ee..0d50777e56a2d8 100644
--- a/srcpkgs/pqiv/template
+++ b/srcpkgs/pqiv/template
@@ -1,7 +1,7 @@
 # Template file for 'pqiv'
 pkgname=pqiv
 version=2.13.1
-revision=1
+revision=2
 build_style=gnu-makefile
 hostmakedepends="pkg-config"
 makedepends="glib-devel gtk+3-devel $(vopt_if ffmpeg ffmpeg-devel)

From 7fdaecfc5a6eee8e77bd0eade995ad62ef54b305 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 055/108] qmmp: revbump for ffmpeg6

---
 srcpkgs/qmmp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/qmmp/template b/srcpkgs/qmmp/template
index 53781ea3bc28ad..2da07f1e87eac0 100644
--- a/srcpkgs/qmmp/template
+++ b/srcpkgs/qmmp/template
@@ -1,7 +1,7 @@
 # Template file for 'qmmp'
 pkgname=qmmp
 version=1.6.1
-revision=3
+revision=4
 build_style=cmake
 configure_args="-DUSE_HAL:BOOL=FALSE -DQMMP_DEFAULT_UI:STRING=simple"
 hostmakedepends="pkg-config qt5-host-tools qt5-qmake"

From 1b9a95b732044e49d2c043181e35fb7f0137aa67 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Thu, 14 Dec 2023 13:28:10 -0500
Subject: [PATCH 056/108] qt6-pdf: revbump for ffmpeg6

---
 srcpkgs/qt6-pdf/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/qt6-pdf/template b/srcpkgs/qt6-pdf/template
index ecda84afac1310..531b4e1d4fe84d 100644
--- a/srcpkgs/qt6-pdf/template
+++ b/srcpkgs/qt6-pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-pdf'
 pkgname=qt6-pdf
 version=6.6.0
-revision=3
+revision=4
 build_style=cmake
 configure_args="-DQT_FEATURE_qtpdf_build=ON
  -DQT_FEATURE_qtpdf_widgets_build=ON

From d031c28ca1dbc15d1de12106a209ac0b26fe26c4 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 057/108] qt5-webengine: revbump for ffmpeg6

---
 .../chromium-media-filters-cpp14.patch        |  11 ++
 srcpkgs/qt5-webengine/patches/ffmpeg5.patch   | 179 ++++++++++++++++++
 .../qtwebengine-fix-ffmpeg5-build.patch       |  14 ++
 srcpkgs/qt5-webengine/template                |   4 +-
 4 files changed, 206 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp14.patch
 create mode 100644 srcpkgs/qt5-webengine/patches/ffmpeg5.patch
 create mode 100644 srcpkgs/qt5-webengine/patches/qtwebengine-fix-ffmpeg5-build.patch

diff --git a/srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp14.patch b/srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp14.patch
new file mode 100644
index 00000000000000..04adc540f2cbc0
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/chromium-media-filters-cpp14.patch
@@ -0,0 +1,11 @@
+--- a/src/3rdparty/chromium/media/filters/BUILD.gn	2023-02-27 13:32:59.000000000 -0500
++++ b/src/3rdparty/chromium/media/filters/BUILD.gn	2023-04-02 17:21:39.204066384 -0400
+@@ -96,6 +96,8 @@
+     "//ui/gfx/geometry:geometry",
+   ]
+ 
++  cflags_cc = [ "-std=c++14" ]
++
+   libs = []
+ 
+   if (proprietary_codecs) {
diff --git a/srcpkgs/qt5-webengine/patches/ffmpeg5.patch b/srcpkgs/qt5-webengine/patches/ffmpeg5.patch
new file mode 100644
index 00000000000000..ac55e1634423a9
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/ffmpeg5.patch
@@ -0,0 +1,179 @@
+--- a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc	2023-04-02 16:50:57.732547446 -0400
++++ b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc	2023-04-02 16:50:09.486478995 -0400
+@@ -57,6 +57,8 @@
+ 
+ namespace {
+ 
++constexpr int64_t kRelativeTsBase = static_cast<int64_t>(0x7ffeffffffffffff);
++
+ void SetAVStreamDiscard(AVStream* stream, AVDiscard discard) {
+   DCHECK(stream);
+   stream->discard = discard;
+@@ -90,24 +92,12 @@
+ 
+ static base::TimeDelta ExtractStartTime(AVStream* stream) {
+   // The default start time is zero.
+-  base::TimeDelta start_time;
++  base::TimeDelta start_time = kNoTimestamp;
+ 
+   // First try to use  the |start_time| value as is.
+   if (stream->start_time != kNoFFmpegTimestamp)
+     start_time = ConvertFromTimeBase(stream->time_base, stream->start_time);
+ 
+-  // Next try to use the first DTS value, for codecs where we know PTS == DTS
+-  // (excludes all H26x codecs). The start time must be returned in PTS.
+-  if (stream->first_dts != kNoFFmpegTimestamp &&
+-      stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
+-      stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
+-      stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
+-    const base::TimeDelta first_pts =
+-        ConvertFromTimeBase(stream->time_base, stream->first_dts);
+-    if (first_pts < start_time)
+-      start_time = first_pts;
+-  }
+-
+   return start_time;
+ }
+ 
+@@ -408,11 +398,11 @@
+   scoped_refptr<DecoderBuffer> buffer;
+ 
+   if (type() == DemuxerStream::TEXT) {
+-    int id_size = 0;
++    size_t id_size = 0;
+     uint8_t* id_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
+ 
+-    int settings_size = 0;
++    size_t settings_size = 0;
+     uint8_t* settings_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
+ 
+@@ -424,7 +414,7 @@
+     buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
+                                      side_data.data(), side_data.size());
+   } else {
+-    int side_data_size = 0;
++    size_t side_data_size = 0;
+     uint8_t* side_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
+ 
+@@ -485,7 +475,7 @@
+                                        packet->size - data_offset);
+     }
+ 
+-    int skip_samples_size = 0;
++    size_t skip_samples_size = 0;
+     const uint32_t* skip_samples_ptr =
+         reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
+             packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
+@@ -1587,6 +1577,8 @@
+   for (const auto& stream : streams_) {
+     if (!stream || stream->IsEnabled() != enabled)
+       continue;
++    if (stream->av_stream()->start_time == AV_NOPTS_VALUE)
++      continue;
+     if (!lowest_start_time_stream ||
+         stream->start_time() < lowest_start_time_stream->start_time()) {
+       lowest_start_time_stream = stream.get();
+@@ -1604,6 +1596,8 @@
+     if (stream && stream->type() == DemuxerStream::VIDEO &&
+         stream->IsEnabled()) {
+       video_stream = stream.get();
++      if (stream->av_stream()->start_time == AV_NOPTS_VALUE)
++        continue;
+       if (video_stream->start_time() <= seek_time) {
+         return video_stream;
+       }
+diff -Naurp qtwebengine-5.15.10.orig/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h qtwebengine-5.15.10/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h
+--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h	2022-05-23 06:38:40.000000000 -0500
++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h	2022-07-11 22:12:47.917192788 -0500
+@@ -29,6 +29,7 @@ extern "C" {
+ #include <libavformat/avformat.h>
+ #include <libavformat/avio.h>
+ #include <libavutil/avutil.h>
++#include <libavutil/channel_layout.h>
+ #include <libavutil/imgutils.h>
+ #include <libavutil/log.h>
+ #include <libavutil/mastering_display_metadata.h>
+diff -Naurp qtwebengine-5.15.10.orig/src/3rdparty/chromium/media/filters/audio_file_reader.cc qtwebengine-5.15.10/src/3rdparty/chromium/media/filters/audio_file_reader.cc
+--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc	2022-05-23 06:38:40.000000000 -0500
++++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc	2022-07-11 22:12:47.917192788 -0500
+@@ -85,7 +85,7 @@ bool AudioFileReader::OpenDemuxer() {
+ }
+ 
+ bool AudioFileReader::OpenDecoder() {
+-  AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
++  const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+   if (codec) {
+     // MP3 decodes to S16P which we don't support, tell it to use S16 instead.
+     if (codec_context_->sample_fmt == AV_SAMPLE_FMT_S16P)
+diff -Naurp qtwebengine-5.15.10.orig/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc qtwebengine-5.15.10/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
+--- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc	2022-05-23 06:38:40.000000000 -0500
++++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc	2022-07-11 22:12:47.917192788 -0500
+@@ -329,7 +329,7 @@ bool FFmpegAudioDecoder::ConfigureDecode
+     }
+   }
+ 
+-  AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
++  const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+   if (!codec ||
+       avcodec_open2(codec_context_.get(), codec, &codec_options) < 0) {
+     DLOG(ERROR) << "Could not initialize audio decoder: "
+diff -Naurp qtwebengine-5.15.10.orig/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc qtwebengine-5.15.10/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc
+--- a/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc	2022-05-23 06:38:40.000000000 -0500
++++ b/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc	2022-07-11 22:12:47.918192779 -0500
+@@ -59,7 +59,6 @@ static int64_t AVIOSeekOperation(void* o
+ }
+ 
+ void FFmpegGlue::InitializeFFmpeg() {
+-  av_register_all();
+ }
+ 
+ static void LogContainer(bool is_local_file,
+@@ -95,9 +94,6 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol
+   // Enable fast, but inaccurate seeks for MP3.
+   format_context_->flags |= AVFMT_FLAG_FAST_SEEK;
+ 
+-  // Ensures we can read out various metadata bits like vp8 alpha.
+-  format_context_->flags |= AVFMT_FLAG_KEEP_SIDE_DATA;
+-
+   // Ensures format parsing errors will bail out. From an audit on 11/2017, all
+   // instances were real failures. Solves bugs like http://crbug.com/710791.
+   format_context_->error_recognition |= AV_EF_EXPLODE;
+diff -Naurp qtwebengine-5.15.10.orig/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc qtwebengine-5.15.10/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
+--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc	2022-05-23 06:38:40.000000000 -0500
++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc	2022-07-11 22:12:47.918192779 -0500
+@@ -391,7 +391,7 @@ bool FFmpegVideoDecoder::ConfigureDecode
+   if (decode_nalus_)
+     codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS;
+ 
+-  AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
++  const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+   if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) {
+     ReleaseFFmpegResources();
+     return false;
+diff -Naurp qtwebengine-5.15.10.orig/src/3rdparty/chromium/media/filters/media_file_checker.cc qtwebengine-5.15.10/src/3rdparty/chromium/media/filters/media_file_checker.cc
+--- a/src/3rdparty/chromium/media/filters/media_file_checker.cc	2022-05-23 06:38:40.000000000 -0500
++++ b/src/3rdparty/chromium/media/filters/media_file_checker.cc	2022-07-11 22:12:47.918192779 -0500
+@@ -68,7 +68,7 @@ bool MediaFileChecker::Start(base::TimeD
+       auto context = AVStreamToAVCodecContext(format_context->streams[i]);
+       if (!context)
+         continue;
+-      AVCodec* codec = avcodec_find_decoder(cp->codec_id);
++      const AVCodec* codec = avcodec_find_decoder(cp->codec_id);
+       if (codec && avcodec_open2(context.get(), codec, nullptr) >= 0) {
+         auto loop = std::make_unique<FFmpegDecodingLoop>(context.get());
+         stream_contexts[i] = {std::move(context), std::move(loop)};
+diff -Naurp qtwebengine-5.15.10.orig/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc qtwebengine-5.15.10/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc	2022-05-23 06:38:40.000000000 -0500
++++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc	2022-07-11 22:12:47.918192779 -0500
+@@ -203,7 +203,7 @@ int32_t H264DecoderImpl::InitDecode(cons
+   // a pointer |this|.
+   av_context_->opaque = this;
+ 
+-  AVCodec* codec = avcodec_find_decoder(av_context_->codec_id);
++  const AVCodec* codec = avcodec_find_decoder(av_context_->codec_id);
+   if (!codec) {
+     // This is an indication that FFmpeg has not been initialized or it has not
+     // been compiled/initialized with the correct set of codecs.
diff --git a/srcpkgs/qt5-webengine/patches/qtwebengine-fix-ffmpeg5-build.patch b/srcpkgs/qt5-webengine/patches/qtwebengine-fix-ffmpeg5-build.patch
new file mode 100644
index 00000000000000..bc24d5b9a29cb5
--- /dev/null
+++ b/srcpkgs/qt5-webengine/patches/qtwebengine-fix-ffmpeg5-build.patch
@@ -0,0 +1,14 @@
+--- a/src/buildtools/configure.json	2023-12-09 11:06:01.503058569 -0500
++++ b/src/buildtools/configure.json	2023-12-09 11:06:14.982361345 -0500
+@@ -779,11 +779,6 @@
+             "type": "warning",
+             "condition": "config.ios && config.simulator && config.device && features.build-qtpdf",
+             "message": "Building fat libray with device and simulator architectures will disable NEON."
+-        },
+-        {
+-            "type": "fatal",
+-            "condition": "features.webengine-system-ffmpeg && !libs.webengine-ffmpeg-support",
+-            "message": "Unmodified ffmpeg >= 5.0 is not supported. Please configure with -qt-webengine-ffmpeg."
+         }
+     ],
+     "summary": [
diff --git a/srcpkgs/qt5-webengine/template b/srcpkgs/qt5-webengine/template
index 3c0f5bda69c7ee..df6e441747cc43 100644
--- a/srcpkgs/qt5-webengine/template
+++ b/srcpkgs/qt5-webengine/template
@@ -1,14 +1,14 @@
 # Template file for 'qt5-webengine'
 pkgname=qt5-webengine
 version=5.15.16
-revision=1
+revision=2
 _version="${version}-lts"
 _chromium_commit=207c2ac45ca3386d153770c6b0d2ea2ec21ca880
 archs="x86_64* i686* armv[67]* ppc64* aarch64*"
 create_wrksrc=yes
 build_style=qmake
 configure_args="--
- -webengine-icu -webengine-ffmpeg -webengine-opus -webengine-webp
+ -webengine-icu -system-ffmpeg -webengine-opus -webengine-webp
  -webengine-pepper-plugins -webengine-printing-and-pdf -webengine-proprietary-codecs
  -webengine-pulseaudio -webengine-spellchecker -webengine-webrtc -webengine-geolocation
  -webengine-kerberos -no-webengine-embedded-build $(vopt_if sndio '' '-no')-webengine-sndio

From 09a462355986d6b3936c3dee25d9cb02ae3c7021 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:51 -0400
Subject: [PATCH 058/108] qt5: revbump for ffmpeg6

---
 srcpkgs/qt5/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template
index 0f8203e899c63f..e57e1593445204 100644
--- a/srcpkgs/qt5/template
+++ b/srcpkgs/qt5/template
@@ -3,7 +3,7 @@
 # revbump libqtxdg after bumping patch version
 pkgname=qt5
 version=5.15.11+20231124
-revision=3
+revision=4
 # commit 4765fa1df7a837db9c1f89c4da0dd76b74bb5fab
 # base repo: https://invent.kde.org/qt/qt/qt5
 build_style=meta

From d68e609bf539d6d71fc780af0ec698258226fee7 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:51 -0400
Subject: [PATCH 059/108] qtav: revbump for ffmpeg4

---
 srcpkgs/qtav/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qtav/template b/srcpkgs/qtav/template
index 775d5a139a9efa..aa69e213c984b0 100644
--- a/srcpkgs/qtav/template
+++ b/srcpkgs/qtav/template
@@ -1,10 +1,10 @@
 # Template file for 'qtav'
 pkgname=qtav
 version=1.13.0
-revision=2
+revision=3
 build_style=qmake
 hostmakedepends="qt5-qmake qt5-host-tools"
-makedepends="ffmpeg-devel libass-devel libopenal-devel
+makedepends="ffmpeg4-devel libass-devel libopenal-devel
  libva-glx-devel libXv-devel pulseaudio-devel
  qt5-declarative-devel qt5-svg-devel
  qt5-quickcontrols"

From ea971a7b215627578f2ceafd94cd8c6eee5ce9d1 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:51 -0400
Subject: [PATCH 060/108] retroarch: revbump for ffmpeg6

---
 srcpkgs/retroarch/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/retroarch/template b/srcpkgs/retroarch/template
index cb3125c5dbf1ae..c65c26f7bf0332 100644
--- a/srcpkgs/retroarch/template
+++ b/srcpkgs/retroarch/template
@@ -1,7 +1,7 @@
 # Template file for 'retroarch'
 pkgname=retroarch
 version=1.16.0.3
-revision=3
+revision=4
 build_style=configure
 configure_args="--prefix=/usr --sysconfdir=/etc --enable-networking
  --enable-udev --disable-builtinflac --disable-builtinglslang

From a74fe9ae975d2a99d22a43cfcb68d63b7713b05f Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:51 -0400
Subject: [PATCH 061/108] scrcpy: revbump for ffmpeg6

---
 srcpkgs/scrcpy/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/scrcpy/template b/srcpkgs/scrcpy/template
index d40651ad8dc835..3ec7139be5c0c5 100644
--- a/srcpkgs/scrcpy/template
+++ b/srcpkgs/scrcpy/template
@@ -1,7 +1,7 @@
 # Template file for 'scrcpy'
 pkgname=scrcpy
 version=2.4
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dcompile_server=false
  -Dprebuilt_server=/usr/share/scrcpy/scrcpy-server-v${version}"

From a10686c4efd7304d6d1d0b99f62c8c57f42cdf8f Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Tue, 17 Oct 2023 08:54:11 -0400
Subject: [PATCH 062/108] New package: spex-x replaces spek-alternative for
 ffmpeg6

---
 srcpkgs/spek-alternative                      |  1 +
 srcpkgs/spek-x/patches/musl.patch             |  7 ++++++
 srcpkgs/{spek-alternative => spek-x}/template | 22 ++++++++++++-------
 3 files changed, 22 insertions(+), 8 deletions(-)
 create mode 120000 srcpkgs/spek-alternative
 create mode 100644 srcpkgs/spek-x/patches/musl.patch
 rename srcpkgs/{spek-alternative => spek-x}/template (52%)

diff --git a/srcpkgs/spek-alternative b/srcpkgs/spek-alternative
new file mode 120000
index 00000000000000..76648236da7017
--- /dev/null
+++ b/srcpkgs/spek-alternative
@@ -0,0 +1 @@
+spek-x
\ No newline at end of file
diff --git a/srcpkgs/spek-x/patches/musl.patch b/srcpkgs/spek-x/patches/musl.patch
new file mode 100644
index 00000000000000..662f45936febc6
--- /dev/null
+++ b/srcpkgs/spek-x/patches/musl.patch
@@ -0,0 +1,7 @@
+--- a/tests/perf.cc	2024-03-09 17:13:49.086603418 -0500
++++ b/tests/perf.cc	2024-03-09 17:13:59.453603753 -0500
+@@ -1,3 +1,4 @@
++#include <cstdint>
+ #include <cstdlib>
+ #include <iostream>
+ #include <fstream>
diff --git a/srcpkgs/spek-alternative/template b/srcpkgs/spek-x/template
similarity index 52%
rename from srcpkgs/spek-alternative/template
rename to srcpkgs/spek-x/template
index d7b55c776b1d43..3ded6c2c323e4f 100644
--- a/srcpkgs/spek-alternative/template
+++ b/srcpkgs/spek-x/template
@@ -1,18 +1,18 @@
-# Template file for 'spek-alternative'
-pkgname=spek-alternative
-version=0.8.2.3
-revision=2
+# Template file for 'spek-x'
+pkgname=spek-x
+version=0.9.3
+revision=1
 build_style=gnu-configure
 hostmakedepends="automake gettext-devel intltool libtool pkg-config
  wxWidgets-common wxWidgets-gtk3-devel"
 makedepends="ffmpeg-devel wxWidgets-gtk3-devel"
 depends="ffmpeg"
 short_desc="Acoustic spectrum analyser"
-maintainer="Kartik Singh <kartik.ynwa@gmail.com>"
+maintainer="zlice <zlice555@gmail.com>"
 license="GPL-3.0-or-later"
-homepage="https://github.com/withmorten/spek-alternative"
-distfiles="https://github.com/withmorten/spek-alternative/archive/${version}.tar.gz"
-checksum="007ba4b84a310b078e378aa84c8e80783db5821437a757a488c3ecec377e6b2a"
+homepage="https://github.com/MikeWang000000/spek-x"
+distfiles="https://github.com/MikeWang000000/spek-x/archive/v${version}.tar.gz"
+checksum="7f4b109903333cdd310ab2b9176f0dc49a565891376e281a233d342cedf90ef7"
 
 CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
 
@@ -22,3 +22,9 @@ export WX_CONFIG_NAME="wx-config-gtk3"
 pre_configure() {
 	NOCONFIGURE=1 ./autogen.sh
 }
+
+spek-alternative_package() {
+	depends="spek-x"
+	short_desc+=" - transitional dummy package"
+	build_style=meta
+}

From 6c7ad7cbfc4ab2885aad8e0c6698b3bfa66beb6a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:51 -0400
Subject: [PATCH 063/108] ssr: revbump for ffmpeg6

---
 .../0001-Fix-build-with-ffmpeg-5.0.patch      | 241 ++++++++++++++++++
 srcpkgs/ssr/template                          |   2 +-
 2 files changed, 242 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch

diff --git a/srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch b/srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch
new file mode 100644
index 00000000000000..4c069b5a9fc464
--- /dev/null
+++ b/srcpkgs/ssr/patches/0001-Fix-build-with-ffmpeg-5.0.patch
@@ -0,0 +1,241 @@
+From f4cbde38021d9330dc73d2e3dfa8a70da3ff5721 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= <bero@lindev.ch>
+Date: Sun, 16 Jan 2022 02:40:04 +0100
+Subject: [PATCH] Fix build with ffmpeg 5.0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Adapt to ffmpeg 5.0 requiring more const-ness for AVCodec.
+
+Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch>
+---
+ src/AV/Output/AudioEncoder.cpp |  6 +++---
+ src/AV/Output/AudioEncoder.h   |  4 ++--
+ src/AV/Output/BaseEncoder.cpp  |  4 ++--
+ src/AV/Output/BaseEncoder.h    |  4 ++--
+ src/AV/Output/Muxer.cpp        | 12 ++++++------
+ src/AV/Output/Muxer.h          |  4 ++--
+ src/AV/Output/VideoEncoder.cpp |  6 +++---
+ src/AV/Output/VideoEncoder.h   |  4 ++--
+ 8 files changed, 22 insertions(+), 22 deletions(-)
+
+diff --git a/src/AV/Output/AudioEncoder.cpp b/src/AV/Output/AudioEncoder.cpp
+index 34d015c..cefc2e0 100644
+--- a/src/AV/Output/AudioEncoder.cpp
++++ b/src/AV/Output/AudioEncoder.cpp
+@@ -34,7 +34,7 @@ const std::vector<AudioEncoder::SampleFormatData> AudioEncoder::SUPPORTED_SAMPLE
+ 
+ const unsigned int AudioEncoder::DEFAULT_FRAME_SAMPLES = 1024;
+ 
+-AudioEncoder::AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext *codec_context, AVCodec* codec, AVDictionary** options)
++AudioEncoder::AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext *codec_context, const AVCodec* codec, AVDictionary** options)
+ 	: BaseEncoder(muxer, stream, codec_context, codec, options) {
+ 
+ #if !SSR_USE_AVCODEC_ENCODE_AUDIO2
+@@ -77,7 +77,7 @@ unsigned int AudioEncoder::GetSampleRate() {
+ }
+ 
+ bool AudioEncoder::AVCodecIsSupported(const QString& codec_name) {
+-	AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
++	const AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
+ 	if(codec == NULL)
+ 		return false;
+ 	if(!av_codec_is_encoder(codec))
+@@ -93,7 +93,7 @@ bool AudioEncoder::AVCodecIsSupported(const QString& codec_name) {
+ 	return false;
+ }
+ 
+-void AudioEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector<std::pair<QString, QString> >& codec_options,
++void AudioEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector<std::pair<QString, QString> >& codec_options,
+ 								 unsigned int bit_rate, unsigned int channels, unsigned int sample_rate) {
+ 
+ 	if(channels == 0) {
+diff --git a/src/AV/Output/AudioEncoder.h b/src/AV/Output/AudioEncoder.h
+index c93278c..ae9c82e 100644
+--- a/src/AV/Output/AudioEncoder.h
++++ b/src/AV/Output/AudioEncoder.h
+@@ -40,7 +40,7 @@ private:
+ #endif
+ 
+ public:
+-	AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options);
++	AudioEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options);
+ 	~AudioEncoder();
+ 
+ 	// Returns the required frame size, i.e. the number of samples (for each channel).
+@@ -57,7 +57,7 @@ public:
+ 
+ public:
+ 	static bool AVCodecIsSupported(const QString& codec_name);
+-	static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector<std::pair<QString, QString> >& codec_options,
++	static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector<std::pair<QString, QString> >& codec_options,
+ 							  unsigned int bit_rate, unsigned int channels, unsigned int sample_rate);
+ 
+ private:
+diff --git a/src/AV/Output/BaseEncoder.cpp b/src/AV/Output/BaseEncoder.cpp
+index 7c01ef3..4780aaf 100644
+--- a/src/AV/Output/BaseEncoder.cpp
++++ b/src/AV/Output/BaseEncoder.cpp
+@@ -42,7 +42,7 @@ double ParseCodecOptionDouble(const QString& key, const QString& value, double m
+ 	return clamp(value_double, min, max) * multiply;
+ }
+ 
+-BaseEncoder::BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options) {
++BaseEncoder::BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options) {
+ 
+ 	m_muxer = muxer;
+ 	m_stream = stream;
+@@ -157,7 +157,7 @@ void BaseEncoder::IncrementPacketCounter() {
+ 	++lock->m_total_packets;
+ }
+ 
+-void BaseEncoder::Init(AVCodec* codec, AVDictionary** options) {
++void BaseEncoder::Init(const AVCodec* codec, AVDictionary** options) {
+ 
+ 	// open codec
+ 	if(avcodec_open2(m_codec_context, codec, options) < 0) {
+diff --git a/src/AV/Output/BaseEncoder.h b/src/AV/Output/BaseEncoder.h
+index 3d92f29..7f02bbd 100644
+--- a/src/AV/Output/BaseEncoder.h
++++ b/src/AV/Output/BaseEncoder.h
+@@ -51,7 +51,7 @@ private:
+ 	std::atomic<bool> m_should_stop, m_should_finish, m_is_done, m_error_occurred;
+ 
+ protected:
+-	BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options);
++	BaseEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options);
+ 
+ public:
+ 	virtual ~BaseEncoder(); // encoders will be deleted by Muxer, don't delete them yourself!
+@@ -117,7 +117,7 @@ protected:
+ 	void IncrementPacketCounter();
+ 
+ private:
+-	void Init(AVCodec* codec, AVDictionary** options);
++	void Init(const AVCodec* codec, AVDictionary** options);
+ 	void Free();
+ 
+ 	void EncoderThread();
+diff --git a/src/AV/Output/Muxer.cpp b/src/AV/Output/Muxer.cpp
+index ad58380..14650b0 100644
+--- a/src/AV/Output/Muxer.cpp
++++ b/src/AV/Output/Muxer.cpp
+@@ -87,7 +87,7 @@ Muxer::~Muxer() {
+ 
+ VideoEncoder* Muxer::AddVideoEncoder(const QString& codec_name, const std::vector<std::pair<QString, QString> >& codec_options,
+ 									 unsigned int bit_rate, unsigned int width, unsigned int height, unsigned int frame_rate) {
+-	AVCodec *codec = FindCodec(codec_name);
++	const AVCodec *codec = FindCodec(codec_name);
+ 	AVCodecContext *codec_context = NULL;
+ 	AVStream *stream = AddStream(codec, &codec_context);
+ 	VideoEncoder *encoder;
+@@ -111,7 +111,7 @@ VideoEncoder* Muxer::AddVideoEncoder(const QString& codec_name, const std::vecto
+ 
+ AudioEncoder* Muxer::AddAudioEncoder(const QString& codec_name, const std::vector<std::pair<QString, QString> >& codec_options,
+ 									 unsigned int bit_rate, unsigned int channels, unsigned int sample_rate) {
+-	AVCodec *codec = FindCodec(codec_name);
++	const AVCodec *codec = FindCodec(codec_name);
+ 	AVCodecContext *codec_context = NULL;
+ 	AVStream *stream = AddStream(codec, &codec_context);
+ 	AudioEncoder *encoder;
+@@ -194,7 +194,7 @@ unsigned int Muxer::GetQueuedPacketCount(unsigned int stream_index) {
+ void Muxer::Init() {
+ 
+ 	// get the format we want (this is just a pointer, we don't have to free this)
+-	AVOutputFormat *format = av_guess_format(m_container_name.toUtf8().constData(), NULL, NULL);
++	const AVOutputFormat *format = av_guess_format(m_container_name.toUtf8().constData(), NULL, NULL);
+ 	if(format == NULL) {
+ 		Logger::LogError("[Muxer::Init] " + Logger::tr("Error: Can't find chosen output format!"));
+ 		throw LibavException();
+@@ -261,8 +261,8 @@ void Muxer::Free() {
+ 	}
+ }
+ 
+-AVCodec* Muxer::FindCodec(const QString& codec_name) {
+-	AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
++const AVCodec* Muxer::FindCodec(const QString& codec_name) {
++	const AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
+ 	if(codec == NULL) {
+ 		Logger::LogError("[Muxer::FindCodec] " + Logger::tr("Error: Can't find codec!"));
+ 		throw LibavException();
+@@ -270,7 +270,7 @@ AVCodec* Muxer::FindCodec(const QString& codec_name) {
+ 	return codec;
+ }
+ 
+-AVStream* Muxer::AddStream(AVCodec* codec, AVCodecContext** codec_context) {
++AVStream* Muxer::AddStream(const AVCodec* codec, AVCodecContext** codec_context) {
+ 	assert(!m_started);
+ 	assert(m_format_context->nb_streams < MUXER_MAX_STREAMS);
+ 
+diff --git a/src/AV/Output/Muxer.h b/src/AV/Output/Muxer.h
+index d72347d..b104bcb 100644
+--- a/src/AV/Output/Muxer.h
++++ b/src/AV/Output/Muxer.h
+@@ -114,8 +114,8 @@ private:
+ 	void Init();
+ 	void Free();
+ 
+-	AVCodec* FindCodec(const QString& codec_name);
+-	AVStream* AddStream(AVCodec* codec, AVCodecContext** codec_context);
++	const AVCodec* FindCodec(const QString& codec_name);
++	AVStream* AddStream(const AVCodec* codec, AVCodecContext** codec_context);
+ 
+ 	void MuxerThread();
+ 
+diff --git a/src/AV/Output/VideoEncoder.cpp b/src/AV/Output/VideoEncoder.cpp
+index 8087e8e..fc8b5d1 100644
+--- a/src/AV/Output/VideoEncoder.cpp
++++ b/src/AV/Output/VideoEncoder.cpp
+@@ -34,7 +34,7 @@ const std::vector<VideoEncoder::PixelFormatData> VideoEncoder::SUPPORTED_PIXEL_F
+ 	{"rgb", AV_PIX_FMT_RGB24, false},
+ };
+ 
+-VideoEncoder::VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options)
++VideoEncoder::VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options)
+ 	: BaseEncoder(muxer, stream, codec_context, codec, options) {
+ 
+ #if !SSR_USE_AVCODEC_ENCODE_VIDEO2
+@@ -95,7 +95,7 @@ unsigned int VideoEncoder::GetFrameRate() {
+ }
+ 
+ bool VideoEncoder::AVCodecIsSupported(const QString& codec_name) {
+-	AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
++	const AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
+ 	if(codec == NULL)
+ 		return false;
+ 	if(!av_codec_is_encoder(codec))
+@@ -111,7 +111,7 @@ bool VideoEncoder::AVCodecIsSupported(const QString& codec_name) {
+ 	return false;
+ }
+ 
+-void VideoEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector<std::pair<QString, QString> >& codec_options,
++void VideoEncoder::PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector<std::pair<QString, QString> >& codec_options,
+ 								 unsigned int bit_rate, unsigned int width, unsigned int height, unsigned int frame_rate) {
+ 
+ 	if(width == 0 || height == 0) {
+diff --git a/src/AV/Output/VideoEncoder.h b/src/AV/Output/VideoEncoder.h
+index cb7ca27..68d872e 100644
+--- a/src/AV/Output/VideoEncoder.h
++++ b/src/AV/Output/VideoEncoder.h
+@@ -40,7 +40,7 @@ private:
+ #endif
+ 
+ public:
+-	VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options);
++	VideoEncoder(Muxer* muxer, AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options);
+ 	~VideoEncoder();
+ 
+ 	// Returns the required pixel format.
+@@ -55,7 +55,7 @@ public:
+ 
+ public:
+ 	static bool AVCodecIsSupported(const QString& codec_name);
+-	static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, AVCodec* codec, AVDictionary** options, const std::vector<std::pair<QString, QString> >& codec_options,
++	static void PrepareStream(AVStream* stream, AVCodecContext* codec_context, const AVCodec* codec, AVDictionary** options, const std::vector<std::pair<QString, QString> >& codec_options,
+ 							  unsigned int bit_rate, unsigned int width, unsigned int height, unsigned int frame_rate);
+ 
+ private:
+-- 
+2.43.0
+
diff --git a/srcpkgs/ssr/template b/srcpkgs/ssr/template
index 3097754e3cbe54..e3c4261f1f5a64 100644
--- a/srcpkgs/ssr/template
+++ b/srcpkgs/ssr/template
@@ -1,7 +1,7 @@
 # Template file for 'ssr'
 pkgname=ssr
 version=0.4.4
-revision=2
+revision=3
 build_style=cmake
 configure_args="-DWITH_QT5=ON"
 hostmakedepends="pkg-config"

From 3bf8db0a2dbb2a8167f765188e7337cf3d68d43b Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 064/108] synfig: revbump for ffmpeg6 and mlt7

---
 srcpkgs/synfig/patches/ffmpeg6.patch | 71 ++++++++++++++++++++++++++++
 srcpkgs/synfig/template              |  6 +--
 2 files changed, 74 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/synfig/patches/ffmpeg6.patch

diff --git a/srcpkgs/synfig/patches/ffmpeg6.patch b/srcpkgs/synfig/patches/ffmpeg6.patch
new file mode 100644
index 00000000000000..10780b42782f4b
--- /dev/null
+++ b/srcpkgs/synfig/patches/ffmpeg6.patch
@@ -0,0 +1,71 @@
+--- a/src/modules/mod_libavcodec/trgt_av.cpp	2022-10-25 09:14:12.000000000 -0400
++++ b/src/modules/mod_libavcodec/trgt_av.cpp	2023-05-05 21:34:17.899194559 -0400
+@@ -38,6 +41,7 @@
+ extern "C"
+ {
+ #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
++#	include <libavcodec/avcodec.h>
+ #	include <libavformat/avformat.h>
+ #elif defined(HAVE_AVFORMAT_H)
+ #	include <avformat.h>
+@@ -155,11 +156,11 @@
+     }
+ 
+ 	bool open_video_stream() {
+-		if (avcodec_open2(video_context, NULL, NULL) < 0) {
++		if (avcodec_open2(video_context, nullptr, nullptr) < 0) {
+ 			synfig::error("Target_LibAVCodec: could not open video codec");
+ 			// seems the calling of avcodec_free_context after error will cause crash
+ 			// so just forget about this context
+-			video_context = NULL;
++			video_context = nullptr;
+ 			close();
+ 			return false;
+         }
+@@ -234,15 +235,21 @@
+ 		close();
+ 
+ 		if (!av_registered) {
++#if LIBAVCODEC_VERSION_MAJOR < 58 // FFMPEG < 4.0
+ 			av_register_all();
++#endif
+ 			av_registered = true;
+ 		}
+ 
+ 		// guess format
+-		AVOutputFormat *format = av_guess_format(NULL, filename.c_str(), NULL);
++#if LIBAVCODEC_VERSION_MAJOR < 59 // FFMPEG < 5.0
++		AVOutputFormat* format = av_guess_format(nullptr, filename.c_str(), nullptr);
++#else
++		const AVOutputFormat* format = av_guess_format(nullptr, filename.c_str(), nullptr);
++#endif
+ 		if (!format) {
+ 			synfig::warning("Target_LibAVCodec: unable to guess the output format, defaulting to MPEG");
+-			format = av_guess_format("mpeg", NULL, NULL);
++			format = av_guess_format("mpeg", nullptr, nullptr);
+ 		}
+ 		if (!format) {
+ 			synfig::error("Target_LibAVCodec: unable to find 'mpeg' output format");
+@@ -254,6 +261,7 @@
+ 		context = avformat_alloc_context();
+ 		assert(context);
+ 		context->oformat = format;
++#if LIBAVCODEC_VERSION_MAJOR < 58 // FFMPEG < 4.0
+ 		if (filename.size() + 1 > sizeof(context->filename)) {
+ 			synfig::error(
+ 				"Target_LibAVCodec: filename too long, max length is %d, filename is '%s'",
+@@ -263,6 +271,14 @@
+ 			return false;
+ 		}
+ 		memcpy(context->filename, filename.c_str(), filename.size() + 1);
++#else
++		context->url = av_strndup(filename.c_str(), filename.size());
++		if (!context->url) {
++			synfig::error("Target_LibAVCodec: cannot allocate space for filename");
++			close();
++			return false;
++		}
++#endif
+ 
+ 		packet = av_packet_alloc();
+ 		assert(packet);
diff --git a/srcpkgs/synfig/template b/srcpkgs/synfig/template
index d4d3e341a20bf8..828b5cb32956ee 100644
--- a/srcpkgs/synfig/template
+++ b/srcpkgs/synfig/template
@@ -2,11 +2,11 @@
 # Should be kept in sync with 'synfigstudio' and 'ETL'
 pkgname=synfig
 version=1.4.4
-revision=4
+revision=5
 build_style=gnu-configure
 configure_args="--with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib"
 hostmakedepends="boost-build ImageMagick pkg-config intltool"
-makedepends="ETL gettext-devel libxml++-devel mlt-devel libmagick-devel
+makedepends="ETL gettext-devel libxml++-devel mlt7-devel libmagick-devel
  libmng-devel boost-build boost-devel libopenexr-devel ffmpeg-devel"
 depends="ImageMagick"
 short_desc="CLI 2D vector and timeline-based animation software"
@@ -20,7 +20,7 @@ CXXFLAGS="-std=c++11 -DHAVE_LOCALE_H=1"
 
 synfig-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}
-	 libopenexr-devel libxml++-devel mlt-devel"
+	 libopenexr-devel libxml++-devel mlt7-devel"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/bin/synfig-config

From c51ec3aff33de6e6d02be50949667f771abba956 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 065/108] timg: revbump for ffmpeg6

---
 srcpkgs/timg/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/timg/template b/srcpkgs/timg/template
index 2a2ab763d2fddf..8fb4327535ef93 100644
--- a/srcpkgs/timg/template
+++ b/srcpkgs/timg/template
@@ -1,7 +1,7 @@
 # Template file for 'timg'
 pkgname=timg
 version=1.4.5
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DWITH_OPENSLIDE_SUPPORT=off -Wno-dev"
 hostmakedepends="pkg-config git"

From af9d7c818b9ab71e3cb39f330d46579386932435 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 066/108] tvheadend: revbump for ffmpeg4

---
 srcpkgs/tvheadend/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/tvheadend/template b/srcpkgs/tvheadend/template
index 9aea7de4ec7057..012d31c4879ff1 100644
--- a/srcpkgs/tvheadend/template
+++ b/srcpkgs/tvheadend/template
@@ -8,7 +8,7 @@ configure_args="--enable-dvbscan --disable-ffmpeg_static
 --disable-libx265_static --disable-libvpx_static --disable-libtheora_static
 --disable-libvorbis_static --disable-libfdkaac_static"
 hostmakedepends="gettext pkg-config python3 git which"
-makedepends="avahi-libs-devel openssl-devel zlib-devel libcurl-devel ffmpeg-devel"
+makedepends="avahi-libs-devel openssl-devel zlib-devel libcurl-devel ffmpeg4-devel"
 short_desc="TV streaming server"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="GPL-3.0-only"

From 9a93ab949cbd6a50304f9b45af90bc71ab12aaba Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 067/108] unpaper: update to 7.0.0.

---
 srcpkgs/unpaper/template | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/unpaper/template b/srcpkgs/unpaper/template
index 38ed47a5840165..1ff910e722afc8 100644
--- a/srcpkgs/unpaper/template
+++ b/srcpkgs/unpaper/template
@@ -1,13 +1,13 @@
 # Template file for 'unpaper'
 pkgname=unpaper
-version=6.1
-revision=3
-build_style=gnu-configure
+version=7.0.0
+revision=1
+build_style=meson
+hostmakedepends="pkg-config meson libxslt"
+makedepends="ffmpeg-devel python3-Sphinx"
+short_desc="Post-processing tool for scanned sheets of paper"
 maintainer="Orphaned <orphan@voidlinux.org>"
-hostmakedepends="pkg-config libxslt"
-makedepends="ffmpeg-devel"
-license="GPL-2"
+license="GPL-2.0-or-later"
 homepage="https://www.flameeyes.eu/projects/unpaper"
-short_desc="A post-processing tool for scanned sheets of paper"
 distfiles="https://www.flameeyes.eu/files/${pkgname}-${version}.tar.xz"
-checksum=237c84f5da544b3f7709827f9f12c37c346cdf029b1128fb4633f9bafa5cb930
+checksum=2575fbbf26c22719d1cb882b59602c9900c7f747118ac130883f63419be46a80

From fc6c03d7e20283f57c8ab896a0bbeaca1bf1e62f Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 068/108] vice: revbump for ffmpeg4

---
 srcpkgs/vice/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vice/template b/srcpkgs/vice/template
index 1c641d9ae9be22..4f43e85b5b8972 100644
--- a/srcpkgs/vice/template
+++ b/srcpkgs/vice/template
@@ -1,7 +1,7 @@
 # Template file for 'vice'
 pkgname=vice
 version=3.8
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--enable-cpuhistory --enable-x64 --disable-pdf-docs
  --libdir=/usr/lib$XBPS_TARGET_WORDSIZE $(vopt_enable sdl2 sdlui2)

From 65b4204b05cd0b67256120fc92bb5cc63513b824 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 069/108] waypipe: revbump for ffmpeg6

---
 srcpkgs/waypipe/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/waypipe/template b/srcpkgs/waypipe/template
index 6da88b21bf2a19..4da8058400b588 100644
--- a/srcpkgs/waypipe/template
+++ b/srcpkgs/waypipe/template
@@ -1,7 +1,7 @@
 # Template file for 'waypipe'
 pkgname=waypipe
 version=0.8.6
-revision=1
+revision=2
 build_style=meson
 # lto is off because it causes linking errors in armv6l and armv7l (due to NEON)
 configure_args="-Dwerror=false -Dwith_dmabuf=enabled -Dwith_lz4=enabled

From 4c9d9148d99c74bb673908c03142187ab774f8ee Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 070/108] xpra: revbump for ffmpeg6

---
 srcpkgs/xpra/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/xpra/template b/srcpkgs/xpra/template
index 7b3031780f211a..14cdf380a770bc 100644
--- a/srcpkgs/xpra/template
+++ b/srcpkgs/xpra/template
@@ -1,7 +1,7 @@
 # Template file for 'xpra'
 pkgname=xpra
 version=6.0
-revision=1
+revision=2
 build_style=python3-module
 make_build_args="--without-cuda_kernels --without-cuda_rebuild"
 make_install_args="$(vopt_with docs) ${make_build_args}"

From a0e850050f11424157e32340b6068b9327d1ea17 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 31 Mar 2023 09:07:40 -0400
Subject: [PATCH 071/108] nv-codec-headers: update to 12.0.16.0

---
 srcpkgs/nv-codec-headers/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/nv-codec-headers/template b/srcpkgs/nv-codec-headers/template
index 3d422a61e48917..251e057f826fb8 100644
--- a/srcpkgs/nv-codec-headers/template
+++ b/srcpkgs/nv-codec-headers/template
@@ -1,6 +1,6 @@
 # Template file for 'nv-codec-headers'
 pkgname=nv-codec-headers
-version=11.1.5.1
+version=12.0.16.0
 revision=1
 build_style=gnu-makefile
 short_desc="FFmpeg version of headers required to interface with Nvidias codec APIs"
@@ -8,7 +8,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://git.videolan.org/?p=ffmpeg/nv-codec-headers.git"
 distfiles="https://github.com/FFmpeg/nv-codec-headers/archive/n${version}.tar.gz"
-checksum=d095fbd56aa93772471a323be0ebe65504a0f43f06c76a30b6d25da77b06ae9c
+checksum=2a1533b65f55f9da52956faf0627ed3b74868ac0c7f269990edd21369113b48f
 
 post_install() {
 	sed -n '4,25p' include/ffnvcodec/nvEncodeAPI.h > LICENSE

From 6a6f49c2c60d4ef1dfa3afac0e8090bc1754ba42 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 31 Mar 2023 09:08:40 -0400
Subject: [PATCH 072/108] openimagedenoise: revbump for ffmpeg6

---
 srcpkgs/openimagedenoise/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/openimagedenoise/template b/srcpkgs/openimagedenoise/template
index 109deb171c3f75..44edf38fb289d8 100644
--- a/srcpkgs/openimagedenoise/template
+++ b/srcpkgs/openimagedenoise/template
@@ -1,7 +1,7 @@
 # Template file for 'openimagedenoise'
 pkgname=openimagedenoise
 version=1.4.3
-revision=2
+revision=3
 archs="x86_64*"
 build_style=cmake
 hostmakedepends="ispc python3"

From c098352518054821981cd96df2f38f7d86ab2d64 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 3 Apr 2023 23:31:45 -0400
Subject: [PATCH 073/108] shotcut: revbump for ffmpeg6

---
 srcpkgs/shotcut/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/shotcut/template b/srcpkgs/shotcut/template
index b0dc9377558941..13e8a08522b68f 100644
--- a/srcpkgs/shotcut/template
+++ b/srcpkgs/shotcut/template
@@ -1,7 +1,7 @@
 # Template file for 'shotcut'
 pkgname=shotcut
 version=23.09.29
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DSHOTCUT_VERSION=${version}"
 hostmakedepends="pkg-config qt6-base qt6-tools"

From b06a5c727276ad33fba0cecf589af34562de7a7a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 3 Apr 2023 23:33:30 -0400
Subject: [PATCH 074/108] shiboken2: revbump for qt5-5.15.11

---
 srcpkgs/shiboken2/patches/importlib-machinery-bypass.patch | 1 +
 1 file changed, 1 insertion(+)
 create mode 120000 srcpkgs/shiboken2/patches/importlib-machinery-bypass.patch

diff --git a/srcpkgs/shiboken2/patches/importlib-machinery-bypass.patch b/srcpkgs/shiboken2/patches/importlib-machinery-bypass.patch
new file mode 120000
index 00000000000000..efcf3249bd8854
--- /dev/null
+++ b/srcpkgs/shiboken2/patches/importlib-machinery-bypass.patch
@@ -0,0 +1 @@
+../../python3-pyside2/patches/importlib-machinery-bypass.patch
\ No newline at end of file

From 9e4c8c1b6061584362330bf44d90f0b2196f7f77 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 3 Apr 2023 23:33:53 -0400
Subject: [PATCH 075/108] python3-pyside2: revbump for qt5-5.15.11

---
 .../patches/importlib-machinery-bypass.patch      | 15 +++++++++++++++
 srcpkgs/python3-pyside2/template                  |  2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/python3-pyside2/patches/importlib-machinery-bypass.patch

diff --git a/srcpkgs/python3-pyside2/patches/importlib-machinery-bypass.patch b/srcpkgs/python3-pyside2/patches/importlib-machinery-bypass.patch
new file mode 100644
index 00000000000000..64c429584776b5
--- /dev/null
+++ b/srcpkgs/python3-pyside2/patches/importlib-machinery-bypass.patch
@@ -0,0 +1,15 @@
+Using this prevents an error around line 220 below it.
+"AttributeError: module 'importlib' has no attribute 'machinery'"
+The old backup logic is in place and compiles without issues.
+--- a/sources/shiboken2/libshiboken/embed/signature_bootstrap.py	2023-04-02 23:09:34.688912402 -0400
++++ b/sources/shiboken2/libshiboken/embed/signature_bootstrap.py	2023-04-02 23:10:03.395529582 -0400
+@@ -170,9 +170,6 @@
+
+     # 'zipstring_sequence' comes from signature.cpp
+     zipbytes = base64.b64decode(''.join(zipstring_sequence))
+-    if sys.version_info[0] >= 3:
+-        vzip = zipfile.ZipFile(io.BytesIO(zipbytes))
+-        return sys.meta_path, EmbeddableZipImporter(vzip)
+
+     # Old version for Python 2.7, only.
+     import os
diff --git a/srcpkgs/python3-pyside2/template b/srcpkgs/python3-pyside2/template
index 249efa90988425..52626436ce75f2 100644
--- a/srcpkgs/python3-pyside2/template
+++ b/srcpkgs/python3-pyside2/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-pyside2'
 pkgname=python3-pyside2
 version=5.15.10
-revision=1
+revision=2
 _pkgname="pyside-setup-opensource-src-${version}"
 build_wrksrc="sources/pyside2"
 build_style=cmake

From d867d267620a0d2eabd527932d984869a8960d2c Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Tue, 4 Apr 2023 11:14:35 -0400
Subject: [PATCH 076/108] konqueror: revbump for ffmpeg6

---
 srcpkgs/konqueror/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/konqueror/template b/srcpkgs/konqueror/template
index add972916753c6..50bbf4eec05e55 100644
--- a/srcpkgs/konqueror/template
+++ b/srcpkgs/konqueror/template
@@ -1,11 +1,11 @@
 # Template file for 'konqueror'
 pkgname=konqueror
 version=23.08.5
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
 hostmakedepends="extra-cmake-modules python3 qt5-host-tools qt5-qmake kdoctools
-kcoreaddons kconfig gettext"
+ kcoreaddons kconfig gettext"
 makedepends="qt5-devel qt5-webengine-devel qt5-declarative-devel
  qt5-webchannel-devel qt5-location-devel kcmutils-devel kdelibs4support-devel
  karchive-devel khtml-devel kdesu-devel kactivities5-devel"

From 0c120a01be6290221bb4161581026a2d0ad5f96f Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Tue, 4 Apr 2023 11:14:58 -0400
Subject: [PATCH 077/108] qt5-speech: revbump for qt5-5.15.11

---
 srcpkgs/qt5-speech/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/qt5-speech/template b/srcpkgs/qt5-speech/template
index 1228bb60c41db4..27a7da1dbdb91b 100644
--- a/srcpkgs/qt5-speech/template
+++ b/srcpkgs/qt5-speech/template
@@ -1,7 +1,7 @@
 # Template file for 'qt5-speech'
 pkgname=qt5-speech
 version=5.15.11
-revision=1
+revision=2
 _commit=d32f4a479d38a11f547598004b975f4356424a16
 build_style=qmake
 configure_args="-- -flite -flite-alsa -speechd"

From 05b1b991426649dc2b1d8c9f3296ce218090e837 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sat, 3 Jun 2023 08:20:22 -0400
Subject: [PATCH 078/108] gtk4: revbump for ffmpeg6

---
 srcpkgs/gtk4/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gtk4/template b/srcpkgs/gtk4/template
index 8f8e645123ef09..2a6c9baac6703c 100644
--- a/srcpkgs/gtk4/template
+++ b/srcpkgs/gtk4/template
@@ -1,7 +1,7 @@
 # Template file for 'gtk4'
 pkgname=gtk4
 version=4.14.3
-revision=1
+revision=4
 build_style=meson
 build_helper="gir"
 configure_args="-Dman-pages=true -Ddocumentation=true -Dbuild-tests=false

From c9ffe4428fbaa72403ed1130b825e7e08dc53e7a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 4 Jun 2023 11:28:26 -0400
Subject: [PATCH 079/108] siril: revbump for ffmpeg6

---
 srcpkgs/siril/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/siril/template b/srcpkgs/siril/template
index 84332f79d060d2..62750dd247548f 100644
--- a/srcpkgs/siril/template
+++ b/srcpkgs/siril/template
@@ -1,7 +1,7 @@
 # Template file for 'siril'
 pkgname=siril
 version=0.9.12
-revision=10
+revision=11
 build_style=gnu-configure
 hostmakedepends="pkg-config intltool autoconf automake gettext-devel"
 makedepends="fftw-devel libconfig-devel libopencv-devel libffms2-devel

From c74ebe5b27e9dc417b08a4c5133dfb02fad08792 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sat, 8 Jul 2023 20:20:59 -0400
Subject: [PATCH 080/108] tracker-miners: revbump for ffmpeg6

---
 srcpkgs/tracker-miners/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/tracker-miners/template b/srcpkgs/tracker-miners/template
index 92b3863efd342c..f91c50598e90ba 100644
--- a/srcpkgs/tracker-miners/template
+++ b/srcpkgs/tracker-miners/template
@@ -1,7 +1,7 @@
 # Template file for 'tracker-miners'
 pkgname=tracker-miners
 version=3.7.1
-revision=2
+revision=3
 build_style=meson
 build_helper=qemu
 # missing libgrss for miner_rss

From 39605a3aeff32fcab00b432269f853bed211998c Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sat, 8 Jul 2023 20:21:21 -0400
Subject: [PATCH 081/108] mpd: revbump for ffmpeg6

---
 srcpkgs/mdp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mdp/template b/srcpkgs/mdp/template
index 3720bfae02f840..1c45395dca9b21 100644
--- a/srcpkgs/mdp/template
+++ b/srcpkgs/mdp/template
@@ -1,7 +1,7 @@
 # Template file for 'mdp'
 pkgname=mdp
 version=1.0.15
-revision=1
+revision=2
 build_style=gnu-makefile
 makedepends="ncurses-devel"
 short_desc="A command-line based markdown presentation tool"

From 9ec1c9f68bcb7a26ea2332e68f43a9b0d6768d01 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 30 Aug 2023 09:10:02 -0400
Subject: [PATCH 082/108] tg_owt: revbump for ffmpeg6

---
 srcpkgs/tg_owt/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/tg_owt/template b/srcpkgs/tg_owt/template
index 34e8fef0540569..1a46a8bedf3473 100644
--- a/srcpkgs/tg_owt/template
+++ b/srcpkgs/tg_owt/template
@@ -1,7 +1,7 @@
 # Template file for 'tg_owt'
 pkgname=tg_owt
 version=0.0.0.20231221
-revision=2
+revision=3
 _commit=afd9d5d31798d3eacf9ed6c30601e91d0f1e4d60
 _libyuv_commit=04821d1e7d60845525e8db55c7bcd41ef5be9406
 _abseil_commit=8c0b94e793a66495e0b1f34a5eb26bd7dc672db0

From b761cb4c50e585476408fbc544bb9d2dcd0a735f Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 30 Aug 2023 09:10:44 -0400
Subject: [PATCH 083/108] telegram-desktop: revbump for ffmpeg6

---
 srcpkgs/telegram-desktop/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template
index d9fc8e561a73a2..5a1365802922b2 100644
--- a/srcpkgs/telegram-desktop/template
+++ b/srcpkgs/telegram-desktop/template
@@ -1,7 +1,7 @@
 # Template file for 'telegram-desktop'
 pkgname=telegram-desktop
 version=4.16.8
-revision=1
+revision=2
 build_style=cmake
 build_helper="qemu gir"
 configure_args="-DTDESKTOP_API_ID=209235

From 00386e5b9fdba815f01ae3fa02ed0adeb901d4cd Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 30 Aug 2023 09:12:09 -0400
Subject: [PATCH 084/108] openmw: revbump for ffmpeg6

---
 srcpkgs/openmw/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/openmw/template b/srcpkgs/openmw/template
index 0abf5ff7cdbecc..b57180f1a4446f 100644
--- a/srcpkgs/openmw/template
+++ b/srcpkgs/openmw/template
@@ -1,7 +1,7 @@
 # Template file for 'openmw'
 pkgname=openmw
 version=0.48.0
-revision=2
+revision=3
 build_style=cmake
 _recast_commit=e75adf86f91eb3082220085e42dda62679f9a3ea
 _bullet_tag=3.17

From 4fd454f0a9d68a9488135505dfe7da03c1d6100d Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 30 Aug 2023 09:18:18 -0400
Subject: [PATCH 085/108] freecad: DELETE

---
 srcpkgs/freecad/patches/001-include.patch     | 112 ------------------
 .../154-revert-gui-tmp-redirect-stderr.patch  |  68 -----------
 ...d63c8c9b1280978be841d04e68a0a55cceb9.patch |  30 -----
 srcpkgs/freecad/template                      |  12 +-
 4 files changed, 7 insertions(+), 215 deletions(-)
 delete mode 100644 srcpkgs/freecad/patches/001-include.patch
 delete mode 100644 srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch
 delete mode 100644 srcpkgs/freecad/patches/fe02d63c8c9b1280978be841d04e68a0a55cceb9.patch

diff --git a/srcpkgs/freecad/patches/001-include.patch b/srcpkgs/freecad/patches/001-include.patch
deleted file mode 100644
index 28b5af54999b96..00000000000000
--- a/srcpkgs/freecad/patches/001-include.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 9a41845a417189776741297c50a3827ce292bc4f Mon Sep 17 00:00:00 2001
-From: Uwe <donovaly@users.noreply.github.com>
-Date: Sun, 3 Jul 2022 22:51:16 +0200
-Subject: [PATCH] [Part] OCCError.h: remove unneeded includes
-
-- also sort includes
----
- src/Mod/Part/App/OCCError.h             | 36 +++----------------------
- src/Mod/Part/App/OffsetCurvePyImp.cpp   | 12 ++++-----
- src/Mod/Part/App/OffsetSurfacePyImp.cpp | 10 +++----
- 3 files changed, 12 insertions(+), 46 deletions(-)
-
---- a/src/Mod/Part/App/OCCError.h
-+++ b/src/Mod/Part/App/OCCError.h
-@@ -23,36 +23,8 @@
- #ifndef _OCCError_h_
- #define _OCCError_h_
- 
--# include <Standard_Version.hxx>
- # include <Standard_Failure.hxx>
--# include <Standard_AbortiveTransaction.hxx>
--# include <Standard_ConstructionError.hxx>
--# if OCC_VERSION_HEX >= 0x060500
--# include <Standard_DefineException.hxx>
--# endif
--# include <Standard_DimensionError.hxx>
--# include <Standard_DimensionMismatch.hxx>
--# include <Standard_DivideByZero.hxx>
--# include <Standard_DomainError.hxx>
--# include <Standard_ImmutableObject.hxx>
--# include <Standard_LicenseError.hxx>
--# include <Standard_LicenseNotFound.hxx>
--# include <Standard_MultiplyDefined.hxx>
--# include <Standard_NegativeValue.hxx>
--# include <Standard_NoMoreObject.hxx>
--# include <Standard_NoSuchObject.hxx>
--# include <Standard_NotImplemented.hxx>
--# include <Standard_NullObject.hxx>
--# include <Standard_NullValue.hxx>
--# include <Standard_NumericError.hxx>
--# include <Standard_OutOfMemory.hxx>
--# include <Standard_OutOfRange.hxx>
--# include <Standard_Overflow.hxx>
--# include <Standard_ProgramError.hxx>
--# include <Standard_RangeError.hxx>
--# include <Standard_TooManyUsers.hxx>
--# include <Standard_TypeMismatch.hxx>
--# include <Standard_Underflow.hxx>
-+# include <Standard_Version.hxx>
- 
- #include <Mod/Part/PartGlobal.h>
- #include <Base/Console.h>
-@@ -88,4 +60,3 @@ PartExport extern PyObject* PartExceptio
- 
- #define PY_CATCH_OCC _PY_CATCH_OCC(return(NULL))
- #endif  // _OCCError_h_
--
---- a/src/Mod/Part/App/OffsetCurvePyImp.cpp
-+++ b/src/Mod/Part/App/OffsetCurvePyImp.cpp
-@@ -20,20 +20,20 @@
-  *                                                                         *
-  ***************************************************************************/
- 
--
- #include "PreCompiled.h"
- #ifndef _PreComp_
- # include <Geom_OffsetCurve.hxx>
- #endif
- 
--#include "OCCError.h"
--#include "Geometry.h"
-+#include <Base/GeometryPyCXX.h>
-+#include <Base/Vector3D.h>
-+#include <Base/VectorPy.h>
-+
- #include "OffsetCurvePy.h"
- #include "OffsetCurvePy.cpp"
-+#include "Geometry.h"
-+#include "OCCError.h"
- 
--#include <Base/GeometryPyCXX.h>
--#include <Base/VectorPy.h>
--#include <Base/Vector3D.h>
- 
- using namespace Part;
- 
---- a/src/Mod/Part/App/OffsetSurfacePyImp.cpp
-+++ b/src/Mod/Part/App/OffsetSurfacePyImp.cpp
-@@ -20,20 +20,16 @@
-  *                                                                         *
-  ***************************************************************************/
- 
--
- #include "PreCompiled.h"
- #ifndef _PreComp_
- # include <Geom_OffsetSurface.hxx>
- # include <memory>
- #endif
- 
--#include <Base/VectorPy.h>
--#include <Base/Vector3D.h>
--
- #include "OCCError.h"
--#include "Geometry.h"
--#include <Mod/Part/App/OffsetSurfacePy.h>
--#include <Mod/Part/App/OffsetSurfacePy.cpp>
-+#include "OffsetSurfacePy.h"
-+#include "OffsetSurfacePy.cpp"
-+
- 
- using namespace Part;
- 
diff --git a/srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch b/srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch
deleted file mode 100644
index d6a9adabdec830..00000000000000
--- a/srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-see https://github.com/FreeCAD/FreeCAD/commit/cfe94b00d3434f3e2c8b5114d2909f628c330fa8#commitcomment-71413407
-
-upstream: yes
-
-From 7b377a216b9185960e4cee980a6504dc1a755f50 Mon Sep 17 00:00:00 2001
-From: wmayer <wmayer@users.sourceforge.net>
-Date: Wed, 29 Jun 2022 15:19:18 +0200
-Subject: [PATCH] Gui: remove workaround for spnav 0.23 due to build failure
- with musl libc
-
----
- src/Gui/3Dconnexion/GuiNativeEventLinux.cpp | 27 ---------------------
- 1 file changed, 27 deletions(-)
-
---- a/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp
-+++ b/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp
-@@ -21,42 +21,17 @@
-  ***************************************************************************/
- 
- #include <FCConfig.h>
--#include <cstdio>
- 
- #include "GuiNativeEventLinux.h"
- 
- #include "GuiApplicationNativeEventAware.h"
- #include <Base/Console.h>
--#include <Base/FileInfo.h>
- #include <QMainWindow>
- 
- #include <QSocketNotifier>
- 
- #include <spnav.h>
- 
--namespace {
--class RedirectStdErr
--{
--public:
--    RedirectStdErr()
--        : fi(Base::FileInfo::getTempFileName())
--        , file(stderr)
--    {
--        stderr = fopen(fi.filePath().c_str(), "w");
--    }
--    ~RedirectStdErr()
--    {
--        fclose(stderr);
--        fi.deleteFile();
--        stderr = file;
--    }
--
--private:
--    Base::FileInfo fi;
--    FILE* file;
--};
--}
--
- Gui::GuiNativeEvent::GuiNativeEvent(Gui::GUIApplicationNativeEventAware *app)
- : GuiAbstractNativeEvent(app)
- {
-@@ -72,8 +47,6 @@ Gui::GuiNativeEvent::~GuiNativeEvent()
- 
- void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window)
- {
--    // tmp. redirect stderr to a file to suppress an error message from spnav_open()
--    RedirectStdErr err;
-     Q_UNUSED(window)
-     if (spnav_open() == -1) {
-         Base::Console().Log("Couldn't connect to spacenav daemon. Please ignore if you don't have a spacemouse.\n");
diff --git a/srcpkgs/freecad/patches/fe02d63c8c9b1280978be841d04e68a0a55cceb9.patch b/srcpkgs/freecad/patches/fe02d63c8c9b1280978be841d04e68a0a55cceb9.patch
deleted file mode 100644
index d4acf370ca0a42..00000000000000
--- a/srcpkgs/freecad/patches/fe02d63c8c9b1280978be841d04e68a0a55cceb9.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From fe02d63c8c9b1280978be841d04e68a0a55cceb9 Mon Sep 17 00:00:00 2001
-From: Roy-043 <70520633+Roy-043@users.noreply.github.com>
-Date: Thu, 29 Dec 2022 23:20:38 +0100
-Subject: [PATCH] Draft: update inspect.getargspec to inspect.getfullargspec
- (#8101)
-
----
- src/Mod/Draft/draftguitools/gui_snapper.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/src/Mod/Draft/draftguitools/gui_snapper.py
-+++ b/src/Mod/Draft/draftguitools/gui_snapper.py
-@@ -1426,7 +1426,7 @@ class Snapper:
-             Gui.Snapper.off()
-             self.ui.offUi()
-             if callback:
--                if len(inspect.getargspec(callback).args) > 1:
-+                if len(inspect.getfullargspec(callback).args) > 1:
-                     obj = None
-                     if self.snapInfo and ("Object" in self.snapInfo) and self.snapInfo["Object"]:
-                         obj = App.ActiveDocument.getObject(self.snapInfo["Object"])
-@@ -1445,7 +1445,7 @@ class Snapper:
-             Gui.Snapper.off()
-             self.ui.offUi()
-             if callback:
--                if len(inspect.getargspec(callback).args) > 1:
-+                if len(inspect.getfullargspec(callback).args) > 1:
-                     callback(None, None)
-                 else:
-                     callback(None)
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index c135701e38b9ad..7d5165f760bab9 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,7 +1,7 @@
 # Template file for 'freecad'
 pkgname=freecad
-version=0.20.2
-revision=7
+version=0.21.1
+revision=2
 build_wrksrc="FreeCAD-${version}"
 build_style=cmake
 pycompile_dirs="usr/lib/${pkgname}/Mod"
@@ -24,8 +24,10 @@ makedepends="python3-devel boost-devel libxerces-c-devel zlib-devel occt-devel
  coin3-devel libshiboken2-devel libspnav-devel pyside2-tools
  liblz4-devel libpyside2-python3-devel python3-matplotlib netcdf-devel
  jsoncpp-devel qt5-devel qt5-svg-devel qt5-tools-devel qt5-webkit-devel
- qt5-xmlpatterns-devel coin3-doc glew-devel python3-pivy"
-depends="python3-matplotlib python3-pyside2-webengine python3-pivy"
+ qt5-xmlpatterns-devel coin3-doc glew-devel python3-pivy qt5-webengine-devel
+ qt5-declarative-devel qt5-webchannel-devel qt5-location-devel"
+depends="python3-matplotlib python3-pyside2-webengine python3-pivy
+ python3-GitPython python3-Markdown"
 short_desc="General purpose 3D CAD modeler"
 maintainer="yopito <pierre.bourgin@free.fr>"
 license="LGPL-2.0-or-later"
@@ -35,7 +37,7 @@ distfiles="
  https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz
  ${SOURCEFORGE_SITE}/cxx/pycxx-${_pycxxver}.tar.gz
 "
-checksum="46922f3a477e742e1a89cd5346692d63aebb2b67af887b3e463e094a4ae055da
+checksum="e9b1fd0323f101268c7f3be52db42e4a29222f2e306ae6c4a6fc309cb418d35a
  4b91e1e1141c23fbd5039df635c4bb6e75632168548f56b83ce177193c0c98c6"
 python_version=3
 patch_args="-Np1 -d ${build_wrksrc}"

From 1ca616b8360e220e575993363dac2ce61c81f658 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 15 Oct 2023 21:47:18 -0400
Subject: [PATCH 086/108] libopenshot: revbump for ffmpeg6

---
 srcpkgs/libopenshot/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libopenshot/template b/srcpkgs/libopenshot/template
index fc45a258057079..7c1de694d06c00 100644
--- a/srcpkgs/libopenshot/template
+++ b/srcpkgs/libopenshot/template
@@ -1,7 +1,7 @@
 # Template file for 'libopenshot'
 pkgname=libopenshot
 version=0.3.2
-revision=1
+revision=2
 build_style=cmake
 # Builds fail with Ruby-2.4.1
 configure_args="-DENABLE_RUBY=OFF -DUSE_SYSTEM_JSONCPP=ON"

From 7a591ee5fdb960062299c012e2e28db522bf3cdd Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 8 Nov 2023 10:10:30 -0500
Subject: [PATCH 087/108] openimageio: revbump for ffmpeg6

---
 srcpkgs/openimageio/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/openimageio/template b/srcpkgs/openimageio/template
index 27d2131bc0a61a..61f44b43f9083e 100644
--- a/srcpkgs/openimageio/template
+++ b/srcpkgs/openimageio/template
@@ -1,7 +1,7 @@
 # Template file for 'openimageio'
 pkgname=openimageio
 version=2.4.9.0
-revision=8
+revision=9
 build_style=cmake
 build_helper=qemu
 configure_args="-DUSE_QT=0 -DUSE_PYTHON=0 -DOIIO_BUILD_TESTS=0

From a089863f80be5bbcf739d3b3c66b22b8a3a514a0 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 8 Nov 2023 10:11:57 -0500
Subject: [PATCH 088/108] synfigstudio: revbump for ffmpeg6

---
 srcpkgs/synfigstudio/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/synfigstudio/template b/srcpkgs/synfigstudio/template
index 09e442da9a6805..2bc017cedca6b8 100644
--- a/srcpkgs/synfigstudio/template
+++ b/srcpkgs/synfigstudio/template
@@ -2,7 +2,7 @@
 # Should be kept in sync with 'synfig' and 'ETL'
 pkgname=synfigstudio
 version=1.4.4
-revision=4
+revision=5
 build_style=gnu-configure
 configure_args="--disable-update-mimedb"
 hostmakedepends="pkg-config intltool gettext synfig"

From e7fe680955a6d97dbf6183fbb39c095168800278 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:53:10 -0500
Subject: [PATCH 089/108] mixxx: revbump for ffmpeg6

---
 srcpkgs/mixxx/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mixxx/template b/srcpkgs/mixxx/template
index 6a79b328c1abf0..9a5141856860b9 100644
--- a/srcpkgs/mixxx/template
+++ b/srcpkgs/mixxx/template
@@ -1,7 +1,7 @@
 # Template file for 'mixxx'
 pkgname=mixxx
 version=2.3.3
-revision=7
+revision=8
 build_style=cmake
 configure_args="-DCMAKE_BUILD_TYPE=Release"
 hostmakedepends="extra-cmake-modules pkg-config protobuf qt5-host-tools qt5-qmake"

From 48e2892017a052024b2f4f1c4c7869514be3909c Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:53:28 -0500
Subject: [PATCH 090/108] musikcube: revbump for ffmpeg6

---
 srcpkgs/musikcube/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/musikcube/template b/srcpkgs/musikcube/template
index acdf51453b8c94..9c4c1aaa7f9ff4 100644
--- a/srcpkgs/musikcube/template
+++ b/srcpkgs/musikcube/template
@@ -1,7 +1,7 @@
 # Template file for 'musikcube'
 pkgname=musikcube
 version=3.0.2
-revision=1
+revision=2
 build_style=cmake
 make_cmd=make
 configure_args="-DNO_NCURSESW=1"

From d5495fbabe11515f1da810acf11e0367ea200eea Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:53:45 -0500
Subject: [PATCH 091/108] electron24: revbump for ffmpeg6

---
 srcpkgs/electron24/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/electron24/template b/srcpkgs/electron24/template
index eafb9a0c696131..42b57dc512d822 100644
--- a/srcpkgs/electron24/template
+++ b/srcpkgs/electron24/template
@@ -1,7 +1,7 @@
 # Template file for 'electron24'
 pkgname=electron24
 version=24.3.0
-revision=3
+revision=4
 _nodever=18.14.0
 _chromiumver=112.0.5615.165
 archs="x86_64* aarch64*"

From fae1096a8b63a24f32a14cc8fef99ea9a5305dce Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:54:00 -0500
Subject: [PATCH 092/108] electron19: revbump for ffmpeg6

---
 srcpkgs/electron19/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/electron19/template b/srcpkgs/electron19/template
index b1fdb63cb67d46..881f04d7d825b7 100644
--- a/srcpkgs/electron19/template
+++ b/srcpkgs/electron19/template
@@ -1,7 +1,7 @@
 # Template file for 'electron19'
 pkgname=electron19
 version=19.0.8
-revision=4
+revision=5
 _nodever=16.14.2
 _chromiumver=102.0.5005.125
 archs="x86_64* aarch64* ppc64le*"

From d1dca83fbfffc3edc69996732cbdb29b0084f7e2 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:54:13 -0500
Subject: [PATCH 093/108] wf-recorder: revbump for ffmpeg6

---
 srcpkgs/wf-recorder/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/wf-recorder/template b/srcpkgs/wf-recorder/template
index 08f986b0310067..63c45cf4b814d7 100644
--- a/srcpkgs/wf-recorder/template
+++ b/srcpkgs/wf-recorder/template
@@ -1,7 +1,7 @@
 # Template file for 'wf-recorder'
 pkgname=wf-recorder
 version=0.4.1
-revision=2
+revision=3
 build_style=meson
 hostmakedepends="pkg-config scdoc wayland-devel"
 makedepends="wayland-protocols wayland-devel ffmpeg-devel libgbm-devel x264-devel

From dbf3b77860214d31324d6af5775708b91c477919 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:54:26 -0500
Subject: [PATCH 094/108] obs: revbump for ffmpeg6

---
 srcpkgs/obs/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/obs/template b/srcpkgs/obs/template
index feb9649977a8d4..0888fb3aaaccfe 100644
--- a/srcpkgs/obs/template
+++ b/srcpkgs/obs/template
@@ -1,7 +1,7 @@
 # Template file for 'obs'
 pkgname=obs
 version=30.1.1
-revision=1
+revision=2
 archs="i686* x86_64* ppc64le* aarch64* riscv64*"
 build_style=cmake
 configure_args="-DOBS_VERSION_OVERRIDE=${version} -DENABLE_JACK=ON

From 3b4d808d88cb15e2dfb43c3c9de33981254e4f85 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:54:36 -0500
Subject: [PATCH 095/108] mlt7: revbump for ffmpeg6

---
 srcpkgs/mlt7/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mlt7/template b/srcpkgs/mlt7/template
index 65eed998d39832..59f7ec147f0d04 100644
--- a/srcpkgs/mlt7/template
+++ b/srcpkgs/mlt7/template
@@ -1,7 +1,7 @@
 # Template file for 'mlt7'
 pkgname=mlt7
 version=7.20.0
-revision=2
+revision=3
 build_style=cmake
 configure_args="-DSWIG_PYTHON=ON -DMOD_QT6=ON"
 hostmakedepends="doxygen pkg-config ladspa-sdk swig python3 which

From 7c4d10e36917849602b1c62ad22ef54dc8fa87bb Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:54:48 -0500
Subject: [PATCH 096/108] qt6-multimedia: revbump for ffmpeg6

---
 srcpkgs/qt6-multimedia/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/qt6-multimedia/template b/srcpkgs/qt6-multimedia/template
index 67a577e1300fea..1da626ecf515a8 100644
--- a/srcpkgs/qt6-multimedia/template
+++ b/srcpkgs/qt6-multimedia/template
@@ -1,7 +1,7 @@
 # Template file for 'qt6-multimedia'
 pkgname=qt6-multimedia
 version=6.6.0
-revision=2
+revision=3
 build_style=cmake
 configure_args="-DQT_FEATURE_gstreamer=ON"
 hostmakedepends="perl qt6-declarative-host-tools pkg-config qt6-shadertools"

From 858dd398a0669747ad0394a3c6b1fc8ebd53ca5f Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 15:00:15 -0500
Subject: [PATCH 097/108] baresip: revbump for ffmpeg6

---
 srcpkgs/baresip/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/baresip/template b/srcpkgs/baresip/template
index b16b67beab8d2b..fe21ebf40c03c1 100644
--- a/srcpkgs/baresip/template
+++ b/srcpkgs/baresip/template
@@ -1,7 +1,7 @@
 # Template file for 'baresip'
 pkgname=baresip
 version=3.6.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="pkg-config glib-devel"
 makedepends="libgsm-devel libpng-devel openssl-devel libsndfile-devel

From 4da7a7271389de25c2873ebe1c6c941dea56c235 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 15:02:30 -0500
Subject: [PATCH 098/108] QMPlay2: revbump for ffmpeg6

---
 srcpkgs/QMPlay2/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/QMPlay2/template b/srcpkgs/QMPlay2/template
index 83a49d5b0b9415..00e659dc598831 100644
--- a/srcpkgs/QMPlay2/template
+++ b/srcpkgs/QMPlay2/template
@@ -1,7 +1,7 @@
 # Template file for 'QMPlay2'
 pkgname=QMPlay2
 version=24.04.07
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="pkg-config qt5-qmake qt5-host-tools"
 makedepends="alsa-lib-devel ffmpeg-devel libass-devel libcdio-devel libgme-devel

From 26e1f8342eddcbca28863e60fa492242676fe410 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 15:02:34 -0500
Subject: [PATCH 099/108] alsa-plugins: revbump for ffmpeg6

---
 srcpkgs/alsa-plugins/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/alsa-plugins/template b/srcpkgs/alsa-plugins/template
index a5708a7d82a8f0..7bfdad046c4830 100644
--- a/srcpkgs/alsa-plugins/template
+++ b/srcpkgs/alsa-plugins/template
@@ -1,7 +1,7 @@
 # Template file for 'alsa-plugins'
 pkgname=alsa-plugins
 version=1.2.7.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--disable-maemo-plugin"
 hostmakedepends="pkg-config"

From e5eaa12cfa0faa71e5eecb0a4d1f7cda2f24a387 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 15:02:43 -0500
Subject: [PATCH 100/108] minidlna: revbump for ffmpeg6

---
 srcpkgs/minidlna/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/minidlna/template b/srcpkgs/minidlna/template
index 5fa929f3a0c124..742991ecd04afc 100644
--- a/srcpkgs/minidlna/template
+++ b/srcpkgs/minidlna/template
@@ -1,7 +1,7 @@
 # Template file for 'minidlna'
 pkgname=minidlna
 version=1.3.3
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --sbindir=/usr/bin

From 5a92e02b26a593ed1ddd1cab8c242f1a2c23aa60 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 20 Nov 2023 17:57:47 -0500
Subject: [PATCH 101/108] mpv: revbump for ffmpeg6

---
 srcpkgs/mpv/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template
index 78ab959982ee99..3d690f21482730 100644
--- a/srcpkgs/mpv/template
+++ b/srcpkgs/mpv/template
@@ -1,7 +1,7 @@
 # Template file for 'mpv'
 pkgname=mpv
 version=0.38.0
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled
  -Dlibmpv=true -Dcplugins=enabled

From 4095370f9dbd34b6baef1158d2acd17c859bc85e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 20 Nov 2023 17:59:29 -0500
Subject: [PATCH 102/108] qimgv: revbump for ffmpeg6

---
 srcpkgs/qimgv/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/qimgv/template b/srcpkgs/qimgv/template
index dd341dfe1bfce8..8a7e1c081ef12f 100644
--- a/srcpkgs/qimgv/template
+++ b/srcpkgs/qimgv/template
@@ -1,7 +1,7 @@
 # Template file for 'qimgv'
 pkgname=qimgv
 version=1.0.2
-revision=3
+revision=4
 build_style=cmake
 configure_args="$(vopt_if video -DVIDEO_SUPPORT=ON -DVIDEO_SUPPORT=OFF)
  $(vopt_if scale -DOPENCV_SUPPORT=ON -DOPENCV_SUPPORT=OFF)

From 06d50bb4c03cd155335732e0e7452db1c367c4cc Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 20 Nov 2023 18:00:36 -0500
Subject: [PATCH 103/108] kfilemetadata5: revbump for ffmpeg6

---
 srcpkgs/kfilemetadata5/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kfilemetadata5/template b/srcpkgs/kfilemetadata5/template
index a0c4d809395323..b584f85ff2058b 100644
--- a/srcpkgs/kfilemetadata5/template
+++ b/srcpkgs/kfilemetadata5/template
@@ -1,7 +1,7 @@
 # Template file for 'kfilemetadata5'
 pkgname=kfilemetadata5
 version=5.115.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="kcoreaddons extra-cmake-modules pkg-config qt5-host-tools qt5-qmake
  gettext kcoreaddons python3"

From a77d736487094a39bae2b897647ab2d1134327a4 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 8 Dec 2023 11:46:01 -0500
Subject: [PATCH 104/108] vba-m: revbump for ffmpeg6

---
 srcpkgs/vba-m/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vba-m/template b/srcpkgs/vba-m/template
index 3d135efa1d0b69..3c5a20db0fa984 100644
--- a/srcpkgs/vba-m/template
+++ b/srcpkgs/vba-m/template
@@ -2,7 +2,7 @@
 pkgname=vba-m
 reverts=1292_2
 version=2.1.9
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DENABLE_GTK=TRUE -DENABLE_FFMPEG=TRUE -DENABLE_LINK=TRUE -DCMAKE_BUILD_TYPE=Release"
 hostmakedepends="gettext pkg-config unzip zip yasm wxWidgets-gtk3-devel"

From 16741ab9e7df1d62cc01b02167f0c3575a9bd8a3 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 8 Dec 2023 11:46:19 -0500
Subject: [PATCH 105/108] dolphin-emu: revbump for ffmpeg6

---
 srcpkgs/dolphin-emu/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/dolphin-emu/template b/srcpkgs/dolphin-emu/template
index 862d3ae964eec4..a7ae0efb58fb75 100644
--- a/srcpkgs/dolphin-emu/template
+++ b/srcpkgs/dolphin-emu/template
@@ -1,7 +1,7 @@
 # Template file for 'dolphin-emu'
 pkgname=dolphin-emu
 version=5.0.19368
-revision=3
+revision=4
 _dolphin_commit=dadbeb4bae7e7fa23af2b46e0add4143094dc107
 _mgba_commit=44e074a15e9651481f7f652ac006a7c9d58cbeb9
 _googletest_commit=be03d00f5f0cc3a997d1a368bee8a1fe93651f48

From a735a3653a6577eaaf5143fc23d5397773dfe905 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Tue, 19 Dec 2023 15:38:51 -0500
Subject: [PATCH 106/108] qtox: revbump for ffmpeg4

---
 srcpkgs/qtox/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qtox/template b/srcpkgs/qtox/template
index bb70e7f51240a4..755e4462bc0137 100644
--- a/srcpkgs/qtox/template
+++ b/srcpkgs/qtox/template
@@ -1,13 +1,13 @@
 # Template file for 'qtox'
 pkgname=qtox
 version=1.17.6
-revision=3
+revision=4
 build_style=cmake
 configure_args="-DUPDATE_CHECK=OFF
  -DGIT_DESCRIBE=${version}
  $(vopt_if snorenotify -DDESKTOP_NOTIFICATIONS=ON)"
 hostmakedepends="pkg-config qt5-host-tools qt5-devel"
-makedepends="ffmpeg-devel libexif-devel libopenal-devel libsodium-devel
+makedepends="ffmpeg4-devel libexif-devel libopenal-devel libsodium-devel
  libvpx-devel opus-devel qrencode-devel qt5-svg-devel sonnet-devel
  sqlcipher-devel toxcore-devel
  $(vopt_if snorenotify snorenotify-devel)"

From 2548baf8413475fabfe2fe947c5169919dfcc35a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Thu, 11 Jan 2024 11:52:00 -0500
Subject: [PATCH 107/108] arcan: revbump for ffmpeg6

---
 srcpkgs/arcan/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/arcan/template b/srcpkgs/arcan/template
index ff9091f90ebb10..030091a6cc9d0c 100644
--- a/srcpkgs/arcan/template
+++ b/srcpkgs/arcan/template
@@ -2,7 +2,7 @@
 # !! keep synced with: acfgfs aclip aloadimage
 pkgname=arcan
 version=0.6.2.1
-revision=2
+revision=3
 create_wrksrc=yes
 build_wrksrc=arcan/src
 build_style=cmake

From 466b42c3f1e4d7a02a4ab556ad1cacf57d94546c Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Thu, 11 Jan 2024 11:52:10 -0500
Subject: [PATCH 108/108] notcurses: revbump for ffmpeg6

---
 srcpkgs/notcurses/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/notcurses/template b/srcpkgs/notcurses/template
index 48a7463cb68eb9..515f316ab4576c 100644
--- a/srcpkgs/notcurses/template
+++ b/srcpkgs/notcurses/template
@@ -1,7 +1,7 @@
 # Template file for 'notcurses'
 pkgname=notcurses
 version=3.0.9
-revision=2
+revision=3
 build_style=cmake
 configure_args="-DUSE_STATIC=ON -DUSE_QRCODEGEN=On $(vopt_bool man USE_PANDOC)"
 hostmakedepends="pkg-config $(vopt_if man pandoc)"

  parent reply	other threads:[~2024-05-13 17:56 UTC|newest]

Thread overview: 175+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 13:20 [PR PATCH] " zlice
2023-05-05 13:27 ` [PR PATCH] [Updated] " zlice
2023-05-05 13:53 ` zlice
2023-05-05 18:04 ` [PR PATCH] [Updated] " zlice
2023-05-07 19:26 ` paper42
2023-05-07 22:00 ` zlice
2023-05-07 22:00 ` [PR PATCH] [Updated] " zlice
2023-05-08  0:23 ` zlice
2023-05-29  1:43 ` zlice
2023-06-04 15:47 ` zlice
2023-06-10  5:04 ` zlice
2023-06-17 19:17 ` zlice
2023-06-17 19:28 ` zlice
2023-06-19 20:19 ` zlice
2023-06-22 14:28 ` zlice
2023-06-23 20:37 ` [PR PATCH] [Updated] " zlice
2023-07-04 13:30 ` zlice
2023-07-04 14:18 ` zlice
2023-07-04 14:19 ` zlice
2023-07-09 14:54 ` zlice
2023-07-09 14:58 ` zlice
2023-07-17 19:52 ` [PR PATCH] [Updated] " zlice
2023-08-02 14:18 ` zlice
2023-08-30 13:18 ` zlice
2023-10-02  0:04 ` yoshiyoshyosh
2023-10-11 12:27 ` zlice
2023-10-11 17:06 ` SpidFightFR
2023-10-11 17:07 ` SpidFightFR
2023-10-16 12:11 ` [PR PATCH] [Updated] " zlice
2023-10-16 12:12 ` zlice
2023-10-16 12:19 ` SpidFightFR
2023-10-16 12:19 ` SpidFightFR
2023-10-16 12:26 ` SpidFightFR
2023-10-16 12:27 ` SpidFightFR
2023-10-16 12:27 ` SpidFightFR
2023-10-17 12:58 ` [PR PATCH] [Updated] " zlice
2023-10-17 12:59 ` zlice
2023-11-08 15:12 ` [PR PATCH] [Updated] " zlice
2023-11-10 20:08 ` zlice
2023-11-14 13:43 ` zlice
2023-11-20 23:00 ` zlice
2023-12-03 16:39 ` mhmdanas
2023-12-03 16:45 ` [PR PATCH] [Updated] " zlice
2023-12-03 16:59 ` zlice
2023-12-05 16:30 ` mhmdanas
2023-12-09 17:37 ` [PR PATCH] [Updated] " zlice
2023-12-09 17:39 ` zlice
2023-12-14 18:28 ` [PR PATCH] [Updated] " zlice
2023-12-19 20:48 ` zlice
2023-12-29 17:30 ` zlice
2023-12-29 17:30 ` zlice
2023-12-29 17:47 ` [PR PATCH] [Updated] " zlice
2024-01-05 13:07 ` zlice
2024-01-11 16:52 ` zlice
2024-01-17 22:35 ` zlice
2024-01-17 22:50 ` zlice
2024-01-28 18:46 ` zlice
2024-02-02 22:44 ` zlice
2024-02-02 22:46 ` zlice
2024-02-02 22:48 ` zlice
2024-02-03 20:31 ` [PR PATCH] [Updated] " zlice
2024-02-03 20:38 ` zlice
2024-02-03 22:46 ` [PR PATCH] [Updated] " zlice
2024-02-06  5:34 ` Luciogi
2024-02-11 17:28 ` [PR PATCH] [Updated] " zlice
2024-02-11 22:49 ` zlice
2024-02-15 19:52 ` zlice
2024-02-20 18:21 ` zlice
2024-02-22 17:25 ` yoshiyoshyosh
2024-02-22 17:34 ` zlice
2024-02-24  2:34 ` yoshiyoshyosh
2024-02-24  2:34 ` yoshiyoshyosh
2024-02-25 17:32 ` [PR PATCH] [Updated] " zlice
2024-02-25 17:33 ` zlice
2024-02-25 19:08 ` yoshiyoshyosh
2024-02-25 19:08 ` yoshiyoshyosh
2024-02-25 19:09 ` yoshiyoshyosh
2024-02-25 19:09 ` yoshiyoshyosh
2024-02-25 19:28 ` yoshiyoshyosh
2024-02-25 19:28 ` zlice
2024-02-25 19:32 ` yoshiyoshyosh
2024-02-25 19:33 ` yoshiyoshyosh
2024-02-25 20:20 ` yoshiyoshyosh
2024-02-25 21:45 ` yoshiyoshyosh
2024-02-25 21:58 ` yoshiyoshyosh
2024-03-01 15:58 ` [PR PATCH] [Updated] " zlice
2024-03-06 21:24 ` zlice
2024-03-09 22:24 ` yoshiyoshyosh
2024-03-09 22:41 ` [PR PATCH] [Updated] " zlice
2024-03-09 22:43 ` zlice
2024-03-09 22:56 ` yoshiyoshyosh
2024-03-10  0:03 ` zlice
2024-03-12 17:08 ` [PR PATCH] [Updated] " zlice
2024-03-18 20:07 ` zlice
2024-03-21 21:29 ` zlice
2024-03-21 21:51 ` zlice
2024-03-28 17:21 ` zlice
2024-04-13 14:47 ` zlice
2024-04-26 12:45 ` zlice
2024-05-09 13:32 ` zlice
2024-05-13 17:56 ` zlice [this message]
2024-05-16 16:36 ` zlice
2024-05-17 13:38 ` Luciogi
2024-05-17 13:40 ` zlice
2024-05-17 13:48 ` zlice
2024-05-17 13:49 ` zlice
2024-05-21  0:20 ` [PR PATCH] [Updated] " zlice
2024-05-27 13:30 ` zlice
2024-05-27 22:54 ` zlice
2024-05-29 22:15 ` zlice
2024-05-29 22:19 ` zlice
2024-06-03 23:13 ` [PR PATCH] [Updated] " zlice
2024-06-04 13:16 ` zlice
2024-06-04 13:20 ` zlice
2024-06-04 14:07 ` [PR PATCH] [Updated] " zlice
2024-06-04 14:08 ` zlice
2024-06-04 14:10 ` [PR PATCH] [Updated] " zlice
2024-06-04 18:40 ` zlice
2024-06-06 13:42 ` [PR PATCH] [Updated] " zlice
2024-06-21 18:12 ` [PR REVIEW] " ahesford
2024-06-23 16:08 ` zlice
2024-06-23 21:57 ` zlice
2024-06-25 15:53 ` ahesford
2024-06-25 17:43 ` [PR PATCH] [Updated] " zlice
2024-06-26 12:28 ` zlice
2024-06-29 11:22 ` zlice
2024-06-29 11:24 ` zlice
2024-06-29 11:24 ` zlice
2024-06-29 11:34 ` [PR PATCH] [Updated] " zlice
2024-06-29 15:14 ` zlice
2024-06-29 15:16 ` zlice
2024-07-04 11:32 ` [PR PATCH] [Updated] " zlice
2024-07-04 16:17 ` chrysos349
2024-07-04 16:27 ` chrysos349
2024-07-04 16:36 ` classabbyamp
2024-07-05 17:56 ` [PR PATCH] [Updated] " zlice
2024-07-05 18:02 ` zlice
2024-07-05 18:04 ` zlice
2024-07-05 18:07 ` classabbyamp
2024-07-05 18:07 ` classabbyamp
2024-07-05 18:10 ` classabbyamp
2024-07-05 18:11 ` classabbyamp
2024-07-05 18:50 ` ahesford
2024-07-05 22:03 ` zlice
2024-07-05 22:35 ` [PR PATCH] [Updated] " zlice
2024-07-05 22:42 ` zlice
2024-07-05 22:47 ` classabbyamp
2024-07-05 23:10 ` zlice
2024-07-06  0:10 ` zlice
2024-07-06 13:31 ` zlice
2024-07-06 13:31 ` zlice
2024-07-06 20:07 ` zlice
2024-07-06 20:08 ` zlice
2024-07-14  2:50 ` [PR PATCH] [Updated] " zlice
2024-07-19 20:32 ` Pestdoktor
2024-07-19 20:34 ` [PR PATCH] [Updated] " zlice
2024-07-21 23:13 ` classabbyamp
2024-07-21 23:20 ` zlice
2024-07-21 23:30 ` classabbyamp
2024-07-28 23:02 ` classabbyamp
2024-07-28 23:02 ` [PR PATCH] [Closed]: " classabbyamp
2024-07-28 23:07 ` classabbyamp
2024-07-28 23:12 ` classabbyamp
2024-07-28 23:12 ` classabbyamp
2024-07-28 23:12 ` classabbyamp
2024-07-28 23:12 ` classabbyamp
2024-07-28 23:13 ` classabbyamp
2024-07-28 23:13 ` classabbyamp
2024-07-28 23:29 ` classabbyamp
2024-07-28 23:29 ` classabbyamp
2024-07-29  0:36 ` classabbyamp
2024-07-29  0:36 ` classabbyamp
2024-07-29  0:36 ` classabbyamp
2024-07-29  1:35 ` zlice
2024-07-29  3:39 ` classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240513175658.0E12F246F1@inbox.vuxu.org \
    --to=zlice@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).