Ports: Upgrade to FFmpeg 5.0 release; enable SDL and networking

This commit is contained in:
Peter Ross 2022-03-01 19:50:19 +11:00 committed by Andreas Kling
parent 34108547b6
commit 451fee8fd7
Notes: sideshowbarker 2024-07-17 18:04:00 +09:00
4 changed files with 31 additions and 7 deletions

View file

@ -44,7 +44,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`flex`](flex/) | flex | 2.6.4 | https://github.com/westes/flex |
| [`fotaq`](fotaq/) | Flight of the Amazon Queen | 1.0 | https://www.scummvm.org/games/#games-queen |
| [`fontconfig`](fontconfig/) | Fontconfig | 2.13.94 | https://www.freedesktop.org/wiki/Software/fontconfig/ |
| [`ffmpeg`](ffmpeg/) | ffmpeg | 4.4 | https://ffmpeg.org |
| [`ffmpeg`](ffmpeg/) | ffmpeg | 5.0 | https://ffmpeg.org |
| [`freeciv`](freeciv/) | Freeciv | 3.0.0-beta2 | http://freeciv.org/ |
| [`freedink`](freedink/) | FreeDink | 109.6 | https://www.gnu.org/software/freedink/ |
| [`freetype`](freetype/) | FreeType | 2.10.4 | https://www.freetype.org/ |

View file

@ -1,20 +1,22 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=ffmpeg
version=4.4
version=5.0
useconfigure=true
depends=("libiconv" "libtiff" "xz" "bzip2")
files="https://ffmpeg.org/releases/ffmpeg-${version}.tar.gz ffmpeg-${version}.tar.gz a4abede145de22eaf233baa1726e38e137f5698d9edd61b5763cd02b883f3c7c"
depends=("libiconv" "libtiff" "xz" "bzip2" "SDL2")
files="https://ffmpeg.org/releases/ffmpeg-${version}.tar.gz ffmpeg-${version}.tar.gz 7bf52bc242b5db8df67c62cb826df134d917dedcf6abf1289e15e4057bcc1750"
auth_type="sha256"
installopts=("INSTALL_TOP=${SERENITY_INSTALL_ROOT}/usr/local")
configopts=("SRC_PATH=.")
configure() {
run ./configure \
--arch="x86_32" \
--target-os=none \
--arch="${SERENITY_ARCH}" \
--cc="${CC} -std=gnu99" \
--cxx="${CXX} -std=gnu99" \
--disable-network \
--enable-cross-compile
--enable-cross-compile \
--disable-stripping \
--disable-avx
}
install() {

View file

@ -0,0 +1,9 @@
# Patches for FFmpeg on SerenityOS
## `errno-is-not-valid-during-cpp.patch`
FFmpeg performs a preprocessor-time test on errno values. This test does
not work on SerenityOS because our errno values are described by an
enum, and therefore are only available at compile time.
The patch removes the preprocessor-time test.

View file

@ -0,0 +1,13 @@
diff --git a/libavutil/error.h b/libavutil/error.h
index 0d3269a..a54d80d 100644
--- a/libavutil/error.h
+++ b/libavutil/error.h
@@ -37,7 +37,7 @@
/* error handling */
-#if EDOM > 0
+#if 1
#define AVERROR(e) (-(e)) ///< Returns a negative error code from a POSIX error code, to return from library functions.
#define AVUNERROR(e) (-(e)) ///< Returns a POSIX error code from a library function error return value.
#else