From bd985b7bdca72818a7ebab0437d1d8b9e27d8644 Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Sat, 10 Aug 2024 16:20:48 +0100 Subject: [PATCH 1/4] Test build --- inputstream.ffmpegdirect/addon.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputstream.ffmpegdirect/addon.xml.in b/inputstream.ffmpegdirect/addon.xml.in index a94fff3e..438989ef 100644 --- a/inputstream.ffmpegdirect/addon.xml.in +++ b/inputstream.ffmpegdirect/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ From 5ddd117a1d2a901dd5fad66728727055a0fc6503 Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Wed, 14 Aug 2024 07:21:59 +0100 Subject: [PATCH 2/4] Add patch for pthread create for Android NDK 26 --- depends/common/libzvbi/0011-fix-android-ndk-26.patch | 12 ++++++++++++ depends/common/libzvbi/CMakeLists.txt | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 depends/common/libzvbi/0011-fix-android-ndk-26.patch diff --git a/depends/common/libzvbi/0011-fix-android-ndk-26.patch b/depends/common/libzvbi/0011-fix-android-ndk-26.patch new file mode 100644 index 00000000..20f7954e --- /dev/null +++ b/depends/common/libzvbi/0011-fix-android-ndk-26.patch @@ -0,0 +1,12 @@ +diff --color -aur a/configure.ac b/configure.ac +--- a/configure.ac 2023-08-25 16:50:40 ++++ b/configure.ac 2024-08-13 11:48:38 +@@ -248,7 +248,7 @@ + dnl When upgrading to autoconf 2.71, AC_TRY_LINK deprecated and replaced + dnl with AC_LINK_IFELSE. + dnl +-AC_CHECK_LIB(pthread, pthread_create,,[ ++AC_SEARCH_LIBS([pthread_create], [pthread pthreads],,[ + AC_CHECK_LIB(pthreadGC2, pthread_create,,[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[pthread_create();]])],[],[ + # same as previous, but use '-pthread' instead of '-lpthread' diff --git a/depends/common/libzvbi/CMakeLists.txt b/depends/common/libzvbi/CMakeLists.txt index aaf846c7..c5a2c5e2 100644 --- a/depends/common/libzvbi/CMakeLists.txt +++ b/depends/common/libzvbi/CMakeLists.txt @@ -5,7 +5,11 @@ cmake_minimum_required(VERSION 3.5) list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) list(APPEND zvbi_conf CPPFLAGS=-I${CMAKE_INSTALL_PREFIX}/include) -list(APPEND zvbi_conf CFLAGS=-I${CMAKE_INSTALL_PREFIX}/include) +if (CORE_SYSTEM_NAME STREQUAL android) + list(APPEND zvbi_conf CFLAGS="-I${CMAKE_INSTALL_PREFIX}/include -Wno-implicit-function-declaration") +else() + list(APPEND zvbi_conf CFLAGS=-I${CMAKE_INSTALL_PREFIX}/include) +endif() list(APPEND zvbi_conf LDFLAGS=-L${CMAKE_INSTALL_PREFIX}/lib) if (CORE_SYSTEM_NAME STREQUAL android) list(APPEND zvbi_conf LIBS=-liconv) From bd0effae9dee202c693429c1a58f8aa5b64b2787 Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Wed, 14 Aug 2024 07:26:27 +0100 Subject: [PATCH 3/4] Test setting CFLAGS for libzvbi using Set instead --- depends/common/libzvbi/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/depends/common/libzvbi/CMakeLists.txt b/depends/common/libzvbi/CMakeLists.txt index c5a2c5e2..dc0a6a92 100644 --- a/depends/common/libzvbi/CMakeLists.txt +++ b/depends/common/libzvbi/CMakeLists.txt @@ -4,12 +4,12 @@ cmake_minimum_required(VERSION 3.5) list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) -list(APPEND zvbi_conf CPPFLAGS=-I${CMAKE_INSTALL_PREFIX}/include) if (CORE_SYSTEM_NAME STREQUAL android) - list(APPEND zvbi_conf CFLAGS="-I${CMAKE_INSTALL_PREFIX}/include -Wno-implicit-function-declaration") + set(zvbi_conf "CFLAGS=-I${CMAKE_INSTALL_PREFIX}/include -Wno-implicit-function-declaration") else() - list(APPEND zvbi_conf CFLAGS=-I${CMAKE_INSTALL_PREFIX}/include) + set(zvbi_conf CFLAGS=-I${CMAKE_INSTALL_PREFIX}/include) endif() +list(APPEND zvbi_conf CPPFLAGS=-I${CMAKE_INSTALL_PREFIX}/include) list(APPEND zvbi_conf LDFLAGS=-L${CMAKE_INSTALL_PREFIX}/lib) if (CORE_SYSTEM_NAME STREQUAL android) list(APPEND zvbi_conf LIBS=-liconv) From 26fff63c4ab8302e3f6587426491d46a8affc72a Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Wed, 14 Aug 2024 08:34:42 +0100 Subject: [PATCH 4/4] Disable vulkan for Android as NDK 26 doesn't have vulkan_beta.h --- depends/common/ffmpeg/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/depends/common/ffmpeg/CMakeLists.txt b/depends/common/ffmpeg/CMakeLists.txt index 66d757ce..cfc834a5 100644 --- a/depends/common/ffmpeg/CMakeLists.txt +++ b/depends/common/ffmpeg/CMakeLists.txt @@ -45,6 +45,11 @@ else() list(APPEND EXTRA_CONF --enable-debug) endif() +# Android NDK 26 doesn't come with vulkan_beta.h so let's disable it in that case +if (CORE_SYSTEM_NAME STREQUAL android) + list(APPEND EXTRA_CONF --disable-vulkan) +endif() + # Run the builds include(ExternalProject) if(NOT WIN32)