Ports/ffmpeg: Update to version 6.0

This additionally includes a patch from the current master branch,
which fixes building with binutils 2.41 and newer.
This commit is contained in:
Tim Schumacher 2023-10-02 01:26:34 +02:00 committed by Jelle Raaijmakers
parent dd81bea9ef
commit 00ed042eda
Notes: sideshowbarker 2024-07-16 21:51:02 +09:00
6 changed files with 136 additions and 10 deletions

View File

@ -70,7 +70,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`emu2`](emu2/) | emu2 DOS emulator | 2021.01 | https://github.com/dmsc/emu2 | | [`emu2`](emu2/) | emu2 DOS emulator | 2021.01 | https://github.com/dmsc/emu2 |
| [`epsilon`](epsilon/) | graphical calculator simulator | 15.5.0 | https://github.com/numworks/epsilon | | [`epsilon`](epsilon/) | graphical calculator simulator | 15.5.0 | https://github.com/numworks/epsilon |
| [`expat`](expat/) | Expat XML parser | 2.5.0 | https://libexpat.github.io/ | | [`expat`](expat/) | Expat XML parser | 2.5.0 | https://libexpat.github.io/ |
| [`ffmpeg`](ffmpeg/) | ffmpeg | 5.0 | https://ffmpeg.org | | [`ffmpeg`](ffmpeg/) | ffmpeg | 6.0 | https://ffmpeg.org |
| [`figlet`](figlet/) | FIGlet | 2.2.5 | http://www.figlet.org/ | | [`figlet`](figlet/) | FIGlet | 2.2.5 | http://www.figlet.org/ |
| [`file`](file/) | file (determine file type) | 5.44 | https://www.darwinsys.com/file/ | | [`file`](file/) | file (determine file type) | 5.44 | https://www.darwinsys.com/file/ |
| [`findutils`](findutils/) | GNU findutils | 4.9.0 | https://www.gnu.org/software/findutils/ | | [`findutils`](findutils/) | GNU findutils | 4.9.0 | https://www.gnu.org/software/findutils/ |

View File

@ -1,13 +1,22 @@
#!/usr/bin/env -S bash ../.port_include.sh #!/usr/bin/env -S bash ../.port_include.sh
port=ffmpeg port='ffmpeg'
version=5.0 version='6.0'
useconfigure=true useconfigure='true'
depends=("libiconv" "libtiff" "xz" "bzip2" "SDL2" "x264" "x265") depends=(
files=( 'bzip2'
"https://ffmpeg.org/releases/ffmpeg-${version}.tar.gz#7bf52bc242b5db8df67c62cb826df134d917dedcf6abf1289e15e4057bcc1750" 'libiconv'
'libtiff'
'SDL2'
'x264'
'x265'
'xz'
)
files=(
"https://ffmpeg.org/releases/ffmpeg-${version}.tar.gz#f4ccf961403752c93961927715f524576d1f4dd02cd76d8c76aed3bbe6686656"
)
installopts=(
"INSTALL_TOP=${SERENITY_INSTALL_ROOT}/usr/local"
) )
installopts=("INSTALL_TOP=${SERENITY_INSTALL_ROOT}/usr/local")
configopts=("SRC_PATH=.")
configure() { configure() {
run ./configure \ run ./configure \

View File

@ -10,7 +10,7 @@ work in cpp, assume that it exists.
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/error.h b/libavutil/error.h diff --git a/libavutil/error.h b/libavutil/error.h
index 0d3269a..a54d80d 100644 index 0d3269aa6da136e849faa7f810ae36748659a2e0..a54d80d0f2d7be91e617cb0ed0640568bffdd693 100644
--- a/libavutil/error.h --- a/libavutil/error.h
+++ b/libavutil/error.h +++ b/libavutil/error.h
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@

View File

@ -0,0 +1,31 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tim Schumacher <timschumi@gmx.de>
Date: Mon, 2 Oct 2023 01:17:46 +0200
Subject: [PATCH] Adapt to the Serenity thread name interface
---
libavutil/thread.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavutil/thread.h b/libavutil/thread.h
index 2f5e7e1cb552fd12f954334e80960cbfb6ac7108..264d6ae646dc78e0f21b58445a412487e055ebc5 100644
--- a/libavutil/thread.h
+++ b/libavutil/thread.h
@@ -26,6 +26,8 @@
#if HAVE_PRCTL
#include <sys/prctl.h>
+#include <unistd.h>
+#include <string.h>
#endif
#include "error.h"
@@ -195,7 +197,7 @@ static inline int ff_thread_once(char *control, void (*routine)(void))
static inline int ff_thread_setname(const char *name)
{
#if HAVE_PRCTL
- return AVERROR(prctl(PR_SET_NAME, name));
+ return AVERROR(prctl(PR_SET_THREAD_NAME, gettid(), name, strlen(name)));
#endif
return AVERROR(ENOSYS);

View File

@ -0,0 +1,73 @@
From 0000000000000000000000000000000000000000 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 6298f5ed1983b84205479d1a714bd657435789f9..ca7e2dffc1076f82d2cabf55eae0681adbdcfb96 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;
}

View File

@ -7,3 +7,16 @@ Assume that EDOM exists
Since errno values are not numeric constants on serenity, this won't Since errno values are not numeric constants on serenity, this won't
work in cpp, assume that it exists. work in cpp, assume that it exists.
## `0002-Adapt-to-the-Serenity-thread-name-interface.patch`
Adapt to the Serenity thread name interface
## `0003-avcodec-x86-mathops-clip-constants-used-with-shift-i.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>