Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
3292f8ac by Steve Lhomme at 2023-07-21T09:59:31+00:00
contrib: tell Android CMake targets where to find the SDK
Our make variable isn't exposed to CMake but the CMake Android toolchain
does it.
- - - - -
b44f5899 by Steve Lhomme at 2023-07-21T09:59:31+00:00
contrib: aom: group the Android cpu-features together
It's cleaner to patch things before doing the copy and also puts the two
related lines together.
contrib: aom: remove cpu-features patch
The code should work out of the box now.
- - - - -
2d12f80d by Steve Lhomme at 2023-07-21T09:59:31+00:00
contrib: aom: use a more generic way to set the pthread library in pkconf
It will work on all platforms whether pthread is used or not.
- - - - -
5 changed files:
- +
contrib/src/aom/0001-Use-the-pthread-library-found-by-CMake-in-the-pkg-co.patch
- − contrib/src/aom/aom-android-cpufeatures.patch
- − contrib/src/aom/aom-android-pthreads.patch
- contrib/src/aom/rules.mak
- contrib/src/main.mak
Changes:
=====================================
contrib/src/aom/0001-Use-the-pthread-library-found-by-CMake-in-the-pkg-co.patch
=====================================
@@ -0,0 +1,63 @@
+From 91bbb73a883de3df77504a5f6d0cd8c69850f286 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <rob...@videolan.org>
+Date: Tue, 18 Jul 2023 09:47:19 +0200
+Subject: [PATCH] Use the pthread library found by CMake in the pkg-config file
+
+It may be empty on some platforms (Android)
+
+See https://cmake.org/cmake/help/latest/module/FindThreads.html for
+explanation of the CMake variable.
+
+We already use CMAKE_USE_PTHREADS_INIT to check whether it detected
+pthread usage. And HAVE_PTHREAD_H is to to its value.
+
+Change-Id: I93a20ea4f7d0687bfa436de07eac7660c8f1e425
+---
+ build/cmake/aom_install.cmake | 2 +-
+ build/cmake/pkg_config.cmake | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/build/cmake/aom_install.cmake b/build/cmake/aom_install.cmake
+index 3b52a6872d..337ac2ddea 100644
+--- a/build/cmake/aom_install.cmake
++++ b/build/cmake/aom_install.cmake
+@@ -46,11 +46,11 @@ macro(setup_aom_install_targets)
+ -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
+ -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
+ -DCMAKE_PROJECT_NAME=${CMAKE_PROJECT_NAME}
++ -DCMAKE_THREAD_LIBS_INIT=${CMAKE_THREAD_LIBS_INIT}
+ -DCONFIG_MULTITHREAD=${CONFIG_MULTITHREAD}
+ -DCONFIG_TUNE_VMAF=${CONFIG_TUNE_VMAF}
+ -DCONFIG_TUNE_BUTTERAUGLI=${CONFIG_TUNE_BUTTERAUGLI}
+ -DCONFIG_TFLITE=${CONFIG_TFLITE}
+- -DHAVE_PTHREAD_H=${HAVE_PTHREAD_H}
+ -P
+ "${AOM_ROOT}/build/cmake/pkg_config.cmake"
+ COMMENT "Writing aom.pc"
+diff --git a/build/cmake/pkg_config.cmake b/build/cmake/pkg_config.cmake
+index e8fff2e776..d3ba67b94b 100644
+--- a/build/cmake/pkg_config.cmake
++++ b/build/cmake/pkg_config.cmake
+@@ -13,7 +13,7 @@ cmake_minimum_required(VERSION 3.5)
+ set(REQUIRED_ARGS "AOM_ROOT" "AOM_CONFIG_DIR" "CMAKE_INSTALL_PREFIX"
+ "CMAKE_INSTALL_BINDIR" "CMAKE_INSTALL_INCLUDEDIR"
+ "CMAKE_INSTALL_LIBDIR" "CMAKE_PROJECT_NAME"
+- "CONFIG_MULTITHREAD" "HAVE_PTHREAD_H")
++ "CONFIG_MULTITHREAD")
+
+ foreach(arg ${REQUIRED_ARGS})
+ if("${${arg}}" STREQUAL "")
+@@ -60,8 +60,8 @@ if(CONFIG_TUNE_BUTTERAUGLI)
+ endif()
+ file(APPEND "${pkgconfig_file}" "\nConflicts:\n")
+ file(APPEND "${pkgconfig_file}" "Libs: -L\${libdir} -l${pkg_name}\n")
+-if(CONFIG_MULTITHREAD AND HAVE_PTHREAD_H)
+- file(APPEND "${pkgconfig_file}" "Libs.private: -lm -lpthread\n")
++if(CONFIG_MULTITHREAD AND CMAKE_THREAD_LIBS_INIT)
++ file(APPEND "${pkgconfig_file}" "Libs.private: -lm
${CMAKE_THREAD_LIBS_INIT}\n")
+ else()
+ file(APPEND "${pkgconfig_file}" "Libs.private: -lm\n")
+ endif()
+--
+2.37.3.windows.1
+
=====================================
contrib/src/aom/aom-android-cpufeatures.patch deleted
=====================================
@@ -1,27 +0,0 @@
-diff --git a/aom_ports/aom_ports.cmake b/aom_ports/aom_ports.cmake
-index d57989654..11d4b5550 100644
---- a/aom_ports/aom_ports.cmake
-+++ b/aom_ports/aom_ports.cmake
-@@ -30,7 +30,8 @@ list(APPEND AOM_PORTS_ASM_X86
"${AOM_ROOT}/aom_ports/emms.asm")
- list(APPEND AOM_PORTS_INCLUDES_X86
"${AOM_ROOT}/aom_ports/x86_abi_support.asm")
-
- list(APPEND AOM_PORTS_SOURCES_ARM "${AOM_ROOT}/aom_ports/arm.h"
-- "${AOM_ROOT}/aom_ports/arm_cpudetect.c")
-+ "${AOM_ROOT}/aom_ports/arm_cpudetect.c"
-+ "${AOM_ROOT}/aom_ports/cpu-features.c")
-
- list(APPEND AOM_PORTS_SOURCES_PPC "${AOM_ROOT}/aom_ports/ppc.h"
- "${AOM_ROOT}/aom_ports/ppc_cpudetect.c")
-diff --git a/aom_ports/arm_cpudetect.c b/aom_ports/arm_cpudetect.c
-index 5a75bb348..bd5e1cb93 100644
---- a/aom_ports/arm_cpudetect.c
-+++ b/aom_ports/arm_cpudetect.c
-@@ -88,7 +88,7 @@ int aom_arm_cpu_caps(void) {
- }
-
- #elif defined(__ANDROID__) /* end _MSC_VER */
--#include <cpu-features.h>
-+#include "cpu-features.h"
-
- int aom_arm_cpu_caps(void) {
- int flags;
=====================================
contrib/src/aom/aom-android-pthreads.patch deleted
=====================================
@@ -1,14 +0,0 @@
---- aom/build/cmake/pkg_config.cmake 2021-05-07 16:22:27.118065285 -0400
-+++ aom/build/cmake/pkg_config.cmake.new 2021-05-07 16:23:24.937812883
-0400
-@@ -56,10 +56,6 @@
- file(APPEND "${pkgconfig_file}" " libvmaf")
- endif()
- file(APPEND "${pkgconfig_file}" "\nConflicts:\n")
--file(APPEND "${pkgconfig_file}" "Libs: -L\${libdir} -l${pkg_name}\n")
--if(CONFIG_MULTITHREAD AND HAVE_PTHREAD_H)
-- file(APPEND "${pkgconfig_file}" "Libs.private: -lm -lpthread\n")
--else()
-+file(APPEND "${pkgconfig_file}" "Libs: -L\${prefix}/lib -l${pkg_name} -lm\n")
- file(APPEND "${pkgconfig_file}" "Libs.private: -lm\n")
--endif()
- file(APPEND "${pkgconfig_file}" "Cflags: -I\${includedir}\n")
=====================================
contrib/src/aom/rules.mak
=====================================
@@ -14,14 +14,8 @@ $(TARBALLS)/libaom-$(AOM_VERSION).tar.gz:
aom: libaom-$(AOM_VERSION).tar.gz .sum-aom
$(UNPACK)
-ifdef HAVE_ANDROID
- $(APPLY) $(SRC)/aom/aom-android-pthreads.patch
- $(APPLY) $(SRC)/aom/aom-android-cpufeatures.patch
-endif
+ $(APPLY)
$(SRC)/aom/0001-Use-the-pthread-library-found-by-CMake-in-the-pkg-co.patch
$(MOVE)
-ifdef HAVE_ANDROID
- cp $(ANDROID_NDK)/sources/android/cpufeatures/cpu-features.c
$(ANDROID_NDK)/sources/android/cpufeatures/cpu-features.h aom/aom_ports/
-endif
DEPS_aom =
ifdef HAVE_WIN32
=====================================
contrib/src/main.mak
=====================================
@@ -457,7 +457,7 @@ ifdef HAVE_WIN32
CMAKE += -DCMAKE_DEBUG_POSTFIX:STRING=
endif
ifdef HAVE_ANDROID
-CMAKE += -DANDROID:BOOL=ON
+CMAKE += -DANDROID:BOOL=ON -DANDROID_NDK=$(ANDROID_NDK)
endif
ifdef MSYS_BUILD
CMAKE = PKG_CONFIG_LIBDIR="$(PKG_CONFIG_PATH)" $(CMAKE)
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/53e3b85860a5ea4693c23a664e3af4d937a40068...2d12f80db5271cf91e0ee69ae1f9669668c48ba7
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/53e3b85860a5ea4693c23a664e3af4d937a40068...2d12f80db5271cf91e0ee69ae1f9669668c48ba7
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits