Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dav1d to replace aom, upgrade ffmpeg to 4.4.5 #136

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions patches/dav1d-dll-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- dav1d-1.3.0/src/meson.build.orig 2023-10-03 17:36:52.000000000 +0200
+++ dav1d-1.3.0/src/meson.build 2023-10-06 08:30:26.038159600 +0200
@@ -304,7 +304,7 @@
endforeach

# The final dav1d library
-if host_machine.system() == 'windows'
+if host_machine.system() == 'windows' and cc.get_id() == 'msvc'
dav1d_soversion = ''
else
dav1d_soversion = dav1d_api_version_major
21 changes: 0 additions & 21 deletions patches/ffmpeg-4.3.1-ff_seek_frame_binary.diff

This file was deleted.

62 changes: 0 additions & 62 deletions patches/ffmpeg-4.3.1-sse.diff

This file was deleted.

59 changes: 59 additions & 0 deletions patches/ffmpeg-5.0-backport-ranlib-build-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
From bc5ccea3b9d2c71929af6271bd8afe9b6cfab436 Mon Sep 17 00:00:00 2001
From: Adrian Ratiu <[email protected]>
Date: Mon, 14 Feb 2022 15:00:07 +0200
Subject: [PATCH] configure: move ranlib -D test after setting defaults
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Upstream-Status: Backport [from master bc5ccea3b9d2c7]

In Gentoo and ChromeOS we want to allow pure LLVM builds without
using GNU tools, so we block any unwanted mixed GNU/LLVM usages
(GNU tools are still kept around in our chroots for projects
like glibc which cannot yet be built otherwise).

The default ${cross_prefix}${ranlib_default} points to GNU and
fails, so move the test a bit later - after the defaults are
set and the proper values get overriden - such that ffmpeg
configure calls the llvm-ranlib we desire. [1]

[1] https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/ffmpeg/ffmpeg-4.4.1-r1.ebuild?id=7a34377e3277a6a0e2eedd40e90452a44c55f1e6#n477

Signed-off-by: Adrian Ratiu <[email protected]>
Signed-off-by: Martin Storsjö <[email protected]>
---
configure | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 7d22c2a345..82642deabe 100755
--- a/configure
+++ b/configure
@@ -4403,11 +4403,7 @@ cc_default="${cross_prefix}${cc_default}"
cxx_default="${cross_prefix}${cxx_default}"
nm_default="${cross_prefix}${nm_default}"
pkg_config_default="${cross_prefix}${pkg_config_default}"
-if ${cross_prefix}${ranlib_default} 2>&1 | grep -q "\-D "; then
- ranlib_default="${cross_prefix}${ranlib_default} -D"
-else
- ranlib_default="${cross_prefix}${ranlib_default}"
-fi
+ranlib_default="${cross_prefix}${ranlib_default}"
strip_default="${cross_prefix}${strip_default}"
windres_default="${cross_prefix}${windres_default}"

@@ -4440,6 +4436,10 @@ set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \
enabled cross_compile || host_cc_default=$cc
set_default host_cc

+if ${ranlib} 2>&1 | grep -q "\-D "; then
+ ranlib="${ranlib} -D"
+fi
+
pkg_config_fail_message=""
if ! $pkg_config --version >/dev/null 2>&1; then
warn "$pkg_config not found, library detection may fail."
--
2.35.1

4 changes: 2 additions & 2 deletions renios/prototype/prototype.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
"-lSDL2_image",
"-lSDL2",
"-lavif",
"-laom",
"-ldav1d",
"-lyuv",
"-lturbojpeg",
"-lpng16",
Expand Down Expand Up @@ -392,7 +392,7 @@
"-lSDL2_image",
"-lSDL2",
"-lavif",
"-laom",
"-ldav1d",
"-lyuv",
"-lturbojpeg",
"-lpng16",
Expand Down
84 changes: 84 additions & 0 deletions renpybuild/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ def build_environment(c):
c.var("configure", "./configure")
c.var("cmake", "cmake")

c.var("meson_configure", "meson setup")
c.var("meson_compile", "meson compile -j " + str(cpuccount))

c.var("sysroot", c.tmp / f"sysroot.{c.platform}-{c.arch}")
c.var("build_platform", sysconfig.get_config_var("HOST_GNU_TYPE"))

Expand Down Expand Up @@ -218,6 +221,11 @@ def build_environment(c):
c.var("cmake_system_processor", "x86_64")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH='{{ install }};{{ sysroot }}' -DCMAKE_SYSROOT={{ sysroot }}")

c.var("meson_cross_system", "linux")
c.var("meson_cross_kernel", "linux")
c.var("meson_cross_cpu_family", "x86_64")
c.var("meson_cross_cpu", "x86_64")

elif (c.platform == "linux") and (c.arch == "aarch64"):

llvm(c, clang_args="-target {{ host_platform }} --sysroot {{ sysroot }} -fPIC -pthread")
Expand All @@ -229,6 +237,11 @@ def build_environment(c):
c.var("cmake_system_processor", "aarch64")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH='{{ install }};{{ sysroot }}' -DCMAKE_SYSROOT={{ sysroot }}")

c.var("meson_cross_system", "linux")
c.var("meson_cross_kernel", "linux")
c.var("meson_cross_cpu_family", "aarch64")
c.var("meson_cross_cpu", "aarch64")

elif (c.platform == "linux") and (c.arch == "armv7l"):

llvm(c, clang_args="-target {{ host_platform }} --sysroot {{ sysroot }} -fPIC -pthread -mfpu=neon -mfloat-abi=hard")
Expand All @@ -240,6 +253,11 @@ def build_environment(c):
c.var("cmake_system_processor", "armv7")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH='{{ install }};{{ sysroot }}' -DCMAKE_SYSROOT={{ sysroot }}")

c.var("meson_cross_system", "linux")
c.var("meson_cross_kernel", "linux")
c.var("meson_cross_cpu_family", "arm")
c.var("meson_cross_cpu", "armhf")

elif (c.platform == "windows") and (c.arch == "x86_64"):

