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: Sun, 11 Feb 2024 23:49:57 +0100	[thread overview]
Message-ID: <20240211224957.7A45E25888@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: 4558 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 (multiple patches in master)
- ~~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? no release)
- vice (3.8 compiles, needs makedepends libcurl-devel)
- kodi
- mlt (only dep left is flowblade - flowblade 2.12.0.2 with mlt7-python3 can 'render' videos with cpu and gpu)
- ~~synfig (mlt)~~ (work with mlt7, bump synfigstudio)
- tvheadend
- ssr
- ~~spek-alternative~~ (replace with spek-x)
- ppsspp
- olive
- 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)
- 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
- ~~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`)


##### 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: 247399 bytes --]

From 8c2119a931c310f40609f6d8b70325d1499a0c1b Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 15 Oct 2023 21:16:56 -0400
Subject: [PATCH 001/113] 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 93fb4b2608729..7987d854066ab 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -389,15 +389,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 9c57200463320..0000000000000
--- 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 9a55178c74f0f..0000000000000
--- 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 53a596d0ee7d4..0000000000000
--- 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 aa948f7a8a2df..0000000000000
--- 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 00e3f68a415b8..0000000000000
--- 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 1ebb436135938..f1e4712c41d08 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 7bda7569067b3dfcd2c4fe0c65909cde6ac2630c Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 15 Oct 2023 21:18:14 -0400
Subject: [PATCH 002/113] 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 8f47851eef354..affb652a9d500 100644
--- a/srcpkgs/openshot/template
+++ b/srcpkgs/openshot/template
@@ -1,7 +1,7 @@
 # Template file for 'openshot'
 pkgname=openshot
 version=3.0.0
-revision=2
+revision=3
 build_style=python3-module
 hostmakedepends="python3 python3-setuptools"
 makedepends="ffmpeg-devel python3-PyQt5"

From 3ad4887c3cc6d7c4bc3f66585486668650d9d92f Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 15 Oct 2023 21:18:36 -0400
Subject: [PATCH 003/113] 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 a3fe134aa5acc..a730afa9fafa9 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=6
+revision=7
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From 5ee89c7ed61e11fba16822028f7326a1e3edd08d Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 19:56:22 -0400
Subject: [PATCH 004/113] 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 0000000000000..887f354e7c6be
--- /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 0000000000000..9c57200463320
--- /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 0000000000000..9a55178c74f0f
--- /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 0000000000000..53a596d0ee7d4
--- /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 0000000000000..aa948f7a8a2df
--- /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 0000000000000..00e3f68a415b8
--- /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 0000000000000..9ba14bdb8ddf3
--- /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 0000000000000..887f354e7c6be
--- /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 0000000000000..887f354e7c6be
--- /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 0000000000000..887f354e7c6be
--- /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 0000000000000..887f354e7c6be
--- /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 0000000000000..887f354e7c6be
--- /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 0000000000000..887f354e7c6be
--- /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 0000000000000..887f354e7c6be
--- /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 0000000000000..887f354e7c6be
--- /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 0000000000000..887f354e7c6be
--- /dev/null
+++ b/srcpkgs/libswscale4
@@ -0,0 +1 @@
+ffmpeg4
\ No newline at end of file

From 7cb70e99dc02bb38acdc67c2ff897303f269b05e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 19:59:04 -0400
Subject: [PATCH 005/113] 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 7987d854066ab..cb85f934e8a04 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2074,58 +2074,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 aea4bfc3a265c..ce94de9424d18 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 c2367e7667bd76880a35d824003bb9c99f29776b Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 19:59:45 -0400
Subject: [PATCH 006/113] 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 cf5f0b7a2ae61..0d899311e6df7 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 9d41c1404fc4324eb04c239c1d1fef6662381d16 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 19:59:46 -0400
Subject: [PATCH 007/113] 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 bb17569277a7f..49e2c1cbe8a53 100644
--- a/srcpkgs/retroshare/template
+++ b/srcpkgs/retroshare/template
@@ -1,7 +1,7 @@
 # Template file for 'retroshare'
 pkgname=retroshare
 version=0.6.6
-revision=3
+revision=4
 build_style=qmake
 #XXX broadcast feature requires an ancient udp-discovery-cpp which either needs
 # to be fetched+patched (FTBFS) here or packaged :/

From 0188b980cfd98a6abb23f4bb56c973ed6d5a4445 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 19:59:46 -0400
Subject: [PATCH 008/113] 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 361b8a23b9497..c5ac17eb54ea4 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 773c3d00520b197526d1f7d114745faa519406f8 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:00:38 -0400
Subject: [PATCH 009/113] 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 bdd0cc414dc1a..7d245a7b0019c 100644
--- a/srcpkgs/vlc/template
+++ b/srcpkgs/vlc/template
@@ -1,7 +1,7 @@
 # Template file for 'vlc'
 pkgname=vlc
 version=3.0.20
-revision=3
+revision=4
 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 de0f50a27272fd4d15114c557af30b3f977bf8f0 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:00:55 -0400
Subject: [PATCH 010/113] osg: revbump for ffmpeg4

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

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index a9ebbd287933b..a131ceaf7a867 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -1,14 +1,14 @@
 # Template file for 'osg'
 pkgname=osg
 version=3.6.5
-revision=2
+revision=3
 build_style=cmake
 build_helper="qemu"
 # don't use /usr/lib64 on 64bit platforms
 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 b239fbaf7f17733459f7b705a9c3839738235979 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:13 -0400
Subject: [PATCH 011/113] 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 3be4d08eac77a..ed6194c17d11e 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 093fefda4dfd9073eb92d6a254f7d2da1fba415b Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:45 -0400
Subject: [PATCH 012/113] attract: revbump for ffmpeg6

---
 srcpkgs/attract/patches/Makefile.patch | 33 --------------------------
 srcpkgs/attract/patches/fe_net.patch   | 10 ++++++++
 srcpkgs/attract/template               |  6 ++---
 3 files changed, 13 insertions(+), 36 deletions(-)
 delete mode 100644 srcpkgs/attract/patches/Makefile.patch
 create mode 100644 srcpkgs/attract/patches/fe_net.patch

diff --git a/srcpkgs/attract/patches/Makefile.patch b/srcpkgs/attract/patches/Makefile.patch
deleted file mode 100644
index 77ae06268e2ac..0000000000000
--- a/srcpkgs/attract/patches/Makefile.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/Makefile	2016-12-06 21:40:22.715155552 +0100
-+++ b/Makefile	2016-12-06 21:41:39.523155740 +0100
-@@ -50,12 +50,8 @@
- 
- FE_VERSION=v2.2.0
- 
--CC=gcc
--CXX=g++
- CFLAGS=$(EXTRA_CFLAGS)
--STRIP=strip
- PKG_CONFIG=pkg-config
--AR=ar
- ARFLAGS=rc
- RM=rm -f
- MD=mkdir -p
-@@ -84,7 +84,7 @@
- override WINDRES := $(TOOLCHAIN)-$(WINDRES)
- endif
- 
--prefix=/usr/local
-+prefix=/usr
- datarootdir=$(prefix)/share
- datadir=$(datarootdir)
- exec_prefix=$(prefix)
-@@ -414,7 +414,7 @@
- 
- $(EXE): $(OBJ) $(EXPAT) $(SQUIRREL) $(AUDIO)
- 	$(EXE_MSG)
--	$(SILENT)$(CXX) -o $@ $^ $(CFLAGS) $(FE_FLAGS) $(LIBS)
-+	$(SILENT)$(CXX) -o $@ $^ $(LDFLAGS) $(CFLAGS) $(FE_FLAGS) $(LIBS)
- ifneq ($(FE_DEBUG),1)
- 	$(SILENT)$(STRIP) $@
- endif
diff --git a/srcpkgs/attract/patches/fe_net.patch b/srcpkgs/attract/patches/fe_net.patch
new file mode 100644
index 0000000000000..ab676952bb614
--- /dev/null
+++ b/srcpkgs/attract/patches/fe_net.patch
@@ -0,0 +1,10 @@
+--- a/src/fe_net.hpp	2023-06-10 15:32:15.000000000 -0400
++++ b/src/fe_net.hpp	2024-02-11 17:26:26.198496103 -0500
+@@ -27,6 +27,7 @@
+ #include <thread>
+ #include <deque>
+ #include <queue>
++#include <string>
+ 
+ class FeNetWorker;
+
diff --git a/srcpkgs/attract/template b/srcpkgs/attract/template
index 24017d2bacc24..d65d8717dc20a 100644
--- a/srcpkgs/attract/template
+++ b/srcpkgs/attract/template
@@ -1,7 +1,7 @@
 # Template file for 'attract'
 pkgname=attract
-version=2.6.2
-revision=2
+version=2.7.0
+revision=1
 build_style=gnu-makefile
 make_build_args="VERBOSE=1"
 make_use_env=yes
@@ -14,4 +14,4 @@ maintainer="Pedro Narciso García Revington <p.revington@gmail.com>"
 license="GPL-3.0-or-later"
 homepage="http://attractmode.org/"
 distfiles="https://github.com/mickelson/attract/archive/v${version}.tar.gz"
-checksum=0412722c9ff186b5f7081027eb04751ee38f89c318d159f2559d0c4ac3246376
+checksum=497bc9d4d5846cb0eee71eaed2352d2350f789df3a913f423a3d6eed9ba428e8

From a17ca1458971bea588c0db3561f26ecc715bbefc Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:45 -0400
Subject: [PATCH 013/113] 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 0000000000000..aace41a6e6d9a
--- /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 ad1c4b2569917..7d875cc02541a 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 b299b7948b59ed97bd642cb09e39d31f4595cfc2 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:45 -0400
Subject: [PATCH 014/113] 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 0000000000000..4e5e34099d71c
--- /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 05e53a9adf78f..4b1968e03de78 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 a101f8c77822843f4b7eb8a13f57f6a8144577b4 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:45 -0400
Subject: [PATCH 015/113] 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 7b838119ab261..84b49305edcef 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 253987bac83b82f8a9f1d0fdd809dd9955e5a5c9 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:45 -0400
Subject: [PATCH 016/113] 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 253a0243e2259..557285982d2b8 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 a08c8fb77837606b52c8d2132753ab00c03430e0 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 017/113] blender: revbump for ffmpeg6

---
 srcpkgs/blender/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/blender/template b/srcpkgs/blender/template
index 1dc61ec9d29d8..e238717ac8c72 100644
--- a/srcpkgs/blender/template
+++ b/srcpkgs/blender/template
@@ -1,7 +1,7 @@
 # Template file for 'blender'
 pkgname=blender
 version=4.0.2
-revision=1
+revision=2
 archs="x86_64* ppc64*"
 build_style="cmake"
 pycompile_dirs="usr/share/blender/${version%.*}/scripts"
@@ -9,8 +9,8 @@ configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF
  -DWITH_JACK=ON -DWITH_CODEC_FFMPEG=ON -DWITH_CODEC_SNDFILE=ON -DWITH_OPENMP=ON
  -DWITH_FFTW3=ON -DWITH_MOD_OCEANSIM=ON -DWITH_CYCLES_EMBREE=OFF -DWITH_OPENCOLORIO=ON
  -DWITH_IMAGE_OPENEXR=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_OPENSUBDIV=ON
- -DWITH_OPENCOLLADA=ON -DWITH_SYSTEM_GLEW=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON
- -DWITH_GHOST_X11=ON -DWITH_GHOST_WAYLAND=ON -DWITH_GHOST_LIBDECOR=ON
+ -DWITH_OPENCOLLADA=ON -DWITH_OPENVDB=ON -DWITH_ALEMBIC=ON
+ -DWITH_GHOST_X11=ON -DWITH_GHOST_WAYLAND=ON -DWITH_GHOST_WAYLAND_LIBDECOR=ON
  -DWITH_BUILDINFO=OFF -DPYTHON_VERSION=${py3_ver} -DPYTHON_LIBPATH=/usr/lib
  -DPYTHON_LIBRARY=python${py3_ver}${py3_abiver} -DPYTHON_INCLUDE_DIRS=/${py3_inc}
  -DWITH_SYSTEM_LZO=ON -DWITH_SYSTEM_EIGEN3=ON -DWITH_SYSTEM_FREETYPE=ON"

From 576cefd100074464178a6705b0704784eb881434 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 018/113] 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 4b417d80d5c2d..8a90aaa4c07a2 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 4ac08e8523f59eee03cd7c793077c148bb9fc26a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 019/113] 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 0000000000000..bcab4890554b9
--- /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 84059ffd02398..a670758bcbe41 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 a138c7c32ef3f60aa52356d2da2e676edfb3b472 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 020/113] 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 0000000000000..a9fd307a23c8a
--- /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 7ef7838949f3a..1f7bbc70a22c8 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 b332fd67bd09f673006a04fb6babfe972911447e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 021/113] chromium: revbump for ffmpeg6

---
 .../patches/chromium-119-ffmpeg-4.4.patch     | 20 --------
 srcpkgs/chromium/patches/ffmpeg5.patch        | 47 +++++++++++++++++++
 srcpkgs/chromium/template                     |  2 +-
 3 files changed, 48 insertions(+), 21 deletions(-)
 delete mode 100644 srcpkgs/chromium/patches/chromium-119-ffmpeg-4.4.patch
 create mode 100644 srcpkgs/chromium/patches/ffmpeg5.patch

diff --git a/srcpkgs/chromium/patches/chromium-119-ffmpeg-4.4.patch b/srcpkgs/chromium/patches/chromium-119-ffmpeg-4.4.patch
deleted file mode 100644
index 04d04b166ba37..0000000000000
--- a/srcpkgs/chromium/patches/chromium-119-ffmpeg-4.4.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/media/filters/ffmpeg_demuxer.cc.orig
-+++ b/media/filters/ffmpeg_demuxer.cc
-@@ -390,7 +390,7 @@
- 
-   scoped_refptr<DecoderBuffer> buffer;
- 
--    size_t side_data_size = 0;
-+    int side_data_size = 0;
-     uint8_t* side_data = av_packet_get_side_data(
-         packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
- 
-@@ -453,7 +453,7 @@
-                                        packet->size - data_offset);
-     }
- 
--    size_t skip_samples_size = 0;
-+    int 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));
diff --git a/srcpkgs/chromium/patches/ffmpeg5.patch b/srcpkgs/chromium/patches/ffmpeg5.patch
new file mode 100644
index 0000000000000..24e2da38e34ca
--- /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 5613fa3813822..cd386c8a84ae6 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=120.0.6099.129
-revision=1
+revision=2
 archs="i686* x86_64* aarch64* armv7l*"
 hostmakedepends="
  $(vopt_if clang "clang lld llvm15")

From 692af5b0793410877e515dd107a34459e97eaeee Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 022/113] 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 24e2da38e34ca..0000000000000
--- 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 0000000000000..ffa95ab811101
--- /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 0d1436744f1b2..a6e4b4fa86cb8 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 9cc3328d4d778ce72aa9246b0775fdd48edaab45 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 023/113] 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 9796e3461601a..5db30e020d17e 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 df46361a67f2b707f21b1cb36558b3f6410a055d Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 024/113] 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 f5f4bf24b8cb6..7b47e615cd48e 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 00c7bffac3082be6f72e19b245dbfa69a7471f90 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 025/113] 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 fc9c9bf6b9d54..fb0480754df4d 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.0.1
-revision=1
+revision=2
 build_style=gnu-makefile
 make_use_env=yes
 make_build_args="ALLOW_STATIC=no"

From 1eb2d525159aa4f761c46a7d0e03f0c573313e63 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:46 -0400
Subject: [PATCH 026/113] 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 1c3f1b8b1fc67..32a9220b79a4d 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 e3901a12d1bb9c247ce48208bba007b746600448 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 027/113] 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 0000000000000..363ff35a28419
--- /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 039eea7622b39..35d546018d12a 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 fd34c4970287d94c78c46b1a6f6a3a39fadfd392 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 028/113] 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 5f0b9414dadaf..11b88193528f4 100644
--- a/srcpkgs/ffmpegthumbs/template
+++ b/srcpkgs/ffmpegthumbs/template
@@ -1,7 +1,7 @@
 # Template file for 'ffmpegthumbs'
 pkgname=ffmpegthumbs
 version=22.12.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules kcoreaddons kconfig-devel
  pkg-config qt5-host-tools qt5-qmake gettext"

From 0b69e20273935cd5312407a659b57fdf28100119 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 029/113] 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 0000000000000..1479fabcafcb4
--- /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 365f64d10cbab..1641ecf43be5b 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 935a0eac310382df95fe9cd4176c9bebac573e1b Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 030/113] 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 0000000000000..a4324da3a8822
--- /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 f36c38ca885b3..97b1d5ea519cd 100644
--- a/srcpkgs/freerdp/template
+++ b/srcpkgs/freerdp/template
@@ -1,7 +1,7 @@
 # Template file for 'freerdp'
 pkgname=freerdp
 version=2.10.0
-revision=3
+revision=4
 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 2386707009eeccd13bba1623183c039e0bdd29cd Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 031/113] 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 ae14f35c767c0..2dc0ac0ce03b5 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 8cdb1421934ebe66ac4b95ab6df3ee979c8bed09 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 032/113] 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 f4a05759f693d..97f44347b03a6 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 4caf7399d852b4a0bb3e7de33e5c9af36133df0a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 033/113] 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 b24be23fc1a6d..0f9350a251bf6 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.22.9
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config yasm"
 makedepends="orc-devel gst-plugins-base1-devel ffmpeg-devel"

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

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

diff --git a/srcpkgs/gst-plugins-bad1/template b/srcpkgs/gst-plugins-bad1/template
index 4fe7053c359c3..63200e74f99a7 100644
--- a/srcpkgs/gst-plugins-bad1/template
+++ b/srcpkgs/gst-plugins-bad1/template
@@ -27,7 +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
+ srt-devel libva-devel oneVPL-devel
  $(vopt_if gme libgme-devel)"
 depends="gst-plugins-base1>=${version}"
 short_desc="GStreamer plugins from the bad set (v1.x)"

From 041d8473caae2e02acbadbed4ad69e0fecd0dee3 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 035/113] 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 bc2a0dea6ac15..f77026c618eb6 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.22.9
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="pkg-config python3"
 makedepends="glib-devel gst-plugins-bad1-devel gobject-introspection

From 25bb3d4825f98033ba214766dac9f0c25b4d3c6a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:47 -0400
Subject: [PATCH 036/113] 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 0000000000000..503c2af3b78c1
--- /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 d42fd38fa4ad1..86a7fd619612c 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 bb63dd1b7f3a3db311c0c026b958cd96e224ee00 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 037/113] 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 26db03867a0c8..d6bb2eda627a3 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 0000000000000..298f9f4ab28f2
--- /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 ca5e4571e49c3..c32cb1bfa31f4 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 5b236905436909ce5ca4b5750f45776e202877ce Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 038/113] 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 94b6db673b0c3..402ccfaaecbc2 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 974e2cbe863dfc9c8b778528716c3dde4342b54c Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 039/113] 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 a9cde0665d55b..f41e1e4fabbae 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 8f83cf37d0e9c49f8ad8373eef24c25f0b2b8b15 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 040/113] 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 0000000000000..135fc50e07c9b
--- /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 31f8210421d1eceea66bf01c657b4946d238516a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 041/113] 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 d37a5918cd675..ea78e0aca0fe3 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 858710473623cb9f23954f541b0476a84394f199 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 042/113] 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 6214a4451336e..3555348659dde 100644
--- a/srcpkgs/kpipewire/template
+++ b/srcpkgs/kpipewire/template
@@ -1,7 +1,7 @@
 # Template file for 'kpipewire'
 pkgname=kpipewire
 version=5.27.10
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="extra-cmake-modules plasma-wayland-protocols gettext
  qt5-qmake qt5-host-tools pkg-config wayland-devel kcoreaddons

From 71cff05a9a8e3bded44d6bd671584345bdf587ca Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 043/113] libextractor: revbump for ffmpeg4

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

diff --git a/srcpkgs/libextractor/template b/srcpkgs/libextractor/template
index 044c663a3a0b9..06e63bc3189d5 100644
--- a/srcpkgs/libextractor/template
+++ b/srcpkgs/libextractor/template
@@ -1,13 +1,13 @@
 # Template file for 'libextractor'
 pkgname=libextractor
 version=1.11
-revision=4
+revision=5
 build_style=gnu-configure
 configure_args="--disable-static"
 hostmakedepends="pkg-config"
 makedepends="zlib-devel bzip2-devel exiv2-devel tiff-devel libpng-devel
  libjpeg-turbo-devel libvorbis-devel libflac-devel giflib-devel libmpeg2-devel
- ffmpeg-devel gtk+3-devel libltdl-devel libarchive-devel file-devel libgsf-devel"
+ ffmpeg4-devel gtk+3-devel libltdl-devel libarchive-devel file-devel libgsf-devel"
 short_desc="Library used to extract meta data from files"
 maintainer="Martin Riese <grauehaare@gmx.de>"
 license="GPL-3.0-or-later"

From 004dba4235283209769cecba3488fca5a346ef4c Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 044/113] 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 88d0f11307d81..8308fca0393e3 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 b7ec43e68e840a584b7c6f215029801c94f5394b Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 045/113] 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 0000000000000..16d4510ee98fa
--- /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 da4f2d56e94c3..4d6bf29efb4fd 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 7b20a9aa7718f54b95a5a2bed4259ad8f99e8fb8 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 046/113] 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 0fcffa7653d18..e888626b945e5 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 86a1713041d30f2d8c174c32af4601634dc85277 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:48 -0400
Subject: [PATCH 047/113] 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 6cd6565031254..93401adb618bd 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 d1dcf4e4f47b2d11e0d1767dc7dc7f330d2616da Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:49 -0400
Subject: [PATCH 048/113] 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 73e3915aaab9a..d7ed4c4b30a86 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 0d13d78301e55e7e5fc7b407fb495f28a66e06eb Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:49 -0400
Subject: [PATCH 049/113] 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 3a04932c8f1e6..838755f88db09 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 d09cccbef646ffd97b7b37fc36dbe51fcf9d389e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:49 -0400
Subject: [PATCH 050/113] 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 607ebeb3c7b24..bf63a91d9764f 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 cb3a6e5b077947477ca4b9adf1dd0c82150cf1d0 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:49 -0400
Subject: [PATCH 051/113] 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 12a46936c9900..5c2917b9c5124 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 185d156673011224d92c38db8223e0df2713a27e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 052/113] 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 ee9f7603f55fd..3e81834ca0edd 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 2e1af81e7d81bff1f626979c918c3ecb09e800fc Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 053/113] 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 e3febb821a451..1e3dc1bf9308e 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 3d4828c31688149168fceba5ab36c7f7093182fe Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 054/113] ppsspp: revbump for ffmpeg4

---
 srcpkgs/ppsspp/template | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/ppsspp/template b/srcpkgs/ppsspp/template
index 2c0ded496eb98..8bf55f65198cd 100644
--- a/srcpkgs/ppsspp/template
+++ b/srcpkgs/ppsspp/template
@@ -1,7 +1,7 @@
 # Template file for 'ppsspp'
 pkgname=ppsspp
 version=1.16.6
-revision=1
+revision=2
 _glslang_commit=b34f619e1c85810dcb3c578107d2e48ba4ee2b37
 _SPIRV_Cross_commit=4212eef67ed0ca048cb726a6767185504e7695e5
 _armips_commit=7bd1ec93d4586985ba1ef420b43b5e620f68695e
@@ -15,7 +15,7 @@ configure_args="-DHEADLESS=1 -DUSE_SYSTEM_FFMPEG=1 -DUNITTEST=ON
  -DUSING_QT_UI=$(vopt_if qt ON OFF) -DUSE_SYSTEM_ZSTD=ON
  -DARMIPS_USE_STD_FILESYSTEM=ON"
 hostmakedepends="pkg-config python3 $(vopt_if qt qt5-host-tools)"
-makedepends="zlib-devel glew-devel ffmpeg-devel libzip-devel
+makedepends="zlib-devel glew-devel ffmpeg4-devel libzip-devel
  snappy-devel rapidjson libpng-devel libzstd-devel
  $(vopt_if sdl2 'SDL2_ttf-devel SDL2-devel') $(vopt_if wayland wayland-devel)
  $(vopt_if qt 'qt5-devel qt5-multimedia-devel')"
@@ -69,10 +69,10 @@ post_extract() {
 	rmdir -v ${wrksrc}/ext/cpu_features
 	mv ${wrksrc}/cpu_features-${_cpu_features_commit} ${wrksrc}/ext/cpu_features
 	rmdir -v ${wrksrc}/ext/rcheevos
-        mv ${wrksrc}/rcheevos-${_rcheevos_commit} ${wrksrc}/ext/rcheevos
+	mv ${wrksrc}/rcheevos-${_rcheevos_commit} ${wrksrc}/ext/rcheevos
 }
 
-post_patch(){
+post_patch() {
 	# disable git versioning
 	vsed -e 's|find_package(Git)|# &|' -i git-version.cmake
 }
@@ -85,7 +85,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 5d94e12aa154939221102a5bdfe31d8f2cf35f37 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 055/113] 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 542fc27a2d32a..9308d949b6a1c 100644
--- a/srcpkgs/pqiv/template
+++ b/srcpkgs/pqiv/template
@@ -1,7 +1,7 @@
 # Template file for 'pqiv'
 pkgname=pqiv
 version=2.12
-revision=1
+revision=2
 build_style=gnu-makefile
 hostmakedepends="pkg-config"
 makedepends="glib-devel gtk+3-devel $(vopt_if ffmpeg ffmpeg-devel)

From 6eb5d080f3e4285400598113e7a95b53617ee69e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 056/113] 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 53781ea3bc28a..2da07f1e87eac 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 a7940042b7852d2c934b25b23160ee8c3217a20a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Thu, 14 Dec 2023 13:28:10 -0500
Subject: [PATCH 057/113] 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 ecda84afac131..531b4e1d4fe84 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 4047fcea6d1130bf484594adb797dc488de8c0aa Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:50 -0400
Subject: [PATCH 058/113] 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 0000000000000..04adc540f2cbc
--- /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 0000000000000..ac55e1634423a
--- /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 0000000000000..bc24d5b9a29cb
--- /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 8d2df1b5175ba..1687a77eb8a2f 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 6cd5f92c21ed525c52fb90c1022b36f5d3a70fa2 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:51 -0400
Subject: [PATCH 059/113] 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 3efb7e42d5fd3..27f6d5388cd15 100644
--- a/srcpkgs/qt5/template
+++ b/srcpkgs/qt5/template
@@ -3,9 +3,9 @@
 # revbump libqtxdg after bumping patch version
 pkgname=qt5
 version=5.15.11+20231124
+revision=3
 # commit 4765fa1df7a837db9c1f89c4da0dd76b74bb5fab
 # base repo: https://invent.kde.org/qt/qt/qt5
-revision=2
 build_style=meta
 hostmakedepends="cmake clang17 flex perl glib-devel pkg-config
  python3 re2c ruby which"

From bb1a10255ce9841fc68d5c2293ccaa902294da8d Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:51 -0400
Subject: [PATCH 060/113] 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 775d5a139a9ef..aa69e213c984b 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 c5a1e8d656742447a1481c1da0512b9c087997d6 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:51 -0400
Subject: [PATCH 061/113] 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 cb3125c5dbf1a..c65c26f7bf033 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 c5989e5d3f55176e2af0ab878cde9eaf01ce84e7 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:51 -0400
Subject: [PATCH 062/113] 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 ac18bc03418ce..f39a7f678ab35 100644
--- a/srcpkgs/scrcpy/template
+++ b/srcpkgs/scrcpy/template
@@ -1,7 +1,7 @@
 # Template file for 'scrcpy'
 pkgname=scrcpy
 version=2.1.1
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dcompile_server=false
  -Dprebuilt_server=/usr/share/scrcpy/scrcpy-server-v${version}"

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

---
 srcpkgs/spek-alternative                      |  1 +
 srcpkgs/{spek-alternative => spek-x}/template | 22 ++++++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)
 create mode 120000 srcpkgs/spek-alternative
 rename srcpkgs/{spek-alternative => spek-x}/template (52%)

diff --git a/srcpkgs/spek-alternative b/srcpkgs/spek-alternative
new file mode 120000
index 0000000000000..76648236da701
--- /dev/null
+++ b/srcpkgs/spek-alternative
@@ -0,0 +1 @@
+spek-x
\ No newline at end of file
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 d7b55c776b1d4..3ded6c2c323e4 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 c6030c0e345b65837567b892c148aa9973d46f78 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:51 -0400
Subject: [PATCH 064/113] 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 0000000000000..4c069b5a9fc46
--- /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 3097754e3cbe5..e3c4261f1f5a6 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 4c8390afc2f795bb3e422c5e5acdbc809fa0364d Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 065/113] 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 0000000000000..10780b42782f4
--- /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 d4d3e341a20bf..828b5cb32956e 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 7baa5a7ec5eda56518aa17a01bfbae149c68d857 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 066/113] 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 2a2ab763d2fdd..8fb4327535ef9 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 33850cbd5a0d3a2f985f0685a6bb8410951fd6b2 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 067/113] 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 9aea7de4ec705..012d31c4879ff 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 ffeadc1935f14a953c1409cca7e3aad73bf95433 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 068/113] 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 38ed47a584016..1ff910e722afc 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 fa482618ebaef3891abcab11e91b928fcbcdbd13 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 069/113] vice: revbump for ffmpeg4

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

diff --git a/srcpkgs/vice/template b/srcpkgs/vice/template
index b1f866d35095e..43f79243a1da1 100644
--- a/srcpkgs/vice/template
+++ b/srcpkgs/vice/template
@@ -1,7 +1,7 @@
 # Template file for 'vice'
 pkgname=vice
 version=3.7.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
 	$(vopt_enable sdl2 sdlui2)
@@ -26,7 +26,7 @@ makedepends="
 	$(vopt_if gtk3 gtk+3-devel)
 	$(vopt_if gtk3 pulseaudio-devel)
 	$(vopt_if gtk3 pango-devel)
-	$(vopt_if ffmpeg ffmpeg-devel)"
+	$(vopt_if ffmpeg ffmpeg4-devel)"
 short_desc="Emulator for C64, C128, CBM-II, PET, VIC20, Plus4 and C16"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"

From bcb5c828c6f220f65765c6563225722a7e255a09 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 070/113] 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 6da88b21bf2a1..4da8058400b58 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 0e2793b3f4c3d00cf679372901758d2c1adde731 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 22 Mar 2023 20:01:52 -0400
Subject: [PATCH 071/113] 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 f4a44ea814867..c0f66c9483d49 100644
--- a/srcpkgs/xpra/template
+++ b/srcpkgs/xpra/template
@@ -1,7 +1,7 @@
 # Template file for 'xpra'
 pkgname=xpra
 version=5.0.5
-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 0cfa3a6898b62266d83b8b7d0385ea191a61513e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 31 Mar 2023 09:07:40 -0400
Subject: [PATCH 072/113] 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 3d422a61e4891..251e057f826fb 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 30ae715eca2b96f833e7d2d83f3985f2cf323ab4 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 31 Mar 2023 09:08:40 -0400
Subject: [PATCH 073/113] 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 b792813dba7c2..109deb171c3f7 100644
--- a/srcpkgs/openimagedenoise/template
+++ b/srcpkgs/openimagedenoise/template
@@ -1,7 +1,7 @@
 # Template file for 'openimagedenoise'
 pkgname=openimagedenoise
 version=1.4.3
-revision=1
+revision=2
 archs="x86_64*"
 build_style=cmake
 hostmakedepends="ispc python3"

From 530e08c44c6786f790d39aaeeb25e151e48fdfcd Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 3 Apr 2023 23:31:45 -0400
Subject: [PATCH 074/113] 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 33141fbd862d7..f46cb53b6bfb9 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-tools-devel"

From 19447dfa02fc31cc4bd1f36078a39ae8354a1094 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 3 Apr 2023 23:33:30 -0400
Subject: [PATCH 075/113] 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 0000000000000..efcf3249bd885
--- /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 c36f98a3131998cce8b8a30dda263aa5d5e9dd64 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 3 Apr 2023 23:33:53 -0400
Subject: [PATCH 076/113] 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 0000000000000..64c429584776b
--- /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 249efa9098842..52626436ce75f 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 44442cd64dc565bd1378697a57a693476ab3ade6 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Tue, 4 Apr 2023 11:14:35 -0400
Subject: [PATCH 077/113] 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 044dafa605ba6..63dd01fafc780 100644
--- a/srcpkgs/konqueror/template
+++ b/srcpkgs/konqueror/template
@@ -1,11 +1,11 @@
 # Template file for 'konqueror'
 pkgname=konqueror
 version=23.08.4
-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 c965d32e23d6b9da87ab20d1b2ecc648c065662e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Tue, 4 Apr 2023 11:14:58 -0400
Subject: [PATCH 078/113] 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 1228bb60c41db..27a7da1dbdb91 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 0ccdc7243769e67b68c86b07245cf4b02ce673a3 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sat, 3 Jun 2023 08:20:22 -0400
Subject: [PATCH 079/113] 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 d8ee60abe06f7..55bff6e33849a 100644
--- a/srcpkgs/gtk4/template
+++ b/srcpkgs/gtk4/template
@@ -1,7 +1,7 @@
 # Template file for 'gtk4'
 pkgname=gtk4
 version=4.12.3
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
 configure_args="-Dman-pages=true -Ddocumentation=true -Dbuild-tests=false

From d104f8633414d2691d65ff11f695d3caa10d57fb Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 4 Jun 2023 11:28:26 -0400
Subject: [PATCH 080/113] 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 84332f79d060d..62750dd247548 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 9f718b4c4ef131caa170be354f6351970855bb81 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Thu, 22 Jun 2023 10:25:02 -0400
Subject: [PATCH 081/113] kdenlive: revbump for ffmpeg6

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

diff --git a/srcpkgs/kdenlive/template b/srcpkgs/kdenlive/template
index a0f3615c9c530..d63166f95c4d7 100644
--- a/srcpkgs/kdenlive/template
+++ b/srcpkgs/kdenlive/template
@@ -1,7 +1,7 @@
 # Template file for 'kdenlive'
 pkgname=kdenlive
 version=23.08.4
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="
  extra-cmake-modules kconfig kcoreaddons kdoctools pkg-config python3

From 3384b6ab0752361c19b193ba232c5aad67a93da8 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sat, 8 Jul 2023 20:20:59 -0400
Subject: [PATCH 082/113] 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 0b97f47489f81..f196d2bf9e4a4 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.6.1
-revision=1
+revision=2
 build_style=meson
 build_helper=qemu
 # missing libgrss for miner_rss

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

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

diff --git a/srcpkgs/mpd/template b/srcpkgs/mpd/template
index 4fd32b7be8c53..b8e2bd4c1b59c 100644
--- a/srcpkgs/mpd/template
+++ b/srcpkgs/mpd/template
@@ -1,7 +1,7 @@
 # Template file for 'mpd'
 pkgname=mpd
 version=0.23.15
-revision=1
+revision=2
 build_style=meson
 configure_args="-Dopus=enabled -Dmikmod=enabled -Dneighbor=true
  -Dsoundcloud=enabled -Dpipe=true -Dtwolame=enabled -Dbzip2=enabled

From f6d30e976d1af275beacb208e5aaa88822b009e8 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 30 Aug 2023 09:10:02 -0400
Subject: [PATCH 084/113] 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 aee8d35d08ffb..34e8fef054056 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=1
+revision=2
 _commit=afd9d5d31798d3eacf9ed6c30601e91d0f1e4d60
 _libyuv_commit=04821d1e7d60845525e8db55c7bcd41ef5be9406
 _abseil_commit=8c0b94e793a66495e0b1f34a5eb26bd7dc672db0

From 887174477acb970036d714228c339e1b522e31a6 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 30 Aug 2023 09:10:44 -0400
Subject: [PATCH 085/113] 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 d00b273b7b738..d20b87b5182db 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.14.9
-revision=1
+revision=2
 build_style=cmake
 build_helper="qemu gir"
 configure_args="-DTDESKTOP_API_ID=209235

From 25baa3d21fbb15cc2efc698bfe95f80f52e85e14 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 30 Aug 2023 09:11:45 -0400
Subject: [PATCH 086/113] gst-plugins-bad1: revbump for ffmpeg6

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

diff --git a/srcpkgs/gst-plugins-bad1/template b/srcpkgs/gst-plugins-bad1/template
index 63200e74f99a7..644758cb187a1 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.22.9
-revision=1
+revision=2
 build_helper="gir"
 build_style=meson
 configure_args="-Dpackage-origin=https://voidlinux.org -Ddoc=disabled

From 207a5f7fc4e19a912e9b366abf906059e81da9c0 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 30 Aug 2023 09:12:09 -0400
Subject: [PATCH 087/113] 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 0abf5ff7cdbec..b57180f1a4446 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 85299103b11957295a15a58e49c12a33505a73d2 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 30 Aug 2023 09:14:53 -0400
Subject: [PATCH 088/113] lms: revbump for ffmpeg6

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

diff --git a/srcpkgs/lms/template b/srcpkgs/lms/template
index e358f75902a98..3b21c458de519 100644
--- a/srcpkgs/lms/template
+++ b/srcpkgs/lms/template
@@ -1,7 +1,7 @@
 # Template file for 'lms'
 pkgname=lms
 version=3.42.1
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="wt-devel ffmpeg-devel boost-devel libconfig++-devel taglib-devel pam-devel libgraphicsmagick-devel gtest-devel libarchive-devel"

From 494cb8b96b18e9a56cfe0973991f60c09b971a55 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 30 Aug 2023 09:18:18 -0400
Subject: [PATCH 089/113] 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 28b5af54999b9..0000000000000
--- 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 d6a9adabdec83..0000000000000
--- 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 d4acf370ca0a4..0000000000000
--- 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 c135701e38b9a..7d5165f760bab 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 16531d66fa719c2224dafd7cc49184a8ce349eb9 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 15 Oct 2023 21:47:18 -0400
Subject: [PATCH 090/113] 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 8e57c5f592169..7a8f4520e7892 100644
--- a/srcpkgs/libopenshot/template
+++ b/srcpkgs/libopenshot/template
@@ -1,7 +1,7 @@
 # Template file for 'libopenshot'
 pkgname=libopenshot
 version=0.3.0
-revision=3
+revision=4
 build_style=cmake
 # Builds fail with Ruby-2.4.1
 configure_args="-DENABLE_RUBY=OFF -DUSE_SYSTEM_JSONCPP=ON"

From c42952a84e14ffeaad7adc1355144b5db6344943 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 8 Nov 2023 10:10:30 -0500
Subject: [PATCH 091/113] 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 3ce3f9e49d350..27d2131bc0a61 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=7
+revision=8
 build_style=cmake
 build_helper=qemu
 configure_args="-DUSE_QT=0 -DUSE_PYTHON=0 -DOIIO_BUILD_TESTS=0

From 5a9a013aa4005e4665d48c925cbe2a2c100f363b Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Wed, 8 Nov 2023 10:11:57 -0500
Subject: [PATCH 092/113] 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 09e442da9a680..2bc017cedca6b 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 e31846e2ac6c9abd2a1b157eb20c3a1eb1deceb7 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:53:10 -0500
Subject: [PATCH 093/113] 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 6921996e4e77b..6a79b328c1abf 100644
--- a/srcpkgs/mixxx/template
+++ b/srcpkgs/mixxx/template
@@ -1,7 +1,7 @@
 # Template file for 'mixxx'
 pkgname=mixxx
 version=2.3.3
-revision=6
+revision=7
 build_style=cmake
 configure_args="-DCMAKE_BUILD_TYPE=Release"
 hostmakedepends="extra-cmake-modules pkg-config protobuf qt5-host-tools qt5-qmake"

From a043ba2fc28e8a86bd6f022fa52e49b1d3a26fed Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:53:28 -0500
Subject: [PATCH 094/113] 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 8c4a51840859e..fb60dd2049089 100644
--- a/srcpkgs/musikcube/template
+++ b/srcpkgs/musikcube/template
@@ -1,7 +1,7 @@
 # Template file for 'musikcube'
 pkgname=musikcube
 version=3.0.0
-revision=3
+revision=4
 build_style=cmake
 make_cmd=make
 configure_args="-DNO_NCURSESW=1"

From cfc46b2fd5cf1925526818b8159ea978697387ae Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:53:45 -0500
Subject: [PATCH 095/113] 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 7b4e28812f483..1ca93fde97a85 100644
--- a/srcpkgs/electron24/template
+++ b/srcpkgs/electron24/template
@@ -1,7 +1,7 @@
 # Template file for 'electron24'
 pkgname=electron24
 version=24.3.0
-revision=2
+revision=3
 _nodever=18.14.0
 _chromiumver=112.0.5615.165
 archs="x86_64* aarch64*"

From ca1883623e96c22771f0f864db0d04941dcd85af Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:54:00 -0500
Subject: [PATCH 096/113] 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 0ef959125cb08..5371c0b354604 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 08dc8e4e997be8a81178d4d60e443ef29490cbd5 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:54:13 -0500
Subject: [PATCH 097/113] 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 08f986b031006..63c45cf4b814d 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 7d601a16043a7d72da0e1b00fbd02ad89a260c73 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:54:26 -0500
Subject: [PATCH 098/113] 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 b343f1131bfcf..a25a67433e285 100644
--- a/srcpkgs/obs/template
+++ b/srcpkgs/obs/template
@@ -1,7 +1,7 @@
 # Template file for 'obs'
 pkgname=obs
 version=30.0.0
-revision=2
+revision=3
 archs="i686* x86_64* ppc64le* aarch64* riscv64*"
 build_style=cmake
 configure_args="-DOBS_VERSION_OVERRIDE=${version} -DENABLE_JACK=ON

From db641237683d6b660d8aab80be257c7cb514928c Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:54:36 -0500
Subject: [PATCH 099/113] 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 98f302ad3a516..7eb8c00fa1580 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 badf5bab45d7bc9e1639723b684f99c68b741f5e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 14:54:48 -0500
Subject: [PATCH 100/113] 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 67a577e1300fe..1da626ecf515a 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 ce449b8d418491d319a35416a8a1ce2d3ba1face Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 15:00:15 -0500
Subject: [PATCH 101/113] 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 12c8954ef7b9b..b16b67beab8d2 100644
--- a/srcpkgs/baresip/template
+++ b/srcpkgs/baresip/template
@@ -1,7 +1,7 @@
 # Template file for 'baresip'
 pkgname=baresip
 version=3.6.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="pkg-config glib-devel"
 makedepends="libgsm-devel libpng-devel openssl-devel libsndfile-devel

From 0ec09ed729f34650509466592d0c44eb31a6ea04 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 15:02:30 -0500
Subject: [PATCH 102/113] 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 46c80f64a1349..942258ce60fb7 100644
--- a/srcpkgs/QMPlay2/template
+++ b/srcpkgs/QMPlay2/template
@@ -1,7 +1,7 @@
 # Template file for 'QMPlay2'
 pkgname=QMPlay2
 version=23.10.22
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="pkg-config qt5-qmake qt5-host-tools"
 makedepends="alsa-lib-devel ffmpeg-devel libass-devel libcdio-devel libgme-devel

From c016f4a075b30ba72bff3f7a702945c7e4d48370 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 15:02:34 -0500
Subject: [PATCH 103/113] 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 a5708a7d82a8f..7bfdad046c483 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 d244e2477515ce7acd5954a014a48af9c4093226 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 10 Nov 2023 15:02:43 -0500
Subject: [PATCH 104/113] 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 5fa929f3a0c12..742991ecd04af 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 2d32f8dc151f61607ea8e42e384bc60483a5b4b5 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 20 Nov 2023 17:57:47 -0500
Subject: [PATCH 105/113] 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 4948d1e332cb8..1ac1b167af189 100644
--- a/srcpkgs/mpv/template
+++ b/srcpkgs/mpv/template
@@ -1,7 +1,7 @@
 # Template file for 'mpv'
 pkgname=mpv
 version=0.36.0
-revision=4
+revision=5
 build_style=meson
 configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled
  -Dlibmpv=true -Dcplugins=enabled

From eb4cb940d9e36a474865cc83d8924554e6781d10 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 20 Nov 2023 17:59:29 -0500
Subject: [PATCH 106/113] 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 dd341dfe1bfce..8a7e1c081ef12 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 0fae751609643c01741a3987c8e325288f00a029 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Mon, 20 Nov 2023 18:00:36 -0500
Subject: [PATCH 107/113] 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 51fd6fec8c1c0..ad229b4c2e241 100644
--- a/srcpkgs/kfilemetadata5/template
+++ b/srcpkgs/kfilemetadata5/template
@@ -1,7 +1,7 @@
 # Template file for 'kfilemetadata5'
 pkgname=kfilemetadata5
 version=5.113.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="kcoreaddons extra-cmake-modules pkg-config qt5-host-tools qt5-qmake
  gettext kcoreaddons python3"

From c1fd922bbd683d17dc22d50be1775e36744ae8bd Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 8 Dec 2023 11:46:01 -0500
Subject: [PATCH 108/113] 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 3d135efa1d0b6..3c5a20db0fa98 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 ea981e576c69460d987ba3fece3c83cfcaabb3fb Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 8 Dec 2023 11:46:19 -0500
Subject: [PATCH 109/113] 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 862d3ae964eec..a7ae0efb58fb7 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 ff70d924e0e8fefc1216c9182202fdfe359803a8 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Tue, 19 Dec 2023 15:38:51 -0500
Subject: [PATCH 110/113] 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 bb70e7f51240a..755e4462bc013 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 c65745517bae38021d33507d58e0674f2227897e Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Thu, 11 Jan 2024 11:52:00 -0500
Subject: [PATCH 111/113] 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 ff9091f90ebb1..030091a6cc9d0 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 8fd0a2a782cf54d866b78a28c7f5f659cb8e08b6 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Thu, 11 Jan 2024 11:52:10 -0500
Subject: [PATCH 112/113] 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 48a7463cb68eb..515f316ab4576 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)"

From 4f27e8e00d1ca62205f4ce4ee7a0433e419fc1be Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sat, 3 Feb 2024 14:28:38 -0500
Subject: [PATCH 113/113] New package: oneVPL-intel-gpu-24.1.3

---
 srcpkgs/oneVPL-intel-gpu/template | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 srcpkgs/oneVPL-intel-gpu/template

diff --git a/srcpkgs/oneVPL-intel-gpu/template b/srcpkgs/oneVPL-intel-gpu/template
new file mode 100644
index 0000000000000..8b93cfabf7fc8
--- /dev/null
+++ b/srcpkgs/oneVPL-intel-gpu/template
@@ -0,0 +1,18 @@
+# Template file for 'oneVPL-intel-gpu'
+pkgname=oneVPL-intel-gpu
+version=24.1.3
+revision=1
+build_style=cmake
+hostmakedepends="pkg-config"
+makedepends="libva-devel libdrm-devel"
+short_desc="Intel oneVPL GPU Runtime"
+maintainer="zlice <zlice555@gmail.com>"
+license="MIT"
+homepage="https://github.com/oneapi-src/oneVPL-intel-gpu"
+changelog="https://github.com/oneapi-src/oneVPL-intel-gpu/blob/main/CHANGELOG.md"
+distfiles="https://github.com/oneapi-src/oneVPL-intel-gpu/archive/refs/tags/intel-onevpl-${version}.tar.gz"
+checksum=15d34e4304d7aeb5ea5e529b6f51171109cef42525113321f675bc14e56c697e
+
+post_install() {
+	vlicense LICENSE
+}

  parent reply	other threads:[~2024-02-11 22:49 UTC|newest]

Thread overview: 106+ 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 [this message]
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
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

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=20240211224957.7A45E25888@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).