From 6accd4396e897e374a018410eba1aa5232119044 Mon Sep 17 00:00:00 2001 From: Yaksh Bariya Date: Sat, 2 Apr 2022 09:04:01 +0530 Subject: [PATCH] fixup(cmake): Do not depend on dependencies of libcurl and libarchive Do not pass `-DCMAKE_USE_SYSTEM_{BZIP2,LIBLZMA,NGHTTP2,ZSTD}` to cmake. libbz2 and liblzma are dependencies of libarchive. CMake does have an option to use zstd because libarchive supports linking to zstd (as a side note, we are building libarchive without zstd). libnghttp2 is dependency of libcurl. CMake's CMakeLists.txt does have options for these libraries in case we are not using shared libarchive and libcurl but wish to link against shared libraries of dependencies of libcurl and libarchive. In case we tell CMake to use shared libarchive and libcurl, these options are basically ignored (i.e. they don't anyway affect the build), which we are doing right now. So there's no need of these options at all! Lastly, `-DCMAKE_USE_SYSTEM_ZLIB` needs to be specified because CMake does directly link against zlib. Perhaps making this option depend on `"NOT CMAKE_USE_SYSTEM_LIBARCHIVE;NOT CMAKE_USE_SYSTEM_CURL"` in CMakeLists.txt:197 is a mistake. Reporting this to upstream might make sense --- packages/cmake/build.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/cmake/build.sh b/packages/cmake/build.sh index 9a4e0ae63..a72029140 100644 --- a/packages/cmake/build.sh +++ b/packages/cmake/build.sh @@ -4,21 +4,18 @@ TERMUX_PKG_LICENSE="BSD 3-Clause" TERMUX_PKG_MAINTAINER="@termux" # When updating version here, please update termux_setup_cmake.sh as well. TERMUX_PKG_VERSION=3.23.0 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://www.cmake.org/files/v${TERMUX_PKG_VERSION:0:4}/cmake-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=5ab0a12f702f44013be7e19534cd9094d65cc9fe7b2cd0f8c9e5318e0fe4ac82 -TERMUX_PKG_DEPENDS="clang, libarchive, libc++, libcurl, libexpat, jsoncpp, liblzma, libnghttp2, libuv, make, rhash, zlib, zstd" +TERMUX_PKG_DEPENDS="clang, libarchive, libc++, libcurl, libexpat, jsoncpp, libuv, make, rhash, zlib" TERMUX_PKG_FORCE_CMAKE=true TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --DCMAKE_USE_SYSTEM_BZIP2=ON -DCMAKE_USE_SYSTEM_CURL=ON -DCMAKE_USE_SYSTEM_EXPAT=ON -DCMAKE_USE_SYSTEM_FORM=ON -DCMAKE_USE_SYSTEM_JSONCPP=ON -DCMAKE_USE_SYSTEM_LIBARCHIVE=ON --DCMAKE_USE_SYSTEM_LIBLZMA=ON -DCMAKE_USE_SYSTEM_LIBRHASH=ON -DCMAKE_USE_SYSTEM_LIBUV=ON --DCMAKE_USE_SYSTEM_NGHTTP2=ON -DCMAKE_USE_SYSTEM_ZLIB=ON --DCMAKE_USE_SYSTEM_ZSTD=ON -DBUILD_CursesDialog=ON"