llvm(
Expand All @@ -254,6 +272,11 @@ def build_environment(c):
c.var("cmake_system_processor", "x86_64")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH='{{ install }};{{ cross }}/llvm-mingw/x86_64-w64-mingw32' -DCMAKE_SYSROOT={{ cross }}/llvm-mingw/x86_64-w64-mingw32")

c.var("meson_cross_system", "windows")
c.var("meson_cross_kernel", "nt")
c.var("meson_cross_cpu_family", "x86_64")
c.var("meson_cross_cpu", "x86_64")

elif (c.platform == "android") and (c.arch == "x86_64"):

android_llvm(c, "x86_64")
Expand All @@ -265,6 +288,11 @@ def build_environment(c):
c.var("android_abi", "x86_64")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH={{ install }} -DCMAKE_TOOLCHAIN_FILE={{cross}}/{{ndk_version}}/build/cmake/android.toolchain.cmake -DANDROID_ABI={{ android_abi }} -DANDROID_PLATFORM=android-21 -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF")

c.var("meson_cross_system", "android")
c.var("meson_cross_kernel", "linux")
c.var("meson_cross_cpu_family", "x86_64")
c.var("meson_cross_cpu", "x86_64")

elif (c.platform == "android") and (c.arch == "arm64_v8a"):

android_llvm(c, "aarch64")
Expand All @@ -276,6 +304,11 @@ def build_environment(c):
c.var("android_abi", "arm64-v8a")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH={{ install }} -DCMAKE_TOOLCHAIN_FILE={{cross}}/{{ndk_version}}/build/cmake/android.toolchain.cmake -DANDROID_ABI={{ android_abi }} -DANDROID_PLATFORM=android-21 -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF")

c.var("meson_cross_system", "android")
c.var("meson_cross_kernel", "linux")
c.var("meson_cross_cpu_family", "aarch64")
c.var("meson_cross_cpu", "aarch64")

elif (c.platform == "android") and (c.arch == "armeabi_v7a"):

android_llvm(c, "armv7a")
Expand All @@ -287,6 +320,11 @@ def build_environment(c):
c.var("android_abi", "armeabi-v7a")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH={{ install }} -DCMAKE_TOOLCHAIN_FILE={{cross}}/{{ndk_version}}/build/cmake/android.toolchain.cmake -DANDROID_ABI={{ android_abi }} -DANDROID_PLATFORM=android-21 -DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF")

c.var("meson_cross_system", "android")
c.var("meson_cross_kernel", "linux")
c.var("meson_cross_cpu_family", "arm")
c.var("meson_cross_cpu", "armv7")

elif (c.platform == "mac") and (c.arch == "x86_64"):

llvm(
Expand All @@ -302,6 +340,12 @@ def build_environment(c):
c.var("cmake_system_processor", "x86_64")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH='{{ install }};{{ cross }}/sdk' -DCMAKE_SYSROOT={{ cross }}/sdk")

c.var("meson_cross_system", "darwin")
c.var("meson_cross_subsystem", "macos")
c.var("meson_cross_kernel", "xnu")
c.var("meson_cross_cpu_family", "x86_64")
c.var("meson_cross_cpu", "x86_64")

elif (c.platform == "mac") and (c.arch == "arm64"):

llvm(
Expand All @@ -317,6 +361,12 @@ def build_environment(c):
c.var("cmake_system_processor", "aarch64")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH='{{ install }};{{ cross }}/sdk' -DCMAKE_SYSROOT={{ cross }}/sdk")

c.var("meson_cross_system", "darwin")
c.var("meson_cross_subsystem", "macos")
c.var("meson_cross_kernel", "xnu")
c.var("meson_cross_cpu_family", "aarch64")
c.var("meson_cross_cpu", "arm64")

elif (c.platform == "ios") and (c.arch == "arm64"):

llvm(
Expand All @@ -331,6 +381,12 @@ def build_environment(c):
c.var("cmake_system_processor", "aarch64")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH='{{ install }};{{ cross }}/sdk' -DCMAKE_SYSROOT={{ cross }}/sdk")

c.var("meson_cross_system", "darwin")
c.var("meson_cross_subsystem", "ios")
c.var("meson_cross_kernel", "xnu")
c.var("meson_cross_cpu_family", "aarch64")
c.var("meson_cross_cpu", "aarch64")

elif (c.platform == "ios") and (c.arch == "sim-arm64"):

llvm(
Expand All @@ -345,6 +401,12 @@ def build_environment(c):
c.var("cmake_system_processor", "aarch64")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH='{{ install }};{{ cross }}/sdk' -DCMAKE_SYSROOT={{ cross }}/sdk")

c.var("meson_cross_system", "darwin")
c.var("meson_cross_subsystem", "ios-simulator")
c.var("meson_cross_kernel", "xnu")
c.var("meson_cross_cpu_family", "aarch64")
c.var("meson_cross_cpu", "aarch64")

elif (c.platform == "ios") and (c.arch == "sim-x86_64"):

llvm(
Expand All @@ -359,6 +421,12 @@ def build_environment(c):
c.var("cmake_system_processor", "x86_64")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH='{{ install }};{{ cross }}/sdk' -DCMAKE_SYSROOT={{ cross }}/sdk")

c.var("meson_cross_system", "darwin")
c.var("meson_cross_subsystem", "ios-simulator")
c.var("meson_cross_kernel", "xnu")
c.var("meson_cross_cpu_family", "x86_64")
c.var("meson_cross_cpu", "x86_64")

elif (c.platform == "web") and (c.arch == "wasm") and (c.name != "web"):

# Use emscripten wrapper to configure and build
Expand Down Expand Up @@ -399,6 +467,11 @@ def build_environment(c):
c.var("cmake_system_processor", "generic")
c.var("cmake_args", "-DCMAKE_FIND_ROOT_PATH={{ install }}")

c.var("meson_cross_system", "emscripten")
c.var("meson_cross_kernel", "none")
c.var("meson_cross_cpu_family", "wasm32")
c.var("meson_cross_cpu", "wasm32")


if c.kind not in ( "host", "host-python", "cross" ):
c.env("PKG_CONFIG_LIBDIR", "{{ install }}/lib/pkgconfig:{{ PKG_CONFIG_LIBDIR }}")
Expand All @@ -411,6 +484,17 @@ def build_environment(c):

c.var("cmake", "{{cmake}} {{ cmake_args }} -DCMAKE_PROJECT_INCLUDE_BEFORE={{root}}/tools/cmake_build_variables.cmake -DCMAKE_BUILD_TYPE=Release")

if not "meson_cross_subsystem" in c.variables:
c.var("meson_cross_subsystem", "{{ meson_cross_system }} ")

if c.kind not in ( "host", "host-python", "cross" ):
c.var("meson_build_kind", "cross")
else:
c.var("meson_build_kind", "native")

c.var("meson_config_file", "{{ install }}/meson_{{meson_build_kind}}_file.txt")
c.var("meson_args", "--{{meson_build_kind}}-file={{meson_config_file}} --buildtype=release -Dc_std=gnu17 -Dcpp_std=gnu++17")

# Used by zlib.
if c.kind != "host":
c.var("cross_config", "--host={{ host_platform }} --build={{ build_platform }}")
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
typing==3.7.4.3
urllib3==2.2.2
meson>=1.4.1
Binary file added source/dav1d-1.5.0.tar.xz
Binary file not shown.
Binary file added source/ffmpeg-4.4.5.tar.gz
Binary file not shown.
Loading