Skip to content

Commit

Permalink
Merge pull request #306 from phunkyfish/fix-android-ndk26
Browse files Browse the repository at this point in the history
Fix android ndk26 for Piers branch
  • Loading branch information
phunkyfish authored Aug 14, 2024
2 parents 13e1460 + 2d69d6f commit b131c99
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
5 changes: 5 additions & 0 deletions depends/common/ffmpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions depends/common/libzvbi/0011-fix-android-ndk-26.patch
Original file line number Diff line number Diff line change
@@ -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'
7 changes: 6 additions & 1 deletion depends/common/libzvbi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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)
list(APPEND zvbi_conf CFLAGS=-I${CMAKE_INSTALL_PREFIX}/include)
if (CORE_SYSTEM_NAME STREQUAL android)
set(zvbi_cflags "CFLAGS=-I${CMAKE_INSTALL_PREFIX}/include -Wno-implicit-function-declaration")
list(APPEND zvbi_conf ${zvbi_cflags})
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)
Expand Down
2 changes: 1 addition & 1 deletion inputstream.ffmpegdirect/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="inputstream.ffmpegdirect"
version="22.0.0"
version="22.0.1"
name="Inputstream FFmpeg Direct"
provider-name="Ross Nicholson">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
7 changes: 7 additions & 0 deletions inputstream.ffmpegdirect/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
v22.0.1
- Add patch for pthread create and compile option for Android NDK 26 compatibility with libzvbi
- Disable vulkan in ffmpeg for Android as NDK 26 doesn't have vulkan_beta.h

v22.0.0
- Initial Release

v21.3.5
- Update depednencies to fix building on apple silicon (gnutls 3.8.4) and binutils on linux (2.41 or higher)

Expand Down

0 comments on commit b131c99

Please sign in to comment.