Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/ffmpeg4.4/PKGBUILD
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-02-24 20:02:26 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2022-02-24 20:02:26 +0100
commit5b9257ab1157efde4c4afc55adc4314d351bef6b (patch)
treef64d29a52d44ac2af5c651f45d3c6396b93880b0 /extra/ffmpeg4.4/PKGBUILD
parent0b013dd7f31dd4387f4d042ee1e4297e2f66e07d (diff)
extra/ffmpeg4.4: apply same patches as for ffmpeg
Diffstat (limited to 'extra/ffmpeg4.4/PKGBUILD')
-rw-r--r--extra/ffmpeg4.4/PKGBUILD85
1 files changed, 85 insertions, 0 deletions
diff --git a/extra/ffmpeg4.4/PKGBUILD b/extra/ffmpeg4.4/PKGBUILD
new file mode 100644
index 00000000..9bb8b8fb
--- /dev/null
+++ b/extra/ffmpeg4.4/PKGBUILD
@@ -0,0 +1,85 @@
+# disable LTO (breaks with too few registers in error: 'asm' operand has impossible constraints
+eval "$(
+declare -f build | \
+ sed '
+ s/--enable-lto/--disable-lto/
+ s/--enable-libmfx/--disable-libmfx/
+ '
+)"
+
+# also disable mfx - libmfx does not compile
+depends=(${depends[@]//libmfx/})
+eval "$(
+ declare -f build | \
+ sed '
+ s/--enable-libmfx/--disable-libmfx/
+ '
+)"
+
+# no vamf for non-pentium4
+if [ "$CARCH" == 'i686' ] || [ "$CARCH" == 'i486' ]; then
+ depends=(${depends[@]//vmaf/})
+
+ eval "$(
+ declare -f prepare | \
+ sed '
+ /vmaf/d
+ '
+ )"
+
+ eval "$(
+ declare -f build | \
+ sed '
+ s/--enable-libvmaf/--disable-libvmaf/
+ '
+ )"
+
+fi
+
+# force picking of a modern libvpx and not libvpx1.3 needed for steam
+makedepends+=('libvpx>=1.8.2')
+
+# no AviSynthPlus on i486 (uses Intel intrinsics and cmake support for
+# disabling it is broken)
+makedepends=(${makedepends[@]//avisynthplus/})
+makedepends_i686+=(avisynthplus)
+makedepends_pentium4=("${makedepends_i686[@]}")
+if [ "$CARCH" == 'i486' ]; then
+ eval "$(
+ declare -f build | \
+ sed '
+ s/--enable-avisynth/--disable-avisynth/
+ '
+ )"
+fi
+
+# no rav1e on i486, no Rust (yet)
+if [ "$CARCH" == 'i486' ]; then
+ depends=(${depends[@]//librav1e.so/})
+ eval "$(
+ declare -f build | \
+ sed '
+ s@--enable-librav1e@--disable-librav1e@
+ '
+ )"
+fi
+
+# svt-av1 is 64-bit only
+depends=(${depends[@]//svt-av1/})
+eval "$(
+ declare -f build | \
+ sed '
+ s@--enable-libsvtav1@--disable-libsvtav1@
+ '
+)"
+
+# -latomic on i486
+if [ "$CARCH" == 'i486' ]; then
+ depends=(${depends[@]//librav1e.so/})
+ eval "$(
+ declare -f build | \
+ sed '
+ s@make[^ ]@make EXTRALIBS-ffmpeg=-latomic EXTRALIBS-ffplay=-latomic EXTRALIBS-ffprobe=-latomic@
+ '
+ )"
+fi