diff --git a/app/src/main/cpp/0001-Don-t-build-other-binaries.patch b/app/src/main/cpp/0001-Don-t-build-other-binaries.patch new file mode 100644 index 000000000..61039e9aa --- /dev/null +++ b/app/src/main/cpp/0001-Don-t-build-other-binaries.patch @@ -0,0 +1,52 @@ +From d1db03ebd9989d10a5a905b792b712c6487a0057 Mon Sep 17 00:00:00 2001 +From: FooIbar <118464521+FooIbar@users.noreply.github.com> +Date: Sat, 24 Feb 2024 12:03:15 +0000 +Subject: [PATCH] Don't build other binaries + +--- + CMakeLists.txt | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a346dd02..52b5d0d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1567,7 +1567,7 @@ endif() + # xzdec and lzmadec + ############################################################################# + +-if(HAVE_DECODERS AND (NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900)) ++if(0) + foreach(XZDEC xzdec lzmadec) + add_executable("${XZDEC}" + src/common/sysdefs.h +@@ -1624,7 +1624,7 @@ endif() + # lzmainfo + ############################################################################# + +-if(HAVE_DECODERS AND (NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900)) ++if(0) + add_executable(lzmainfo + src/common/sysdefs.h + src/common/tuklib_common.h +@@ -1680,7 +1680,7 @@ endif() + # xz + ############################################################################# + +-if(NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900) ++if(0) + add_executable(xz + src/common/mythread.h + src/common/sysdefs.h +@@ -1914,7 +1914,7 @@ endif() + # Scripts + ############################################################################# + +-if(UNIX) ++if(0) + # NOTE: This isn't as sophisticated as in the Autotools build which + # uses posix-shell.m4 but hopefully this doesn't need to be either. + # CMake likely won't be used on as many (old) obscure systems as the +-- +2.34.1 + diff --git a/app/src/main/cpp/CMakeLists.txt b/app/src/main/cpp/CMakeLists.txt index 3faa70207..a6ae26bae 100644 --- a/app/src/main/cpp/CMakeLists.txt +++ b/app/src/main/cpp/CMakeLists.txt @@ -20,8 +20,9 @@ option(BUILD_TESTING OFF) FetchContent_Declare( liblzma - GIT_REPOSITORY https://github.com/FooIbar/xz.git + GIT_REPOSITORY https://git.tukaani.org/xz.git GIT_TAG v5.6.1 + PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/0001-Don-t-build-other-binaries.patch || cd . ) FetchContent_MakeAvailable(liblzma)