diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3798239..2c54644 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,25 +118,6 @@ jobs: - { build_machine: ubuntu-22.04, host_profile: android-21-armv7, ndk_version: 26.3.11579264 } - { build_machine: ubuntu-22.04, host_profile: android-21-x86, ndk_version: 26.3.11579264 } - { build_machine: ubuntu-22.04, host_profile: android-21-x86_64, ndk_version: 26.3.11579264 } - # Known not working build configurations - # Would be cool to actually solve odrcore/1.0.0 for Android - exclude: - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py", "test_conanfile": "recipes/odrcore/all/test_package/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-23-armv8, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py", "test_conanfile": "recipes/odrcore/all/test_package/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-23-armv7, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py", "test_conanfile": "recipes/odrcore/all/test_package/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-23-x86, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py", "test_conanfile": "recipes/odrcore/all/test_package/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-23-x86_64, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py", "test_conanfile": "recipes/odrcore/all/test_package/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-21-armv8, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py", "test_conanfile": "recipes/odrcore/all/test_package/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-21-armv7, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py", "test_conanfile": "recipes/odrcore/all/test_package/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-21-x86, ndk_version: 26.3.11579264 } - - package: { "package_reference": "odrcore/1.0.0", "package": "odrcore", "version": "1.0.0", "conanfile": "recipes/odrcore/all/conanfile.py", "test_conanfile": "recipes/odrcore/all/test_package/conanfile.py" } - config: { build_machine: ubuntu-22.04, host_profile: android-21-x86_64, ndk_version: 26.3.11579264 } steps: - name: checkout uses: actions/checkout@v4 diff --git a/recipes/odrcore/all/conandata.yml b/recipes/odrcore/all/conandata.yml index c31c559..2578c04 100644 --- a/recipes/odrcore/all/conandata.yml +++ b/recipes/odrcore/all/conandata.yml @@ -37,6 +37,12 @@ patches: - patch_file: "patches/1.0.0-0001-fix-cmake-install.patch" patch_description: "Fix header install in CMakeLists.txt" patch_type: "conan" + - patch_file: "patches/1.0.0-0002-fix-glog-stacktrace-misdetection.patch" + patch_description: "Glog checks if execinfo.h is available and if it is - expects backtrace to be there, but backtrace is only available from Android API 33" + patch_type: "conan" + - patch_file: "patches/1.0.0-0003-fix-cryptopp-cpu-features.patch" + patch_description: "Cryptopp expects cpu-features.h and .c to be in the source dir, prepare them" + patch_type: "conan" "2.0.0": - patch_file: "patches/2.0.0-0001-fix-cmake-uchardet.patch" patch_description: "Fix broken dependency in CMakeLists.txt" diff --git a/recipes/odrcore/all/patches/1.0.0-0002-fix-glog-stacktrace-misdetection.patch b/recipes/odrcore/all/patches/1.0.0-0002-fix-glog-stacktrace-misdetection.patch new file mode 100644 index 0000000..196cec8 --- /dev/null +++ b/recipes/odrcore/all/patches/1.0.0-0002-fix-glog-stacktrace-misdetection.patch @@ -0,0 +1,16 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -59,6 +59,13 @@ + FetchContent_GetProperties(glog) + if(NOT glog_POPULATED) + FetchContent_Populate(glog) ++ file(READ ${glog_SOURCE_DIR}/CMakeLists.txt GLOG_CMAKELISTS) ++ string(REPLACE ++ "check_include_file (execinfo.h HAVE_EXECINFO_H)" ++ "if(NOT ANDROID)\n check_include_file (execinfo.h HAVE_EXECINFO_H)\n endif()" ++ GLOG_CMAKELISTS ++ "${GLOG_CMAKELISTS}") ++ file(WRITE ${glog_SOURCE_DIR}/CMakeLists.txt "${GLOG_CMAKELISTS}") + set(BUILD_TESTING OFF CACHE BOOL "" FORCE) + add_subdirectory(${glog_SOURCE_DIR} ${glog_BINARY_DIR} EXCLUDE_FROM_ALL) + endif() diff --git a/recipes/odrcore/all/patches/1.0.0-0003-fix-cryptopp-cpu-features.patch b/recipes/odrcore/all/patches/1.0.0-0003-fix-cryptopp-cpu-features.patch new file mode 100644 index 0000000..8f23ebd --- /dev/null +++ b/recipes/odrcore/all/patches/1.0.0-0003-fix-cryptopp-cpu-features.patch @@ -0,0 +1,13 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -89,6 +89,10 @@ + FetchContent_GetProperties(cryptopp) + if(NOT cryptopp_POPULATED) + FetchContent_Populate(cryptopp) ++ if (DEFINED CMAKE_ANDROID_NDK) ++ file(COPY ${CMAKE_ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c DESTINATION ${cryptopp_SOURCE_DIR}) ++ file(COPY ${CMAKE_ANDROID_NDK}/sources/android/cpufeatures/cpu-features.h DESTINATION ${cryptopp_SOURCE_DIR}) ++ endif(DEFINED CMAKE_ANDROID_NDK) + set(BUILD_TESTING OFF CACHE BOOL "" FORCE) + add_subdirectory(${cryptopp_SOURCE_DIR} ${cryptopp_BINARY_DIR} EXCLUDE_FROM_ALL) + endif()