mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-16 06:40:51 +00:00
- Fixes https://github.com/termux/termux-packages/issues/27349 - Fixes build error `ld.lld: error: undefined symbol: cmCPackAppImageGenerator::cmCPackAppImageGenerator()` - The error is related to the new upstream feature "CPack AppImage generator". https://cmake.org/cmake/help/latest/cpack_gen/appimage.html There are two possible ways to fix it. One would be by entirely disabling all code related to the feature from the Termux build, and the other is to just fix the linking error, which is what this patch does. - Currently, the feature is not useful on Android because AppImage is unimplemented for Termux or Android, but in my opinion it is better to leave the feature enabled in the code, since actually, it is theoretically possible for there to be a Termux/Android AppImage, just nobody to my knowledge has ever successfully made one. All that would be necessary for AppImage to be possible on Android would be for someone to fully implement a port of the `appimagetool` command. I tried to before in the past, but I wasn't able to completely make it work only because of problems that I believe are probably possible to fix some day with enough work. If the `appimagetool` command is implemented in the future by someone, CMake should be able to automatically detect and use it for this feature.
58 lines
2.5 KiB
Bash
58 lines
2.5 KiB
Bash
TERMUX_PKG_HOMEPAGE=https://cmake.org/
|
|
TERMUX_PKG_DESCRIPTION="Family of tools designed to build, test and package software"
|
|
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
|
TERMUX_PKG_LICENSE_FILE="LICENSE.rst"
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
|
# When updating version here, please update termux_setup_cmake.sh as well.
|
|
TERMUX_PKG_VERSION="4.2.0"
|
|
TERMUX_PKG_SRCURL=https://www.cmake.org/files/v${TERMUX_PKG_VERSION:0:3}/cmake-${TERMUX_PKG_VERSION}.tar.gz
|
|
TERMUX_PKG_SHA256=4104e94657d247c811cb29985405a360b78130b5d51e7f6daceb2447830bd579
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
|
TERMUX_PKG_DEPENDS="libarchive, libc++, libcurl, libexpat, jsoncpp, libuv, rhash, zlib"
|
|
TERMUX_PKG_RECOMMENDS="clang, make"
|
|
TERMUX_PKG_FORCE_CMAKE=true
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
|
-DSPHINX_MAN=ON
|
|
-DCMAKE_MAN_DIR=share/man
|
|
-DCMAKE_DOC_DIR=share/doc/cmake
|
|
-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_LIBRHASH=ON
|
|
-DCMAKE_USE_SYSTEM_LIBUV=ON
|
|
-DCMAKE_USE_SYSTEM_ZLIB=ON
|
|
-DBUILD_CursesDialog=ON"
|
|
|
|
termux_pkg_auto_update() {
|
|
local TERMUX_SETUP_CMAKE="${TERMUX_SCRIPTDIR}/scripts/build/setup/termux_setup_cmake.sh"
|
|
local TERMUX_REPOLOGY_DATA_FILE=$(mktemp)
|
|
python3 "${TERMUX_SCRIPTDIR}"/scripts/updates/api/dump-repology-data \
|
|
"${TERMUX_REPOLOGY_DATA_FILE}" "${TERMUX_PKG_NAME}" >/dev/null || \
|
|
echo "{}" > "${TERMUX_REPOLOGY_DATA_FILE}"
|
|
local latest_version=$(jq -r --arg packageName "${TERMUX_PKG_NAME}" '.[$packageName]' < "${TERMUX_REPOLOGY_DATA_FILE}")
|
|
if [[ "${latest_version}" == "null" ]]; then
|
|
latest_version="${TERMUX_PKG_VERSION}"
|
|
fi
|
|
if [[ "${latest_version}" == "${TERMUX_PKG_VERSION}" ]]; then
|
|
echo "INFO: No update needed. Already at version '${TERMUX_PKG_VERSION}'."
|
|
rm -f "${TERMUX_REPOLOGY_DATA_FILE}"
|
|
return
|
|
fi
|
|
rm -f "${TERMUX_REPOLOGY_DATA_FILE}"
|
|
|
|
local TERMUX_CMAKE_TARNAME="cmake-${latest_version}-linux-x86_64.tar.gz"
|
|
local TERMUX_CMAKE_URL="https://github.com/Kitware/CMake/releases/download/v${latest_version}/${TERMUX_CMAKE_TARNAME}"
|
|
local TERMUX_CMAKE_TARFILE=$(mktemp)
|
|
curl -Ls "${TERMUX_CMAKE_URL}" -o "${TERMUX_CMAKE_TARFILE}"
|
|
local TERMUX_CMAKE_SHA256=$(sha256sum "${TERMUX_CMAKE_TARFILE}" | cut -d" " -f1)
|
|
sed \
|
|
-e "s|local TERMUX_CMAKE_VERSION=.*|local TERMUX_CMAKE_VERSION=${latest_version}|" \
|
|
-e "s|local TERMUX_CMAKE_SHA256=.*|local TERMUX_CMAKE_SHA256=${TERMUX_CMAKE_SHA256}|" \
|
|
-i "${TERMUX_SETUP_CMAKE}"
|
|
rm -f "${TERMUX_CMAKE_TARFILE}"
|
|
|
|
termux_pkg_upgrade_version "${latest_version}"
|
|
}
|